1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 01:02:09 +02:00

nvcc: add page (#11618)

This commit is contained in:
Zhiyuan Pan 2023-12-01 13:34:11 +08:00 committed by GitHub
parent 3b645a018b
commit 47e6495906
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
pages/common/nvcc.md Normal file
View file

@ -0,0 +1,20 @@
# 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}} -I{{path/to/includes}} -L{{path/to/library}} -l{{library_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}}`