Repository navigation
Conversation
|
Tested I ranked the code ranges of all 26,503 shaders from my 1.0.2.1 copy by size within each stage and selected the median and largest entry per stage (CS, GS, MS, PS, VS). I called For the largest CS, I ran three fresh processes per revision, alternating order. Each process read the input, disassembled it in both wave modes, encoded and hashed the returned listings. Linux
That is a 71% lower median peak RSS for this input. This measures the text path in a standalone process. It does not measure the whole package’s peak memory. Aggregate measurements only. AI-assisted. |
|
Verified the one-file overlap with #4928 at Four focused tests passed on #4928 and the resolved tree. All 24 explicit-target comparisons matched #4928's listing bytes and structured metadata across gfx1013/gfx1030 and wave32/wave64. Both CLI listings matched. On one valid 8,192-instruction gfx1030 case, peak traced Python allocation was 12,240,869 B on #4928 and 1,948,377 B on the combined tree, with identical output. Both published branches remain separate. Synthetic CPU verification, AI-assisted. |
|
Tested
No issues found. AI-assisted review (Gemini 4 Neon). |
|
PASS, with notes. The refactor is behaviour-preserving: a differential run over 328 blobs / 880 instructions, with Two notes:
Approving as a safe refactor. AI-assisted review, no game files, no GPU. |
|
Thanks for the independent checks. Updated head |
|
Independent Windows check at Environment: Windows 11 x64, CPython 3.13.7, Tests:
Behavioural equivalence: 432 cases compared between parent Peak Python allocation for
Both sizes produced the same listing SHA-256 and
|
|
Follow-up to the earlier #4928 integration check. With #4943 at |
|
Re-checked the updated head
The only code change since the verified AI-assisted. |
|
Tested cfc09ac merged with main 3faac55 on Linux (WSL2), CPython 3.12.16 (-I): pass
|
|
Independent check of Environment: Windows 11, CPython 3.15.2, no game files.
Overlap: #4963 ( AI-assisted (Devin). |
|
Tested
|
|
Updated to On Windows with uv CPython 3.12.13, all 36 synthetic API comparisons matched main. CLI listings matched for gfx1013 and gfx1030. The decoder suite passed 14 tests with one optional LLVM test skipped. Five focused CLI and three line-ending tests passed. For 8,192 synthetic instructions, the same listing required 1,948,377 B peak traced Python allocation versus 12,240,869 B on main. This measures Python allocations during the call. AI-assisted, CPU only. |
shayderrr
left a comment
There was a problem hiding this comment.
Review
Reviewed change in PR #4943: Stream Python shader text disassembly to lower peak memory.
Scope: tests/test_rdna2_decode.py, tools/rdna2_decode.py
Diff: +58 / -12 across 2 file(s).
The change stays inside the stated scope and the touched files line up with the description. No unrelated production paths are pulled in, and the stated behavior is directly exercised by the diff. I'm approving this one.
Reviewed by shayderrr via automated batch review.
|
Thanks @whattheflop - I went through Stream Python shader text disassembly to lower peak memory and the diff around |
Fixes #4932. Coordination claim.
Share the existing instruction walk between the structured decoder and the text formatter. The text path writes each instruction to a buffer as it decodes, so it can release the instruction record before the listing is complete. The structured API, listing bytes, offsets, wave-size handling and invalid-word counting follow the existing rules.
Verified
Windows, uv-managed CPython 3.12.13, on upstream
3faac557. Twelve synthetic API comparisons and a CLI listing comparison matched the baseline. Peak Python allocations measured withtracemallocinclude the returned string and exclude input construction. Three measurements at each size agreed.Eight decoder tests, 20 shader-disasm tests, three newline tests, compilation, CLI help and the no-game-data check passed. With WSL LLVM 21.1.8 enabled, the parity test failed identically on main and this branch on the existing SDWA fixture. The allocation check does not measure RSS or runtime.
#4928 separately adds target-specific decoder names. The patches touch the same entry points; keep its target parameter when integrating either branch second.
AI-assisted. CPU only, synthetic inputs, no game data or protection changes.