Repository navigation
tests: define SENTINEL in native_f16_alu_check - #3190
Conversation
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.
|
LGTM. Trivial cleanup: replacing the unused |
R0Y00
left a comment
There was a problem hiding this comment.
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.
Follow-up to #3159. Target branch
main.native_cvt_f16_i16_hardwarefails onmain(9e7eab5b). Every conversion matches, then the guard check raisesAttributeError: module 'native_f16_alu_check' has no attribute 'SENTINEL'.tests/native_cvt_f16_i16_check.pyimportsnative_f16_alu_check as Fand compares guard words withF.SENTINEL, but that module defines noSENTINEL; it writes the fill0x69696969inline.Change:
tests/native_f16_alu_check.pydefinesSENTINEL = 0x69696969, the fillnative_store_replayuses for untouched words (memset(..., 0x69, ...)), and uses it for its own expected guard words. The test from #3159 is unchanged. Open PR #3187 addstests/native_fma_f16_check.pywith the sameF.SENTINELcomparison, 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
main9e7eab5b.native_cvt_f16_i16_irand_controlspass, and_hardwarefails with the error above.native_cvt_f16_i16tests andnative_f16_alu_ir/_hardwarepass.SENTINELto0x69696968fails bothnative_cvt_f16_i16_hardwareandnative_f16_alu_hardware, so both guard checks are effective.AI-assisted.