Skip to content

tests: define SENTINEL in native_f16_alu_check - #3190

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:fix-cvt-f16-sentinel
Nov 27, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:fix-cvt-f16-sentinel

Conversation

@Leyukaka

Copy link
Copy Markdown
Collaborator

Follow-up to #3159. Target branch main.

native_cvt_f16_i16_hardware fails on main (9e7eab5b). Every conversion matches, then the guard check raises AttributeError: module 'native_f16_alu_check' has no attribute 'SENTINEL'. tests/native_cvt_f16_i16_check.py imports native_f16_alu_check as F and compares guard words with F.SENTINEL, but that module defines no SENTINEL; it writes the fill 0x69696969 inline.

Change: tests/native_f16_alu_check.py defines SENTINEL = 0x69696969, the fill native_store_replay uses for untouched words (memset(..., 0x69, ...)), and uses it for its own expected guard words. The test from #3159 is unchanged. Open PR #3187 adds tests/native_fma_f16_check.py with the same F.SENTINEL comparison, which this also covers.

Tests. The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on main 9e7eab5b.

  • Before: native_cvt_f16_i16_ir and _controls pass, and _hardware fails with the error above.
  • After: the three native_cvt_f16_i16 tests and native_f16_alu_ir/_hardware pass.
  • Mutation check, run by hand: setting SENTINEL to 0x69696968 fails both native_cvt_f16_i16_hardware and native_f16_alu_hardware, so both guard checks are effective.

AI-assisted.

native_cvt_f16_i16_check.py (R0Y00#3159) reads F.SENTINEL from
native_f16_alu_check, which defines no such name, so
native_cvt_f16_i16_hardware fails with an AttributeError after all
conversions have matched. Define SENTINEL = 0x69696969, the fill
native_store_replay uses for untouched words, and use it for the module's
own expected guard words.

AI-assisted.
@KelboLive

Copy link
Copy Markdown
Contributor

LGTM. Trivial cleanup: replacing the unused SENTINEL variable with its literal value. Safe to merge.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently reviewed 87ae9622 over main d99e0ae4 (tree 987c7a67a28624bbe61de3b1c1f1f88d481ecb5d). The 0x69696969 constant matches the 0x69 initializer in native_store_replay; the patch is confined to the test module.

With the same Release replay binary, the unmodified main Python fixture reached its guard check and reproduced AttributeError: module 'native_f16_alu_check' has no attribute 'SENTINEL'. On the candidate I built compile_dxil native_store_replay native_compute_ir_dump and ran ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(cvt_f16_i16|f16_alu)_'. Debug and Release /O2 passed 5/5 each with no skips. The fixed fixture matched 82 conversions across two groups, and the existing controls verified 38 refusals. RTX 4060 Laptop 32.0.16.1656, Windows 26200.9974, SDK/DXC 10.0.26100.0, wave32, debug layer disabled. GitHub Windows, Linux Python and gfx1013 checks passed.

@R0Y00
R0Y00 merged commit afe70bd into R0Y00:main Nov 27, 2026
5 checks passed
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.

3 participants