[Libclc-dev] libclc with nvptx backend
Yazhou Zu
yazhou.zu at utexas.edu
Thu Nov 7 21:25:17 PST 2013
Hi,
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
--with-llvm-config=$PWD/../install-trunk/bin/llvm-config make
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
square.linked.bc
I can't find builtins.bc. I can only find builtins.link.bc and
builtins.opt.bc.
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...
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20131108/e3d4b90d/attachment.html>
More information about the Libclc-dev
mailing list