Skip to content

Commit

Permalink
Fix compilation on arm64 (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitterion authored Jan 15, 2025
1 parent 096f98e commit 6cf701e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/cubecl-hip/src/compute/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ impl HipContext {
let include_option_cstr = CString::new(include_option).unwrap();
// needed for rocWMMA extension to compile
let cpp_std_option_cstr = CString::new("--std=c++17").unwrap();
let mut options: Vec<*const i8> =
vec![cpp_std_option_cstr.as_ptr(), include_option_cstr.as_ptr()];
let mut options = vec![cpp_std_option_cstr.as_ptr(), include_option_cstr.as_ptr()];
unsafe {
let options_ptr = options.as_mut_ptr();
let status =
Expand All @@ -413,7 +412,7 @@ impl HipContext {
status, hiprtcResult_HIPRTC_SUCCESS,
"Should retrieve the compilation log size"
);
let mut log_buffer = vec![0i8; log_size];
let mut log_buffer = vec![0; log_size];
let status = cubecl_hip_sys::hiprtcGetProgramLog(program, log_buffer.as_mut_ptr());
assert_eq!(
status, hiprtcResult_HIPRTC_SUCCESS,
Expand Down Expand Up @@ -446,7 +445,7 @@ impl HipContext {
"Should get size of compiled code"
);
}
let mut code = vec![0i8; code_size];
let mut code = vec![0; code_size];
unsafe {
let status = cubecl_hip_sys::hiprtcGetCode(program, code.as_mut_ptr());
assert_eq!(
Expand Down

0 comments on commit 6cf701e

Please sign in to comment.