[Mutant Race Kernels - 2] Pin assembly files for baseline kernel #55
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 502 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #55"
general
weight: 0.35
stbaione
This pins the device assembly (
.s) of each baseline race-corpus kernel forgfx950andgfx1250, and adds the tooling that regenerates that assembly, records how it was built, andchecks it.
Pinning keeps the baselines identical across toolchains and runs, so the mutants derived from
them are deterministic. The pinned baselines are what mutant generation and the race-detection
runs consume.
Motivation
1. Converting HIP to assembly needs a compiler step, which is hard to add and manage in CI.
2. Our tools should run on a fixed set of instructions.
3. A toolchain update should not silently change the instructions, and with them the mutants.
Technical Details
Pinned listings. 21 cases, 37 listings: 16 for gfx950 and 21 for gfx1250, under
corpus/race/asm/<target>/<kernel>.s. hipcc's per-invocation__hip_cuidhash is normalized, soregenerating with the same toolchain reproduces the files exactly. The baselines have no races;
each mutant should be detected as having at least one.
Inventory:
cases.toml. It declares the corpus targets, and each case's kernel, targets andoptional headers.
inventory.pyreads and validates it for both scripts.Recipe:
asm/<target>/recipe.toml. It records how a target's listings were built:--version;recipe.pyreads and validates it. Assemble the listings, and the mutants derived from them, withthe SDK their recipe names.
Regeneration:
regenerate_asm.py.ROCM_PATH,rocm-sdk, or/opt/rocm. It and its compiler areresolved once per run, and only that SDK's own
hipccorclang++is used.CPATH,HIP_,HIPCC_*_FLAGS_APPEND,CCC_OVERRIDE_OPTIONS, ...) are removed from the compile. Extra flags andinclude directories go through
--cxxflags, which the recipe records.recipe are replaced together, only when all of its cases compiled, and with exactly the listings
its cases produce. A failed or skipped case leaves the target as committed, and an interrupted run
leaves a state the inventory check rejects.
--check. It regenerates into a temporary directory and compares the result with thecommitted assembly, reporting a changed recipe separately from a toolchain update.
| Exit code | Meaning |
|---:|---|
| 0 | Success |
| 1 | Drift |
| 2 | A case failed to compile, or an argument is invalid |
| 3 | Incomplete: a case was skipped (see
--allow-skipped), or nothing was compared || 4 | The inventory or the toolchain cannot be used |
Inventory check:
check_cases.py. It needs no compiler and is suited to CI. It checks:cases.tomlagainstkernels/andasm/, so every listing belongs to a case;.amdgcn_targetmatches its directory;recipe.toml.It exits 0 on success and 1 on any problem.
The workflow is documented in
corpus/race/README.md.Test Plan
Will be included & used as an artifact in an overall testing workflow in a later PR.
This PR also has a suite of unit tests.
Test Result
Submission Checklist