Skip to content

docs/shader_validation.md: name tools/valu_int_diff.py, the CPU-only integer VALU differential fuzzer (EGEN-VALUINTDIFF-DOC) - #6435

Open
evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/6-valuintdiff-doc
Open

evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/6-valuintdiff-doc

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

tools/valu_int_diff.py has been on main since dde25ff ("tools: add differential fuzzer for 32-bit and 16-bit integer VALU ops") with tests/test_valu_int_diff.py and a passing --self-test, but no document named it. docs/shader_validation.md names the CPU oracle (tools/shader_diff.py) and the GPU-side integer runners (tools/wint_diff.py, tools/valu_fuzz.py, tools/vint_diff.py, tools/pk16_diff.py), so the CPU-side integer fuzzer was the one gap in that list.

What changed: one subsection in docs/shader_validation.md, placed just before the GPU-side wint_diff.py subsection, that says what the tool compares (seeded 32-bit integer, bitfield, SAD/lerp, 16-bit op_sel and packed 16-bit VALU programs, bit-exact on all four exported VGPRs against an ISA model), that it needs no game files, GPU or LLVM, and lists the commands together with the exit codes (0 every program matched, 1 the first mismatch, 2 a harness error).

Before: git grep -l valu_int_diff -- '*.md' printed nothing.

python -I tools/valu_int_diff.py --self-test                       -> self-test OK, exit 0
python -I tools/valu_int_diff.py --programs 20 --seed 1             -> "20 programs (seed 1): 20 pass, 0 mismatch", exit 0
python -I tools/valu_int_diff.py --max-ops 32 --programs 200 --seed 7 -> exit 0 (8.9 s)
python -I tools/valu_int_diff.py --spirv-val --programs 5 --seed 1  -> exit 2, "harness error: --spirv-val requested but spirv-as/spirv-val not found in PATH"
LLVM_MC=C:\does-not-exist\llvm-mc.exe python -I tools/valu_int_diff.py --programs 3 --seed 1 -> 3 pass, exit 0 (no LLVM needed)
python -I tests/test_valu_int_diff.py                               -> Ran 3 tests, OK

Docs checks after the change, all green: python -I tests/test_docs_links.py (6 tests OK), python -I tests/test_docs_cli_flags.py (3 tests OK, it checks the documented flags against the tools), python -I tests/test_docs_list_items.py (2 tests OK).

No GPU needed (CPU-only tool); nothing was run against game data.

Notes: the --spirv-val example stays in the block but is marked as needing spirv-as/spirv-val on PATH, because the tool deliberately exits 2 without them and I did not want a documented command that fails silently in the reader's shell. No new test: docs-only change, and tests/test_docs_cli_flags.py already guards the flags I quote.

Item: EGEN-VALUINTDIFF-DOC

AI-assisted.

…integer VALU differential fuzzer (EGEN-VALUINTDIFF-DOC)

valu_int_diff.py compares seeded 32-bit, bitfield, SAD/lerp, 16-bit op_sel and packed 16-bit VALU programs bit-exact against an ISA model with no GPU and no LLVM, has a passing --self-test and tests/test_valu_int_diff.py, yet no document named it. Give it a subsection with the verified commands next to the GPU-side wint_diff/valu_fuzz entries.
@memorypressure

Copy link
Copy Markdown

Verified on Linux, CPU-only, merged with main 1cc6e3c: docs-only change, and every artifact it names exists on main (tools/valu_int_diff.py, its test, the semantic interpreter). The documented --self-test prints self-test OK and the fuzz invocation runs clean; test_docs_repo_paths, test_docs_cli_flags and test_docs_links all pass with the new text. It also merges with the older #3954, which edits the same page, so no ordering problem there. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants