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?
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 ?
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,