Results 1 to 5 of 5

Thread: How does the OpenCL Platform model map to actual hardware?

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    How does the OpenCL Platform model map to actual hardware?

    I have a few questions as to how the OpenCL Platform model relates to the actual hardware:

    1. Does the OpenCL specification dictate what a compute unit or processing element has to correspond to on the actual hardware or is that left to the device vendor?[/*:m:2gve1397]
    2. What does a compute unit and processing element usually/always map to on a CPU, GPU and accelerator device respectively?[/*:m:2gve1397]
    3. Are there situations where it would be useful to know the number of processing elements a device has?[/*:m:2gve1397]
    4. Can I use the OpenCL API to query a device for its number of processing elements?[/*:m:2gve1397]

  2. #2
    Senior Member
    Join Date
    Mar 2011
    Location
    Seoul
    Posts
    118

    Re: How does the OpenCL Platform model map to actual hardwar

    1. The OpenCL specification dictates the capabilities of the hardware, e.g., minimum memory sizes, IEEE floating point compliance, scheduling control (mem fences and barriers), etc. It‘s then up to the vendor to design compute units and processing elements with those capabilities. For example, the vendor could put lots of independent logic flow control in the processing elements, but then that takes up more die space. So they may save die space by instead putting that control in the compute unit and make all processing elements run in SIMD. There is a wide range of options vendors have building with scalar processors and vector processors.

    2. A compute unit is some kind of core that can schedule and synchronize processing elements. A processing element it is some kind SIMD or SPMD unit with ALU(s) and SFU(s).

    3. If you know the frequency, number of compute units, and processing elements per compute unit, you could then calculate the theoretical peak FLOPS and try to load balance based on that info.

    4. You can do a device query for the PREFERRED_WORK_GROUP_MULTIPLE. This should tell you how many processing elements per compute unit. This is generally true for GPUs but I recently found that for CPUs Intel‘s platform says 16 while AMD‘s platform says 1, even for the same Intel i5 CPU device.

    Those are my quick answers but someone else may correct my understanding or fill in what I may have overlooked.

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    Re: How does the OpenCL Platform model map to actual hardwar

    Thank you for the reply.

    Quote Originally Posted by sean.settle
    You can do a device query for the PREFERRED_WORK_GROUP_MULTIPLE. This should tell you how many processing elements per compute unit.
    Hmm, I can't seem to find any such constant in the documentation.

    Quote Originally Posted by sean.settle
    This is generally true for GPUs but I recently found that for CPUs Intel‘s platform says 16 while AMD‘s platform says 1, even for the same Intel i5 CPU device.
    I sort of understand what the processing elements are on a GPU but what are they on a CPU?

  4. #4
    Member
    Join Date
    Jul 2011
    Location
    Moscow, Russia
    Posts
    41

    Re: How does the OpenCL Platform model map to actual hardwar

    PREFERRED_WORK_GROUP_SIZE_MULTIPLE is introduced in OpenCL 1.1. It is better to have workgroup size to be multiple of this value to avoid waisting device's resources. For GPU this value shows wavefront size. For CPU: AMD APP SDK is not able to auto-vectorize kernels so this value is 1 for them. Intel OpenCL SDK is able to auto-vectorize kernels so this value is 16 (or something) for this driver.
    Blog (in russian)

  5. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    Re: How does the OpenCL Platform model map to actual hardwar

    I see. Thank you.

    (Also found the constant in the docs now.)

Similar Threads

  1. Question about the OpenCL Platform
    By grimm in forum OpenCL
    Replies: 4
    Last Post: 06-15-2010, 01:11 PM
  2. Hardware/ platform support
    By martijn_himself in forum WebGL - General
    Replies: 3
    Last Post: 04-13-2010, 05:19 AM

Posting Permissions

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