Repository navigation
Inactive kernel gets executed #798
Answered
by
inducer
Richardk2n
asked this question in
Q&A
|
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 |
Answered by
inducer
Nov 13, 2024
Replies: 1 comment 2 replies
|
I can't think of a reason why |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
printfis supported there.