Repository navigation
Compare validated FSPX translation runs by code identity - #6062
kacper-serewis wants to merge 4 commits into
Conversation
|
The comparison keeps the previous program's bytes alive while it reads the next program. On Windows 11 with CPython 3.14.7 at Run the following from the checkout root with import json, sys, tempfile, tracemalloc
from pathlib import Path
sys.path.insert(0, str(Path("tools").resolve()))
from fspx_coverage import by_identity
with tempfile.TemporaryDirectory() as temp:
root = Path(temp)
(root / "fspx").mkdir()
for names in (["a"], ["a", "b"]):
for name in names:
(root / "fspx" / (name + ".code")).write_bytes(name.encode() * (4 << 20))
(root / "index.json").write_text(json.dumps([{"file": n + ".dxbc"} for n in names]))
tracemalloc.start()
groups, missing = by_identity(root, root / "out", "code")
print(len(groups), missing, tracemalloc.get_traced_memory()[1])
tracemalloc.stop()Please hash each open file as a stream. Keep the existing missing-identity handling for empty and absent files. The direct parent I ran the coverage, FSPX stage, translator CLI, and text line-ending test files. Across the four suites, 50 tests passed and one skipped. AI-assisted. |
Windows CPU: 29 cached listings, 18 pass spirv-val, 11 explicit refusals. Older output has 11 missing results. All 50 focused tests passed. The repository newline scan flags the unchanged upstream f64_omod_probe.py:268. AI-assisted.
Depends on: ItsNotRexed#5688 at 31ba693. Windows CPU: both focused tests and compileall passed. Re-ran both ItsNotRexed#2323 input paths at 6dcbcbd with local refusal recording on all 29 cached programs. spirv-val confirmed 18 retained and 11 newly validated identities, with no missing identities or regressions. The legacy run had 11 missing results, all explicit refusals in the updated listing run. No raw package or GPU. AI-assisted.
|
Tested d1321a9 on Arch Linux, Python 3.14.10, CPU only (llvm-mc 23.1.5 / SPIRV-Tools present): pass.
One note, pre-existing and not from this PR: No game files, no GPU. AI-assisted. |
FSPX-COMPARE, claim on #5934.
Depends on: #5688
Extends the existing count-only coverage CLI with an optional two-run comparison. Matches complete kind-6 code bytes by SHA-256, handles renames and shuffled inventories, flags duplicate identities, and distinguishes absent evidence from explicit refusals. Indexed modules pass through spirv-val again before being counted as validated. The original single-run invocation and output are preserved. Only aggregate counts are printed.
On Windows, compared all 29 cached programs using both input paths of #2323 at 6dcbcbd with --wave64-emulate --no-asm. Added only local recording of names in the existing Unsupported handler for this measurement. Listing to direct binary: 18 remained validated, 11 explicit refusals became validated, 0 regressions, 0 unchanged refusals, 0 missing identities. CPU and SPIRV-Tools only. No raw package, GPU or driver used. #2323 was used for testing only.
Passed tests/test_fspx_coverage.py (legacy output, renamed/shuffled synthetic programs, duplicate identities, forward/reverse changes, absent evidence and validator failure), tests/test_text_write_line_endings.py, compileall on both changed Python files, and git diff --check.
AI-assisted implementation and testing.