[cfe-dev] openclc to llvm
Peter Collingbourne
peter at pcc.me.uk
Fri Apr 27 04:36:50 PDT 2012
On Fri, Apr 27, 2012 at 11:37:13AM +0800, Lei Mou wrote:
> Hi Ankur,
>
> Yes, you need the support of libclc in order to successfully compile OpenCL
> kernels. It is available at http://libclc.llvm.org/. After building libclc,
> you can use the script "compile-test.sh" to compile OpenCL kernels. For me,
> the compile-test.sh has a little problem (due to the option -Xclang
> ptx32--nvidiacl/lib/builtins.bc), so I just removed the option, and the
What problem? Did you follow the instructions in README.TXT to build
the builtins.bc file?
> resulting script looks like this:
>
> clang -ccc-host-triple ptx32--nvidiacl -Iptx-nvidiacl/include
> -Igeneric/include -include clc/clc.h -target-feature -Xclang +ptx23 -Xclang
> -target-feature -Xclang +sm20 -Dcl_clang_storage_class_specifiers -S
> -emit-llvm "$@"
>
> Using the modified script, OpenCL kernels can be successfully compiled into
> PTX codes.
But most of the builtin functions won't work.
Thanks,
--
Peter
More information about the cfe-dev
mailing list