Skip to content

[Release SM 6.9] Cherry-Pick Execution Tests: Add min precision test cases to the long vector test#8371

Open
alsepkow wants to merge 1 commit intomicrosoft:release-1.9.2602from
alsepkow:user/alsepkow/cherry-pick-3531468
Open

[Release SM 6.9] Cherry-Pick Execution Tests: Add min precision test cases to the long vector test#8371
alsepkow wants to merge 1 commit intomicrosoft:release-1.9.2602from
alsepkow:user/alsepkow/cherry-pick-3531468

Conversation

@alsepkow
Copy link
Copy Markdown
Contributor

Cherry-pick PR (#8260)

Assisted by gh copilot.

Depends on: #8369, #8370

SHA 3531468

…microsoft#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 microsoft#7780

All tests require the rawBufferVectorLoad/Store fix from :
microsoft#8274
The array accessor and wave/quad op tests for min precision require the
optimizer fix from:
microsoft#8269


Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant