Which Visual Studio 2019 package should I install to work with CUDA?

I would like to use my nVidia GPU to speed up my computations. For this reason, I'd like to install CUDA with Microsoft Visual Studio 2019 Enterprise.
Unfortunately, Visual Studio 2019 has a lot of workloads and packages and I do not know which one I should install in order to use the GPU coder.
Is the "Desktop Development with C++" workload enough for this purpose or additional packages are required?

Answers (1)

To accelerate your MATLAB code with an NVIDIA GPU, you do not need to install a C++ Compiler.

4 Comments

Yes. But in the GPU Coder Prerequisite Products there is written that I need Visual Studio. And since for MEX Generation the "Desktop Development with C++" workflow is required, I was wondering if it is the same for the GPU Coder.
But you do need to use code generation? Or is PCT and gpuArray sufficient? I ask because sometimes we find people are under the impression that GPU Coder is a requirement for GPU capabilities in MATLAB.
I'd like to have a MEX file to be executed on the GPU. I do not think, for the kind of code I have, that PCT and gpuArray are enough.
But you are writing the CUDA code entirely yourself? In which case you should be using mexcuda, not GPU Coder.

Sign in to comment.

Products

Release

R2019b

Asked:

CaG
on 3 Dec 2019

Commented:

on 4 Dec 2019

Community Treasure Hunt

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

Start Hunting!