# 什么是 NVIDIA CUDA 编译器驱动程序?(nvcc) NVIDIA CUDA 编译器驱动(NVIDIA CUDA Compiler Driver,即 nvcc)是用于编译 [CUDA C/C++](/gpu-glossary/host-software/cuda-c) 程序的工具链。它输出符合主机 ABI 的二进制可执行文件,其中包含要在 GPU 上执行的 [PTX](/gpu-glossary/device-software/parallel-thread-execution) 和/或 [SASS](/gpu-glossary/device-software/streaming-assembler) —— 这种文件被称为 "胖二进制文件"(fat binary)。 这些二进制文件可以使用与其他二进制文件相同的工具(如 Linux 上的 `readelf`)进行检查,还可以使用专门的 [CUDA 二进制工具集](/gpu-glossary/host-software/cuda-binary-utilities) 进行额外操作。 其中包含的 [PTX](/gpu-glossary/device-software/parallel-thread-execution) 代码通过 [计算能力 (Compute Capability)](/gpu-glossary/device-software/compute-capability) 进行版本控制,可通过向 `--gpu-architecture` 或 `--gpu-code` 选项传递 `compute_XYz` 值来配置。 包含的 [SASS](/gpu-glossary/device-software/streaming-assembler) 代码则通过 [流式多处理器架构版本 (SM architecture version)](/gpu-glossary/device-hardware/streaming-multiprocessor-architecture) 进行版本控制,通过向 `--gpu-architecture` 或 `--gpu-code` 选项传递 `sm_XYz` 值来配置。将 `compute_XYz` 传递给 `--gpu-code` 也会触发生成与 [PTX](/gpu-glossary/device-software/parallel-thread-execution) 版本相同的 [SASS](/gpu-glossary/device-software/streaming-assembler) 代码。 主机/CPU 代码的编译通过主机系统的编译器驱动,例如 `gcc` 编译器驱动程序。请注意,不要将编译器驱动程序与硬件驱动程序(如 [NVIDIA GPU 驱动程序](/gpu-glossary/host-software/nvidia-gpu-drivers))混淆。 `nvcc` 的文档可以在 [此处](https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/) 找到。