cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

boxerab
Challenger

Best way of protecting OpenCL code

I am planning to release my OpenCL app shortly; what is the best way of discouraging

having my app pirated ?

0 Likes
1 Solution

If you want to protect the app's OCL kernels I suggest to use the 'cl_khr_spir' extension . It allows you to keep the app's kernels in a cross vendor/cross device binary format making them much harder to modify and use elsewhere.

View solution in original post

0 Likes
5 Replies

If you want to protect the app's OCL kernels I suggest to use the 'cl_khr_spir' extension . It allows you to keep the app's kernels in a cross vendor/cross device binary format making them much harder to modify and use elsewhere.

0 Likes

That sounds very sad. I would assume something like this had been designed for simplified workflow support.

0 Likes
maxdz8
Elite

Note "discouraging having my app pirated" is a different thing than protecting the CL kernels.

In practice, game industry advice from the last 15 years: you cannot prevent your program to be pirated effectively without pissing off your legit users.

Without knowing who you are or what you're going to publish, I'd even say it could even be your interest to be pirated easily! It's currently my best interest, to the point I've even published most of the code.

0 Likes

Thanks, maxdz8. I am mostly concerned about somebody decompiling my kernels

to see how they work.

0 Likes

You can also use the Kernel Analysis module within CodeXL to generate your kernel binary into a file.  Using the Export Binaries panel in CodeXL, you can decide not to include your OpenCL kernel source code in the output file.