I’m doing some CUDA programming in matlab (2011b) and was wondering if anyone knows of a way to call cudaDeviceSetCacheConfig in a way that would affect subsequent kernel calls.
The kernels are loaded from ptx using parallel.gpu.CUDAKernel and run using feval. I want to change the cache configuration to give the 48KB to the cache rather than the local memory.
You are asking about a feature of the Parallel Computing Toolbox. You should ask on the MATLAB usenet group (also known as the MATLAB Newsreader) to get a better response.
Have you looked at using the Jacket SDK for integrating your own CUDA code into MATLAB?
Thanks for the link.
I have tested Jacket in the past (trial license) and for the most part it behaves much better than the parallel computing toolbox (although Matlab’s support for ptx is nice). The problem is that this is for several academic papers so jacket is just too expensive, especially considering that our lab gets a license for the parallel computing toolbox via the university license, so I make do with what I have. It is a pity though as it makes me jump through some loops to do things that jacket would have done easier. At least the ptx supports allows me to avoid using CUDA via mex for this.
Thanks for the details. I’ll follow-up with you on PMs to make sure you can use Jacket.