shader_diff: exercise scalar addition and carry (s_add_u32) #453
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/453"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-11-24T05:40:15Z.
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123163799
What changed
tools/shader_diff.py: Generates_add_u32from seeded SGPRs by default and add--opsfiltering for focused runs and replay, exporting both the running sum andscccarry into the two least-recently-written export VGPRs so both CPU oracles compare them.tests/test_shader_diff_scalar_add.py&tests/test_shader_diff.py: Deterministic synthetic tests covering default generation,--ops s_add_u32replay, ordinary addition, 32-bit wraparound (0xffffffff + 1,0xffffffff + 2), negative mismatch control, and updated fixture seeds preserving register-allocation boundary coverage.Testing & Disclosure
gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).ubiquitarianism/leonidamain(8f481cf16):pytest tests/test_shader_diff.py(20/20),test_shader_diff_exit.py(18/18),test_shader_diff_scalar_add.py(4/4), 10/10--ops s_add_u32runs, 3/3 self-test canaries,check_no_game_data.py, LF check — all passed.Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T08:52:25Z.
Merging. Why merged: the shader differential runner now covers scalar add and carry (s_add_u32), and replay commands include --ops.
Why it's good: test-harness only; on main
1c93c86: shader_diff tests 38 -> 42 (11 fail without the change); repo-consistency set 563/563.AI-assisted (Claude Code, Claude Opus 5.5).