You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execution Tests: Add min precision test cases to the long vector test (#8260)
This PR extends the SM 6.9 long vector execution tests to cover HLSL min
precision types (min16float, min16int, min16uint). These types are
always available — `D3D12_SHADER_MIN_PRECISION_SUPPORT` only reports
whether hardware actually uses reduced precision, not whether the types
compile — so no device capability check is needed and the tests live in
the existing `DxilConf_SM69_Vectorized_Core` class alongside other
types.
Note: I wasn't able to find any existing min precision HLK tests.
Unclear if we have coverage.
## Key design decisions
**Full-precision buffer I/O:** Min precision types have
implementation-defined buffer storage width, so we use full-precision
types (`float`/`int`/`uint`) for all Load/Store operations via the
`IO_TYPE`/`IO_OUT_TYPE` shader defines, with explicit casts to/from the
min precision compute type. This ensures deterministic data layout
regardless of the device implementation.
**Half-precision tolerances:** Validation compares results in fp16 space
using HLSLHalf_t ULP tolerances. Since min precision guarantees at least
16-bit, fp16 tolerances are a correct upper bound — devices computing at
higher precision will produce more accurate results, not less.
**Test coverage mirrors existing patterns:**
- min16float mirrors HLSLHalf_t
(float/trig/math/comparison/dot/cast/derivative/wave/quad/load-store)
- min16int mirrors int16_t
(arithmetic/bitwise/comparison/reduction/cast/wave/quad/load-store)
- min16uint mirrors uint16_t
(arithmetic/bitwise/comparison/cast/wave/quad/load-store)
**Wave and quad op support:** Wave ops
(WaveActiveSum/Min/Max/Product/AllEqual, WaveReadLaneAt/First,
WavePrefix*, WaveMultiPrefix*, WaveMatch) and quad ops (QuadReadLaneAt,
QuadReadAcrossX/Y/Diagonal) are tested for all three min precision
types, mirroring the ops supported by their 16-bit equivalents. The wave
op shader helpers use `#ifdef MIN_PRECISION` guards to store results via
`IO_OUT_TYPE` for deterministic buffer layout without changing DXIL for
existing non-min-precision tests.
**Excluded operations:**
- Signed div/mod on min16int: HLSL does not support signed integer
division on min precision types
- Bit shifting on min16int/min16uint: Not supported for min precision
types
- FP specials (INF/NaN/denorm): min precision types do not support them
Resolves#7780
All tests require the rawBufferVectorLoad/Store fix from :
#8274
The array accessor and wave/quad op tests for min precision require the
optimizer fix from:
#8269
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
0 commit comments