I am trying to replicate an academic paper. The code from the paper includes a .cu file that generates files that are needed for the remainer of the paper.
I did some searching and I may need an additional toolkit for MATLAB to run this correctly
From here, I tried the nvcc command, and my version of MATLAB does not recognize the function.
Is the following link the toolkit that I need to get this to run?

댓글 수: 8

Oli Shaw
Oli Shaw 2019년 8월 2일
I've already dowloaded this. After doing so, I tried executing the following code
nvcc -ptx MCMC_CUDA.cu (this is the name of my file)
found from the site at the link below
Doing this, I get the following error
Screenshot (35).png
Is there something I did incorrectly with this download?
Walter Roberson
Walter Roberson 2019년 8월 2일
편집: Walter Roberson 2019년 8월 2일
That toolkit itself does not install nvcc.m
Note: you might need VS 2017, or VS 2015 Professional, in order to use CUDA properly. On MS Windows, nvcc does not support mingw
Oli Shaw
Oli Shaw 2019년 8월 2일
Screenshot (38).png
I already downloaded the toolkit. Attached is where everything downloaded to. I'm very confused as far as what to do next. Clicking on the highlghted file does nothing.
After you installed that File Exchange contribution, go to the MATLAB command line and command
nvcc -config
What result do you get?
Oli Shaw
Oli Shaw 2019년 8월 2일
Screenshot (39).png
I keep getting this message
Oli Shaw
Oli Shaw 2019년 8월 2일
I am trying reinstalling the toolkit, and have received this message part-way through. Could this be part of the issue?
Screenshot (41).png
Walter Roberson
Walter Roberson 2019년 8월 2일
You need VS 2017, or VS 2015 Professional, in order to use CUDA properly.

댓글을 달려면 로그인하십시오.

답변 (1개)

Joss Knight
Joss Knight 2019년 8월 3일

0 개 추천

Hi Oli. You don't run nvcc in MATLAB, since it isn't a MATLAB feature. You run it at a Windows Command Prompt (or Powershell). Use it to generate a PTX file and then load that into MATLAB using the CUDAKernel feature. To use this properly is an Advanced skill because it requires you to understand a bit about CUDA code and CUDA kernels.

댓글 수: 1

Samuel Gray
Samuel Gray 2021년 2월 9일
nvcc is a command-line tool that is installed when you install the CUDA toolkit.
the above download for an example of using nvcc with matlab

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

질문:

2019년 8월 2일

댓글:

2021년 2월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by