Announcement

Collapse
No announcement yet.

A New OpenCL Back-End For LLVM Is Published

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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?

      Comment


      • #4
        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...

        Comment


        • #5
          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.

          Comment

          Working...
          X