I use OpenCL in my program, and i need to protect opencl code from reading by other users. Compile code to binary maybe the option, but if exist some way to decompile it, this option is useless. I cant allow to somebody steal my opencl code. How i can do opencl protection? Thanks!
Raghu, what part of SPIR do you think will help?
The best you can hope is that your kernel code will be converted into bytecode which will make the work a bit more difficult (not a lot).
And honestly, speaking from a point of view of someone who has been doing assembly code for a long time, you can't. From my past experience of if someone want to get your kernel code it is always possible.
It is even easier for OpenCL since the API is fixed and well defined so writing a fake DLL to redirect the calls is not that hard.
The only way to protect it would be for Khronos to decide of some kind of cryptography API with dual keys (like PGP or something like that) that you could use to encrypt the kernels.
I have never seen that (OpenGL shaders, DirectX shaders, and CUDA don't support it either).