Group Abstract Group Abstract

Message Boards Message Boards

CUDAlink does not support nVIDIA CUDA Toolkit

Posted 2 years ago

Hi,
Currently both Mathematica 13.1 and 13.2 only support CUDA Toolkit 11.8 from nVIDIA.
When will CUDAlink support CUDA Toolkit 12.0 from nVIDIA?
Mathematica 13.2 can not work with CUDA Toolkit 12.0

Kind regards,
Bert

POSTED BY: Bert Aerts
14 Replies
Posted 1 year ago

Meawhile

Get["OpenCLLink`OpenCLLink`"]

still prints and OpenCL does not work.

SetDelayed::write: Tag NVCCCompiler in NVCCCompiler[Available] is Protected.

SetDelayed::write: Tag NVCCCompiler in NVCCCompiler[Name][] is Protected.

SetDelayed::write: Tag NVCCCompiler in NVCCCompiler[Name][] is Protected.
General::stop: Further output of SetDelayed::write will be suppressed during this calculation.
Set::write: Tag NVCCCompiler in Options[NVCCCompiler] is Protected.
Set::write: Tag NVCCCompiler in Options[NVCCCompiler] is Protected.
Table::iterb: Iterator {CCompilerDriver`CCompilerDriverRegistry`Private`installation,NVCCCompiler[Installations][]} does not have appropriate bounds.
Table::iterb: Iterator {CCompilerDriver`CCompilerDriverRegistry`Private`installation,NVCCCompiler[Installations][]} does not have appropriate bounds.
POSTED BY: ZAQU zaqu
Posted 2 years ago

Mathematica 13.3.1 finally fully supports nVIDIA CUDA Toolkit 12.2.1 The CUDADot issue is solved. Tested on Ubuntu 23.04 with nVIDIA 535.98 driver.

POSTED BY: Bert Aerts
Posted 2 years ago

OK thanks for the fix of renaming the library files. CUDAMap now gives correct results.

But please look at below image : CUDADot gives wrong results: enter image description here

POSTED BY: Bert Aerts

This behavior is reproducible and a new paclet release with the fix will release soon. For now, the workaround would be renaming following two files "Examples12.so" and "Examples11.so" present in

FileNameJoin[{$InstallationDirectory, "SystemFiles", "Links", "GPUTools", "LibraryResources", "Linux-x86-64"}]

to "libExample12.so" and "libExample11.so" respectively.

POSTED BY: Dev Budhathoki

Very sorry about this. There should be a paclet update soon to resolve this issue on Linux (WL v13.3). In the meantime, you could try renaming the underlying Examples library:

e.g.:

mv ~/Wolfram/Mathematica/13.3/SystemFiles/Links/GPUTools/LibraryResources/Linux-x86-64/Examples_12.so ~/Wolfram/Mathematica/13.3/SystemFiles/Links/GPUTools/LibraryResources/Linux
-x86-64/libExamples_12.so

restart WL and retry:

Needs["CUDALink`"]
CUDAQ[]
CUDAMap[Cos, 1.*Range[10]]

Also, you mention CUDADot not giving the correct result, could you please provide an example.

Posted 2 years ago

Well, on 13.3 and Toolkit 11.8 {0.540302, -0.416147, -0.989992, -0.653644, 0.283662, 0.96017, \ 0.753902, -0.1455, -0.91113, -0.839072} is printed.

Did not test 12.2 toolkit yet.

POSTED BY: ZAQU zaqu
Posted 2 years ago
POSTED BY: Bert Aerts
Posted 2 years ago

So do you know how to make OpenCL work on windows? It still does not work with 13.2.1 and latest Nvidia driver and Toolkit 11.8.

POSTED BY: ZAQU zaqu
Posted 2 years ago

Unfortunately Mathematica 13.2.1 still doesn't support nVIDIA CUDA Toolkit 12.0.1

Wolfram support says they are still working on it...

POSTED BY: Bert Aerts
Posted 2 years ago
POSTED BY: ZAQU zaqu
Posted 2 years ago

On my laptop running Ubuntu 22.10 both CUDA 11.8 and OpenCL 3.0 are working fine. I start Mathematica 13.2 with this shell script:

cat mathematica.sh 
export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libnvidia-tls.so.525.60.11
export CUDA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libcuda.so
export PATH=/home/bert/bin_gcc_11:/usr/local/cuda-11.8/bin:$PATH$
g++ --version
mathematica &

Then OpenCL looks like: enter image description here

POSTED BY: Bert Aerts
Posted 2 years ago

Meanwhile installed 11.8. CUDA works now, but OpenCL does not :( I was also surprised it apparently needs CUDA now...

Looks like 13.2 broke OpenCL.

POSTED BY: ZAQU zaqu
Posted 2 years ago
POSTED BY: Bert Aerts
Posted 2 years ago

Are you sure it is not a fake limitation, cause major version changed?

POSTED BY: ZAQU zaqu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard