Why can't I run gpuDevice in MATLAB?

I am trying to use gpuArray function for my MATLAB code. I am getting the following error when trying to run gpuDevice,
Error using gpuDevice (line 26)
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA driver version is insufficient for CUDA runtime Version
Running parallel.gpu.GPUDevice.getDevice(1) gives this,
ans =
CUDADevice with properties:
Name: 'Quadro M3000M'
Index: 1
ComputeCapability: '5.2'
SupportsDouble: 1
DriverVersion: 8
ToolkitVersion: 8
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 4.2950e+09
AvailableMemory: NaN
MultiprocessorCount: 8
ClockRateKHz: 924000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 0
and
>> parallel.internal.gpu.CUDADriverVersion
ans =
'6.14.13.6213 (362.13)'
Other Details,
  • MATLAB Version = 2017a with parallel computing Toolbox
  • Platform = Windows 7
MATLAB 2017a has CUDA toolkit Version 8.0. The Driver Version also seems to be 8. Then why is there an erorr? or am I wrong about the Driver Version?
Please help me with this!

7 Comments

That is quite odd, but then the behaviour of these mobile graphics chips on laptops is odd. First, try installing the latest driver from the NVIDIA driver download site. Second, go into your NVIDIA control panel's 3D settings and ensure that MATLAB as an application is selected to use accelerated graphics.
I just checked and it appears that CUDA 9.1 is supported for Windows 7. The corresponding information about CUDA 9.2 (not available quite yet?) does not seem to be available.
... Just double checking because a couple of weeks ago I had difficulty with installing CUDA 9.1 on OS-X El Capitan.
CUDA 9.2 drivers aren't out yet, that's true. You don't need them.
Joss, I thought so too. I will try installing the latest NVIDIA Driver Version. And yes MATLAB is running on the NVIDIA GPU.
A different question, is it necessary to install CUDA SDK separately for using GPUArrays in the MATLAB Code? Because I haven't installed any toolkit separately for CUDA, I installed only the Parallel Computing Toolbox.
Thank you so much Walter and Joss for your replies. The error is resolved now. I updated the NVIDIA Driver to 391.33 and it worked. Updated details are as below,
>> gpuDevice
ans =
CUDADevice with properties:
Name: 'Quadro M3000M'
Index: 1
ComputeCapability: '5.2'
SupportsDouble: 1
DriverVersion: 9.1000
ToolkitVersion: 8
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 4.2950e+09
AvailableMemory: 3.8116e+09
MultiprocessorCount: 8
ClockRateKHz: 924000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
>> parallel.internal.gpu.CUDADriverVersion
ans =
'23.21.13.9133 (391.33)'
No, you don't need to install the CUDA SDK (i.e. Toolkit) to use gpuArray, only the driver. You only need the toolkit to compile your own CUDA code (to use mexcuda for instance). The toolkit comes with a driver so often that's the way people get their driver; nothing but that will actually be used by MATLAB.
I get it. Thank you for Clearing the doubt

Sign in to comment.

 Accepted Answer

The error is resolved now. I updated the NVIDIA Driver to 391.33 and it worked. Updated details are as below,
>> gpuDevice
ans = CUDADevice with properties:
Name: 'Quadro M3000M'
Index: 1
ComputeCapability: '5.2'
SupportsDouble: 1
DriverVersion: 9.1000
ToolkitVersion: 8
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 4.2950e+09
AvailableMemory: 3.8116e+09
MultiprocessorCount: 8
ClockRateKHz: 924000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
>> parallel.internal.gpu.CUDADriverVersion
ans = '23.21.13.9133 (391.33)'

More Answers (0)

Community Treasure Hunt

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

Start Hunting!