Not able to Compile a GPU MEX-File

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)

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.

Asked:

on 24 Apr 2015

Answered:

on 28 May 2015

Community Treasure Hunt

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

Start Hunting!