Options (7)
-o, --output-filebooleanCompile a CUDA program
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}}-g, --debugbooleanGenerate debug information
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-g|--debug]}} {{[-G|--device-debug]}}-G, --device-debugbooleanGenerate debug information
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-g|--debug]}} {{[-G|--device-debug]}}-I, --include-pathbooleanInclude libraries from a different path
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-I|--include-path]}} {{path/to/includes}} {{[-L|--library-path]}} {{path/to/library}} {{[-l|--library]}} {{library_name}}-L, --library-pathbooleanInclude libraries from a different path
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-I|--include-path]}} {{path/to/includes}} {{[-L|--library-path]}} {{path/to/library}} {{[-l|--library]}} {{library_name}}-l, --librarybooleanInclude libraries from a different path
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-I|--include-path]}} {{path/to/includes}} {{[-L|--library-path]}} {{path/to/library}} {{[-l|--library]}} {{library_name}}--generate-codebooleanSpecify the compute capability for a specific GPU architecture
Example:
nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-gencode|--generate-code]}} arch={{arch_name}},code={{gpu_code_name}}Examples (4)
Compile a CUDA program
nvcc path/to/source.cu [-o|--output-file] path/to/executableGenerate debug information
nvcc path/to/source.cu [-o|--output-file] path/to/executable [-g|--debug] [-G|--device-debug]Include libraries from a different path
nvcc path/to/source.cu [-o|--output-file] path/to/executable [-I|--include-path] path/to/includes [-L|--library-path] path/to/library [-l|--library] library_nameSpecify the compute capability for a specific GPU architecture
nvcc path/to/source.cu [-o|--output-file] path/to/executable [-gencode|--generate-code] arch=arch_name,code=gpu_code_namemade by @shridhargupta | data from tldr-pages