Repository navigation
Conversation
c1_guard.py read and analysed each shader library's MSL in one loop on one core, after a full dmsh_build.py run whose compile already used every core: FINAL FANTASY RESONANCE's 73,496 shaders kept one core busy for about 7 minutes (11.8 minutes for it and cb_extent.py together, on an M5 with 10 cores). Each shader is checked on its own (its MSL and its reflection's c1 length), so the loop body becomes unproven(), mapped over the sorted file names with a multiprocessing pool as cb_extent.py already does; Pool.map keeps the order, so c1_full.tsv lists the same keys in the same order as before. Checked on Silver Pines' 56,386 Mac libraries (chain b-98ca73d18869): the same 13,372 keys, byte for byte below the header line; 299 s on one core, 44 s with the pool (10 cores). c1_guard.py is not a chain input (dmsh_chain.py), so no library or chain version changes. The Python tool tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018XsrnTnMEXD4jZMChLCZPK
|
The failing ruff and pyright (ratchet) check is not from this change: The three new findings are all on I ran The fix is either an assert on the spec and its loader before 🤖 Generated with Claude Code |
The ratchet in .github/workflows/lint-python.yml fails on main since 78cb26d with three new pyright findings on this file's line 11 (spec_from_file_location's ModuleSpec | None passed to module_from_spec, and .loader.exec_module on it). An assert that the spec and its loader exist states what holds for a script path that exists and clears all three; dm/tools/lint_python.py --against origin/main: 411 findings, all in the baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018XsrnTnMEXD4jZMChLCZPK
|
Added the lint fix as a separate commit (2/2): an 🤖 Generated with Claude Code |
c1_guard.py read and analysed each shader library's MSL in one loop on one core, after a full dmsh_build.py run whose compile already used every core: FINAL FANTASY RESONANCE's 73,496 shaders kept one core busy for about 7 minutes. Each shader is checked on its own (its MSL and its reflection's c1 length), so the loop body becomes unproven(), mapped over the sorted file names with a multiprocessing pool as cb_extent.py already does; Pool.map keeps the order, so c1_full.tsv lists the same keys in the same order as before. Same keys, byte for byte below the header line, on three games: Silver Pines (56,386 libraries, 13,372 keys) 299 s -> 44 s on an M5; Pokemon Legends Z-A (28,603, 1,011 keys) 206 s -> 17 s and Pokemon Scarlet (30,142, 325 keys) 211 s -> 21 s here. c1_guard.py is not a chain input (dmsh_chain.FILES), so no library or chain version changes. The PR's second commit (test_nsp_space.py's spec assert) is already on main as part of 4fc7f51. PR #366 carried the same c1_guard change. Co-authored-by: Chen Chia Yang <[email protected]>
|
Thanks! The I checked it on two more games and got the same keys, byte for byte below the header line:
I left out the second commit ( |
c1_guard.py read and analysed each shader library's MSL in one loop on one core, after a full dmsh_build.py run whose compile already used every core: FINAL FANTASY RESONANCE's 73,496 shaders kept one core busy for about 7 minutes. Each shader is checked on its own (its MSL and its reflection's c1 length), so the loop body becomes unproven(), mapped over the sorted file names with a multiprocessing pool as cb_extent.py already does; Pool.map keeps the order, so c1_full.tsv lists the same keys in the same order as before. Same keys, byte for byte below the header line, on three games: Silver Pines (56,386 libraries, 13,372 keys) 299 s -> 44 s on an M5; Pokemon Legends Z-A (28,603, 1,011 keys) 206 s -> 17 s and Pokemon Scarlet (30,142, 325 keys) 211 s -> 21 s here. c1_guard.py is not a chain input (dmsh_chain.FILES), so no library or chain version changes. The PR's second commit (test_nsp_space.py's spec assert) is already on main as part of 7b92332. PR seedds#366 carried the same c1_guard change. Co-authored-by: Chen Chia Yang <[email protected]>
c1_guard.pyreads and analyses each shader library's MSL in one loop on one core, right after a fulldmsh_build.pyrun whose compile already used every core. On FINAL FANTASY RESONANCE's 73,496 shaders it kept one core busy for about 7 minutes; withcb_extent.pythe two passes after the compile took 11.8 minutes of a 94-minute first build (M5, 10 cores).Each shader is checked on its own (its MSL and its reflection's c1 length), so the loop body becomes
unproven(), mapped over the sorted file names with amultiprocessingpool, ascb_extent.pyalready does.Pool.mapkeeps the order, soc1_full.tsvlists the same keys in the same order.Checked
b-98ca73d18869): the same 13,372 keys, byte for byte below the header linec1_guard.pyis not a chain input (dmsh_chain.py): no library or chain version changespython3 -m unittest discover -s dm/tools/tests(334 tests, 16 skipped) passes, includingtest_nsp_chain.py's c1 guard casesregress.pyhas nothing to compare here: the chain does not change, and this changes no host, translator or runtime behaviour.🤖 Generated with Claude Code
https://claude.ai/code/session_018XsrnTnMEXD4jZMChLCZPK