tags:

views:

36

answers:

1

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?

+1  A: 

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

sudo killall cvmsServ

Doesn't seem very graceful, but oh well

Ian Johnson