bvh_tri_probe: fix skipped-kernel compare/exit, check_kernel stores, and atomic I/O (BVH-TRI-PROBE-COMPARE-CHECK-AND-IO) #1546
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1546"
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 IlyassRS3 on 2026-11-25T04:07:42Z.
What
Fix comparison, safety-check, architecture-skip, and file-output bugs in
tools/bvh_tri_probe.pywithout changing any kernel assembly lines (PINNEDhashes are unchanged):"OK"(compare,main):run_hw()skips a kernel (e.g., 8192-word lane kernels under Linux DRM's 4096-word limit) and the translator backend is not enabled,valsincompare()is empty, soall(v == want for v in vals)vacuously evaluated toTrue, marking 448–896 skipped rows"OK"and counting them as matches."SKIP", report skipped counts separately inmain()'s summary ({matched} match, {bad} mismatch, {skipped} skipped), and exit77when every selected row was skipped.check_kernel():ValueError(instead of rawStopIteration) on an emptyk.caseslist and guardguard < 2before slicinglines[guard - 2:guard].global_store*instruction (including implicitoffset:0stores without anoffset:suffix), use the instruction's actual byte width (previouslys[24:25]hardcoded+ 4, missingglobal_store_dwordx4overflows pastctl + 16), reject negative offsets (off < 0), and reject unknown store ops/bases withValueErrorinstead of rawKeyError.main):ValueErrorfromasm.family(oracle.arch)(e.g.gfx900) so--oracle hwprintsSKIP: <arch> is not GFX10 (RDNA1/RDNA2)and returns77as documented instead of crashing with an uncaught traceback.write_kernels,main):--write-kernelsagainst empty/whitespace strings and existing non-directory paths witherror: ...and exit2(previously--write-kernels ""was silently ignored and an existing file raisedFileExistsError), and catch(OSError, ValueError)cleanly..s,.json, and--jsonoutputs atomically via a sibling temp file (newline="\n",file_mode.published_mode,replace_retry.replace,allow_nan=False) and terminate per-kernel.jsonfiles with"\n".Claimed in the coordination issue as
BVH-TRI-PROBE-COMPARE-CHECK-AND-IO— verified 0 open PRs and 0 prior claims; unable to post a comment on#14because GitHub disabled commenting once#14reached its 2,500-comment cap (and no successor"Coordinating who works on what"issue is open yet).Testing
python3 -I -W error tests/test_bvh_tri_probe.py -v: 22/22 OK (including all 5PINNEDkernel SHA-256 checks and 5 new/extended regression tests).python3 -I tools/bvh_tri_probe.py --self-test: OK (22 kernels, 564 single-lane cases, 2 x 7 lane cases).python3 -I tests/test_text_write_line_endings.py: 3/3 OK.python3 -I scripts/check_no_game_data.py tools/bvh_tri_probe.py tests/test_bvh_tri_probe.py: clean.python3 -m compileall -q tools/bvh_tri_probe.py tests/test_bvh_tri_probe.py: clean.Mutation check against unpatched
main:tools/bvh_tri_probe.py: all 6 new/extended tests fail onmain(FAILED (failures=3, errors=3)).AI-assisted: yes
GPUs tested: none (CPU-only tests with stand-in oracle on macOS; no GPU or game files needed)
Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T04:07:57Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by GeorgiyDemo on 2026-11-25T04:20:08Z.
Tested
4cc96d172on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), againstmainc7e82e26e(Python tool; hardware path not run):tests/test_bvh_tri_probe.py: 22 passed, 678 subtests passed at this head (thePINNEDkernel hashes are unchanged, as the PR says).main: 6 failed, 16 passed, 675 subtests — the skipped-kernel compare/exit,write_kernelsand atomic JSON-replace tests.run_hw()on a real AMD GPU (none here), so the hardware-kernel skip path is only covered through the tests' mocks.AI-assisted; synthetic fixtures only, no game data.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T10:45:24Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 19 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)