I'm having trouble getting my new GPU system to work with Mathematica 12.2. I have two RTX3090 cards in my setup. My NVIDIA drivers are version 460.89 (the latest).

I have installed CUDAToolkit 11.0 and cudnn 11.0 (I have also tried 11.1 and 11.2 with the same results). I have also VisualStudio 2019 installed and checked that Mathematica recognises it correctly as an external C compiler. CUDAQ[] returns True, and CUDAInformation[] Returns all the detailed information on my cards correctly. I have checked that my installation directories are correct. Library Paths have also been correctly allocated.

My problem is: when I run any GPU calculation, on either GPU card, for the first time, Mathematica takes approximately 25 minutes (independently of what GPU calculation I feed it) to start working. Once it has initialised and finished the calculation for the first time, then it will run instantaneously for the remaining times. However, if the Kernel is reinitiated, this initialization fo the GPU has to be repeated. It is as though the GPU card has to be woken up before everything starts working normally, and this takes a very long time.

Is there any further configuration of Mathematica that needs to be done? Is there any way to save the GPU status after proper initialization, so that I can quit my kernel and don't have to wait another 25 minutes?

Thank you for your help!

  • 5
    $\begingroup$ You may be lucky and find somebody here with insight on this problem from previous experience, but I’d think that contacting Wolfram Support directly might be a better approach. $\endgroup$
    – MarcoB
    Dec 27, 2020 at 16:58
  • 2
    $\begingroup$ Thank you, I already have. Doing more research I could see that the CUDA functionalities are all perfectly fine, it is the nerual net ones that have the described problem. Therefore it might be an issue regarding MXnet not being updated to these graphic cards. But I'm not sure. $\endgroup$ Dec 28, 2020 at 0:43
  • 1
    $\begingroup$ The CUDALink package provides plenty of problems, on Win and Linux (didn't test on Mac). I never use it. I recommend you use LibraryLink instead, and then write a lib that uses CUDA. There is an example in the documentation on how to do that. No package clutter, no symbol collision danger, LibraryLink is superfast (basically like a "plugin" for the kernel and runs directly in the o/s), and now CUDA is right at your fingertips. The best way to use CUDA from M! $\endgroup$ Mar 8, 2021 at 2:43


Browse other questions tagged or ask your own question.