-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
cudarc CUStream_st and cuda_runtime
#188
Comments
You aren't doing anything incorrectly - this is just a outcome of using multiple bindgens. bindgen might have a built in way to handle this but I haven't looked into it in depth. Since most (if not all?) of the CUDA types are pointers underneath the hood, you can just cast it to the correct bindgen type: Try this: add_kernel_default(
stream,
*x.device_ptr() as _, // rust should auto infer the correct pointer type here
*y.device_ptr() as _,
*out.device_ptr_mut(),
N.try_into().unwrap(),
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the great crate!
2 quick questions:
CUDA C
library that generatesCUStream_st
andCUStream
types becausecuda_runtime
is included in the originating header.Briefly, the library is used to launch kernels such as:
When calling this method, the stream type
CUStream
is defined inside the generatedbindgen
bindings. This conflicts with thecudarc
CUStream_st
andCUstream
types that I get through thedevice.cu_stream()
, though the definitions are identical.What am I doing incorrectly, as this seems like a opaque blunder on my part?
cudarc
versions but this seems unnecessarily hacky.Thoughts?
Here is the complete code (where
launcher
contains the generated bindings for theC CUDA
lib):The text was updated successfully, but these errors were encountered: