-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I wrote a opencl code , such as:
#pragma OPENCL EXTENSION cl_amd_printf : enable
__kernel void test_ker(__global int* out, int num) {
int tid = get_global_id(0);
int tnum = get_global_size(0);
if (tid == 0) {
printf("hello**************************");
}
for (int t = tid; t < num; t += tnum) {
out[t] = out[t] * t + out[t]&t;
}
}
I Compiled the code by rga using the command:
rga -s opencl -c gfx1030 --O2 -b a.bin test.cl
when I executed the kernel, I got the error:
unknown file: Failure C++ exception with description "clCreateKernel" thrown in the test body.
but if I remove printf, the kernel will run successfully, so How should I print something inside the kernel??
Metadata
Metadata
Assignees
Labels
No labels