Questions about global and local work size

Viewed 61102

Searching through the NVIDIA forums I found these questions, which are also of interest to me, but nobody had answered them in the last four days or so. Can you help?

Original Forum Post

Digging into OpenCL reading tutorials some things stayed unclear for me. Here is a collection of my questions regarding local and global work sizes.

  1. Must the global_work_size be smaller than CL_DEVICE_MAX_WORK_ITEM_SIZES? On my machine CL_DEVICE_MAX_WORK_ITEM_SIZES = 512, 512, 64.

  2. Is CL_KERNEL_WORK_GROUP_SIZE the recommended work_group_size for the used kernel?

    1. Or is this the only work_group_size the GPU allows? On my machine CL_KERNEL_WORK_GROUP_SIZE = 512
  3. Do I need to divide into work groups or can I have only one, but not specifying local_work_size?

    1. To what do I have to pay attention, when I only have one work group?
  4. What does CL_DEVICE_MAX_WORK_GROUP_SIZE mean? On my machine CL_DEVICE_MAX_WORK_GROUP_SIZE = 512, 512, 64

    1. Does this mean, I can have one work group which is as large as the CL_DEVICE_MAX_WORK_ITEM_SIZES?
  5. Has global_work_size to be a divisor of CL_DEVICE_MAX_WORK_ITEM_SIZES? In my code global_work_size = 20.

1 Answers
Related