cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

evk8888
Journeyman III

OpenCL kernel

What kind of CL constructs can the kernel have?

Hello,

 

I would like to know what all OpenCL constructs can be written inside the OPENCL kernels. I would like to know whether any kind of memory barriers  or events can be added? also whether clenqueuetask can be used inside the kernels? thank you.

vk

 

 

0 Likes
3 Replies
himanshu_gautam
Grandmaster

Refer to OpenCL spec 1.1. You can use barriers but only within a workgroup.

You cannot use clEnqueueTask inside kernels.

0 Likes

Thanks!! Also one more question, does out of order execution is supported yet? and whether clenqueuetask works if independent kernels (equal to the number of cores in the machine) are queued to the machine? (will the utilization be 100%) without using device fission..

 

thanks 

evk

0 Likes

out of order queue is currently not supported on AMD implementation.

I don't understand why you are interested in clEnqueueTask when clEnqueueNDRangeKernel gives you more programmability. I have never used clEnqueueTask so cannot say anything for sure.

But as per spec:

"clEnqueueTask is equivalent to calling clEnqueueNDRangeKernel with work_dim = 1, global_work_offset = NULL, global_work_size[0] set to 1, and local_work_size[0] set to 1."

So it should not be possible to run different tasks on different compute units of GPU. Also device fission is only there for CPUs so there you should be able to run many kernels.

0 Likes