Setup and Build Systems#

Compilation on DGX Station#

CMake#

CMake can automatically detect CUDA toolchains when certain prerequisites are met. Since DGX Station comes with the CUDA SDK pre-installed, CMake will detect and use it automatically. For example, run the following on your DGX Station:

git clone https://github.com/NVIDIA/CUDALibrarySamples.git
cd CUDALibrarySamples/cuBLAS/Level-3/gemm
mkdir build
cd build
cmake  -DCMAKE_CUDA_ARCHITECTURES="103-real" ..
cmake --build .
./cublas_gemm_example

If CMake is unable to find nvcc, add -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc to the first cmake call. For optimal performance, make sure to compile for the compute capability of your device.