I’m working on a project with the ultimate goal of having OpenCL code run on a variety of devices and platforms. Currently, I’ve got it set up to create binary files for kernels as kind of a cache for future runs of the project. Now that this works, I am considering using this functionality to avoid distributing the kernel source altogether. To do so, I would need to create multiple binary files which I would then distribute in place of the OpenCL source file.
My question is, at what level can I expect to be able to reuse the binaries that I create? That is, do I have to create individual binaries for each device the project supports? Or can I do it at the platform level? Could I create a binary for say the NVIDIA platform and expect it to run on any device which is supported by the NVIDIA plaform? I currently have my code producing binaries at the platform level. It works on my computer, but that doesn’t say a whole lot as no platform used on my computer supports more than one device on my computer.