rdna2spirv: accept VOP3 clamp/omod as hardware no-op on v_cvt_{i16,u16}_f16 #435

Merged
leonida/mandy
tahffo68hk-hash merged 1 commit from fix/shader-cvt16-outmod-noop into main 2026-11-28 11:51:38 +00:00

Pull request successfully merged and closed

tahffo68hk-hash commented 2026-11-24 05:13:51 +00:00

Summary

(AI-assisted) Fixes SHADER-CVT16-OUTMOD-NOOP: ools/rdna2spirv.py previously rejected VOP3 clamp, mul:2, mul:4, and div:2 (and SDWA clamp) with Unsupported on the integer-destination 16-bit conversions _cvt_i16_f16 and _cvt_u16_f16.

Native RDNA2 hardware measurement (gfx1036) across all 4 HW_REG_MODE configurations (

### Summary (AI-assisted) Fixes SHADER-CVT16-OUTMOD-NOOP: ools/rdna2spirv.py previously rejected VOP3 clamp, mul:2, mul:4, and div:2 (and SDWA clamp) with Unsupported on the integer-destination 16-bit conversions _cvt_i16_f16 and _cvt_u16_f16. Native RDNA2 hardware measurement (gfx1036) across all 4 HW_REG_MODE configurations (
Oliwettoo commented 2026-11-24 10:36:41 +00:00

test_alu_cvt_16.py passes with the PR on current main, but the contract isn't updated: docs/design.md's v_cvt_u16_f16/v_cvt_i16_f16 row still says clamp and the output multipliers are rejected as Unsupported rather than guessed, which this PR changes. Please change that row to the new rule. The measured words are only in the PR text, so nobody can reproduce them: please commit a reproducible gfx103x case (an int_hw_probe.py case, or the tools/hw_oracle .asm plus its raw output), as the maintainer asked on #392/#398 (AGENTS.md: a new rule goes in with how it was confirmed). AI-assisted review.

`test_alu_cvt_16.py` passes with the PR on current `main`, but the contract isn't updated: `docs/design.md`'s `v_cvt_u16_f16`/`v_cvt_i16_f16` row still says `clamp` and the output multipliers are rejected as `Unsupported` rather than guessed, which this PR changes. Please change that row to the new rule. The measured words are only in the PR text, so nobody can reproduce them: please commit a reproducible gfx103x case (an `int_hw_probe.py` case, or the `tools/hw_oracle` .asm plus its raw output), as the maintainer asked on #392/#398 (AGENTS.md: a new rule goes in with how it was confirmed). AI-assisted review.
sodove commented 2026-11-28 10:45:32 +00:00

#435 | head 3cc3c6c2e5bfa95ddaa5cce9f882366f1c86453a | python3 -m unittest discover -s tests/semantic -p test_alu_cvt_16.py -v | red: 8 run, 20 errors | green: 8 passed | Red → green

Unmodified main rejected output modifiers on the f16-to-i16/u16 conversions. The merged translator accepted the cases and passed the semantic assertions.

Captured 269 distinct complete SPIR-V module(s) emitted while rerunning test_alu_cvt_16.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand.

Base 3bd936ecd98995bca3e1da83d5e28d2343001aef was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. Batch claim.

#435 | head `3cc3c6c2e5bfa95ddaa5cce9f882366f1c86453a` | `python3 -m unittest discover -s tests/semantic -p test_alu_cvt_16.py -v` | red: 8 run, 20 errors | green: 8 passed | **Red → green** Unmodified main rejected output modifiers on the f16-to-i16/u16 conversions. The merged translator accepted the cases and passed the semantic assertions. Captured 269 distinct complete SPIR-V module(s) emitted while rerunning test_alu_cvt_16.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand. Base `3bd936ecd98995bca3e1da83d5e28d2343001aef` was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7237873883).
DadaCap commented 2026-11-28 11:51:40 +00:00

Merged, thank you @tahffo68hk-hash! This translator PR (rdna2spirv: accept VOP3 clamp/omod as hardware no-op on v_cvt_{i16,u16}_f16) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

Merged, thank you @tahffo68hk-hash! This translator PR (rdna2spirv: accept VOP3 clamp/omod as hardware no-op on v_cvt_{i16,u16}_f16) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
Sign in to join this conversation.
No description provided.