It seems that GPU training in Mathematica has some additional requirements on the software. For example, when I run this example on a Linux system, I get the following errors
trainingData =
RandomReal[1, {10000, 4}] -> RandomReal[1, {10000, 4}];
net = NetChain[{8, 4}];
NetTrain[net, trainingData, TargetDevice -> "GPU"]
[13:35:27] /home/dszeto/Desktop/mxnet0932_64/dmlc-core/include/dmlc/./logging.h:300: [13:35:27] /home/dszeto/Desktop/mxnet0932_64/src/storage/storage.cc:38: Check failed: e == cudaSuccess || e == cudaErrorCudartUnloading CUDA: CUDA driver version is insufficient for CUDA runtime version
The system has a K40 GPU and CUDA 7.5 installed and has no problem running GPU version of tensorflow. Here is the detailed information:
$ uname -m && cat /etc/*release x86_64
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.8 (Santiago) Red Hat
Enterprise Linux Server release 6.8 (Santiago)
$ gcc --version gcc
(GCC) 4.9.0
$ uname -r
2.6.32-642.11.1.el6.x86_64
In[1]:= $Version
Out[1]:= 11.1.0 for Linux x86 (64-bit) (March 13, 2017)
From the error message, it seems that Mathematica is using the CUDA library that is newer than the driver on the system. However, the CUDA library on the system should be compatible with the GPU driver, since the GPU training in tensorflow works well. Does Mathematica use its own CUDA library rather than the CUDA library on the system? What are the software requirements such as:
- GCC
- graphics driver
- cuDNN
- CUDA
- MXNet
It seems that Mathematica comes with an MXNet library (in folder SystemFiles/Components/MXNetLink/LibraryResources/
) but the others?
Moreover, what are the hierarchy structures of these software components that the Mathematica neural network framework builds on?
CUDA driver version is insufficient for CUDA runtime version
so start by updating your drivers to the latest version. Check directly on Nvidia's site for the latest version because sometime the OS check does not give the latest version. Also check that your GPU has compute capability 3 or higher withCUDAInformation
. $\endgroup$