Skip to content

Rearrange LongVector Execution Tests infrastructure#7739

Merged
damyanp merged 28 commits intomicrosoft:mainfrom
damyanp:damyanp/longvec-parameter-experiment
Sep 9, 2025
Merged

Rearrange LongVector Execution Tests infrastructure#7739
damyanp merged 28 commits intomicrosoft:mainfrom
damyanp:damyanp/longvec-parameter-experiment

Conversation

@damyanp
Copy link
Copy Markdown
Member

@damyanp damyanp commented Sep 6, 2025

This change rearranges the long vector execution test infrastructure to be more static, relying on explicit dispatch tables rather than class hierarchies, variants and std:::functions.

This change tries to avoid moving code around more than it has to. Follow up NFC changes will reorganize this to move more code out of the header.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 6, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@damyanp damyanp marked this pull request as ready for review September 8, 2025 16:08
@damyanp damyanp requested review from V-FEXrt and alsepkow September 8, 2025 17:32
Copy link
Copy Markdown
Contributor

@alsepkow alsepkow left a comment

Choose a reason for hiding this comment

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

Submitting some comments from initial review

Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectorTestData.h
Comment thread tools/clang/unittests/HLSLExec/LongVectors.h Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Copy link
Copy Markdown
Collaborator

@V-FEXrt V-FEXrt left a comment

Choose a reason for hiding this comment

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

You meantion having NFC/reformatting PR coming so feel free to punt all the comments

Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Comment on lines +1443 to +1445
auto Config = TestConfig::Create(VerboseLogging);
if (Config)
dispatchTest<TrigonometricOpType>(*Config);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't feel strongly about it but I've seen others suggest something like

Suggested change
auto Config = TestConfig::Create(VerboseLogging);
if (Config)
dispatchTest<TrigonometricOpType>(*Config);
if (auto Config = TestConfig::Create(VerboseLogging))
dispatchTest<TrigonometricOpType>(*Config);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh thanks, this is the sort of thing I'd normally be calling out :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you make this change for all the instances of auto Config = ... not just this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh that's embarrassing.

Co-authored-by: Ashley Coleman <ascoleman@microsoft.com>
damyanp and others added 3 commits September 8, 2025 19:36
Co-authored-by: Ashley Coleman <ascoleman@microsoft.com>
Co-authored-by: Ashley Coleman <ascoleman@microsoft.com>
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp
Comment thread tools/clang/unittests/HLSLExec/LongVectors.cpp Outdated
Copy link
Copy Markdown
Contributor

@alsepkow alsepkow left a comment

Choose a reason for hiding this comment

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

LGTM

@damyanp damyanp merged commit 7f80fbc into microsoft:main Sep 9, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants