Repository navigation
Conversation
|
Reviewed 9ba1fa9: navmesh_decode now imports AI-assisted review. Recommendation: Merge |
…eads from a group counter A compute program with console lanes relabels its threads so that each host wave holds a wave-aligned run of console threads. Outside a console wave64 program run as 32-lane halves, the console thread was the flat id of the wave's first lane rounded down to the wave size, plus the lane. A host need not fill its waves that way: a 32-lane host fills 2-D groups from 16 x 2 tiles, so two waves of a 32 x 2 group round down to the same base and half the group's threads get the ids of the other half. Such programs, in groups larger than one host wave, now take their threads from an LDS counter as the halves path already did (wave_base): every thread zeroes it, the group meets, and each wave's first active lane adds for its wave. A full wave takes the next aligned block from the low 16 bits; a wave with fewer lanes adds its lane count to the high 16 bits and is placed past the full blocks, so it cannot shift a full wave off its alignment (this also covers the halves path's groups whose size is not a multiple of 32, where each wave used to add a fixed 32). Lanes are placed by their rank among the active lanes. For groups of full 32-lane waves the halves path gives the ids it gave before. LEONIDA_THREAD_TICKET, on by default; 0 keeps the old rounding. It is read by the translator, so it joins the switches the shader cache keys on (shader_cache.rs). Tests choose it per thread (TEST_THREAD_TICKET) instead of through the environment. from TaynanGT/Vice-Tay c125c0c, GPL-3.0 (Garu667's upstream fix for VIctory issue ProjectLeonida#1243). Its follow-up 53c9ab5 (the group-info SGPR from the relabelled wave) is not taken: this tree does not lower that SGPR at all, a program reading it is refused. Checked: wave64_tests' new test, a console wave32 program with v_mbcnt in a 32 x 2 group that stores 1 at dword 32y + x, run on the host GPU (NVIDIA, 32-lane waves): the old rounding writes 32 of 64 dwords, the counter all 64. cargo test -p leonida-shader --lib: 282 passed, 1 failed (typed_d16_table_uav_roundtrip_uint_sint_and_float, which fails the same way without this change); cargo check --profile diag -p leonida --features diagnostics. Not run in the game. AI-assisted. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
#1243 | head 9ba1fa9 (merged cleanly with main c7753ed) | live NTFS Audited |
|
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main c8bf0e7, PR head 9ba1fa9 : red none / green OK No test in the PR:
Verdict: NO RED (correct refactor, no test). AI-assisted: Claude Code |
|
Tested
AI-assisted (Claude Code). |
|
Added:
Every PR in this series now touches that AI-assisted. |
92558cc to
352ea02
Compare
|
Rebased onto Verified on the new head:
No behaviour change beyond the shared helper. Ready to merge: |
aslan2142
left a comment
There was a problem hiding this comment.
Reviewed the diff against main: delegating the report-path guard in tools/navmesh_decode.py to report_paths.same_report_path is clean and clean-room verified, but this branch currently conflicts with main in tests/test_report_paths.py:8-12 (SHARED tuple updated by #2639 and earlier merges). Keep the LEGACY_COPIES = set() update in tests/test_report_paths.py:17 when rebasing. Please rebase onto current main so CI runs cleanly.
(AI-assisted review.)
352ea02 to
298601b
Compare
It was the last tool carrying its own copy, so LEGACY_COPIES is empty now.
With the SHARED entry on main, test_switched_tools_import_the_helper_and_define_no_copy
fails ("'from report_paths import same_report_path' not found"); with this branch it passes.
298601b to
9ca1256
Compare
Claimed in the coordination issue as: NAVMESH-DECODE-SHARED-REPORT-PATH (#14 (comment))
Depends on: none
Fixes: none
What and why
tools/navmesh_decode.pycarried a full private copy oftools/report_paths.py(:1049-1081):_PC_CASE_SENSITIVE,_case_insensitive_volume(the macOSpathconfprobe),_path_key(realpath + normcase + NFD casefold) and its ownsame_report_path, all used by the four output guards at:1101(--csvagainst--out),:1108(the input),:1112(the carve folder'sindex.json) and:1115(each carved entry). CONTRIBUTING.md asks a report writer tocall
report_paths.same_report_pathinstead of deriving the answer again.The copy was also missing the part the shared helper has and it does not: the folding-volume probe
(
same_name_on_folding_volume). Its macOS probe answers only on APFS/HFS+ andnormcasefolds only on Windows, soon a Linux mount that ignores case (vfat, exFAT, CIFS)
--out R.jsonand--csv r.jsonpassed as two report pathsand the second replaced the first.
The four private helpers and the now-unused
unicodedataimport go (1 insertion, 37 deletions). The module keepsthe name
same_report_pathbecausetests/test_report_path_case.pyresolvesnavmesh_decode.same_report_path; it isnow the imported function. Different topic from NAVMESH-JOAAT-LATIN1 (
joaat_csencoding). No behaviour change onWindows, macOS or a case-sensitive Linux filesystem.
Tested
tests/test_navmesh_decode.pyandtests/test_report_path_case.py: 20 passed, 1 skipped, 15 subtests passed.python -I tools/navmesh_decode.py --help: prints its usage (the import works under-I).python -m compileall -q tools/navmesh_decode.py: clean.machine is NTFS, where
normcasealready folds case.tests/test_report_paths.pycovers the helper's ownfolding-volume answer.
GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)