Results 1 to 2 of 2

Thread: OpenCl+llvm+clang

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    1

    OpenCl+llvm+clang

    Hello

    I'm trying to wrap my head around all of this and all I read is only getting me more and more confused. Comprehensive information about OpenCl and compilation of its code is rather endangered species( common for new relatively new technology I guess).

    Is there any way of compiling OpenCl code with the use of llvm+clang? After all it is used by Apple/Nvidia/RapidMind for their implementations of OpenCL.
    Do I really need driver for OpenCL provided by Nvidia to make use of OpenCL?
    Second question comes from actual hardware I right now poses. It's 7 series which is not obviously "CUDA-enabled" thus not supported by OpenCL driver from Nvidia.

    Thank is advance for shedding any light on those questions
    Cheers.

    On another note. This is rather different story, but comes to my mind. Ignore it if it there's too weak connection with questions above.
    According to GPU Gems, series of n40 GPUs are actually programmable in GPGPU context ( via HSLS AFAIR right). How does this comply in the light of OpenCL?

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: OpenCl+llvm+clang

    If llvm+clang support the opencl dialect of C then you should be able to compile them. However, to actually use these kernels you will need support for the built-in functions (such as get_global_id(); which implies a runtime) and all the math functions (and there are a lot of them). With llvm+clang supporting most if not all of opencl today, the hard part for implementing OpenCL is really the math libraries and interacting with the GPUs themselves. The former is hard to get right, and very hard to make fast, while the latter is exceedingly difficult to do without vendor support.

    As to your question about older GPUs, the real limiting factor is what the hardware supports. OpenCL puts no limitation on program length, pointer indirection, or control flow, so if those are not supported to arbitrary degrees by the hardware, it will never be CL compatible.

Similar Threads

  1. OpenCL device fission to LLVM-IR
    By barun.parichha in forum OpenCL
    Replies: 2
    Last Post: 07-23-2012, 11:04 PM
  2. Implementation of OpenCL in clang
    By mariusC in forum OpenCL
    Replies: 3
    Last Post: 02-04-2011, 09:27 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
  •