[cfe-dev] CUDA again: what is supported (and what is not)

latzori luca.atzori at cern.ch
Thu Jun 11 09:50:11 PDT 2015

Hi all,

I'm trying to take stock of the situation about clang's CUDA support.

The informations I found around the web are very fragmentary and sometimes
contradictory, so I decided to open this post to clarify, and perhaps help
others in the same situation.

*Question: is there some way to generate ASTs without touching to the

These are more or less the informations I found.

1) Looking at the official repositories (this  mirror
<https://github.com/llvm-mirror/clang>   for example) it seems that some
work is in progress, but of course far away from completion.

2) After a brief chat on the  official IRC Channel
<http://irc.lc/oftc/clang/irctc@@@>  , some users confirmed me that
end-to-end compilation isn't supported, but that they internally have some
parser that runs quite well (?). They also linked me the  D9506
<http://reviews.llvm.org/D9506>  ,  D9507 <http://reviews.llvm.org/D9507>  
and  D9509 <http://reviews.llvm.org/D9509>   patches.

3) Some projects claim that they can parse CUDA with clang. I'm referring in
particular to  CU2CL <http://chrec.cs.vt.edu/cu2cl/>   (cited in  this

4) It is not clear to me if using some other tools, like libnvvm, is
possible to at least generate LLVM IR from CUDA source (and then maybe
compile it on x86?). (Or maybe only from PTX? Is that the so called NVVM

Any answer about any possible solution will be very appreciated!

Thanks in advance,

View this message in context: http://clang-developers.42468.n3.nabble.com/CUDA-again-what-is-supported-and-what-is-not-tp4046000.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list