Repository navigation
feat(perf-integrity): add calibrated cold-cache sweep, rotating buffers, and versioned input recipes (ALMIOPEN-3437) - #143
Open
SamuelReeder wants to merge 1 commit into
Conversation
SamuelReeder
force-pushed
the
users/sareeder/perf-integrity
branch
from
November 24, 2026 18:17
1ef0cf1 to
53d16db
Compare
…rs, and versioned input recipes (ALMIOPEN-3437)
SamuelReeder
force-pushed
the
users/sareeder/perf-integrity
branch
from
November 24, 2026 19:06
53d16db to
526acf8
Compare
This was referenced Nov 24, 2026
SamuelReeder
changed the base branch from
main
to
users/sareeder/perf-integrity-fixes
November 24, 2026 19:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
users/sareeder/perf-integrity-fixes→main): Performance-integrity bug fixes (timing unification, compare gates, runtime guards, telemetry, analytical v2, DVC setup)users/sareeder/perf-integrity→users/sareeder/perf-integrity-fixes):ALMIOPEN-3437— Calibrated cold-cache sweep, VRAM-safe rotating buffers, and versioned input recipesusers/sareeder/knob-sweeps→users/sareeder/perf-integrity): Strict--knobvalidation,--sweep-knobs, and--knob-candidatesSummary
Completes the
ALMIOPEN-3437deliverables on top of #149:timing.py): Replaces cold-cache zero-fill with a coalesced read-only capacity sweep (hiprtcuint4kernel on HIP,torch.sumon Torch, with truthfulzero_fillfallback) sized per GPU (gfx90a: 24 MiB,gfx942/gfx950: 640 MiB, unlisted GPUs:3 × L2_cache_sizeclamped to 4 MiB..1 GiB, fallback: 512 MiB).--cache-mode rotate,--rotate-buffers N): CyclesNindependent I/O buffer sets across launches across all four runtimes (hipdnn,pytorch,rocke,aiter) and hipDNN--oraclechildren, compatible with--timing-block N. Auto-sized from the active GPU's eviction target and capped at 60% of free VRAM (query_free_vram_bytes), clamping with a warning or failing fast before OOM; primes PyTorch ring sets1..N-1beforemeasure()and uses single-prepare()ring binding on AITER and rocKE. Recordsrun.config.rotate_buffersandtiming.{flush_method,flush_bytes,rotated_buffers}.--input-recipe {centered,llm,heavy_tail,legacy,zeros}, defaultcentered): Recordsrun.config.input_recipe,run.config.input_recipe_version, and per-graph 12-hexgraph.input_fingerprint, forwards--input-recipeto oracle and profiling children, and gatesdnn-benchmark compareoninput_recipe(treating missing keys in older schema 2/3 files as"legacy").centered(zero-mean, dense) replacesU[0, 1)as the default: Zero-meanN(0, 1)is dense and nonzero (< 0.1%round to0.0in fp16/bf16; it does not introduce sparsity or zero-skipping shortcuts —--input-recipe zerosis separate and diagnostic-only). Real model weights, LayerNorm/RMSNorm outputs, residuals, GELU/SiLU inputs, and SDPAQ/Kare approximately zero-mean signed. By contrast, all-positiveU[0, 1)locks sign bits to0and compresses exponents into[0.125, 1.0)(lowering MFMA/VALU switching power), collapses SDPAQK^Tsoftmax weights toward uniform, turns ReLU into a 100% pass-through, and hides sign bugs. Undercentered, unconstrained operands and SDPAQ/Kdraw fromN(0, 1), fp16/bf16 conv operands draw fromU[-1, 1), SDPAVand fp32/fp64 conv operands stay inU[0, 1)to avoid near-zero cancellation false failures, and strictly positive inputs (norm variances,inv_rms, scales, epsilons, dropout scale) draw fromU[0.5, 1.5). Use--input-recipe llmorheavy_tailfor heavy-tailed activation/outlier studies and--input-recipe legacyfor apples-to-apples comparisons against pre-PR runs.Risk Assessment
Risk Level: 4 / 5 — Changes default input generation (
centered), default cold-cache eviction (read_sweep), and adds--cache-mode rotateacross 30 files.Related
centereddefault). End-to-end verification in this PR ran ongfx90a; thegfx90a/gfx942/gfx950method comparison measurements live in theALMIOPEN-3437ticket research comments, sogfx942/gfx950CI verification of these defaults is provisional until thegfx950CI lane runs.Device / Architecture Coverage
gfx90a(MI210, local): Verifiedcenteredbf16 SDPA (PyTorch flash/efficient vs MATH:0mismatches), batchnorm variance (2 passed), coldread_sweep(24 MiB), auto-sized VRAM-awarerotate(rotated_buffers=48, 24.42 MiB onsample_conv_fwd), PyTorchrotateon scalar-epsilon graphs and with--pytorch-dispatch, and hipDNN--oracle --cache-mode rotate(1.71x).gfx942: Calibrated 640 MiB sweep size fromALMIOPEN-3437measurements; not re-executed on hardware in this PR.gfx950: Calibrated 640 MiB sweep size fromALMIOPEN-3437measurements; hipDNN/AITER SDPA validation requires thegpu-tests (gfx950, full suite)CI lane.Testing Summary
black --check(25.12.0): passed on all 40 modified/added Python files.PYTHONPATH=src .workspace/.venv/bin/python -m pytest tests/unit -m "not gpu" -q): 2,297 passed, 1 skipped, 0 failed.Testing Checklist
black --check(25.12.0) on all modified/added Python files2,297 passed, 1 skipped)gfx90a) targeted GPU checks (centeredbf16 SDPA, batchnorm variance, coldread_sweep, VRAM-awarerotate, hipDNN--oraclerotate, PyTorch--pytorch-dispatch+rotate)gpu-tests (gfx950, full suite)CI lane (hipDNN/AITER SDPA validation ongfx950)