Reputation: 607
Let us say I have 8 cores in total in my GPU. What I want is that I run two kernels in parallel (or if not possible then at least concurrently) on each of 4 cores. Is it possible? if yes how do we do this in OpenCL?
Upvotes: 2
Views: 1095
Reputation: 1814
Abitlity to run multiple OpenCL kernels at once is determined by hardware. Latest AMD & Nvidia cards can do that. At least you need such device & multiple command queues, in which you enqueue kernels execution. Look at this: How do I know if the kernels are executing concurrently?
Division of your GPU is called Device Fission. It's supported in OpenCL 1.1 as extension and comes out of the box in OpenCL 1.2. AFAIK, it's not supported for GPU by main vendors, though, CPU can be easily diced up into sub-devices. Correspondend API call is clCreateSubDevices. Good article on this theme: OpenCL* Device Fission for CPU Performance by Intel.
Upvotes: 2