Ignore whitespace in RDNA2 instruction flags #2664
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2674"
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 luckyteagirl on 2026-11-26T05:46:30Z.
gen_rdna2.pydropped an instruction flag when its XML text contained surrounding whitespace. Trim the text before matchingTRUEso reformatting the XML preserves instruction flags.What is in it
Tested
b49be183generated flags2for the padded fixture and11for the compact fixture. The patched generator emits identical output for both.python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows with Python 3.11.AMD RDNA 2architecture name; the focused fixture also passes with the input guard from open PR #2612.910af8ceac019cf8e68355df222b1ec70dee1dfac4cf69fdb6f116026dafff42). AMD GPUOpen XML distributiongit diff --checkpassed.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T09:45:49Z.
All 32 possible combinations of the five instruction flags produced the expected integer (0 through 31) on
72e160e05d343783f97836f627b154aa3e03b12f. I used one XML instruction per mask and compared the entire Rust file across compact mixed-case flags, padded UTF-8 and padded UTF-16. Mainb49be1836844produced zero for every padded mask. Combining this head with #2612 at5efcf08de944kept all 32 masks and rejected an RDNA 3 input before writing over the output.The regression test runs through the generator CLI.
python -B -m unittest discover -s scripts -p "test_*.py"passed all 27 tests with it added. Windows build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) wrote and ran the synthetic tests. I did not regenerate the full AMD specification or run GPU workloads.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:33:41Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:39:26Z.
Triage (#1607) – head
72e160eNo open or merged PR makes the same change. #1504 and #2612 also edit
scripts/gen_rdna2.py, but both keep(fl.findtext(tag) or "FALSE").upper()without.strip(). The synthetic spec is valid for the generator, and the expectedflags: 11matches bits 0, 1 and 3.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:01:19Z.
merge-check
base:
1c8b551475head:
72e160e05dmerge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/gen_rdna2.pyandscripts/test_rdna2_instruction_flags.py, +52/-1)build: not run (Tier 0 Python generator script diff; no Rust code changed)
tests:
python -m unittest -v scripts/test_rdna2_instruction_flags.py-> 1 passed, 0 failed (new test file);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pyon Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+52/-1). Adding
.strip()before.upper() == "TRUE"inscripts/gen_rdna2.py:65prevents XML whitespace insideInstructionFlagselements from silently zeroing instruction flag bits. The synthetic XML test confirms byte-identical output (flags: 11for bits 0, 1, 3) with whitespace-padded mixed-case tags. No problems found.performance: none (offline table generator in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T18:32:06Z.
merge-check
base:
c53e969602head:
72e160e05dverdict: safe to merge
Windows — RDNA2 instruction-flag generator check on
72e160eClean merge onto
main(merge commit8589121788caf08509f8504b95cc23e1dd48923a).git diff --checkwas clean.Setup
Windows 10 21H2 build 19044.6332. This Tier 0 check exercises the generator with synthetic XML.
Tested
python scripts/test_rdna2_instruction_flags.py— 1 passed, 0 failed, 0 skipped. The test verifies byte-identical Rust output for compact and whitespace-padded flag values, withflags: 11on the synthetic branch instruction.Diff review
Read the full diff. The generator strips surrounding whitespace before case normalization, and the synthetic fixture checks the emitted flag word. The diff changes only the generator and its test.
Not tested
A production ISA regeneration, the Rust suite, GPU execution, and retail smoke. The targeted check covers this script-only diff.
AI use
Codex (GPT-6) merged the PR, reviewed the diff, ran the script test, and drafted this report.