Test RDNA legacy MAD lowering without a GPU #3294
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
3 participants
Due date
No due date set.
Reference
leonida/mandy!3294
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3294"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as D3D12-SHADER-RDNA-LEGACY-MAD-TEST.
What and why
The
mad_legacy: written alikeassertion that caught the regression fixed by #2624 runs in a Windows RDNA hardware test. The regression was also visible when comparing the compiler output on a CPU during the #2698 review. This adds that comparison to the portable shader library tests.The test reuses the synthetic VALU fixture with live root inputs and a buffer store. It compares the DXIL payload with only the RDNA
LEGACYbit changed. The existing Windows test still checks hardware execution.Tested
cargo test -p leonida-shader --lib --locked --offlineon516c9eaawith this patch. 255 passed, two ignored.legacy_madwith its earlier implementation from1d22590b9made the new assertion fail. The same test passes with the current lowering.fae5bd4b. The merge is clean and the portable suite had 256 passes and two ignored, including both the size-handle test and this regression.git diff --checkand the scoped clean-room check passed. Independent read-only review found no issues.GPUs tested: n/a. All tests above were compiler-only.
AI-assisted: OpenAI Codex (GPT-6) and independent read-only review by GPT-6.2 Sol.
Checklist
mainand merges cleanly.VERIFY-3294 — el test que responde la pregunta que dejé abierta en
#2698, y pasaUn fichero, +20/−4, y es el complemento exacto del carry
#3293:Y lo que hace es la respuesta a mi duda:
rdna_legacy_mad_uses_distinct_dxil—compila la instrucción y compara el DXIL de las dos formas, exigiendo que difieran. En
#2698yo dije que el fallo era «mad_legacy: written alike» y que no sabía si el test pedía lo imposible o el emisor perdía la forma. La respuesta es: ni una ni otra — el test no estaba midiendo lo que hacía falta, y este lo mide. Y el comentario del código dice por qué el caso es real: "Runtime inputs keep the zero check live", o sea que usa registros de entrada y no constantes, que es lo que hace que el camino del cero siga existiendo.Lo que verifiqué: el test nuevo pasa en su head (1 passed), y el fichero que toca es el mismo
valu_tests.rsdel rojo de#2698. Lo que no: la suite entera con este cambio — cambia un helper (lowers_valu→lower_valu, que ahora devuelveLowered) y es#[cfg(test)], así que no puede afectar al runtime, pero no corrí los 430 para comprobarlo.Si los dos entran,
#3293+#3294son el arreglo y la prueba juntos — y#2698, que sigue abierto, el mismo trabajo con una base vieja.The Windows runtime job on
9582059astopped inleonida-hlebefore it reached the shader tests.modules::xasync::tests::run_returns_the_work_resultgotE_PENDINGwhere it expectedE_ABORT. The HLE source tree is identical tomain. I separately built the Windows MSVC shader test binary from9582059aand ran the new test under Wine. It passed.ac8af63esyncs withmainatd9b618f10. The test patch is byte-for-byte identical against the new base, the focused Linux test passed again, and an independent reviewer checked the sync. Fresh CI is starting. AI-assisted with OpenAI Codex.Y la suite entera que dije que no había corrido: 430/0/6, la misma que
mainLo escribí hace un minuto — «cambia un helper de
cfg(test), que no puede afectar al runtime, pero no corrí los 430 para comprobarlo» — y eso es exactamente la frase que me he pasado la noche anotando como trampa. El comando son 447 segundos y no hay nadie esperando.El mismo número que
mainy que el carry#3293, con el test nuevo incluido — porque el test nuevo es uno de los 430, y los otros 429 siguen pasando con ellower_valucambiado.Lo que esto añade a lo anterior: el refactor del helper (
lowers_valu→lower_valu, devolviendoLowered) no rompe nada de lo que usaba el anterior, que era la única duda real que quedaba sobre este PR.Así que el estado de
#3294es: un fichero, +20/−4, el test que responde la pregunta de#2698, y 430/0/6 con la suite entera.All three workflows passed on
ac8af63e. The native Windows job recordsemit::lower::tests::rdna_legacy_mad_uses_distinct_dxil ... okandmodules::xasync::tests::run_returns_the_work_result ... ok. The Windows run onmainalso passes that XAsync test. Its earlier failure is tracked in #2570.The advisory asset-policy step logs the same three findings on both trees. The separate No Game Data workflow passed. AI-assisted with OpenAI Codex.
RUN (in game, batch of three pull requests), each head merged with
git merge --no-ffonto maind9b618f10, in one build: #3290898de93c2, #3293fae5bd4b5, #32949582059a2. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Two heads moved during the run: #3293 to
2abd0c4c4, which only regeneratesd3d12/docs/switches.md(git diff fae5bd4b5 2abd0c4c4outside*.mdis empty), and #3294 toac8af63e1, which only merges maind9b618f10, the same main this batch was built on (git diff d9b618f10 ac8af63e1is the same one-file change tolower.rsthat was tested). This run therefore also stands for those two new heads.Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. #3290's switch is opt-in and was left off. #3293 targets AMD: on this NVIDIA card it shows no regression on the default path only, and the run on an RDNA4 card is still needed. The precompile before the world took 538 s against about 155 s for most batches tonight: the translator change leaves the pipeline cache cold.AI-assisted (Claude Code).
tested: same on both sides, no GPU needed for it. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB, tree at
e5c777734(threed3d12/README.mdcommits on maind9b618f10).cargo test --workspace --exclude xtask --lockedind3d12/-> the sevenokresults andleonida-gpu715 passed / 1 failed / 59 ignored, the one failure the knowndescriptor::host::tests::views_are_made_beside_the_heap_and_copied_inwhich passes withLEONIDA_VIEW_COPY=0and is unrelated to this change.node --test tests/test_*.cjs-> 113 tests, 0 fail. Headac8af63e1. Same counts as the base, so the legacy MAD lowering is covered by the translator's own tests without a card, as the note says.Windows native verification -- PASS on head
ac8af63e1(merged cleanly viagit merge --no-ffontomaind9b618f10).Checks (Windows 10 x64)
python -I scripts/check_no_game_data.py-> PASScargo test -p leonida-shader --lib --locked lower::(withLEONIDA_DXIL=noneon Windows 10 inboxdxil.dll) -> test result: ok. 25 passed; 0 failed; 1 ignored; 0 measured; 410 filtered out; finished in 0.02sAI-assisted: yes (Antigravity -- Gemini 4 Neon).
The test needs no GPU, the rename makes
lower_valureusable, andTEST_RDNAis restored before the unwrap. Checked thatcrate::Containerandcrate::FourCC::DXILare exported. No objection.Merged by Moon's agent, on Moon's written authorization (two maintainers). Checked before merging:
cargo test --locked -p leonida-gpu -p leonida-shader -p xtaskgreen on main + this PR (1247 passed, 0 failed, Windows 11, RTX 4060),check_no_game_data.pyclean on the changed files, and a separate reviewer agent returned ACCEPT. Main is nowe1b0248c12.