Scripts: reject non-RDNA2 decoder table inputs #2602
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2612"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by JiyouProt on 2026-11-26T01:55:37Z.
gen_rdna2.pyaccepts AMD's public RDNA1 XML and replaces the requested RDNA2 decoder table successfully: 1,149 instructions instead of 1,153. CheckISA/Architecture/ArchitectureNamebefore parsing tables or opening the output. Wrong or missing architecture exits with a diagnostic and preserves the destination; valid RDNA2 generation is unchanged.What is in it
scripts/gen_rdna2.py: architecture guard resolved from the root, including an absent<ISA>element. This addresses review 6069236763:<Spec><Document/></Spec>now reports the missing architecture instead of an AttributeError traceback.scripts/test_gen_rdna2_architecture.py: synthetic CLI regressions for wrong/missing metadata, absent ISA with existing/absent destination, and valid table generation. No vendor XML or generated source committed.Tested
-C target-feature=+fmaon this FMA-capable CPU, as in the prior validation.python -B -m unittest discover -s scripts -p 'test_*.py' -v: 30 passed, 0 failed. Before the review fix, both new absent-ISA subcases fail with the reported traceback; afterward both reject cleanly and preserve the destination state.5efcf08de944, clean tree:cargo build --locked --workspace -j 4andcargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output, both Debug and Release (--release), pass. Each test run: 1,435 passed / 0 failed / 47 ignored. Session-localXCL_DXIL_CACHEpoints to a writable workspace directory; caching remains enabled.XCL_SAMPLE_*files supplied.console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, cached-only miss). It also failed alone; setting the documented cache path to a writable workspace directory made the isolated test and both full suites pass. No source/assertion changes to that test; initial failure retained in the report.git diff --checkand PR-description checks pass.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T02:06:18Z.
Tested exact head
3399fd80d1ae07334c15252dea557bddc66286cfand parentb49be1836844with an independent synthetic XML. The opcode has two disjoint ranges, listed in reverse XML order, and two identifiers that differ only in opcode bits. I saved it as UTF-8, UTF-8 with BOM, UTF-16LE and UTF-16BE.[(4, 2), (10, 2)], fixed mask/value0xf3c0/0x8140, opcode 6 and the instruction flag. SHA-256:cc174b56e226c8b1251518f701a0fa080bcd2799b1be00db95ed106b2ba21eca.3608a7aa744bproduced the same RDNA2 table from UTF-8 but rejected both valid UTF-16 variants. For a future combination, the guard ported onto the encoding-aware #1504 branch passes all eight cases and retains this PR's architecture tests.Commands:
python -I scripts/gen_rdna2.py <fixture.xml> <table.rs>andpython -B -m unittest discover -s scripts -p "test_*.py". The complete Python suite passed 29 tests on this PR and 31 on the combined candidate, with zero failures or skips. Windows build 26100, i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) prepared the fixture, ran the checks and ported the guard. No full AMD XML, Rust build, GPU or title run in this test.Recheck after the update
I rechecked the revised head
5efcf08de944402eafb2ca1ffaa3998fa2e2de09. For<Spec><Document/></Spec>, the CLI exited 1 without a traceback both with and without an existing destination. It preserved the existing sentinel and did not create a missing file. The previous head printed a traceback in both cases. The earlier combined fork98f2b0balso rejected these inputs cleanly via its existing structural check.On all three revisions, the same small valid RDNA2 fixture encoded as UTF-8 and UTF-16 generated identical Rust bytes. I ran
python -B -m unittest discover -s scripts -p "test_*.py"on the revised head: all 30 tests passed. These checks used synthetic XML only.OpenAI Codex (GPT-6) ran the checks and prepared this update. No game or GPU workload.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:31:59Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:59:49Z.
Review: COMMENTED
Could the missing-architecture diagnostic also cover an absent
<ISA>element? With a well-formed<Spec><Document/></Spec>,root.find("ISA")returnsNoneandisa.findtext(...)raises anAttributeErrortraceback before the newSystemExitdiagnostic. I confirmed the script exits 1 and preserves a pre-existing output on this exact head, but the user gets the traceback rather than the promised clean rejection. ResolvingISA/Architecture/ArchitectureNamefromroot, plus an absent-ISA fixture, would cover it. Exact head3399fd80d1ae07334c15252dea557bddc66286cf; synthetic XML only, no vendor regeneration. AI-assisted review with Codex.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:29:15Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:28:12Z.
Triage (#1607) – head
5efcf08No open or merged PR makes
gen_rdna2.pyreject a non-RDNA2 spec. #1504 rewrites the samemain()intogenerate()/CLI handling but does not checkArchitectureName. #2674 changes how instruction flags are parsed. Whichever merges second will need a small rebase.The check runs before the output is opened, and the tests cover wrong, missing and empty architectures.
No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.