Reputation: 23
I have an OpenCL application which runs on CUDA v7.5.
The application has very many large kernels. I am setting CUDA_CACHE_MAXSIZE to the maximum possible value, 4294967296 i.e. 4GB. However, the total size of the files stored in the cache directory never grows above ~307MB. It does appear that cache entries are being added / evicted (I see small changes in the total file size, and my application is definitely hitting the cache when querying for recent kernels). It behaves as if there were some cache size limit lower than CUDA_CACHE_MAXSIZE being enforced, maybe by the opencl driver?
I would like to know what caused this, and if it is possible for me to access the full cache size of 4GB.
Upvotes: 2
Views: 784
Reputation: 1721
Sorry for taking so long to respond. I just found this is a bug in libcuda. I will submit a fix shortly.
For now, a workaround is to set CUDA_CACHE_MAXSIZE
to 2Gb-1 (2147483647
). Setting it to a value between 2Gb and 4Gb-1 could end up with a really high cache size, and setting it to 4Gb should result in a cache size of 256Mb, which is the default cache size since R334, instead of 32Mb, as said here.
I hope this workaround will help you.
Upvotes: 4