Results 1 to 3 of 3

Thread: How to get the warp/wavefront size in runtime?

  1. #1

    How to get the warp/wavefront size in runtime?

    Is it possible to get the warp/wavefront size in runtime?

    (I need it inside the kernel so a predefined macro would be great, but if it's only possible to find this value at the host side than I can pass it to the kernel at compilation time.)

    Thanks in advance,
    Yoav

  2. #2
    Junior Member
    Join Date
    Dec 2011
    Posts
    15

    Re: How to get the warp/wavefront size in runtime?

    Hi,
    I don't think these concepts exist in OpenCL. While I accept that in some underlying hardware
    they will exist, they are not universal. If you desperately need them AND you know you will only
    ever use NVIDIA or AMD cards then you can assume the warp size is 32 for NVIDIA and I think
    the wavefront size is 64 for AMD. You can test before starting your kernel which platfom you
    are using by looking at the clGetDeviceInfo() and set the value appropriately.

    Saying all that, I would avoid developing codes that require this information.

    --
    jason

  3. #3

    Re: How to get the warp/wavefront size in runtime?

    The information can be usually be retrieved from the CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE parameter in the clGetKernelWorkGroupInfo(). Although this is theoretically kernel+device specific, I found that on NVIDIA and AMD GPUs it always returns the GPU warp/wavefront size.

Similar Threads

  1. warp size vs # of SPs per SM
    By jimmyz500 in forum OpenCL
    Replies: 3
    Last Post: 03-20-2013, 07:16 PM
  2. Array size at runtime
    By jeffheaton in forum OpenCL
    Replies: 2
    Last Post: 05-12-2010, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •