Inactive kernel gets executed #798
-
This is more of a general OpenCL question rather than a pyopencl question, but you seem to know a lot, so I hope asking here is ok. Why does this not work: import pyopencl as cl
plattform = cl.get_platforms()[0]
device = plattform.get_devices()[0]
ctx = cl.Context([device])
queue = cl.CommandQueue(ctx)
src = r"""
kernel void tet() {
const long m = get_global_id(0);
printf("ID %ld\n", m);
}
"""
src2 = r"""
kernel void other() {
const long n = get_global_id(0);
printf("Do not print %ld\n", n);
}
"""
p = cl.Program(ctx, src).compile()
p2 = cl.Program(ctx, src2).compile()
program = cl.link_program(ctx, [p, p2])
program.tet(queue, (2,), None) I would expect this to output:
But what I get is:
This seems to be specifically related to the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I can't think of a reason why |
Beta Was this translation helpful? Give feedback.
That's my read of the situation, yes. Note that pocl can also take to Nvidia GPUs through its CUDA support, though I am uncertain whether
printf
is supported there.