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

custom_opencl fails with multiple scalar #118

Closed
cdeterman opened this issue Apr 4, 2018 · 2 comments
Closed

custom_opencl fails with multiple scalar #118

cdeterman opened this issue Apr 4, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@cdeterman
Copy link
Owner

I received an email detailing a bug with custom_opencl. When a user includes multiple scalars, the function will fail stating that the kernel arguments don't match. A reproducible example is shown below.

saxpy.cl

__kernel void SAXPY(__global float* x, __global float* y, float a, float b)
{
const int i = get_global_id(0);
y [i] += a * x [i];
}

R code

cl_args <- setup_opencl(objects = c("vclVector", "vclVector", "scalar","scalar"),
intents = c("IN", "OUT", "IN","IN"),
queues = list("SAXPY", "SAXPY", "SAXPY","SAXPY"),
kernel_maps = c("x", "y", "a","b"))
custom_opencl("saxpy.cl", cl_args, "float")

Returns the error:

error ("Error in custom_opencl("saxpy.cl", cl_args, "float") : Non OpenCL buffer kernel arguments don't match to initialized objects.").

Thanks to Tamas for reporting this bug to me.

@cdeterman cdeterman self-assigned this Apr 4, 2018
@cdeterman cdeterman added the bug label Apr 4, 2018
@cdeterman cdeterman added this to the 2.1.0 milestone Apr 4, 2018
@cdeterman
Copy link
Owner Author

This issue should be resolved now and will close once merged with the master branch.

@tamas-ferenci
Copy link

That indeed seems to solve the problem, thank you!

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

No branches or pull requests

2 participants