Hi,
Check the GPU and CUDA version supported by MATLAB current release from NVIDIA's website.
Install CUDA
CUDA - Getting Started on Windows
- Install CUDA driver
- Install CUDA toolkit
- Install CUDA SDK
- restart computer
Verify CUDA Installation
- To verify installation, from the Window's command prompt:
nvcc -V
- Run the bandwidthTest program located in
%NVSDKCUDA_ROOT%\bin\win32\Release
Where, in my case, %NVSDKCUDA_ROOT% is C:\WINNT\Profiles\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C
Compile CUDA Code
Compile your CUDA code using MEX in MATLAB.
MATLAB MEX
If you run into issues wherein some of the CUDA libraries are not found, you may either find the libraries and add them to your current directory, or add a few directories to the PATH:
C:\CUDA\bin; %NVSDKCUDA_ROOT%\common\lib; %NVSDKCUDA_ROOT%\common\inc;
2 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/564344-using-mex-with-cuda#comment_938141
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/564344-using-mex-with-cuda#comment_938141
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/564344-using-mex-with-cuda#comment_939084
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/564344-using-mex-with-cuda#comment_939084
Sign in to comment.