Repository navigation
Conversation
|
@reviewbd — your follow-up is a real defect: I independently reproduced it on #5094's head (translate in Coordination, before either of us duplicates work: #5134 is a duplicate of my #5094 for the same item. I claimed TEST-1147 first at #5032 (comment); the coordinator ruled #5094 is the valid PR and asked you to pick another item at #5032 (comment); the finder @AmazingMoaaz passed first refusal to me at #5032 (comment). #5094 also carries two fixes found in review that #5134 lacks ( So I am not implementing the generator-bound fix in #5094 — it's yours, as claimed. Could you retarget #5269 onto #5094 instead of #5134 ( |
d2fe5db to
d7f0733
Compare
Kam471
left a comment
There was a problem hiding this comment.
Head d2fe5dbfb. git diff --check clean.
python -I -m pytest tests/semantic/test_fma_exact.py tests/test_shader_checks.py tests/test_shader_meta.py tests/test_spirv_stubs.py -q->122 passed, 1089 subtests passed(nothing skipped; this collection is 122, not the body's 127).- Negative control for the regression: restoring
tools/rdna2spirv.pyfromc53013b52->SUBFAILED(mode='exact')andSUBFAILED(mode='khr')intest_index_keeps_the_mode_used_for_each_translation, 1 passed; with the PR -> all pass. The test restores the globals beforeshader_meta, which is exactly the failure mode fixed by snapshottingfma_modeinGen.__init__. python -I -m pytest tests -k fma -q->287 passed, 19 skipped, 2641 subtests passed;tests/semantic/test_fma_khr.py tests/test_fma_mix_probe.py(not in the body's list) ->27 passed.- GPU (RTX 5070 Ti, build from main):
--filter cs_fma_fused->PASS 8/8 fused exact (GLSL Fma); withLEONIDA_FMA=exact->PASS 8/8 fused exact (exact emulation). The newshader_fma_mode(index...)dispatch is exercised on both the lenient and strict paths. - Fallback ordering is safe: an index without
fma_modestill yieldsfeatures shaderFmaFloat32 -> khrelseLEONIDA_FMA/glsl, i.e. the old judgement; a recorded mode overrides a conflicting env var, which is right because the SPIR-V cannot change after translation.shader_features()has no remaining callers.
Verdict: merge. Single behaviour change beyond the snapshot is that --fma exact is now judged strictly (8/8 fused exact (exact emulation)), which is the intent.
|
@reviewbd — verified your force-push: #5269 now contains all of #5094's commits ( Independent check on your new head |
|
Tested
|
kacper-serewis
left a comment
There was a problem hiding this comment.
Independent Windows CPU review at d7f0733 against direct parent #5094 (159426d). For each of glsl, exact and khr, all 24 cached shaders translated and validated under Vulkan 1.2 on both revisions. Assembly, binaries and index.json matched byte for byte in each mode. In a synthetic same-process check, three generators were constructed under different modes, then emitted code and wrote metadata under changed settings. All three head generators retained their construction mode in both assembly and persisted metadata. All three parent generators instead followed the mode active at each operation. AI-assisted; 12 pixel and 12 vertex shaders in the CLI slice.
|
Tested Unit and semantic tests, on the branch: Negative control (the point of the change). On The same file on GPU side, this machine: So the per-generator mode also holds on the hardware: the fused shader is still bit-exact on Ampere and the two pixel fixtures are exact. AI-assisted. No game data. |
|
Tested
AI-assisted (Claude Code). |
|
AI-assisted. Independent run on an Apple M4 (macOS, MoltenVK 1.4.2) at Corpus slice. Over
The exact build passes the strict judging on this GPU. GPU suite. The full suite gives 152/217 passed and 58 skipped. Every row has the same status and detail as on Unit tests.
|
|
@ray3242 Thanks for checking the stack. I merged main at 561b65a into #5269 in f173caa. The PR still builds on #5094 and uses its I ran the two FMA semantic suites, both shader test runners, the metadata tests and the SPIR-V stub tests on Windows with CPython 3.13.9. Of 194 tests, 191 passed and 3 were skipped. This was a CPU-only run. AI-assisted. |
Claimed in the coordination issue. Closes #5267.
Depends on: #5094
What and why
Capture the selected mode when the generator is constructed. Instruction emission and shader_meta now use the same value even if a Python caller restores configuration or translates another shader before writing the first index entry. The CLI already sets its options before constructing each generator.
Tested
On Windows with CPython 3.13.9, 142 tests passed and two optional SPIR-V tests were skipped across test_fma_exact, test_fma_khr, test_shader_checks and test_run_gpu_tests. The regression checks all three generators after their translation options have been restored. The branch builds on commit 159426d of #5094 and uses its existing fma metadata field. Synthetic CPU tests only.
AI-assisted: yes