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

Closed
legacy-code-archaeologist wants to merge 1 commit from upstream-pr/3555 into main
legacy-code-archaeologist commented 2026-11-30 04:47:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-30T04:47:31Z.


Summary

This fixes the four main failures from #3547. 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 #3470 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 #3300, 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 #3547

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 #3547.
  • 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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5559173045 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3555). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-30T04:47:31Z. --- ## Summary This fixes the four `main` failures from #3547. 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 #3470 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 #3300, 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 #3547 ## 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 #3547. - 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)
legacy-code-archaeologist commented 2026-11-30 09:21:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-30T09:21:21Z.


Closing as superseded: #3542 (merged at 2e30cc59) made the same three expectation changes and removed the v_sin_f16 refusal control, so the four failures from #3547 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7274090898 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3555#issuecomment-7274090898). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-30T09:21:21Z. --- Closing as superseded: #3542 (merged at `2e30cc59`) made the same three expectation changes and removed the `v_sin_f16` refusal control, so the four failures from #3547 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

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
R0Y00/Xbox2Windows!3555
No description provided.