tests: define SENTINEL in native_f16_alu_check #3190

Merged
Leyukaka merged 1 commit from upstream-pr/3190 into main 2026-11-27 21:37:01 +00:00
Leyukaka commented 2026-11-27 21:00:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T21:00:52Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5533039522 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3190). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T21:00:52Z. --- 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.
KelboLive commented 2026-11-27 21:13:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T21:13:51Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7228254392 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3190#issuecomment-7228254392). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-27T21:13:51Z. --- LGTM. Trivial cleanup: replacing the unused `SENTINEL` variable with its literal value. Safe to merge.
R0Y00 commented 2026-11-27 21:33:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T21:33:46Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6093516183 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3190#pullrequestreview-6093516183). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T21:33:46Z. **Review:** APPROVED --- 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.
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!3190
No description provided.