PTX is both a virtual instruction set architecture (ISA) as well as a compiler intermediate format. Its purpose is to abstract away differences between the constantly changing GPU microarchitectures that are generally not binary compatible. The NVVM part of the CUDA compiler (derived from LLVM) generates PTX code and applies high-level machine-independent optimizations. The PTX code is then compiled by ptxas, another optimizing compiler, into machine code (SASS). ptxas applies some general but mostly machine specific optimizations and is responsible for register allocation and instruction selection and scheduling.
This model of evolving the hardware is markedly different from the long-term binary compatibility maintained in the x86 world. NVIDIA’s approach results in an acceleration of the technical evolution of the GPU hardware compared to x86 CPUs, while at the same time increasing the challenges of software development in the lowest layers of the software stack. Although NVIDIA may still be perceived as a hardware company, it employs more software engineers than hardware engineers per public statements from the company’s representatives, and is actually a fully integrated systems company.