how to compile cuda with mex where i dont have parallel toolbox

조회 수: 1 (최근 30일)
Michaelscheinfeild
Michaelscheinfeild 2016년 10월 26일
답변: Joss Knight 2016년 10월 31일
i have matlab 2015 i want to make mex from cuda file , i dont have the parallel toolbox
setenv('MW_NVCC_PATH','/usr/local/CUDA/bin')
mex mexGPUExample.cu
*Building with 'NVIDIA CUDA Compiler'.
Error using mex
LINK : fatal error LNK1181: cannot open input file 'gpu.lib'*

채택된 답변

Joss Knight
Joss Knight 2016년 10월 31일
You can't build CUDA kernels using mex without Parallel Computing Toolbox. This requires the NVIDIA compiler nvcc and the infrastructure to call that from mex is only provided with PCT.
You need to build your device code into a separate library independently of MATLAB and built using nvcc, and then write mex functions that link to it using the -l option.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by