Unfortunately you can’t do this out-of-the box. It is not a problem with ComputeCpp per se. Let me explain. When we build ComputeCpp, we use the upstream Khronos OpenCL ICD loader, in other words, we use the official libOpenCL.so as provided here. When you build that you get the following files
libOpenCL.so -> libOpenCL.so.1
libOpenCL.so.1 -> libOpenCL.so.1.2
When you link your application/library against
libOpenCL.so, the linker will actually use the library SONAME, which in this case will be
From what you’re saying it seems that
pocl is not ICD compatible, since they provide their whole implementation in
With that said, I have two solutions that can work for you:
- The easiest solution for you would be to
cp libOpenCL.so libOpenCL.so.1 or create a symlink.
- Another, more complicated, but better solution would be to create a file in
pocl.icd containing the full path to your
libOpenCL.so. By doing this, you will have installed
pocl in an ICD compatible way.