I just got my first OpenCL code working. There are still a lot of things needed to be fine tuned and digested. One of those is the CPU load when running the code on a multicore CPU.
My computer has an intel quad-core (Q6700) CPU and a Radeon 4650 card, I first called clGetPlatformIDs() and it returned 1 platform, called "ATI Stream". Then, I used clCreateContextFromType() created a CPU context from this platform. Calliing clGetContextInfo() returned 4 devices, which I assume they are the 4 cores of the CPU. Then, I created a command queue for device, I thought that it attached a queue for the first core of the CPU. However, when I launched my kernel for this command queue, I saw my CPU load jumped to 400%, indicating all cores are used.
Can anyone explain to me what happened? do you expect the call
[code]commands=clCreateCommandQueue(context,devices ... )[/code]
limit all the subsequent computation to a single core of the CPU? or stream sdk is smart enough to expand it to all available devices within this context?
In addition, my card is supposed to have 320 cores, but when I ran CLInfo, it showed only 8 compute units. is this right? (running my code on GPU was a lot slower than CPU )