Solvedincubator mxnet Installing GPU support on Mac

Anyone managed to install GPU support on macOS? I've got an eGPU running with NVIDIA card. Installed CUDA 9 with cuDNN (version 8 does not seem to run on macOS 10.13.2).

I've read some posts saying that CUDA 9 was supported from MXNET v 0.12.

Running a command like pip install mxnet-cu90 does not work though.

31 Answers

✔️Accepted Answer

@Cosmo

  1. Download Xcode8.3.3 from Apple. This is the version NVIDIA state for Cuda 9.1 Mac. Unzip and rename to Xcode8.3.3.app.
  2. Run sudo xcode-select -s /Applications/Xcode8.3.3.app or to wherever you have placed Xcode.
  3. Run xcode-select --install to install all command line tools compilers etc.
  4. Run git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet to get the latest version currently 1.0.1 which worked for me.
  5. cd mxnet
  6. Edit the make/osx.mk file to set
USE_CUDA = 1
USE_CUDA_PATH = /usr/local/cuda
USE_CUDNN = 1
USE_OPENCV = 0
  1. Copy the mxnet/make/osx.mk to mxnet/config.mk
  2. Run make If you previously attempted to compile you might want to do make clean_all first. You can also run make -j to compile with multithreading. There'll be plenty of warnings but should be no errors.
  3. Once finished you should have a file called libmxnet.so in mxnet/lib/
  4. Do cd python
  5. Run sudo python setup.py install
  6. Do cd .. then you should be able to run python example/image-classification/train_mnist.py --network lenet --gpus 0 to test GPU training.

Other Answers:

@szha thanks, can confirm it all works, running macOS 10.13.2 with Cuda 9.1 and cuDNN 7 on a MacBook Pro with Sonnett ePGU and GeForce 1080 gpu.

Training the lenet example takes 36 seconds now vs. 14 minutes and 11 seconds on cpu.

Related Issues:

8
incubator mxnet Installing GPU support on Mac
@Cosmo Download Xcode8.3.3 from Apple This is the version NVIDIA state for Cuda 9.1 Mac Unzip and re...
4
incubator mxnet Pretty high cpu load when import mxnet
This is the code in https://github.com/apache/incubator-mxnet/blob/master/src/operator/operator_tune...
31
onnx Dynamic dummy input when exporting a PyTorch model?
For now I temporarily modify the onnx graph inputs: This seems to work with the tensorflow backend b...
20
gluon cv OSError: libcudart.so.9.0: cannot open shared object file: No such file or directory
make sure you cuda version is 9.0 And add below to ~/.bashrc run Add below to /etc/ld.so.conf.d/cuda...
11
horovod mpi_lib.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
@michaelkyu @Aki57 I've been able to repro this internally and found a solution The root cause of th...
6
horovod hvd.init() hangs on aws deep learning instance
@gururao001 on AWS you should uninstall MPI that comes with their base image: Hello ...
6
horovod WARNING: One or more tensors were submitted to be reduced, gathered
I see the same thing happens pretty regularly The data is coming from network storage Horovod is run...
4
horovod Building Horovod from source
@libliang bdist_wheel will build you a wheel file on that can be installed on a server with exactly ...