I'm interested in implementing a interface layer so that clGetPlatformInfo returns all the devices on the platform, instead of just those under the control of the specific implementation. In other words, on linux right now, as far as I can tell, a program can link to either the AMD or NVIDIA implementation, not both. The goal of this project would be to make it possible to be agnostic about what implementations exist on the machine, and leave it to the interface to communicate with them. This would allow a process to send multiple kernels to multiple devices.
I'm fairly sure that this is the case on Apple systems at the moment, so I'd like to get the same functionality on Linux.
Any recommendations on the best way to do this? If possible it would be great if at runtime the interface could search for multiple versions of libOpenCL.so, load them, and multiplex the functions appropriately. I apologise, I'm a bit ignorant when it comes to linkers and compilers. I would be open to more creative ways of interfacing with multiple implementations too, this just seemed like it would be the most efficient/elegant.
Thanks a lot,