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/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121108/c32289b1/attachment.html>
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. 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121109/b4dadcdc/attachment.html>
Dear Apala, Have you heard of OpenACC? That's an OpenMP-like set of directives specially tuned for accelerators: data regions, implicit or explicit memory copyins/copyouts, gangs/vectors, etc. Developing your idea further, in fact, leads to implementing an OpenACC frontend for LLVM. PTX backend is definitely a necessary ingredient. Besides it, at some point you would still need to develop a loop analysis system. Two projects are doing related work: Polly [1] and KernelGen [2,3]. [1] http://polly.llvm.org/ [2] http://kernelgen.org/ [3] http://kernelgen.org/ncar2012/ 2012/11/9 Justin Holewinski <justin.holewinski at gmail.com>:> 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. > > 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 >
----- 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