Hi,
I wanted to use both CPU and GPU for my computations. But when i created context with the two detected devices, it does not provide any context. I get the context when i use either a GPU or a CPU, but not both. Ofcourse, i wanted to use seperate queues for both.
Does anyone know if there is any a SDK limitation on this?
I will try to create seperate contexts and queues for GPU and CPU and schedule same jobs on both. Any reason why that's not a good idea?
Thanks,
Vignyan
You should not have any problems in creating context with both CPU and GPU. Could you post the context creation code snippet which you have written?
Attaching the code.
devices[0] = cpu; devices[1] = gpu; context = clCreateContext(0, 2, devices, NULL, NULL, &status); mAssert(status, CL_SUCCESS, "Could not create context", HARD_ERROR); /*Attach a command queue to each device in this context*/ cpuQueue= clCreateCommandQueue(context, cpu, 0, &status); mAssert(status, CL_SUCCESS, "Could not command queue for CPU", HARD_ERROR); gpuQueue= clCreateCommandQueue(context, gpu, 0, &status); mAssert(status, CL_SUCCESS, "Could not command queue for GPU", HARD_ERROR);
You need to change your code to work with ICD. take a look at-
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71
vignyan,
In your code,
devices[0] = cpu;
devices[1] = gpu;
What are the datatypes of cpu and gpu?
Could you post your host side code?