Sorry for my wrong post!

Dear Tom,

hsa-runtime was not available? https://github.com/tstellarAMD/hsa-runtime/

在 2017年06月26日 16:20, Leslie Zhai 写道:
Hi Tom,

Thanks for your kind response!

> clang -include /path/to/libclc/headers/clc.h -I /path/to/libclc/headers -Dcl_clang_storage_class_specifiers -target amdgcn--amdhsa -mcpu=carrizo $INPUT_FILE -o $OUTPUT_FILE

When I tried to build cos.cl testcase https://github.com/llvm-mirror/libclc/blob/master/test/cos.cl

$ clang -include clc/clc.h -Dcl_clang_storage_class_specifiers -target amdgcn--amdhsa -mcpu=carrizo cos.cl -o cos.out

cos.cl:1:27: error: pointer arguments to kernel functions must reside in '__global', '__constant' or
      '__local' address space
__kernel void foo(float4 *f) {
                          ^
1 error generated.

Then I added __local before float4 *f like this:

Index: cos.cl
===================================================================
--- cos.cl      (revision 306265)
+++ cos.cl      (working copy)
@@ -1,3 +1,3 @@
-__kernel void foo(float4 *f) {
+__kernel void foo(__local float4 *f) {
   *f = cos(*f);
 }

because [OpenCL] Improve address space diagnostics https://reviews.llvm.org/D27671

then rebuilt again,

cos.cl:1:15: error: unsupported call to function _Z3cosDv4_f
__kernel void foo(__local float4 *f) {
              ^
1 error generated.

why not found *cos* function? please give me some hint, thanks a lot!


--
Regards,
Leslie Zhai https://reviews.llvm.org/p/xiangzhai/



_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to