Skip to content

Commit 6cf701e

Browse files
authored
Fix compilation on arm64 (#413)
1 parent 096f98e commit 6cf701e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/cubecl-hip/src/compute/server.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,7 @@ impl HipContext {
399399
let include_option_cstr = CString::new(include_option).unwrap();
400400
// needed for rocWMMA extension to compile
401401
let cpp_std_option_cstr = CString::new("--std=c++17").unwrap();
402-
let mut options: Vec<*const i8> =
403-
vec![cpp_std_option_cstr.as_ptr(), include_option_cstr.as_ptr()];
402+
let mut options = vec![cpp_std_option_cstr.as_ptr(), include_option_cstr.as_ptr()];
404403
unsafe {
405404
let options_ptr = options.as_mut_ptr();
406405
let status =
@@ -413,7 +412,7 @@ impl HipContext {
413412
status, hiprtcResult_HIPRTC_SUCCESS,
414413
"Should retrieve the compilation log size"
415414
);
416-
let mut log_buffer = vec![0i8; log_size];
415+
let mut log_buffer = vec![0; log_size];
417416
let status = cubecl_hip_sys::hiprtcGetProgramLog(program, log_buffer.as_mut_ptr());
418417
assert_eq!(
419418
status, hiprtcResult_HIPRTC_SUCCESS,
@@ -446,7 +445,7 @@ impl HipContext {
446445
"Should get size of compiled code"
447446
);
448447
}
449-
let mut code = vec![0i8; code_size];
448+
let mut code = vec![0; code_size];
450449
unsafe {
451450
let status = cubecl_hip_sys::hiprtcGetCode(program, code.as_mut_ptr());
452451
assert_eq!(

0 commit comments

Comments
 (0)