-
Notifications
You must be signed in to change notification settings - Fork 74
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
Error: Kernel argument type mismatch vol 2 #160
Comments
Yeah your fix is exactly right and I'd be happy to merge a PR with those changes. I'm curious to know why you're wrapping the |
Great, I'll try to prepare something later. About the queue.kernel_builder("foo")
.arg(Uint::new(100))
.arg(Uint2::new(200, 300))
.arg(Uint2::new(400, 500))
.build() ... seemed more logical to me than just |
Hi, I've come up with this: https://github.com/Patryk27/ocl/commit/03086863e95e43033ae67f1530801cb57032e1a3 It seems to work correctly + using the macro makes the entire method more legible IMO - could you please take a look? Thanks! |
Yeah looks great. Go ahead and submit a pull request :) |
D'oh, I forgot about the PR itself :-) #161 |
Hi,
I've got following Rust and OpenCL code:
... which ends up with this, quite unexpected and counter-intuitive, run-time error:
Seems like the core of this problem lays in the
ArgType::matches()
method:cl_uint
is an alias foru32
, which has different type-id thanUint
- so even though this code is, in fact, correct and works just fine, it refuses to compile with the Intel's driver [1].I was able to successfully fix this with
TypeId::of::<cl_uint>() == type_id || TypeId::of::<Uint>() == type_id
and I might be able to prepare a complete fix (for other types) too, if you let me know that I'm doing it the right way (TM) :-)[1] The issue seems to occur only with the Intel's OpenCL driver - I've got an Nvidia card that runs the original code without any changes.
By the way: I'm aware of the #146 - I've created another one, because even though both problems end up with similar error message, the essence of both problems is different.
The text was updated successfully, but these errors were encountered: