Repository navigation
test(semantic): add comprehensive semantic tests and reference oracle for ds_max_src2_f32 - #3761
Closed
slopgobblercobbler wants to merge 8 commits into
Closed
slopgobblercobbler wants to merge 8 commits into
slopgobblercobbler wants to merge 8 commits into
Conversation
…odel for ds_max_src2_f32
…ions for ds_max_src2_f32
…king for ds_max_src2_f32
…on for ds_max_src2_f32
…eneration for ds_max_src2_f32
…andling for ds_max_src2_f32
… detection for ds_max_src2_f32
Kam471
suggested changes
Nov 22, 2026
Contributor
|
Same pattern as the sibling: this file does not run the translator, and
Suggested shape: implement the opcode with a contract row, then translate a hand-written listing through AI-assisted review, no game files, no GPU. |
Owner
|
Closing: the tests never exercise the translator (they model the instruction in Python without calling tools/rdna2spirv.py), so tests/test_semantic_translator_use.py rejects them. Please translate a listing through support.translate_* and check its result instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Add comprehensive semantic tests and reference mathematical oracle for RDNA2 Local Data Share (LDS) dual-source atomic single-precision floating-point maximum (
ds_max_src2_f32) intests/semantic/test_lds_max_src2_f32.py.The 8-commit suite covers:
oracle_max_f32,ref_ds_max_src2_f32) following IEEE 754-2008 / IEEE 754-2019 maxNum semantics (NaN suppression, signed zero orderingmax(+0.0, -0.0) == +0.0, subnormals preserved without flush-to-zero) and architectural dual-address model (LDSMemory,calc_lds_src2_addresses) with 64 KiB capacity, 32-bank layout, dword alignment, and dual 8-bit dword offsets (offset0andoffset1).DSOpcode.DS_MAX_SRC2_F32,RegisterOperand,LDSAddressExpression,DSSrc2Instruction,Program).ScalarMachineState,ScalarInterpreter) with register file, memory state, and program chain execution.EXECmasking across Wave32 and Wave64 execution with concurrent atomic collision serialization on shared location A and inactive lane preservation.offset0 == offset1).mem_updated,mem_unchanged,zero,negative,nan,infinity,subnormal), bank conflict analysis (stride 1 vs stride 32), and scalar/vectorVCCisolation.Tested
python -m compileall -q testspython -I tests/semantic/test_lds_max_src2_f32.py(37/37 tests passing)python -m unittest -v tests/semantic/test_lds_max_src2_f32.py(37/37 tests passing)Checklist
docs/design.md, with how it was confirmed.