One program can contain multiple kernels. Does it make any difference if I break my kernels across multiple programs? Can they all use the same context and run on the same devices and queues?
I'm playing around with OpenCL, and happen to be working in PyOpenCL. The structure is such that the command queue is owned by a class which compiles several kernels into a program. I am implementing a few subclasses that implement some kernels that I'll run on the base class' queue. Do I need to inject those kernels back into the base class and compile it into one program, or can I compile separate programs for each subclass that all rely on the context in the base class?
An OpenCL context can have multiple programs associated with it, so you can split your kernels across several programs and everything will still work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With