3 Replies Latest reply on May 31, 2011 11:43 AM by himanshu.gautam

    OpenCL kernel

    evk8888
      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

       

       

        • OpenCL kernel
          himanshu.gautam

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

          You cannot use clEnqueueTask inside kernels.

            • OpenCL kernel
              evk8888

              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

                • OpenCL kernel
                  himanshu.gautam

                  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.