This question derives from my desire to have an OpenCL program constructed at runtime from various kernels. So, imagine I have various kernels that I want to execute in a given context with the same set of memory objects.
If I knew ahead of time all the kernels I wanted to combine into a program, I'd have no problem - simply create a program with all the kernel sources or binaries.
However, given that I don't know ahead of time which kernels I want to combine I was considering creating one program for each kernel source. Is this equivalent to the original case (assuming the compile time options are all the same)? Is there a performance penalty in calling kernels that reside in different programs?
The problem is possibly that I don't understand the abstraction of a "program". What is it? Is it more than just a collection of kernels and some compile time options?