Skip to content

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

Closed
legacy-code-archaeologist wants to merge 1 commit into
R0Y00:mainfrom
legacy-code-archaeologist:tests/sdwa-stale-expectations
Closed

legacy-code-archaeologist wants to merge 1 commit into
R0Y00:mainfrom
legacy-code-archaeologist:tests/sdwa-stale-expectations

Conversation

@legacy-code-archaeologist

Copy link
Copy Markdown
Contributor

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 compute: admit SDWA profiles for lowered f16, frexp and conversion ops #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 shader: lower v_sin_f16 and v_cos_f16 in direct Compute DXIL #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 tests: four native SDWA checks and the profiles note disagree with the translator on main #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

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
(R0Y00#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 R0Y00#3547

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@legacy-code-archaeologist

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: four native SDWA checks and the profiles note disagree with the translator on main

1 participant