Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I force Apple's OpenCL compiler to recompile a cached kernel?

Tags:

opencl

I want to use #include statements in my OpenCL kernels but it appears Apple's OpenCL compiler caches kernels, so if you change the contents of an included file but not the file doing the including, the program will not change between runs.

I've coded up an example which illustrates this: http://github.com/enjalot/adventures_in_opencl/tree/master/experiments/inc/

If you compile and run, it should work fine. Then if you comment out the struct definition in inc.cl it will still run just fine (or change anything in lvl2.cl)

Using the NVIDIA compiler on Ubuntu you get the expected behavior.

So is there someway to force clBuildProgram to recompile the kernel?

like image 315
Ian Johnson Avatar asked Oct 25 '22 06:10

Ian Johnson


1 Answers

I got an answer from the [email protected] mailing list

sudo killall cvmsServ

Doesn't seem very graceful, but oh well

like image 134
Ian Johnson Avatar answered Jan 02 '23 19:01

Ian Johnson