Skip to content

Move double-precision tests to DoublePrecision class#8157

Merged
alsepkow merged 4 commits intomainfrom
copilot/move-double-precision-tests
Feb 14, 2026
Merged

Move double-precision tests to DoublePrecision class#8157
alsepkow merged 4 commits intomainfrom
copilot/move-double-precision-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 12, 2026

Addresses mmerecki's comment on PR #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.

Original prompt

Create a follow-up PR in microsoft/DirectXShaderCompiler to address mmerecki's comment on PR #8134 (#8134 (comment)).

Problem:
PR #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.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Move 11 double-precision related tests from DxilConf_SM69_Vectorized_Core
to DxilConf_SM69_Vectorized_Double as suggested by mmerecki in PR #8134.

Tests moved:
- CastToFloat64_* (9 variants for different source types)
- AsDouble_uint32_t
- AsUint_SplitDouble_double

These tests now use HLK_TEST_DOUBLE macro to associate them with the
Device.Graphics.D3D12.DXILCore.ShaderModel69.DoublePrecision specification.

Co-authored-by: alsepkow <5620315+alsepkow@users.noreply.github.com>
Copilot AI changed the title [WIP] Move double-precision tests to vectorized double class Move double-precision tests to DoublePrecision class Feb 12, 2026
Copilot AI requested a review from alsepkow February 12, 2026 19:28
@alsepkow
Copy link
Copy Markdown
Contributor

@copilot We don't need to group the tests like you did. You can leave them in the original location. Just update the macro call.

Changed HLK_TEST to HLK_TEST_DOUBLE for 11 double-precision tests
in their original locations within DxilConf_SM69_Vectorized_Core,
rather than moving them to a separate class.

Co-authored-by: alsepkow <5620315+alsepkow@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot We don't need to group the tests like you did. You can leave them in the original location. Just update the macro call.

Done in fee4f4a. Changed HLK_TEST to HLK_TEST_DOUBLE for the 11 tests in their original locations without any reorganization.

Copilot AI changed the title Move double-precision tests to DoublePrecision class Associate double-precision tests with DoublePrecision HLK specification Feb 12, 2026
@alsepkow
Copy link
Copy Markdown
Contributor

@copilot I was wrong. You can revert that last commit.

This reverts commit fee4f4a.
Restoring the original approach of moving tests to the Double class.

Co-authored-by: alsepkow <5620315+alsepkow@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 13, 2026

@copilot I was wrong. You can revert that last commit.

Reverted in 13ebe08. The tests are now moved to the Double class as in the original approach.

Copilot AI changed the title Associate double-precision tests with DoublePrecision HLK specification Move double-precision tests to DoublePrecision class Feb 13, 2026
@alsepkow alsepkow marked this pull request as ready for review February 13, 2026 22:48
Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@alsepkow alsepkow enabled auto-merge (squash) February 13, 2026 23:23
@alsepkow alsepkow merged commit feae699 into main Feb 14, 2026
11 checks passed
@alsepkow alsepkow deleted the copilot/move-double-precision-tests branch February 14, 2026 00:27
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants