[LLVMdev] translating from OpenMP to CUDA

Hal Finkel hfinkel at anl.gov
Sat Nov 10 14:44:20 PST 2012


----- Original Message -----
> From: "Justin Holewinski" <justin.holewinski at gmail.com>
> To: "Apala Guha" <aguha at uchicago.edu>
> Cc: llvmdev at cs.uiuc.edu
> Sent: Friday, November 9, 2012 4:22:02 PM
> Subject: Re: [LLVMdev] translating from OpenMP to CUDA
> 
> 
> The PTX back-end is robust (it's based on the sources used by nvcc),
> but I'm not sure about the OpenMP representation in LLVM IR. I
> believe the OpenMP constructs are already lowered into libgomp calls
> before leaving DragonEgg. It's been awhile since I've loooked at it
> though.

This is correct. dragonegg will turn the OpenMP pragmas into calls to libgomp. Unfortunately, these calls won't help you directly with the PTX backend (because there is no libgomp that runs on the GPU).

 -Hal

> 
> 
> If you use the PTX back-end and have any issues, please don't
> hesitate to post to the list and cc: me at jholewinski at nvidia.com
> 
> 
> 
> On Thu, Nov 8, 2012 at 8:05 AM, Apala Guha < aguha at uchicago.edu >
> wrote:
> 
> 
> 
> 
> 
> 
> Hi,
> 
> 
> 
> Is it possible to translate an OpenMP program to CUDA using LLVM? I
> read that dragonegg has a OpenMP front-end and LLVM has a PTX
> back-end. I don’t know how mature these tools are. Please let me
> know. Thanks.
> 
> 
> 
> -Apala
> 
> 
> 
> Postdoctoral Scholar
> 
> Department of Computer Science, University of Chicago
> 
> Computation Institute, Argonne National Laboratory
> 
> http://sites.google.com/site/apalaguha/home/
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 
> 
> 
> 
> --
> 
> 
> Thanks,
> 
> 
> Justin Holewinski
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list