Explorer

PTX Playground

Listing P.1 — Vector Add

PTX target: sm_90

C[i] = A[i] + B[i]; per-thread body only — addresses already computed, bounds guard omitted

Assumed live on entry%rd1, %rd2, %rd3byte addresses of A[i], B[i], C[i] — computed from the thread index, valid, and naturally aligned to the 4-byte access size

Expected issue / dependency schematic

Columns preserve PTX source order, not time. Hardware issues SASS, not PTX: the pipe markers assume a straightforward lowering, and ptxas may reorder, fuse, or eliminate instructions. Markers encode events, never durations, and spacing is not to scale.
Pipeline labels follow Nsight Compute's pipeline taxonomy, which mixes physical units, logical categories, aggregates, and sub-pipelines. Final SASS dispatch is compiler-, instruction-, and target-dependent.

Position 1 issues ld.global.f32 %f1, [%rd1]; on the LSU pipeline. Position 2 issues ld.global.f32 %f2, [%rd2]; on the LSU pipeline. Position 3 issues add.rn.f32 %f3, %f1, %f2; on the FMA pipeline. Position 4 issues st.global.f32 [%rd3], %f3; on the LSU pipeline. Instruction 3 reads %f1 written by instruction 1 and %f2 written by instruction 2. Because issue within a warp is in-order, once instruction 3 becomes the warp's next instruction the warp is ineligible until those results have returned — a long-scoreboard stall. Instruction 4 reads %f3 written by instruction 3.

Expected pipe
Depends
Warp
  • Instruction 3 cannot issue until %f1, %f2 are ready

A fading line has no consumer in this excerpt — no register result is awaited

A dot marks where a result is required, not when it returns; two dots at the same position do not imply the loads return together.

FMA
ALU
ADU
LSU
TMA
XU
Tensor
CBU

Instruction details for ld.global.f32 %f1, [%rd1];

LSU issue pipeline

ld.global.f32 %f1, [%rd1];

Issue a load of A[i] to L1TEX. The LSU is not occupied for the full end-to-end latency; scattered or poorly coalesced lane addresses increase the sectors accessed and may require multiple serialized L1TEX wavefronts

SASS family
LDG family (expected)
Result readiness
Scoreboard-tracked
Logical category
LSU
Named PTX register operands
1 written / 1 read

Register Usage

Writes
%f1
Reads
%rd1

Named PTX virtual register operands, private to each thread — one name, and each active lane has its own value. One name is not one hardware register: a 64-bit %rd occupies a pair of 32-bit GPRs, and ptxas assigns the physical SASS registers, reusing or eliminating these entirely.

Pipeline Legend

FMA: Most FP32 arithmetic — FADD, FMUL, FFMA — plus integer multiply and dot products
ALU: Logic, bit manipulation, and non-multiply integer arithmetic
ADU: Address-divergence handling for branches and jumps, plus constant loads and block-level barrier support
LSU: Issues loads, stores, atomics and reductions to L1TEX; also shuffles, S2R, and some CTA barriers
TMA: Asynchronous bulk transfers — primarily global to shared, also between the shared memories of a cluster and some shared-to-global reductions
XU: Transcendental and data-type conversion: sin, cos, rsqrt, and numeric conversions
Tensor: Executes the MMA instruction families; Nsight also exposes narrower tensor sub-pipelines
CBU: Warp-level convergence, branch, and barrier instructions