PDA

View Full Version : how to run on cpu graphics card



prince
01-25-2013, 05:52 AM
in function below when i select CPU
clGetDeviceIDs(platform_id,CL_DEVICE_TYPE_CPU,1,&device_id,&num_of_devices)
then opencl program or kernel run on CPU or Graphics card of CPU?

thanks

chippies
01-28-2013, 10:38 AM
It will run on the CPU. If you want the GPU that is built into the CPU then you must specify CL_DEVICE_TYPE_GPU.

prince
01-28-2013, 08:57 PM
thank you
it means that if i am using 2 core CPU ,then it will utilize both core of CPU as it does in GPU (in which it utilizes all cores of GPU)

matthiasv
01-29-2013, 12:29 AM
It will also, if possible, vectorize your code to use suitable SSE or AVX instructions.

prince
01-29-2013, 09:09 AM
and if i do not write opencl program then program will use only single core of CPU
or more?

prince
02-06-2013, 03:24 AM
pls reply if anybody knows that
in function below when i select CPU
clGetDeviceIDs(platform_id,CL_DEVICE_TYPE_CPU,1,&device_id,&num_of_devices)
then opencl program or kernel run on CPU and if my CPU have 4 core than the kernel utilize 4 core or single core means then it will be termed as a sequential program on CPU or not?

thanks

clint3112
02-06-2013, 04:12 AM
it should be executed on all 4 cores and should also be optimized to sse if possible. See the intel/amd specs for that. Or just have a look at your Taskmanager

prince
02-06-2013, 07:43 AM
anybody have the ans.......

clint3112
02-07-2013, 03:09 AM
how many other answers do you need?

prince
02-07-2013, 07:06 AM
pls differentiate simple sequential c program and opencl CPU program ?
which should i compare with GPU ?
thanks

prince
02-07-2013, 07:27 AM
which should i compare with GPU and when ?
thanks

brian604
02-07-2013, 11:02 AM
which should i compare with GPU and when ?
thanks

Bump..
Anyone actually know the answer to this?

clint3112
02-08-2013, 12:43 AM
This depends on the tasks you want to compare. But in general i would say you have to compare openCL CPU with openCL GPU when you just want to see if your parallelization with openCL is faster on one Hardware or the other.
If you want to see if your algorithm runs faster in parallel than in sequential, you have to compare any openCL Device with your sequential execution