Let other applications use Matlab's version of the CUDA toolkit

6 visualizaciones (últimos 30 días)
I have an external piece of CUDA code that needs to know the path to the CUDA Toolkit in order to compile. Rather than installing a separate version of the CUDA Toolkit, I would like to use the installation already established on my machine by the Parallel Computing Toolbox (under R2018a). Is that possible, and if so, how do I locate Matlab's copy of the CUDA toolkit?
  3 comentarios
Matt J
Matt J el 2 de Dic. de 2020
Editada: Matt J el 2 de Dic. de 2020
@Mohammad. Yes, I know that. Do you know the answer to my question?
Michal el 8 de Dic. de 2020
I have very similar problem, see here. So far, I only found several unofficial tutorials how to install supported CUDA Toolkit 10.2 on Ubuntu Linux 20.04 (officially supported linux distribution!!!) but without any success. In one case the installation of proper version of GCC broke my whole linux OS functionality??!! The main problem is the GCC compiler version compatibility. CUDA toolkit 10.2 requires GCC 7, but Ubuntu 20.04 has as default GCC 9.
From my point of view is the whole problem very hard to solve to get full CUDA functionality on latest MATLAB versions in general.

Iniciar sesión para comentar.

Respuesta aceptada

Jason Ross
Jason Ross el 4 de Dic. de 2020
There's a difference between the whole toolkit installation and redistributable libraries. If you are compiling things you likely need access to the nvcc compiler and other things like that -- which aren't shipped or installed with MATLAB. On the GPU support by release page, this is called out where it talks about compiling applications. Note that for basic GPU gpuArray type funtions to work, your only need the driver installed -- the SDK is not required. There's more detail in this section:
CUDA Toolkit
If you want to use CUDA kernel objects or use GPU Coder, you must install a CUDA Toolkit. The CUDA Toolkit contains CUDA libraries and tools for compilation.
  6 comentarios
Michal el 8 de Dic. de 2020
May be, you should ask Nvidia instead of TMW :)
Jason Ross
Jason Ross el 9 de Dic. de 2020
Matt J -- thanks for the link, it was very helpful in illistrating what we can improve. I've filed an enhancement to see if we can at least further document exactly what patch level we are using with each release, and I've included this Answer as a reference.

Iniciar sesión para comentar.

Más respuestas (1)

Bjorn Gustavsson
Bjorn Gustavsson el 2 de Dic. de 2020
0: I have no idea about legalities.
1, I found a lot with unix find:
$ find ./ -iname \*cuda\*.so\*
$ find ./ -iname \*cuda\*.a\*
If you're not in a Linux/Unix OS, you should be able to find your way to similar lib-files.


Más información sobre GPU Computing en Help Center y File Exchange.





Community Treasure Hunt

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

Start Hunting!

Translated by