Results 1 to 5 of 5

Thread: A New OpenCL Back-End For LLVM Is Published

  1. #1
    Join Date
    Jan 2007
    Posts
    15,112

    Default A New OpenCL Back-End For LLVM Is Published

    Phoronix: A New OpenCL Back-End For LLVM Is Published

    Besides the open-source AMD Radeon support for OpenCL finally taking shape, there's more good open-source OpenCL news: a newly open-sourced LLVM OpenCL back-end...

    http://www.phoronix.com/vr.php?view=MTA2NzM

  2. #2
    Join Date
    Nov 2008
    Location
    Madison, WI, USA
    Posts
    877

    Default

    Quote Originally Posted by phoronix View Post
    Phoronix: A New OpenCL Back-End For LLVM Is Published

    Besides the open-source AMD Radeon support for OpenCL finally taking shape, there's more good open-source OpenCL news: a newly open-sourced LLVM OpenCL back-end...

    http://www.phoronix.com/vr.php?view=MTA2NzM
    That's kinda cool. I like the idea of being able to input a parallel/vectorized algorithm into LLVM and hopefully getting CL kernels out the back end. Could make it easier to do the initial port of a parallel application to OpenCL.

  3. #3
    Join Date
    Jul 2007
    Posts
    100

    Default

    So, you write something in C++, and instead of compiling it for x86, you compile it for OpenCL and run it on the GPU?

    Does this mean that we're a step closer to applications automatically utilizing both the CPU and GPU at runtime?

  4. #4
    Join Date
    Mar 2012
    Posts
    1

    Default

    I do not quite understand the usefulness of such a project. So you are compiling whatever comes from a LLVM frontend to OpenCL code and run it on a GPU. For which reason? So you can transform code from any language to OpenCL code instead of writing OpenCL code in the first place?

    Also, you cannot just take code you wrote for a CPU and expect magic 100x speedup. Coding for a GPU is completely different. You need completely different algorithms to solve your problems and you need exact knowledge about the memory layout and capabilities for accessing memory addresses of your GPU. I'm not sure if this is what a LLVM backend can hide from you...

  5. #5
    Join Date
    Nov 2008
    Location
    Madison, WI, USA
    Posts
    877

    Default

    Quote Originally Posted by pdaw View Post
    I do not quite understand the usefulness of such a project. So you are compiling whatever comes from a LLVM frontend to OpenCL code and run it on a GPU. For which reason? So you can transform code from any language to OpenCL code instead of writing OpenCL code in the first place?

    Also, you cannot just take code you wrote for a CPU and expect magic 100x speedup. Coding for a GPU is completely different. You need completely different algorithms to solve your problems and you need exact knowledge about the memory layout and capabilities for accessing memory addresses of your GPU. I'm not sure if this is what a LLVM backend can hide from you...
    I'm not expecting a magic speedup, if anything the initial version will probably be slower than the original CPU code. But with that being said, if it handles getting the initial port to OpenCL done and lets you get on with the business of optimizing the generated for the specific devices/cpus you're targetting, I think that can be useful. Not everyone will want to use it, but it could be useful to some people.

Posting Permissions

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