Skip to content

tools: cuda_sass_identity.py rebuilds a differing image and fails on an unstable build - #1532

Merged
ashhart merged 2 commits into
ashhart:mainfrom
jschmied:sass-recheck
Oct 29, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
jschmied:sass-recheck

Conversation

@jschmied

@jschmied jschmied commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1440, as asked there. One commit, now rebased onto main after #1440's merge.

What

When an image differs between base and head, the tool builds it again from both trees, one build at a time:

  • A function counts as changed only if base and head differ again in the rebuild.
  • If a tree's two builds disagree on any function, it is reported as unstable, and the exit status is non-zero. A flaky build can never pass quietly.
  • Images that match on the first builds are not rebuilt, so a clean run costs the same as before.
  • --no-recheck keeps the old behaviour: the first builds' differences count, without a rebuild.

The logic sits in one function, recheck(), and the main loop only builds and prints.

Checks

  • python3 -m unittest cuda_sass_identity_test (from tools/zig): 6 tests pass. The 3 new ones use canned dumps:
    • a change both builds reproduce counts once, with nothing unstable;
    • a head whose rebuild matches the base is not a change, but it is unstable;
    • a base whose rebuild disagrees with itself is unstable.
  • A real change, NVFP4 fact tiles: fact_swiglu reads each mma A quad in one 16-byte load #1525 (b30d5b9d3 → 1e627ed14, nvcc 13.0):
    • nvfp4_experts has 5 functions changed (tf_nvfp4_fact_swiglu on 5 SMs);
    • after the rebuild: 5 differ again, 0 unstable.
  • A simulated unstable build: an nvcc wrapper gives only the base's rebuild -Xptxas -O1. Result: 65 functions unstable, exit 1.
  • lean_check: 0 new. zig build test: passes.

jschmied and others added 2 commits October 29, 2026 12:31
…an unstable build

A function counts as changed only if base and head differ again in a rebuild,
one build at a time; a tree whose two builds disagree is reported as unstable
and the exit status is non-zero. --no-recheck keeps the first builds' count.
@ashhart
ashhart merged commit 39fd6e1 into ashhart:main Oct 29, 2026
@ashhart

ashhart commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Thanks @jschmied, landed as 80d7c3b with its changelog line. The rebase met #1555's move of the fp4pair control to common/fp_pairs.cuh, so the new usage text names that path; the six unit tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants