Disable caching by the opencl compiler
Hi,
I am trying to profile OpenCL compiler compile time performance. I noticed that the compilation speed reduces dramatically during the subsequent compilation phase. Is there a way to get around that. I want to record similar compilation times for each run. I am using clCreateProgramWithSource
to compile my opencl kernel.

Thanks
Gudge
Hi,

I am trying to profile OpenCL compiler compile time performance. I noticed that the compilation speed reduces dramatically during the subsequent compilation phase. Is there a way to get around that. I want to record similar compilation times for each run. I am using clCreateProgramWithSource

to compile my opencl kernel.



Thanks

Gudge

#1
Posted 08/01/2011 10:48 PM   
I don't know an official way to disallow the compiler to cache and reuse the binaries for the same source code, but you could try to add dummy whitespaces / comments to the source code, hoping that the compiler is just using some sort of checksum of the source code before running the pre-compiler to see whether it has already compiled that source code.
I don't know an official way to disallow the compiler to cache and reuse the binaries for the same source code, but you could try to add dummy whitespaces / comments to the source code, hoping that the compiler is just using some sort of checksum of the source code before running the pre-compiler to see whether it has already compiled that source code.

#2
Posted 08/02/2011 07:37 AM   
Occasionally I delete the ComputeCache from %AppData%\NVIDIA\ComputeCache (Windows) or
~/.nv/ (Linux).
Don't know if this is a safe thing to do, but it worked for me.
Occasionally I delete the ComputeCache from %AppData%\NVIDIA\ComputeCache (Windows) or

~/.nv/ (Linux).

Don't know if this is a safe thing to do, but it worked for me.

#3
Posted 01/19/2012 11:50 AM   
You can set the CUDA_CACHE_DISABLE variable to disable caching.

In C/C++ do this before Platform initialization:
[code]setenv("CUDA_CACHE_DISABLE", "1", 1);[/code]

Cheers,
Richard
You can set the CUDA_CACHE_DISABLE variable to disable caching.



In C/C++ do this before Platform initialization:

setenv("CUDA_CACHE_DISABLE", "1", 1);




Cheers,

Richard

#4
Posted 01/29/2012 05:27 PM   
Scroll To Top