Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expected *mut u8, found *mut i8 #2596

Open
adam-blip opened this issue Dec 8, 2024 · 4 comments
Open

expected *mut u8, found *mut i8 #2596

adam-blip opened this issue Dec 8, 2024 · 4 comments
Assignees

Comments

@adam-blip
Copy link

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/Tracel-AI/burn
  2. cargo run checks-all
    see error.log
    for detail

Expected behavior
compiling runs without error

Desktop (please complete the following information):

  • OS: ChromeOS latest / Debian container linux penguin 6.6.50-05090-g02ec56928355 refactor: create tape only during backprop #1 SMP PREEMPT Fri, 8 Nov 2024 00:13:13 +0000 aarch64 GNU/Linux
  • Browser chrome Version 130.0.6723.126 (Official Build) (64-Bit)

Additional context
tensor multiplication in 'getting started' example runs just fine

@adam-blip
Copy link
Author

using 0.15. release zip instead of git clone works fine

@laggui
Copy link
Member

laggui commented Dec 9, 2024

@syl20bnr looks like a cubecl HIP issue:

error[E0308]: mismatched types
   --> /home/user/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/1c4e003/crates/cubecl-hip/src/compute/server.rs:357:18
    |
357 |             vec![cpp_std_option_cstr.as_ptr(), include_option_cstr.as_ptr()];
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
    |
    = note: expected raw pointer `*const i8`
               found raw pointer `*const u8`

error[E0308]: mismatched types
    --> /home/user/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/1c4e003/crates/cubecl-hip/src/compute/server.rs:361:85
     |
361  | ...   cubecl_hip_sys::hiprtcCompileProgram(program, options.len() as i32, options_pt...
     |       ------------------------------------                                ^^^^^^^^^^^ expected `*mut *const u8`, found `*mut *const i8`
     |       |
     |       arguments to this function are incorrect
     |
     = note: expected raw pointer `*mut *const u8`
                found raw pointer `*mut *const i8`
note: function defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cubecl-hip-sys-0.0.7/src/bindings/bindings_622.rs:1407:12
     |
1407 |     pub fn hiprtcCompileProgram(
     |            ^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/user/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/1c4e003/crates/cubecl-hip/src/compute/server.rs:371:75
     |
371  | ... = cubecl_hip_sys::hiprtcGetProgramLog(program, log_buffer.as_mut_ptr());
     |       -----------------------------------          ^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut u8`, found `*mut i8`
     |       |
     |       arguments to this function are incorrect
     |
     = note: expected raw pointer `*mut u8`
                found raw pointer `*mut i8`
note: function defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cubecl-hip-sys-0.0.7/src/bindings/bindings_622.rs:1438:12
     |
1438 |     pub fn hiprtcGetProgramLog(
     |            ^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/user/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/1c4e003/crates/cubecl-hip/src/compute/server.rs:376:42
    |
376 |                 let log = CStr::from_ptr(log_buffer.as_ptr());
    |                           -------------- ^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`
note: associated function defined here
   --> /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ffi/c_str.rs:277:25

error[E0308]: mismatched types
    --> /home/user/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/1c4e003/crates/cubecl-hip/src/compute/server.rs:405:65
     |
405  | ...atus = cubecl_hip_sys::hiprtcGetCode(program, code.as_mut_ptr());
     |           -----------------------------          ^^^^^^^^^^^^^^^^^ expected `*mut u8`, found `*mut i8`
     |           |
     |           arguments to this function are incorrect
     |
     = note: expected raw pointer `*mut u8`
                found raw pointer `*mut i8`
note: function defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cubecl-hip-sys-0.0.7/src/bindings/bindings_622.rs:1449:12
     |
1449 |     pub fn hiprtcGetCode(prog: hiprtcProgram, code: *mut ::std::os::raw::c_cha...
     |            ^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `cubecl-hip` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...

/edit:

I didn't even notice the cargo run-checks-all command🤦 my brain mapped it to the usual ./run-checks all that is used everywhere

@syl20bnr syl20bnr self-assigned this Dec 10, 2024
@syl20bnr
Copy link
Member

syl20bnr commented Dec 10, 2024

@adam-blip What is this command cargo run checks-all ? I don't think we documented this command anywhere in the repository. Try cargo xtask validate or ./run-checks at the root of the repository. See CONTRIBUTING.md for more info.

@adam-blip
Copy link
Author

@syl20bnr looks like a cubecl HIP issue:

/edit:

I didn't even notice the cargo run-checks-all command🤦 my brain mapped it to the usual ./run-checks all that is used everywhere

Same here... dunno where that came from.
error stays the same with cargo xtask validate with git clone burn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants