Hi I wanted to know the status of OpenMP (or in general auto parallelization) support in LLVM. I read some threads discussing about possible effort in that direction in 3.1 onwards, but did not see any further discussion on that. If someone in the list knows the updated info or can point me to any useful info, that would be useful. Thanks Regards Prakash Raghavendra -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120704/e6bc283e/attachment.html>
On 07/04/2012 10:35 AM, Raghavendra, Prakash wrote:> Hi > > I wanted to know the status of OpenMP (or in general auto > parallelization) support in > > LLVM. > > I read some threads discussing about possible effort in that direction > in 3.1 onwards, > > but did not see any further discussion on that. > > If someone in the list knows the updated info or can point me to any > useful info, > > that would be useful.Hi Prakash, OpenMP consists of several things: a) Support for parsing C/FORTRAN OpenMP pragmas For clang (the C frontend) there are patches available from Simone Pellegrini <spellegrini at dps.uibk.ac.at>. They have not been reviewed and are based on a very generic pragma infrastructure. This is especially nice for research, but it needs to be evaluated if this generic implementation has performance impacts that are too large for production codes. With dragonegg FORTRAN and C code (including OpenMP pragmas) can be lowered to LLVM-IR. b) Support for representing OpenMP in LLVM-IR There is no specific support in LLVM-IR for OpenMP. Currently OpenMP is represented as a bunch of function calls to a specific openmp run time library. It might be nice to formalize this more to represent OpenMP code in a runtime independent way and to allow the inlining of simple openmp runtime calls directly into the code. c) An OpenMP runtime There are two open source runtimes I am aware of. The GNU OpenMP runtime and MPC [1]. Both are interesting, but we need to be careful with the licenses. d) Automatic Parallelization - There is Polly [2] which I am working on. Polly can automatically parallelize SCoPs. It uses the algorithm developed in Pluto [3] for this. - There are a couple of research projects working on speculative parallelization. "Jimborean Alexandra" from Strasbourg was e.g. working on this. - There is a project called "Parallelization for LLVM" [4]. They have a lot of interesting stuff on the website, but I am not sure about the progress. Preston should be able to give details here. Cheers Tobi [1] http://mpc.sourceforge.net/ [2] http://polly.sf.net [3] pluto-compiler.sourceforge.net/ [4] https://sites.google.com/site/parallelizationforllvm/
On Wed, Jul 4, 2012 at 8:57 AM, Tobias Grosser <tobias at grosser.es> wrote:> - There is a project called "Parallelization for LLVM" [4]. They have a > lot of interesting stuff on the website, but I am not sure about the > progress. Preston should be able to give details here. > > [4] https://sites.google.com/site/parallelizationforllvm/I'm at an early stage, still working on dependence analysis. While the dependence analysis is coming along well, actual loop transformations based on the analysis are a ways out. Preston
Hi Tobi Thanks a lot for your detailed update on the status of OpenMP in LLVM. It looks like there is no "official" support of OpenMP in LLVM 3.x at least. In your descriptive list, I can see that [a] is an optional patch or available in GCC, [b] & [c] are available as optional runtimes (which have to be carefully bundled). [d] anyway is little different from OpenMP (can exist without OpenMP support in fact). Thanks Regards Prakash -----Original Message----- From: Tobias Grosser [mailto:tobias at grosser.es] Sent: Wednesday, July 04, 2012 9:27 PM To: Raghavendra, Prakash Cc: llvmdev at cs.uiuc.edu; preston.briggs at gmail.com Subject: Re: [LLVMdev] OpenMP/autopar support in LLVM On 07/04/2012 10:35 AM, Raghavendra, Prakash wrote:> Hi > > I wanted to know the status of OpenMP (or in general auto > parallelization) support in > > LLVM. > > I read some threads discussing about possible effort in that direction > in 3.1 onwards, > > but did not see any further discussion on that. > > If someone in the list knows the updated info or can point me to any > useful info, > > that would be useful.Hi Prakash, OpenMP consists of several things: a) Support for parsing C/FORTRAN OpenMP pragmas For clang (the C frontend) there are patches available from Simone Pellegrini <spellegrini at dps.uibk.ac.at>. They have not been reviewed and are based on a very generic pragma infrastructure. This is especially nice for research, but it needs to be evaluated if this generic implementation has performance impacts that are too large for production codes. With dragonegg FORTRAN and C code (including OpenMP pragmas) can be lowered to LLVM-IR. b) Support for representing OpenMP in LLVM-IR There is no specific support in LLVM-IR for OpenMP. Currently OpenMP is represented as a bunch of function calls to a specific openmp run time library. It might be nice to formalize this more to represent OpenMP code in a runtime independent way and to allow the inlining of simple openmp runtime calls directly into the code. c) An OpenMP runtime There are two open source runtimes I am aware of. The GNU OpenMP runtime and MPC [1]. Both are interesting, but we need to be careful with the licenses. d) Automatic Parallelization - There is Polly [2] which I am working on. Polly can automatically parallelize SCoPs. It uses the algorithm developed in Pluto [3] for this. - There are a couple of research projects working on speculative parallelization. "Jimborean Alexandra" from Strasbourg was e.g. working on this. - There is a project called "Parallelization for LLVM" [4]. They have a lot of interesting stuff on the website, but I am not sure about the progress. Preston should be able to give details here. Cheers Tobi [1] http://mpc.sourceforge.net/ [2] http://polly.sf.net [3] pluto-compiler.sourceforge.net/ [4] https://sites.google.com/site/parallelizationforllvm/
Apparently Analagous Threads
- [LLVMdev] OpenMP/autopar support in LLVM
- [LLVMdev] OpenMP/autopar support in LLVM
- [LLVMdev] Proposal: Generic auto-vectorization and parallelization approach for LLVM and Polly
- [LLVMdev] OpenMP Support for LLVM and clang
- [LLVMdev] Multithreaded code generation