MATLAB: Parallel.gpu.CUDAKernel slow on GTX 1080

gpugtx 1080Parallel Computing Toolbox

I executed this matlab command to load a cuda kernel.
KNNSearchGPU = parallel.gpu.CUDAKernel('Search.ptx','Search.cu');
It took about a minute on a computer with GTX 1080 but less than a sec on one with GTX TITAN. Both of them have cuda 8.0rc installed on ubuntu 14.04.
Even for an empty function like this in Search.cu.
__global__ void Search( float * result, const int * args, const float * pc1, const float * pc2)
{
}
I've notice the problem that matlab may not yet support this new card from this discussion. http://www.mathworks.com/matlabcentral/answers/79275-gpudevice-command-very-slow
If that's the case, when will matlab support GTX 1080? Will it be in 2016b?

Best Answer

Hi Kuan-Ting,
The reason for the slow performance that you have observed is because of the one time compilation of the CUDA and MATLAB GPU libraries which may take several minutes. In this case, MATLAB is using a CUDA toolkit(7.5) which does not support the new Pascal architecture(GTX 1080).
The slowness should be once after which it will improve. So the observation of the other answer post being a similar issue(in the past) is correct.
At this moment it would be difficult to say when we will extend support for GTX 1080 since it seems like CUDA 8.0 toolkit is released very recently and also in this case since CUDA 8 card was released before CUDA 8 toolkit it did not give good amount of buffer time to extend support. We might extend support in one of the future releases of MATLAB but at this moment it would be difficult to say the exact release.
-Ritesh