[Libclc-dev] libclc with nvptx backend
yazhou.zu at utexas.edu
Thu Nov 7 21:25:17 PST 2013
I'm tring to use clang to comiple OpenCL source files into LLVM IR,
and use LLVM NVPTX backend to generate PTX IR for nvidia gpus.
I tried the following command:
svn checkout http://llvm.org/svn/llvm-project/libclc/trunk libclc
built it with ./configure.py
clang -Dcl_clang_storage_class_specifiers -isystem
libclc/generic/include -include clc/clc.h -target nvptx -xcl
test.cl-emit-llvm -S -o test.ll
then it went wrong with this command :
llvm-link libclc/nvptx--nvidiacl/lib/builtins.bc test.ll -o
I can't find builtins.bc. I can only find builtins.link.bc and
Can some one tell me how to fix this?
However, I can use
llc -march=nvptx -mcpu=sm_13 trivial-kernel.ll -o trivial-kernel.ptx
to generate ptx code. Is it ok to do so?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libclc-dev