
上QQ阅读APP看书,第一时间看更新
Mac
This section covers steps to install CUDA on macOS. It needs the *.dmg installer downloaded from the CUDA website. The steps to install after downloading the installer are as follows:
- Launch the installer and follow the onscreen prompt to complete the installation. It will install all prerequisites, CUDA, toolkit, and CUDA samples.
- Then, you need to set environment variables to point at CUDA installation using the following commands:
If you have not installed CUDA at the default locations, you need to change the path to point at your installation location.
export PATH=/Developer/NVIDIA/CUDA-x.x/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-x.x/lib\
${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
- Run the script: cuda-install-samples-x.x.sh. It will install CUDA samples with write permissions.
- After it has completed, you can go to bin/x86_64/darwin/release and run the deviceQuery project. If the CUDA toolkit is installed and configured correctly, it will display your GPU's device properties.