Lower the operations 0x218 programs use that were refused #101

Closed
Castyan wants to merge 51 commits from upstream-pr/101 into main
Castyan commented 2026-11-26 20:05:12 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T20:05:12Z.


Stacked on #98 (0x218, itself on #64 and #61). The changes to review are the 7 commits after 60ff2e8.

What

Operations the 0x218 programs use that were refused. Each has an execution test against an exact reference, with edge cases.

  • s_sext_i32_i8 / s_sext_i32_i16, v_mad_u32_u16, buffer_atomic_sub, s_absdiff_i32.
  • v_pk_fmac_f16, rounded once (the test fails without round-to-odd: 0x3e02 instead of 0x3e01).
  • v_add_nc_u32 / v_sub(rev)_nc_u32 with clamp, saturated.
  • The thread-group info SGPR (COMPUTE_PGM_RSRC2.TG_SIZE_EN): the programs read the wave count and the wave index times 64 (s_and_b32 sN, s6, 0xfc0, then v_mbcnt). These are reproduced exactly for the waves the host runs. A read that keeps the unknown bits above 11 is refused.
  • ds_append is still refused.

Results

Replay of two sets of 200 captured 0x218 descriptions on the RTX 5060: these commits were measured together with the lane-mask and address branches (88 -> 162 and 23 -> 101 for all three), with no program lost.

Checks (RTX 5060, at 9457437)

cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean. cargo test --workspace --locked: 748 passed, 0 failed, 11 ignored.

🤖 Generated with Claude Code

<!-- greyfinch-sync:DexNom/VIctory:issue:5516459731 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/101). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T20:05:12Z. --- **Stacked on #98** (0x218, itself on #64 and #61). The changes to review are the 7 commits after `60ff2e8`. ## What Operations the 0x218 programs use that were refused. Each has an execution test against an exact reference, with edge cases. - `s_sext_i32_i8` / `s_sext_i32_i16`, `v_mad_u32_u16`, `buffer_atomic_sub`, `s_absdiff_i32`. - `v_pk_fmac_f16`, rounded once (the test fails without round-to-odd: `0x3e02` instead of `0x3e01`). - `v_add_nc_u32` / `v_sub(rev)_nc_u32` with clamp, saturated. - **The thread-group info SGPR** (`COMPUTE_PGM_RSRC2.TG_SIZE_EN`): the programs read the wave count and the wave index times 64 (`s_and_b32 sN, s6, 0xfc0`, then `v_mbcnt`). These are reproduced exactly for the waves the host runs. A read that keeps the unknown bits above 11 is refused. - `ds_append` is still refused. ## Results Replay of two sets of 200 captured 0x218 descriptions on the RTX 5060: these commits were measured together with the lane-mask and address branches (88 -> 162 and 23 -> 101 for all three), with no program lost. ## Checks (RTX 5060, at `9457437`) `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean. `cargo test --workspace --locked`: 748 passed, 0 failed, 11 ignored. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
andrewDoing commented 2026-11-26 22:43:39 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-26T22:43:39Z.


At the exact PR head tested:

At 9457437, the stock packed FP16 FMA test passed on physical RTX 5070 and WARP with 768 additional finite sign, denormal, cancellation and overflow triples checked against the integer reference. This tests packed FMA only; the other opcodes and title captures were not independently verified.

Verification was AI-assisted with GPT-6.2 Astra.

<!-- greyfinch-sync:DexNom/VIctory:comment:7204932864 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/101#issuecomment-7204932864). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-26T22:43:39Z. --- At the exact PR head tested: At `9457437`, the stock packed FP16 FMA test passed on physical RTX 5070 and WARP with 768 additional finite sign, denormal, cancellation and overflow triples checked against the integer reference. This tests packed FMA only; the other opcodes and title captures were not independently verified. Verification was AI-assisted with GPT-6.2 Astra.
Castyan commented 2026-11-27 07:40:35 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-27T07:40:35Z.


Merged into #64 (83bfddc), where this work continues. Closing as superseded.

<!-- greyfinch-sync:DexNom/VIctory:comment:7212706413 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/101#issuecomment-7212706413). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-27T07:40:35Z. --- Merged into #64 (`83bfddc`), where this work continues. Closing as superseded.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
DexNom/VIctory!101
No description provided.