feat(rdna2-ref): port all 16 MIMG image_atomic_* instructions to Rust #353
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!353
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-353"
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?
@Lewandox on GitHub · 2026-11-26 11:54 UTC · original
Lewandox:feat/rust-mimg-image-atomics→main· +243 −7 · 4 files · 2 commits · merged 2026-11-26 15:21 UTCSummary
Ports all 16 RDNA 2
MIMGimage_atomic_*2D instructions (32-bit and 64-bit) and the 4 raw integer image formats (32_UINT,32_SINT,32_32_UINT,32_32_SINT) from the Python oracle (#309) to the Rust reference interpreter (crates/anyxboxx-rdna2-ref), restoring 100% Python/Rust parity for MIMG.crates/anyxboxx-rdna2-ref/src/image_desc.rs:FORMAT_32_UINT(20),FORMAT_32_SINT(21),FORMAT_32_32_UINT(62),FORMAT_32_32_SINT(63) totexel_bytes.Op::Atomiccovering all 16image_atomic_*mnemonics (swap,cmpswap,add,sub,smin,umin,smax,umax,and,or,xor,inc,dec,fcmpswap,fmin,fmax).glc(bit 13) ininstruction_fields, addedatomic_width/atomic_format_ok/is_cmpswap, and updatedcheck_instructionandaddress_count(2VGPRs in 2D).crates/anyxboxx-rdna2-ref/src/image_texel.rs:1) totexelandstore_texel.crates/anyxboxx-rdna2-ref/src/image_exec.rs:atomic_opreusingatomic::applyfor all 16 integer and float atomic operations in 32-bit and 64-bit, enforcing format/width compatibility,glcreturn-old behavior (preservingvdatawhenglc=0andcmpVGPRs), OOB guards (no memory write,0returned whenglc=1), and safevdata/vaddroverlap.tests/test_rdna2_ref_parity.py:test_image_atomic_programs_match_the_python_modelcomparing Rust and Python line-by-line across all 16image_atomic_*ops (32-bit & 64-bit, wave32 & wave64,glc=0/1, OOB, NSA, overlap, multi-lane contention, NaN/±0, raw integer load/store, and refuseddmask/format mismatches).Verification
cargo fmt -p anyxboxx-rdna2-ref -- --check: passed.cargo clippy -p anyxboxx-rdna2-ref --no-deps --all-targets -- -D warnings: 0 warnings.cargo test -p anyxboxx-rdna2-ref: 134 passed, 0 failed.ruff check --select W605,F,E9 PrototypeScarlett tests tools: All checks passed!python -m pytest -q tests/test_rdna2_ref_parity.py tests/test_readme_sync.py: 48 passed, 1 skipped (0 failed).