cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

boxerab
Challenger

Best way of protecting OpenCL code

Jump to solution

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

having my app pirated ?

0 Likes
Reply
1 Solution

Accepted Solutions
tzachi_cohen
Staff
Staff

Re: Best way of protecting OpenCL code

Jump to 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
Reply
5 Replies
tzachi_cohen
Staff
Staff

Re: Best way of protecting OpenCL code

Jump to 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
Reply
maxdz8
Elite

Re: Best way of protecting OpenCL code

Jump to solution

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
Reply
maxdz8
Elite

Re: Best way of protecting OpenCL code

Jump to solution

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

0 Likes
Reply
boxerab
Challenger

Re: Best way of protecting OpenCL code

Jump to solution

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

to see how they work.

0 Likes
Reply
bpurnomo
Staff
Staff

Re: Best way of protecting OpenCL code

Jump to solution

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.