Skip to content

Mac OS CUDA

dkappe edited this page Aug 30, 2018 · 1 revision

Here is what I did, I actually planned to make it more detailed and add screenshots, but the lack of time...

  1. Download and install cuda at https://www.nvidia.com/object/macosx-cuda-396.148-driver.html 1a. instructions and some explanations are here: https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#system-requirements

  2. Up- or downgrade to Xcode 9.2 and command line tools 9.0.0 (mentioned in the cuda installation guide). You may install more than one version of the command line tools and switch to 9.0.0 with xcode-select --switch [Path]

  3. Download and install cudnn from https://developer.nvidia.com/cudnn

  4. Now comes a tricky part, the installation of the Nvidia webdriver (Unfortunately I can't remember anymore whether or not it was really important but I think there is a problem with the cuda driver otherwise). For my 775M WebDriver-387.10.10.10.40.105.pkg worked, but I remember it wasn't the newest version.

  5. Reboot and pray that the the driver will load ;-).

  6. Install homebrew (I used macports before this might also work)

  7. Install python3 meson and ninja via homebrew

  8. Download the source code of lc0

  9. Create a symlink /usr/local/cuda/lib64 pointing to lib in the same directory (just a workaround for the settings in meson_options.txt of the lc0 code)

  10. run build.sh

/check, whether the build script finds

Library cublas found: YES Library cudnn found: YES Library cudart found: YES

and hope for the best

BTW, I'm not coding but worked and compiled source code on linux systems since the late 90ies. There might be other or simplier solutions.

Ciao

acepoint