[cfe-dev] Clang and CUDA with C++11 features
justin.holewinski at gmail.com
Thu Jun 14 11:21:21 PDT 2012
On Thu, Jun 14, 2012 at 2:08 PM, Peter Colberg <peter at colberg.org> wrote:
> On Thu, Jun 14, 2012 at 09:57:27AM -0400, Justin Holewinski wrote:
> > Something is probably getting messed up in the IR generation for the
> > functions (we recently got rid of the old PTX back-end, on which the CUDA
> > integration is based, in favor of the NVPTX back-end). If you post the
> > I can take a look at it.
> I attached the CUDA source and the LLVM IR.
> clang++ -S -emit-llvm -I/usr/local/cuda-4.2/cuda/include -o kernel-call.s
> clang++ -I/usr/local/cuda-4.2/cuda/include
> -L/usr/local/cuda-4.2/cuda/lib64 -lcudart -o kernel-call kernel-call.cu
> Using CUDA device #0
> 42 == 0
> clang++ --version
> clang version 3.2 (http://llvm.org/git/clang.gitf1492f970c7c6eb85dc18f13fb864b185bed1d23) (
> http://llvm.org/git/llvm.git cba91230c0beef79e5042d8e983198b26aac5616)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
The attached IR is for the host, not the device. I haven't played around
with the CUDA front-end in Clang, but I don't think the plumbing is hooked
up to generate PTX device code and embed it into the final binary. Someone
who works on the front-end would be better able to comment.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev