Skip to content

[HLSLExec] Make execution tests directly consumable by the HLK - #9104

Draft
joaosaffran wants to merge 4 commits into
microsoft:mainfrom
joaosaffran:users/joaosaffran/remove-hlk-conversion-script
Draft

joaosaffran wants to merge 4 commits into
microsoft:mainfrom
joaosaffran:users/joaosaffran/remove-hlk-conversion-script

Conversation

@joaosaffran

Copy link
Copy Markdown
Collaborator

Embed the HLK metadata that the DXCBuild conversion scripts used to inject, so ExecutionTest.cpp and ShaderOpArithTable.xml can be built into the HLK as-is. Under _HLK_CONF the test class is exposed as DxilConfTest to keep existing HLK waivers matching.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The process-global verifier setup does not configure the runtime used by the selected Agility SDK factory, so /p:DriverVerifier=true can leave actual test devices unverified.

1 open issue
What changed in this PR

Makes HLSL execution tests directly consumable by the Windows Hardware Lab Kit (HLK), replacing metadata injection by DXCBuild conversion scripts while preserving waiver matching.

Changes:

  • Embeds HLK identifiers, descriptions, names, and specifications in test methods and XML rows.
  • Exposes the test class as DxilConfTest under _HLK_CONF.
  • Simplifies test dependencies and adds runtime-configurable driver verification.
File Description
tools/​clang/​unittests/​HLSLExec/​TableParameterHandler.h Uses shared test utility headers for all builds.
tools/​clang/​unittests/​HLSLExec/​ShaderOpArithTable.xml Adds HLK metadata to data-driven test rows.
tools/​clang/​unittests/​HLSLExec/​ExecutionTest.cpp Adds HLK method metadata, compatible class naming, and verifier configuration.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:14
@joaosaffran
joaosaffran force-pushed the users/joaosaffran/remove-hlk-conversion-script branch from 550dd21 to fb1851a Compare November 7, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The driver-verifier toggle targets the process-global runtime rather than the selected device-factory runtime, so verification can be reported as enabled without applying to the test devices.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Low severity Fix the “intrinrics” typo in the HLK description

tools/​clang/​unittests/​HLSLExec/​ExecutionTest.cpp:267

The new HLK description misspells “intrinsics” as “intrinrics”. Please correct it so the test description is spelled correctly in HLK.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The unguarded function leaves an unused Enabled parameter when _HLK_CONF is undefined, causing normal MSVC execution-test builds to fail because C4100 is treated as an error.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

When _HLK_CONF is undefined, the helper leaves Enabled unused, triggering C4100 as an error and breaking the normal Windows ExecHLSLTests build.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A minor finding omitted from the published review requires human judgment to determine whether it affects approval.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@alsepkow Alex Sepkowski (alsepkow) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding a couple comments

@joaosaffran
joaosaffran force-pushed the users/joaosaffran/remove-hlk-conversion-script branch from e0dfdff to fd95310 Compare November 10, 2026 01:03
Copilot AI balanced review requested due to automatic review settings November 10, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

HLK-visible metadata contains a typo and incorrectly identifies the msad4 test as Bfi instead of Msad.

2 open issues

Review effort: Balanced

Comment on lines +5528 to +5531
Kits.Description="Verifies the Bfi DXIL instruction."
Kits.TestId="ca7a8fe3-b671-4b2a-90d3-0efca2abff87"
Kits.Specification="Device.Graphics.WDDM22.AdapterRender.D3D12.DXILCore.ShaderModel60.CoreRequirement"
Kits.TestName="D3D12 - DXIL Core Test - Bfi instruction">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whoops, this sounds like an existing bug. I'd suggest we file a bug to look at this after we get this checked in.

@joaosaffran
joaosaffran marked this pull request as draft November 11, 2026 18:16
@joaosaffran
joaosaffran force-pushed the users/joaosaffran/remove-hlk-conversion-script branch from fd95310 to 053b291 Compare November 12, 2026 21:39
Embed the HLK metadata that the DXCBuild conversion scripts used to inject, so ExecutionTest.cpp and ShaderOpArithTable.xml can be built into the HLK as-is. The test class is renamed from ExecutionTest to DxilConfTest so existing HLK waivers keep matching, and the TAEF name filters in hcttest.cmd are updated to match.

To match the former gen_DxilConf.cpp template under _HLK_CONF:
- Drop the TAEF Parallel/Priority class properties, which the HLK class did not have.
- Exclude the non-HLK-only ReportLiveObjects/WriteInfoQueueMessages helpers, which do not compile with UNICODE.

The template's DriverVerifier toggle and skipped IsNormalTest stub are intentionally not carried over: the former is no longer used, and the latter's HLK references were removed when microsoft#7768 was resolved. DxilConfTestUtils.h is no longer needed: dxc/Support/Global.h provides its macros, and ExecutionTest.cpp already defines contains().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joaosaffran
joaosaffran force-pushed the users/joaosaffran/remove-hlk-conversion-script branch from 053b291 to d80a898 Compare November 12, 2026 23:34
public:
BEGIN_TEST_CLASS(ExecutionTest)
BEGIN_TEST_CLASS(DxilConfTest)
TEST_CLASS_PROPERTY(L"Parallel", L"true")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This lets TAEF know that it could run the tests in parallel. The CLI stil requires the \parallel to actually run in parallel.

Comment thread utils/hct/hcttest.cmd
set TEST_USE_LIT=1
set TEST_CLANG_FILTER=
set TEST_EXEC_FILTER=ExecutionTest::*
set TEST_EXEC_FILTER=DxilConfTest::*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Seems a little weird for this to be called 'TEST_EXEC_FILTER' now if we change the class name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Although....the dll is still named 'ExecHLSLTests.dll'. It might be worth doing a follow up change on that instead.

Thoughts?

This branch has not been deployed

No deployments
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.

4 participants