MATLAB: Ptxas fatal : Unresolved extern function ‘cudaGetPa​rameterBuf​ferV2’ with matlab 2017a on GTX1080

cudadynamic parallelismgtx1080parallel.gpu.cudakernelunresolved extern function

Hi,
I am having errors trying to use dynamic parallelism on my GTX1080 card. I have the cuda programs in .cu file and I compile and run from Matlab R2017a.
Call from Matlab:
system('nvcc child_kernel.cu parent_kernel.cu -dc -gencode=arch=compute_61,code=compute_61 -m64 -rdc=true -lcudadevrt -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" -ptx -Wno-deprecated-gpu-targets -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin"');
kernel_test = parallel.gpu.CUDAKernel('parent_kernel.ptx', 'parent_kernel.cu', 'parent_kernel');
kernel_test.ThreadBlockSize = [1,0,0];
kernel_test.GridSize = [1,0,0];
I get the following error:
Error using parallel.gpu.CUDAKernel
An error occurred during PTX compilation of <image>.
The information log was:
The error log was:
ptxas fatal : Unresolved extern function 'cudaGetParameterBufferV2'
The CUDA error code was: CUDA_ERROR_NO_BINARY_FOR_GPU.
Error in test_cuda (line 36)
kernel_test = parallel.gpu.CUDAKernel('test_cuda_fncall_frm_cuda.ptx', 'test_cuda_fncall_frm_cuda.cu',
'test_cuda_fncall_frm_cuda');
Device info:
Name: 'GeForce GTX 1080'
Index: 1
ComputeCapability: '6.1'
SupportsDouble: 1
DriverVersion: 8
ToolkitVersion: 8
cmd:
nvcc child_kernel.cu parent_kernel.cu -dc -gencode=arch=compute_61,code=compute_61 -m64 -rdc=true -lcudadevrt -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" -ptx -Wno-deprecated-gpu-targets -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin"

Best Answer

Dynamic parallelism is not supported in MATLAB CUDAKernel objects. You need to use a MEX function instead. Sorry.
Related Question