tests: define SENTINEL in native_f16_alu_check #3192

Manually merged
github merged 1 commit from github-bot/gh-3190 into gh-pr/3190/base 2026-11-27 21:37:16 +00:00 AGit
Owner

@⁠Leyukaka on GitHub · 2026-11-27 21:00 UTC · original
Leyukaka:fix-cvt-f16-sentinel → main · +2 −1 · 1 files · 1 commits · merged 2026-11-27 21:37 UTC

Follow-up to #3161. 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 #3161 is unchanged. Open PR #3189 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.

**@⁠Leyukaka** on GitHub · 2026-11-27 21:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3190) `Leyukaka:fix-cvt-f16-sentinel` → `main` · +2 −1 · 1 files · 1 commits · merged 2026-11-27 21:37 UTC Follow-up to #3161. 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 #3161 is unchanged. Open PR #3189 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 (#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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:04:58 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-11-27 21:13 UTC · original

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

**@⁠KelboLive** on GitHub · 2026-11-27 21:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3190#issuecomment-7228254392) LGTM. Trivial cleanup: replacing the unused `SENTINEL` variable with its literal value. Safe to merge.
github-bot changed target branch from main to gh-pr/3190/base 2026-11-27 21:37:15 +00:00
github manually merged commit 87ae96222d into gh-pr/3190/base 2026-11-27 21:37:16 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-27 21:33 UTC · original · approved these changes

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** on GitHub · 2026-11-27 21:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3190#pullrequestreview-6093516183) · **approved these changes** 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.