NVIDIA SASS for Visual Studio Code
Syntax highlighting and contextual tooltips for NVIDIA SASS disassembly produced by
nvdisasm, cuobjdump -sass, Nsight, and shader-cache extraction tools.
This extension is SASS-specific. It recognizes the native NVIDIA instruction format rather than
PTX, including instruction postfixes, uniform registers, predicate destinations, constant banks,
and the control information found in real disassembly listings.
SASS is intentionally undocumented, and NVIDIA does not recommend relying on it. Consequently,
there are no guarantees about how this extension will work in the long run. It is currently tested
on Ampere- and Ada-generation GPUs. As such, take the descriptions with a pinch of salt.
Contributions are welcome to improve the factual correctness of the descriptions.
You can toggle the above verbose hover descriptions in settings:

Highlights
The extension comes with light and dark themes.
- Highlights 255 NVIDIA-documented opcodes plus graphics-pipeline instructions seen in shader
disassembly.
- Shades opcode postfixes by position, so
LDG.E.128.STRONG.SM remains easy to scan.
- Uses warm colors for per-thread state (
R*, P*) and cold colors for warp-uniform state
(UR*, UP*, c[][]).
- Brightens destinations while keeping sources at their register-class color. Store addresses
remain sources, and writes to
RZ, URZ, PT, or UPT are shown as discarded results.
- Shows hover documentation for opcodes, postfixes, registers, special registers, constants,
immediates, instruction addresses, and Maxwell-style control-code fields.
- Elaborate opcode hovers bind algorithms to the current operands and translate constant
LOP3/PLOP3 truth-table immediates into equivalent Boolean expressions.
- Adds function and label entries to the Outline and breadcrumbs views.
- Supports raw
nvdisasm, cuobjdump -sass, Nsight export, and bare instruction formats.
Use
Open a .sass or .nvsass file and select either SASS Dark or SASS Light from
Preferences: Color Theme. To apply the language mode manually, run Change Language Mode
and choose NVIDIA SASS.
The .sass extension is also used by the indented CSS preprocessor syntax. If you work with both,
override individual paths or file patterns in your VS Code settings:
{
"files.associations": {
"**/shader-dumps/*.sass": "nvidia-sass",
"**/styles/*.sass": "sass"
}
}
Example:
/*0120*/ @!P5 LDG.E.STRONG.SM R11, [R12.U32+UR4] ;
/*0130*/ STG.E.128.STRONG.SM [R19.U32+UR4], R0 ;
/*0140*/ UIADD3 UR6, UP0, UR4, 0x100, URZ ;
In the bundled themes:
R11, R12, R19, and R0 are warm per-thread registers.
UR4 and UR6 are cool warp-uniform registers.
R11, UR6, and UP0 are emphasized as destinations.
- All registers in the store are sources; the extension does not mistake the address for a
destination.
Settings
nvidiaSass.semanticHighlighting: refine register colors using destination/source roles.
nvidiaSass.hover.enabled: enable contextual tooltips.
nvidiaSass.hover.detail: choose concise or elaborate opcode tooltips. Elaborate mode adds
a context-aware algorithm/formula using the current registers and literals, operand behavior,
execution domain, scheduling notes, live operand roles, and decoded active postfixes. In the
Settings UI, open Extensions > NVIDIA SASS and select Elaborate under Hover: Detail.
nvidiaSass.hover.architecture: select the architecture used for opcode availability checks.
auto reads EF_CUDA_SM* from the file header.
Reference data
Opcode names and architecture availability come from the
NVIDIA CUDA Binary Utilities instruction-set reference.
Postfix semantics are not comprehensively documented by NVIDIA, so every curated postfix entry
records whether it comes from the PTX ISA, published reverse engineering, or observed disassembly.
Hover text exposes that provenance instead of presenting inference as specification.
The grammar and examples also draw on:
Development
The extension is dependency-free CommonJS and has no build step.
py tools/verify.py
py tools/package_vsix.py
verify.py checks JSON and grammar structure, manifest/theme/provider consistency, parser behavior,
operand roles, and opcode/postfix coverage across the sample corpus. package_vsix.py creates an
installable VSIX without requiring vsce; add --install to install it through the VS Code CLI.
Regenerate the first-party opcode table with:
py tools/fetch_opcodes.py
The generated data/opcodes.json is kept separate from hand-curated graphics opcodes and postfix
descriptions.
License
MIT