Not able to Compile a GPU MEX-File

1 view (last 30 days)
Erik Mathias
Erik Mathias on 24 Apr 2015
Answered: Joss Knight on 28 May 2015
Hi,
I was trying to compile the GPU mex-file as it is written in the Matlab home page
But it says error with compute capability. I am not a sudo user. It seems I need to change the flags in the mex_CUDA_glnxa64.xml file. But I am not sure. Could any one please help me, thanks.
setenv('MW_NVCC_PATH','/usr/local/CUDA/bin')
>> mex -largeArrayDims mexGPUExample.cu
Building with 'nvcc'.
sh /tmp/mex_157937607297064_15337: Signal 127
Error using mex nvcc fatal : Unsupported gpu architecture 'compute_50'

Answers (1)

Joss Knight
Joss Knight on 28 May 2015
Hi, you need to install the CUDA toolkit matching your version of MATLAB.
gpu = gpuDevice;
gpu.ToolkitVersion
At the moment you are trying to build your mex file using an older version of the toolkit than required by MATLAB.

Community Treasure Hunt

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

Start Hunting!