OpenCL minification and obfuscation

927 Views Asked by At

As OpenCL-enabled software needs to be packaged with source code of OpenCL kernels, minification and obfuscation seems to be a standard requirement for OpenCL deployment, at least for commercial applications.

Which tools could be used for minification/obfuscation of OpenCL/WebCL code?

Update: my deployment target is WebCL, so I am mostly interested in minification, but obfuscation could provide similar result.

1

There are 1 best solutions below

1
On

Pack kernel code inside C string or compile it & save to binary or SPIR (as Ruyk said). Even if binary is disassembled, complicated kernels are usually not that easy to understand. E. g. in game development, shaders are stored in source code.