After uninstalling CUDA toolkit still MATLAB responds for gpuDevice() !!

조회 수: 4 (최근 30일)
JAI PRAKASH
JAI PRAKASH 2018년 11월 27일
편집: JAI PRAKASH 2018년 12월 12일
Hi
Accidently I installed CUDA 10 in ubuntu 16.04.
Later on I came to know that matlab supports CUDA 9.1.
So i unistalled CUDA from ubuntu. But still it responds to gpuDevice.
I am raising this issue because I am worried if I install CUDA 9.1, MATLAB may not be able to detect new CUDA.
Is there any environment variable or something, I have to change.
Screenshot from 2018-11-27 18-50-39.png

답변 (1개)

Edric Ellis
Edric Ellis 2018년 11월 28일
편집: Edric Ellis 2018년 11월 28일
MATLAB and Parallel Computing Toolbox need the CUDA driver to be installed on your system, not the CUDA toolkit.
I admit it is very easy to get confused about the distinction between these two components, let me try to explain.
The CUDA driver is a frequently-updated low-level library that connects your GPU hardware into the rest of your computer. It provides the lowest-level support for your GPU - for example, it provides the ability to allocate memory on the GPU, and to launch kernels. However, the driver does not contain any specific algorithms - for example, it does not contain an FFT implementation.
Any given CUDA driver supports all CUDA versions up to and including the version current at the time of release of that driver. It is almost always the right thing to do to install the latest available CUDA driver from NVIDIA, since newer drivers are compatibile with older applications that use CUDA. (There are rare exceptions when this compatibility is inadvertently broken)
The CUDA toolkit comprises a CUDA compiler (nvcc), and support libraries for FFT and BLAS (MTIMES etc.). Any given CUDA application (such as MATLAB) is built using a specific version of the CUDA toolkit. In the case of MATLAB, we ship with MATLAB the portions of the CUDA toolkit that are needed for execution of gpuArray code. For example, we ship the cufft and cublas libraries. You can see these in the <matlab>/bin/<arch> directory.
Putting all this together - for most usage of gpuArray, you do not need to install any version of the CUDA toolkit, since MATLAB already brings along the pieces it needs. However, we cannot bring along the CUDA driver, so you must install that - and the only requirement there is that the driver is at least as recent as the version of the toolkit shipping in the version of MATLAB you're using.
The time you need to install your own CUDA toolkit is when you want to build CUDA sources to use within MATLAB, either using parallel.gpu.CUDAKernel or mexcuda. In that case, to ensure correct binary compatibility, it is important that you install precisely the same version of the CUDA toolkit as is being used by MATLAB. You can see this version information by looking at the ToolkitVersion property of the gpuDevice object. (The DriverVersion of your gpuDevice tells you the latest version of the CUDA toolkit supported by the CUDA driver installed on your machine.)
One final note: NVIDIA have a page about compatilibity of drivers and toolkits here.
  댓글 수: 5
Joss Knight
Joss Knight 2018년 11월 30일
Linux drivers are distributed (on that page that Edric linked) as a runfile (that you just run from the command line) if you select "Linux 64 bit", and as a .deb or other if you select a specific Linux distribution.
JAI PRAKASH
JAI PRAKASH 2018년 12월 12일
편집: JAI PRAKASH 2018년 12월 12일
After setting required environment variables it is working all good.
Thanks for your support.

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

카테고리

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

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by