mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #1546] bvh_tri_probe: fix skipped-kernel compare/exit, check_kernel stores, and atomic I/O (BVH-TRI-PROBE-COMPARE-CHECK-AND-IO) #1573
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1573
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1546
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/bvh-tri-probe-compare-and-io📝 Commits (1)
4cc96d1bvh_tri_probe: fix skipped-kernel compare/exit, check_kernel stores, and atomic I/O📊 Changes
2 files changed (+206 additions, -25 deletions)
View changed files
📝
tests/test_bvh_tri_probe.py(+115 -1)📝
tools/bvh_tri_probe.py(+91 -24)📄 Description
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)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.