[Libclc-dev] clang/libclc ptx backend

zheng zhang eddy.zhengzhang at gmail.com
Sat Nov 3 12:21:08 PDT 2012


Dear All,

I run into some problems when I was configuring llvm/clang/libclc to
compile openCL files into ptx code. I followed the instructions on Justin
Holewinski's slides after I finished installing llvm, clang, and libclc,
which was originally:

clang -ccc-host-triple ptx32 \
 -Xclang -target-feature -Xclang +ptx23 \
 -Xclang -target-feature -Xclang +sm20 \
 -I$LIBCLC/include/generic -I$LIBCLC/include/ptx \
 -include clc/clc.h -Dcl_clang_storage_class_specifiers \
 -O3 SOURCE.cl -S

I installed clang 3.2 and there is no option ccc-host-triple, I found the
option triple, so I did:

clang -triple ptx32 \
 -Xclang -target-feature -Xclang +ptx23 \
 -Xclang -target-feature -Xclang +sm20 \
 -I$LIBCLC/include/generic -I$LIBCLC/include/ptx \
 -include clc/clc.h -Dcl_clang_storage_class_specifiers \
 -O3 SOURCE.cl -S

Then I got this error:
 error: invalid target feature '+ptx23'
error: invalid target feature '+sm20'

I removed these two features, and I saw error messages like this after I
compile the matrix multiply example in nvidia opencl sdk

error: use of undeclared identifier 'BLOCK_SIZE'

Also there is this warning that: option '-triple ptx32' not used

I am not sure if I am missing anything here or the information I got is
simply out-of-date. I think I have installed all the necessary packages and
configured them. Can anyone help me and point me to the right direction?

Thanks a lot!

Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20121103/777b1645/attachment-0002.html>


More information about the Libclc-dev mailing list