Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Extracted .rodata Tables

Addresses apply to ptxas v13.0.88 (CUDA 13.0). VA base is 0x400000 (non-PIE); file offset = VA − 0x400000.

Every static constant table in ptxas's .rodata has been extracted to machine-readable JSON — 45 files covering 100% of the 7.16 MB section (≈64% recovered as structured data; the remainder is flex DFA tables, vtables, padding, and loose strings). The corpus lives in ptxas/extracted/ and is regenerated in ~0.5 s by ptxas/tools/extract_rodata.py (stdlib-only):

cd ptxas && python3 tools/extract_rodata.py     # --binary ptxas --output extracted/

manifest.json records the binary SHA-256, VA layout, and a checksum per file. All VA constants are pinned to v13.0.88; a different build needs new addresses.

This page indexes the corpus and links each group to the wiki section it backs. The tables are the primary evidence behind those pages; cite them directly when you need the full data rather than the representative rows quoted in prose.

Conventions

  • Opcode index — the runtime integer key for a SASS instruction (0–321). This is ptxas's internal id, not the SASS binary opcode field; opcode_master.json is the canonical index → mnemonic + encoding map.
  • ROT13 — user-visible names (opcodes, knobs, passes) are ROT13-obfuscated in the image; extracted names are decoded, with the raw form kept in a rot13 field.
  • Sentinels-1/0xFFFFFFFF = unused slot; 355 in opcode→encoding = take the extended dispatch path; 0xBA9E23 in ISel dispatch = no-match stub.
  • SM generation — most tables are per-SM or per-family (sm_7x, sm_8x, sm_10x), spanning sm_30 (Kepler) through sm_121 (consumer Blackwell).

Opcode & instruction identity

Backs SASS Opcode Catalog, PTX Instruction Table, Instructions & Opcodes.

FileRecordsContents
opcode_names.json322 + MercuryROT13-decoded SASS mnemonics; index = runtime opcode id (0=ERRBAR, 1=IMAD, 321=LAST)
opcode_master.json322Canonical per-opcode record: name + encoding category + ISel slot + SM generation
encoding_category_map.json322opcode index → encoding category (verified identity map)
opcode_to_encoding.json222opcodes 0–221 → ISel encoding slot; 355 = extended path; ≥222 use virtual dispatch
extended_sass_names.json467ROT13-decoded mnemonics with modifiers (FFMA2, FENCE.T, DSETP, …)
modifier_format_strings.json533ROT13-decoded format templates with modifier placeholders

SASS instruction encoding (Mercury pipeline)

Backs SASS Instruction Encoding, Encoding Dispatch Tables.

FileRecordsContents
format_descriptors.json38Per-format encoding geometry (136-byte descriptors: width + slot_sizes/types/flags); 15 unique format IDs; 1-slot=64b, 2-slot=128b, ID 16=256b
universal_slot_template.json3×10Default slot geometry (7,302 xrefs — most-referenced encoding table); sizes [3,2,4,6,8]
encoding_bitfield_lookup.json4,096modifier combination → SASS bitfield position (98% fill)
encoding_constants.json8 sub-tablesStructured encoding-slot lookups + 128 packed u16 slot pairs
encoding_geometry.json38 formatsDerived: format descriptors × tier-2 layout params
encoding_trees.json2 trees / 13,568 nodesHierarchical encoding decision trees (internal child ptrs; leaves = encoding id + .text handler VA)
tier2_modifiers.json6 groups / 28 xmmwordsPer-SM-generation encoder layout params (loaded at encoder ctx +404); each group carries its sm_range
modifier_value_tables.json40 arraysOri IR modifier enum → SASS binary value (tristate/quaternary + reordering tables)
instruction_legality.json60,416 sparse(opcode, modifier combo) → legality flags; 0x08000000 = special validation

SASS handler dispatch

Backs Encoding Dispatch Tables, Mercury Encoder.

FileRecordsContents
sass_handler_dispatch_1.json6,915opcode id → SASS encoder .text address (Format A/B variants; opcode_id = (category<<8) | variant)
sass_handler_dispatch_2.json3,511Second handler table (full-prologue encoders)
per_sm_handler_dispatch.json5 SM-gen tablesPer-SM encoding handler dispatch (SM50-7x, 75, 80-8x, 86-89, 100+); 492 opcodes shared across gens

Instruction scheduling & latency

Backs Latency Model, Scheduler Overview, Scoreboards.

FileRecordsContents
per_sm_latency_tables.json256+430+619Per-FU 72-byte records (unit_id, 2×8 pipe masks, 12 sched params); sm_8x/10x/7x
per_sm_dependency_rules.json11 SM tablesPer-unit 40-byte dependency rules (latency, throughput⁻¹, barrier latency/throughput, r/w latency, stall, issue slots); sm_60…sm_103
per_sm_scoreboard_configs.json7 SM tablesPer-unit 88-byte scoreboard config (≤6 (id,threshold,mask) triplets); sm_100 richest
scheduling_vtable.json77 ptrsScheduling backend vtable (8 core + 3×23 per-gen pipeline-query methods)
sched_encoder_dispatch.json330 + vtablesDispatch tables for the 85 KB scheduling encoder (sub_89FBA0): 330-entry jump table, 773 identity perm, resource-class dispatch
opcode_pipeline_map.jsonsm_10x:31, sm_7x:37(opcode, pipeline flags) → execution pipe (1=ALU, 2=FP64, 3=SFU, …)
sm_scheduling_seeds.json50(sm_id, gen_code, variant) → per-SM scheduling builder; gen 1=Fermi…9=Thor

Register allocation

Backs Allocator Architecture, Fatpoint Algorithm, GPU ABI.

FileRecordsContents
register_file_config.json2,784 u32Per-SM resource limits (GPR banks 120, pred 64, uniform 256, barriers 32, …)
register_class_aux.jsonsm_10x:97, 8x:24, 7x:150Per-SM register-class descriptors (64-byte: class_id, variants, range bounds)
register_class_constraints.json3×72Per-SM operand register-class constraints (≤5 (class,sub_a,sub_b) triplets)
regalloc_init_data.json196-ptr vtable + 1,218 reg idsAllocator init (dispatch vtable, SM-variant groups, reg-id arrays with bank<<16|reg)
occupancy_constants.json8 xmmwordPer-family occupancy-formula params
operand_resource_strategy.json6 vtables + 9 jump tablesPer-SM operand resource-cost eval (register-count matrices, min 13 / max 128)

Instruction selection (ISel)

Backs Instruction Selection.

FileRecordsContents
isel_dispatch_tables.json1,885 ptrsISel DAG pattern-matcher dispatch (273 = no-match sentinel 0xBA9E23; all verified in .text)
isel_node_descriptors.jsonvtable pool + 2 descriptorsISel node type system (polymorphic node vtables, operand field-offset blocks)
isel_operand_constraints.json39 × 0x100Per-arch operand-constraint records (9 opcodes; 25 type ids; 47-entry operand vtable; 399-entry op vtable)

SM architecture & targets

Backs SM Architecture Map.

FileRecordsContents
sm_id_enumeration.json28Supported compute capabilities sm_30…sm_121
sm_version_codes.json128 u16internal arch index → SM version code (bits[15:12]=major×10, [11:8]=minor, [7:0]=variant; 0x9004=sm_90a)
shared_memory_configs.json11 + 3Per-SM shared-memory size options (0…335,872 B)

Compiler configuration

Backs Knobs System, DUMPIR & NamedPhases, Pass Inventory.

FileRecordsContents
phase_names.json159Optimization pipeline phase names (0=OriCheckInitialProgram, 158=NOP)
knob_strings.json1,142ROT13-decoded internal tuning-knob names (OCG + DAG regions)
okt_knob_descriptors.json994Structured knob descriptors (type, default, params, flags, .bss offset; names linked at runtime)
supplemental_pass_names.json100Scheduler/scoreboard pass + feature names (SbXBlock*, SchedLds*, …)

Embedded code & intrinsics

Backs Intrinsic Table, Pseudo-Instruction Macros, String-Pool Encryption.

FileRecordsContents
embedded_ptx_intrinsics.json1,080.weak .func prototypes for CUDA builtins (WMMA/MMA/barrier/shared/sanitizer); categories cuda_other 549 / sm70 433 / sm20_math 70 / redux_sync 17 / sanitizer 7
wgmma_intrinsic_infra.json469 handlers + enumsWGMMA infra (pipeline depth=32/max_pending=128/latency=24; 469 PTX-intrinsic lowering handlers; 100 Mercury opcode enum arrays)
high_entropy_blob.jsonmetadataDescribes the 2.80 MB precompiled SASS stub region (607 __cuda_* builtins; entropy 7.998; SHA-256)
manifest.jsonBinary metadata + per-file checksums

Cross-References