Parallel Computing Toolbox - random CUDA error "invalid texture reference" - GTX970

3 views (last 30 days)
Setup : MATLAB r2013a, Nvidia GTX 970, Ubuntu 14.04 64 bit, CUDA 6.5 with Support for GeForce GTX9xx GPUs ( https://developer.nvidia.com/cuda-downloads-geforce-gtx9xx ), Driver Version 346.59.
I am using the Parallel Computing Toolbox for some GPU computation, but I get this error at random instants: e.g., during an allocation of ones(m, n, 'gpuArray'): Error using ones An unexpected error occurred trying to launch a kernel. The CUDA error was: invalid texture reference
or during a GPU matrix multiplication: Error using mtimes [...]
What might be the problem? Thanks
  2 Comments
Timothy Scharf
Timothy Scharf on 9 May 2015
getting similar error - Ubuntu 14.04 64bit R2013a CUDA 7.0 GTX 980 driver 346.59
For what its worth I noticed that my error tended to happen when allocating gpuArray.rand(... , 'single'), but not when I allocate same array as 'double'
Joss Knight
Joss Knight on 28 May 2015
It's hard to say without more details. Most likely you are short on memory because you are sharing your GPU compute resources with graphics. You should analyze whether this is the case by looking at the free memory after each operation.
gpu = gpuDevice;
gpu.FreeMemory
However, 'invalid texture reference' is an unusual error to be getting for an allocation failure so the implication is that the actual source of the problem is elsewhere in the code, or something else in your system is causing a problem with the card. You could try issuing the commands
feval('_gpu_asyncState', false);
feval('_gpu_setLazyEvaluationEnabled', false);
feature('GpuAllocPoolSizeKb', 0);
This just puts the device into a mode which will ensure errors are reported at the appropriate point in the code.
Also, you say that you are using MATLAB R2013a with CUDA 6.5 - this is not possible, R2013a uses CUDA 5. It is conceivable there is an issue with Maxwell support in R2013a since Maxwell cards are very new - upgrading MATLAB would be worth doing if that option is available to you.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!