You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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??
The text was updated successfully, but these errors were encountered:
I wrote a opencl code , such as:
I Compiled the code by rga using the command:
when I executed the kernel, I got the error:
but if I remove
printf
, the kernel will run successfully, so How should I print something inside the kernel??The text was updated successfully, but these errors were encountered: