tests: update SDWA expectations that #3470 made stale #3557

Closed
github-bot wants to merge 1 commit from github-bot/gh-3555 into main AGit
Owner

@⁠legacy-code-archaeologist on GitHub · 2026-11-30 04:47 UTC · original
legacy-code-archaeologist:tests/sdwa-stale-expectations → main · +33 −7 · 3 files · 1 commits · closed without merging

Summary

This fixes the four main failures from #3549. It changes tests and one doc only; the translator is unchanged.

  • tests/native_cvt_f16_i16_check.py: the SDWA program with dst_select = 6 (an f32 placement) now passes the profile gate that #3472 opened, and is refused at the 16-bit destination rule. The case now expects unsupported SDWA destination modifier. The positive SDWA cases for all four ops in OPS are already in native_sdwa_profiles_check.py (NEW_PROFILES), and a comment points there.
  • tests/native_sdwa_profiles_check.py:
    • v_sin_f16 has an SDWA lowering since #3302, so it is no longer a refusal control (case 14).
    • v_sin_f16 and v_cos_f16 are now admitted profiles in the third program, which grows from 6 to 8 slots, still under the 32-slot layout.
    • v_sin_f16 picks -0.125 from WORD_0 with ABS and writes WORD_1 with PRESERVE. Dropping the ABS flips the sign of 0.7071. A wrong word pick reads 0.25 turns and gives 1.0.
    • v_cos_f16 picks 0.5 and gives exactly -1.0.
    • Expected values come from native_sin_cos_f16_check.expected_trig_f16. The readback uses that file's tolerance, 2^-20 plus two binary16 ulp, on the placed half only. The other half stays exact, and ±0/±1 are compared exactly.
  • docs/experiments/direct-sdwa-profiles.md: the "still refused in SDWA" sentence and the program and refusal counts are corrected.

Fixes #3549

Tests

On main 44a3ad5a, Windows 10.0.26100, dev preset:

  • Before: ctest --preset dev --no-tests=error -R '^native_(cvt_f16_i16|sdwa_profiles)_' gives native_cvt_f16_i16_ir, native_cvt_f16_i16_controls, native_sdwa_profiles_ir and native_sdwa_profiles_dxil failed, as in #3549.
  • After: ctest --preset dev --no-tests=error -R '^native_(cvt_f16_i16|sdwa_profiles|sin_cos_f16)_' gives 6 passed and 3 hardware skipped (77).
  • ctest --preset dev --no-tests=error -R '^native_' -E '_hardware$' -j 2: 243/243 passed.
  • python -B tests/docs_links_check.py: passed (181 files, 726 links).
  • The hardware readback is unmeasured here. This machine's only D3D12 FL 12_0 adapter does not report SM 6.6 with wave32.

AI-assisted: written with Claude Code. I reviewed it and ran the commands above.

🤖 Generated with Claude Code

**@⁠legacy-code-archaeologist** on GitHub · 2026-11-30 04:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3555) `legacy-code-archaeologist:tests/sdwa-stale-expectations` → `main` · +33 −7 · 3 files · 1 commits · closed without merging ## Summary This fixes the four `main` failures from #3549. It changes tests and one doc only; the translator is unchanged. - `tests/native_cvt_f16_i16_check.py`: the SDWA program with `dst_select = 6` (an f32 placement) now passes the profile gate that #3472 opened, and is refused at the 16-bit destination rule. The case now expects `unsupported SDWA destination modifier`. The positive SDWA cases for all four ops in `OPS` are already in `native_sdwa_profiles_check.py` (`NEW_PROFILES`), and a comment points there. - `tests/native_sdwa_profiles_check.py`: - `v_sin_f16` has an SDWA lowering since #3302, so it is no longer a refusal control (case 14). - `v_sin_f16` and `v_cos_f16` are now admitted profiles in the third program, which grows from 6 to 8 slots, still under the 32-slot layout. - `v_sin_f16` picks -0.125 from WORD_0 with ABS and writes WORD_1 with PRESERVE. Dropping the ABS flips the sign of 0.7071. A wrong word pick reads 0.25 turns and gives 1.0. - `v_cos_f16` picks 0.5 and gives exactly -1.0. - Expected values come from `native_sin_cos_f16_check.expected_trig_f16`. The readback uses that file's tolerance, 2^-20 plus two binary16 ulp, on the placed half only. The other half stays exact, and ±0/±1 are compared exactly. - `docs/experiments/direct-sdwa-profiles.md`: the "still refused in SDWA" sentence and the program and refusal counts are corrected. Fixes #3549 ## Tests On `main` `44a3ad5a`, Windows 10.0.26100, dev preset: - Before: `ctest --preset dev --no-tests=error -R '^native_(cvt_f16_i16|sdwa_profiles)_'` gives `native_cvt_f16_i16_ir`, `native_cvt_f16_i16_controls`, `native_sdwa_profiles_ir` and `native_sdwa_profiles_dxil` **failed**, as in #3549. - After: `ctest --preset dev --no-tests=error -R '^native_(cvt_f16_i16|sdwa_profiles|sin_cos_f16)_'` gives 6 **passed** and 3 hardware **skipped (77)**. - `ctest --preset dev --no-tests=error -R '^native_' -E '_hardware$' -j 2`: 243/243 passed. - `python -B tests/docs_links_check.py`: passed (181 files, 726 links). - The hardware readback is unmeasured here. This machine's only D3D12 FL 12_0 adapter does not report SM 6.6 with wave32. AI-assisted: written with Claude Code. I reviewed it and ran the commands above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
native_cvt_f16_i16's SDWA program with dst_select 6 now passes the
profile gate and is refused at the 16-bit destination rule, so it
expects that reason; the positive SDWA cases for these ops are in
native_sdwa_profiles. v_sin_f16 and v_cos_f16 have an SDWA lowering
(#3300), so native_sdwa_profiles drops them from the refusals and
checks them as admitted profiles, with the readback tolerance of
native_sin_cos_f16. The profiles note no longer calls them refused.

Fixes #3547

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 04:51:56 +00:00
github-bot closed this pull request 2026-11-30 09:23:55 +00:00
Author
Owner

@⁠legacy-code-archaeologist on GitHub · 2026-11-30 09:21 UTC · original

Closing as superseded: #3544 (merged at 2e30cc59) made the same three expectation changes and removed the v_sin_f16 refusal control, so the four failures from #3549 are gone on main. All that is left here is the two positive v_sin_f16/v_cos_f16 profile entries, and native_sin_cos_f16 already covers those SDWA forms. Not worth a separate review.

AI-assisted.

**@⁠legacy-code-archaeologist** on GitHub · 2026-11-30 09:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3555#issuecomment-7274090898) Closing as superseded: #3544 (merged at `2e30cc59`) made the same three expectation changes and removed the `v_sin_f16` refusal control, so the four failures from #3549 are gone on `main`. All that is left here is the two positive `v_sin_f16`/`v_cos_f16` profile entries, and `native_sin_cos_f16` already covers those SDWA forms. Not worth a separate review. AI-assisted.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.