Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Do Intel, AMD, and Nvidia really support OpenCL?

Tags:
  1. Dec 27, 2011 #1
    I'm working on a project using GPUs to simulate heat transfer. We are trying to create a superset which will execute on all the main architectures. How legit is OpenCL for this purpose?
     
  2. jcsd
  3. Dec 27, 2011 #2

    chiro

    User Avatar
    Science Advisor

    Hey Fusiontron.

    The way OpenGL works is that the graphics card vendor (i.e. ATI/nVidia/Intel etc) provide a code library (DLL file) that implements the actual routines that are created by the OpenGL standards board, of which many of the members are from graphics cards companies.

    What you have to do when you code the routines is query the DLL for the OpenGL version and any extensions that you wish to use.

    If the OpenGL is set to a specific version or greater than a specific version, you are gauranteed to have all the standardized features of that particular version.

    Basically you have to do two things:

    1) Query the supported version. If the version supports everything you need and the system has a version greater than or equal to your version, then you are done and you can guarantee that the code that relies on having that version will run ok.

    2) If you do not have a high enough implementation then you have to query for extensions and use them.

    Extensions are basically non-standard features that vendors implement. These features can be experimental or they can be highly optimized routines that make use of new features in the architecture of the graphics device itself.

    The features are vendor specific in most cases and in some cases you can use these extensions to do the same things that you can do in higher OpenGL version standards when the device has a lower standard. This is actually the kind of thing that was done in the video game Doom 3 to support the older video cards: custom extensions had to be used.

    In terms of computing with regard to graphics, there are OpenGL standards that gaurantee specific computational platforms which will be useful for you, since once the standard for your graphics card is guaranteed, you just run the same code for every card that adheres to the standard.

    I'm not sure about OpenCL specifically, but for OpenGL it is not hard to program GPU's and get results back if you use a high enough implementation.
     
  4. Dec 28, 2011 #3
    I can vouch for OpenCL. It's dependent on your graphics card. Some of the newer ones support OpenCL, from both ATI and Nvidia. I can also vouch for the fact that it is pretty difficult to program. Whether or not it's suited to your purpose <shrugs>, depending on the computational algorithm you use it may be. If your problem domain is already highly parallelizable, then GPU computing with OpenCL will work great for you. (You may need to designate a month or three to learning it if you've never had exposure to parallel computing before).

    OpenCL is about as legitimate as DirectX or CUDA, but unlike DirectX or CUDA, OpenCL was designed to be capable of working with a heterogeneous system of CPU's and GPUs. This means that it's capable of working with CPU's and GPUs from different vendors equally well.

    Which GPUs are you working with?
     
  5. Jan 2, 2012 #4
    Thanks for the responses. It looks like OpenCL will probably work for our project. I'm gonna visit the head of the project tomorrow to report to him these findings. Now, if anyone could hit me up with some good resources for learning it, then that'd be real helpful.
     
  6. Jan 2, 2012 #5
    GPU Computing Gems Emerald Edition:

    https://www.amazon.com/GPU-Computing-Gems-Emerald-Applications/dp/0123849888

    --- Should be a fantastic resource.

    Programming Massively Parallel Processors:

    https://www.amazon.com/Programming-...ssors-Hands/dp/0123814723/ref=pd_bxgy_b_img_c

    --- This introduces you to the concepts of parallel processing and terminology for the GPU. It spends a lot of time (the first several chapters) explaining concepts in CUDA, but the way of thinking is similar to OpenCL.


    OpenCL Khronos specification:

    http://www.khronos.org/registry/cl/

    --- This thing is your bible. Don't leave home without it.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Do Intel, AMD, and Nvidia really support OpenCL?
  1. OpenCL Questions (Replies: 1)

  2. Intel Galileo & IOT (Replies: 1)

Loading...