nvcc
The NVIDIA CUDA Compiler Driver. More information: <https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc>.
Install
- All systems
-
curl cmd.cat/nvcc.sh
- Ubuntu
-
apt-get install nvidia-cuda-toolkit
- Arch Linux
-
pacman -S cuda
- Kali Linux
-
apt-get install nvidia-cuda-toolkit
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install nvidia-cuda-toolkit
- Dockerfile
- dockerfile.run/nvcc
The NVIDIA CUDA Compiler Driver. More information: <https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc>.
-
Compile a CUDA program:
nvcc path/to/source.cu -o path/to/executable
-
Generate debu[g] information:
nvcc path/to/source.cu -o path/to/executable --debug --device-debug
-
Include libraries from a different path:
nvcc path/to/source.cu -o path/to/executable -Ipath/to/includes -Lpath/to/library -llibrary_name
-
Specify the compute capability for a specific GPU architecture:
nvcc path/to/source.cu -o path/to/executable --generate-code arch=arch_name,code=gpu_code_name
© tl;dr; authors and contributors