cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

angelko
Journeyman III

How can I run a kernel with cpu device ?

Hiiii,

I'm trying  to run a OpenCL code on multi2sim . I can run a kernel on gnu, like this :

ret = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU, 1, &device_id, &ret_num_devices);

But when I run a kernel on cpu device, there is a "load kernel program failed!" error.

I just change the " CL_DEVICE_TYPE_GPU" to "CL_DEVICE_TYPE_CPU"


How can this problem be solved?

How can I run a kernel with cpu device?

0 Likes
2 Replies
cgrant78
Adept III

The code you posted only shows query for the device ids. How was the OpenCL device created ? Are there any valid CPU device on the system ?

0 Likes
dipak
Big Boss

You may check OpenCL samples in AMD APP SDK. The samples can be run on cpu or gpu depending on command line argument "--device cpu/gpu" [please type "-h" or "--help" for more details].

Regards,

0 Likes