PTX
PTX (Parallel Thread Execution) is NVIDIA’s virtual instruction-set architecture and intermediate language for GPU programs.
CUDA for LLMs
PTX is NVIDIA's virtual instruction set architecture and intermediate assembly language for GPU programming.
- How it is used
- Inspect emitted GPU instructions to understand execution, control low-level behavior, and diagnose kernel performance.
- How deep it goes
- Defines PTX’s place in compilation, decodes WGMMA instruction tokens, and relates GEMM instructions to observed stalls.
- Examples
- Uses vector-add instructions, WGMMA inline assembly, and tiled-GEMM loads and FMA to illustrate PTX.
- What you can do after
- Understand emitted instructions and diagnose shared-memory stalls; use higher-level abstractions without writing PTX for production tensor-core kernels.
GPU Programming with Triton
PTX is NVIDIA's low-level virtual instruction-set representation for GPU programs.
- How it is used
- Positions PTX as a low-level representation in Triton’s compilation pipeline and a possible target for performance-critical hand-written kernels.
- How deep it goes
- Defines PTX as textual GPU instructions and traces its compiler role to CUBIN, without teaching PTX programming.
- Examples
- Uses Triton’s compiler pipeline from LLVM IR through PTX to CUBIN as its concrete artifact.
- What you can do after
- Understand how PTX fits between LLVM IR and GPU binary generation in Triton’s compilation pipeline.
Related concepts
- cubinproduces · A cubin is a CUDA binary containing GPU machine code compiled for a particular NVIDIA GPU architecture.
- inline assemblyused by · Inline assembly is assembly-language instructions embedded directly in source code written in another programming language.
- LLVM IRproduced by · LLVM IR is a typed, low-level intermediate representation used by the LLVM compiler infrastructure for program analysis and code generation.
- WGMMAused by · WGMMA is an NVIDIA GPU instruction family that performs matrix multiply-accumulate operations collectively across a warp group.
Questions about PTX
What is PTX?
PTX (Parallel Thread Execution) is NVIDIA’s virtual instruction-set architecture and intermediate language for GPU programs.
Which Manning books explain PTX?
CUDA for LLMs and GPU Programming with Triton.
What is PTX a kind of?
PTX is a kind of virtual assembly language. A virtual assembly language is an assembly-like instruction representation that abstracts over the machine code of specific processor generations.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

