Commit feae699
Move double-precision tests to DoublePrecision class (microsoft#8157)
Addresses mmerecki's comment on PR microsoft#8134: several tests operating on
double-precision values remained in `DxilConf_SM69_Vectorized_Core` but
belong in `DxilConf_SM69_Vectorized_Double`.
## Changes
**Moved from `DxilConf_SM69_Vectorized_Core` to
`DxilConf_SM69_Vectorized_Double`:**
- `CastToFloat64_*` (9 variants: HLSLBool_t, HLSLHalf_t, float,
uint16_t, uint32_t, uint64_t, int16_t, int32_t, int64_t)
- `AsDouble_uint32_t`
- `AsUint_SplitDouble_double`
**Technical change:**
- Removed tests from `DxilConf_SM69_Vectorized_Core` class
- Added same tests to `DxilConf_SM69_Vectorized_Double` class using
`HLK_TEST_DOUBLE` macro
- Tests are now properly associated with
`Device.Graphics.D3D12.DXILCore.ShaderModel69.DoublePrecision`
specification
- Tests organized in sections: "Explicit Cast to Double (from various
types)" and "AsType (double precision)"
Test names and OpType template parameters remain unchanged.
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
> Create a follow-up PR in microsoft/DirectXShaderCompiler to address
mmerecki's comment on PR microsoft#8134
(microsoft#8134 (comment)).
>
> Problem:
> PR microsoft#8134 split long vector execution tests into separate classes based
on HLK requirements, introducing DxilConf_SM69_Vectorized_Core and
DxilConf_SM69_Vectorized_Double test classes in
tools/clang/unittests/HLSLExec/LongVectors.cpp. mmerecki noted that
several tests still live under DxilConf_SM69_Vectorized_Core but appear
to be double-precision related and should be moved to
DxilConf_SM69_Vectorized_Double.
>
> The tests listed by mmerecki:
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_HLSLBool_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_HLSLHalf_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_float
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_uint16_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_uint32_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_uint64_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_int16_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_int32_t
> - DxilConf_SM69_Vectorized_Core::CastToFloat64_int64_t
> - DxilConf_SM69_Vectorized_Core::AsDouble_uint32_t
> - DxilConf_SM69_Vectorized_Core::AsUint_SplitDouble_double
>
> Expected behavior / fix:
> - Update tools/clang/unittests/HLSLExec/LongVectors.cpp so that these
tests are associated with the DoublePrecision HLK specification.
> - Concretely, remove the above tests from
DxilConf_SM69_Vectorized_Core and add equivalent tests to
DxilConf_SM69_Vectorized_Double.
> - Prefer using HLK_TEST_DOUBLE for the tests being moved so they pick
up the "Device.Graphics.D3D12.DXILCore.ShaderModel69.DoublePrecision"
specification.
> - Ensure the resulting test method names remain stable/consistent and
compilation passes.
> - Validate that moved tests still call the correct OpType values
(OpType::CastToFloat64, OpType::AsDouble, OpType::AsUint_SplitDouble)
with appropriate template type arguments.
>
> Notes / pointers:
> - Relevant file: tools/clang/unittests/HLSLExec/LongVectors.cpp (see
locations around DxilConf_SM69_Vectorized_Core and
DxilConf_SM69_Vectorized_Double classes).
> - DxilConf_SM69_Vectorized_Double class defines HLK_TEST_DOUBLE and
already contains many double tests.
>
> Deliverables:
> - A new PR with changes only necessary to re-home these tests from
Core to Double.
> - Include a concise PR description referencing mmerecki's comment and
why the tests belong in the DoublePrecision group.
>
>
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
*This pull request was created from Copilot chat.*
>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/DirectXShaderCompiler/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: alsepkow <[email protected]>1 parent c44a383 commit feae699
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2140 | 2140 | | |
2141 | 2141 | | |
2142 | 2142 | | |
2143 | | - | |
2144 | 2143 | | |
2145 | 2144 | | |
2146 | 2145 | | |
| |||
2150 | 2149 | | |
2151 | 2150 | | |
2152 | 2151 | | |
2153 | | - | |
2154 | 2152 | | |
2155 | 2153 | | |
2156 | 2154 | | |
| |||
2160 | 2158 | | |
2161 | 2159 | | |
2162 | 2160 | | |
2163 | | - | |
2164 | 2161 | | |
2165 | 2162 | | |
2166 | 2163 | | |
| |||
2170 | 2167 | | |
2171 | 2168 | | |
2172 | 2169 | | |
2173 | | - | |
2174 | 2170 | | |
2175 | 2171 | | |
2176 | 2172 | | |
| |||
2180 | 2176 | | |
2181 | 2177 | | |
2182 | 2178 | | |
2183 | | - | |
2184 | 2179 | | |
2185 | 2180 | | |
2186 | 2181 | | |
| |||
2190 | 2185 | | |
2191 | 2186 | | |
2192 | 2187 | | |
2193 | | - | |
2194 | 2188 | | |
2195 | 2189 | | |
2196 | 2190 | | |
| |||
2200 | 2194 | | |
2201 | 2195 | | |
2202 | 2196 | | |
2203 | | - | |
2204 | 2197 | | |
2205 | 2198 | | |
2206 | 2199 | | |
| |||
2210 | 2203 | | |
2211 | 2204 | | |
2212 | 2205 | | |
2213 | | - | |
2214 | 2206 | | |
2215 | 2207 | | |
2216 | 2208 | | |
| |||
2220 | 2212 | | |
2221 | 2213 | | |
2222 | 2214 | | |
2223 | | - | |
2224 | 2215 | | |
2225 | 2216 | | |
2226 | 2217 | | |
| |||
2255 | 2246 | | |
2256 | 2247 | | |
2257 | 2248 | | |
2258 | | - | |
2259 | 2249 | | |
2260 | 2250 | | |
2261 | 2251 | | |
2262 | | - | |
2263 | 2252 | | |
2264 | 2253 | | |
2265 | 2254 | | |
| |||
2802 | 2791 | | |
2803 | 2792 | | |
2804 | 2793 | | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
2805 | 2809 | | |
2806 | 2810 | | |
2807 | 2811 | | |
| |||
0 commit comments