[LLVMdev] OpenCL kernel to bitcode

Stefanus Du Toit stefanus.dutoit at rapidmind.com
Tue Feb 10 11:48:47 PST 2009


Hi Vikram and Nico,

RapidMind is a user today of LLVM, and potentially in the future of  
OpenCL. We use LLVM for x86 code generation today, and intend to use  
OpenCL to access GPU devices in the future once vendor implementations  
of OpenCL are available.

There are currently no complete available implementations of OpenCL,  
but that will change soon. It is very likely that some of these  
implementations will be based on LLVM and related technologies.

OpenCL provides functionality to compile kernels written in OpenCL C  
(a language derived from C99 used to express computations in OpenCL)  
to some form of binary code, both at runtime and as a compile time  
tool. The specification does not say what that binary code should look  
like. LLVM IR is certainly an option for an OpenCL implementation, but  
so is native binary code for a specific hardware device, or any other  
IR or machine code representation. Currently there is no provision of  
portability of binary code between OpenCL implementations.

LLVM does not currently (to my knowledge) contain any functionality  
specific to OpenCL, but LLVM and Clang would provide a good starting  
point for (the language part of) an OpenCL implementation.

I hope that addresses your questions,

Stefanus

On 10-Feb-09, at 2:30 PM, Vikram S. Adve wrote:
> I don't think I ever saw a response to this message.  RapidMind
> reported that they are using OpenCL as well as LLVM but their press
> release wasn't clear about whether they do this.  I'd be interested in
> hearing from Stefanus or anyone else there about how you use OpenCL
> and whether it is compiled to LLVM.
>
> --Vikram
> Associate Professor, Computer Science
> University of Illinois at Urbana-Champaign
> http://llvm.org/~vadve
>
>
>
> On Feb 2, 2009, at 9:14 AM, Nico wrote:
>
>> Hi,
>>
>> is there any possibility to compile OpenCL kernels into LLVM-bitcode?
>>
>> Thanx,
>> Nico
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

--
Stefanus Du Toit <stefanus.dutoit at rapidmind.com>
   RapidMind Inc.
   phone: +1 519 885 5455 x116 -- fax: +1 519 885 1463






More information about the llvm-dev mailing list