upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/cf_diff.py
AgeCommit message (Collapse)Author
12 dayscf_diff: the scalar 'not equal' condition is s_cmp_lg, not s_cmp_newavehs
CCS serves both v_cmp (VOPC, where v_cmp_ne_* exists) and the sif shape's s_cmp, but SOPC has no 'ne' encoding: rdna2spirv correctly refuses s_cmp_ne_u32 (tests/semantic/test_sopc_validation.py lists it as a nonexistent mnemonic). One of the six seeded programs then came back as 'translator unsupported: s_cmp_ne_u32' and test_small_fixed_seed_run_is_clean[structured-32] failed with pass 5 != 6 (dispatch-loop-32 likewise). Map 'ne' to the real encoding 'lg' at the scalar emission site only; the vector compares keep v_cmp_ne_*. (cherry picked from commit 9ccfea42211aa7268ddd5a91ff2b9f0eb20adb1a)
12 daysf32_fuzz, cf_diff: import the translator where it is used ↵fadi-abu-basem-25
(EGEN-FUZZ-LAZY-IMPORT) Both tools set sys.dont_write_bytecode and imported rdna2spirv at the top, so on a checkout without __pycache__ every start compiled the translator before parsing the arguments: about 20 s to print a usage line, which made test_no_arguments_prints_usage time out (5 s) in tests/test_f32_fuzz.py and tests/test_cf_diff.py. They now import it in the functions that use it. Also removes the second, identical CliTests class in tests/test_f32_fuzz.py, which replaced the first one at import. Supersedes #5056, which conflicts with main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 daysRequire a program when showing a control-flow listing (#6659)David
Squash-merged after diff review of PR #6659
12 daysMerge pull request #4448 from tedin7ItsNotRexed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 daysfix: cf_diff --program exits 2 when the program was skipped, like the suite ↵tedin7
(review)
13 dayscf_diff, mem_diff, shader_diff, fmisc_diff: exit 2 when every program was ↵tedin7
skipped
13 daysMerge pull request #3629 from Kam471ItsNotRexed
13 dayscf_diff/f32_fuzz: print usage and exit 2 with no argumentsKam471
13 daysMerge pull request #3055 from Marco LuzzaroItsNotRexed
13 dayscf_diff: reject an empty program batchMarco Luzzaro
13 daystools: add saveexec logic variants to cf_diffeyyun
13 daystools: text reports are written with LF line ends on every platform (BUILD-468)Ewann
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/, make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention. AI-assisted (Claude), on behalf of dev-ewann.
13 daystools: a path outside the console's code page no longer crashes a tool's outputDominik
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts its __main__ block the same way (stdout errors="replace"). tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes (analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 daysFUZZ-8: control-flow/EXEC differential fuzzer; wave32 SCC of mask ops is ↵tunczzzz
wave-wide tools/cf_diff.py generates seeded wave32/wave64 pixel shaders from the control-flow shapes compilers emit (saveexec if/else, v_cmpx, VCC- and SCC-voted branches, uniform and per-lane loops, two-entry cycles) and compares every lane's export between: * tools/cf_ref.py: cpu_ref's Machine plus branches, compares, v_cmpx, saveexec and 64-bit masks (the ISA model, one wave) * rdna2spirv + tests/semantic/spirv_wave_interp.py: every invocation of one subgroup in lockstep, split at selections and rejoined at merges, with the subgroup operations the translator emits in both the structured and the dispatch-loop form; --spirv-val also validates each module, --minimize reduces a mismatch. Finding (fixed here): in a wave32 program s_and/or/xor/andn2/orn2/nand/ nor/xnor_b32 on lane masks set SCC from the lane's own bit instead of the whole mask, so `s_and_b32 s0, vcc_lo, exec_lo; s_cbranch_scc0` and loops closed by `s_andn2_b32 exec_lo, ...; s_cbranch_scc1` split the wave. SCC is now the same subgroup vote as for the _b64 forms. GPU test ps_scc_mask32 (not run on a GPU yet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>