Skip to content

[SM6.10][Exec] Fix GetElement test, add transpose to helper#8361

Merged
V-FEXrt merged 6 commits intomicrosoft:mainfrom
V-FEXrt:linalg-hlk-fixes
Apr 10, 2026
Merged

[SM6.10][Exec] Fix GetElement test, add transpose to helper#8361
V-FEXrt merged 6 commits intomicrosoft:mainfrom
V-FEXrt:linalg-hlk-fixes

Conversation

@V-FEXrt
Copy link
Copy Markdown
Collaborator

@V-FEXrt V-FEXrt commented Apr 9, 2026

  • Fixes Wave sizes on the GetElement test
  • Always store the matrix back in row-major
  • Removes now unnecessary MAJOR_DIM define
  • Adds transpose to makeExpected

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff e9d74b2e4f20be7b25616f9cf1f02d311357ca45 41ae95cce6fb37b447b332e7ef184dc9be0e4d32 -- tools/clang/unittests/HLSLExec/LinAlgTests.cpp
View the diff from clang-format here.
diff --git a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
index 4146da0c..6eb637cd 100644
--- a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
+++ b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
@@ -246,11 +246,14 @@ static VariantCompType makeExpected(ComponentType CompType, int32_t M,
         Floats[Idx] = StartingVal + static_cast<float>(Increment ? Value : 0);
         break;
       case ComponentType::I32:
-        VERIFY_IS_TRUE(StartingVal < static_cast<float>(std::numeric_limits<int32_t>::max()),
-                 "Value too large to cast to int32_t");
-        VERIFY_IS_TRUE(StartingVal > static_cast<float>(std::numeric_limits<int32_t>::min()),
-                 "Value too small to cast to int32_t");
-        Ints[Idx] = static_cast<int32_t>(StartingVal) + static_cast<int32_t>(Increment ? Value : 0);
+        VERIFY_IS_TRUE(StartingVal < static_cast<float>(
+                                         std::numeric_limits<int32_t>::max()),
+                       "Value too large to cast to int32_t");
+        VERIFY_IS_TRUE(StartingVal > static_cast<float>(
+                                         std::numeric_limits<int32_t>::min()),
+                       "Value too small to cast to int32_t");
+        Ints[Idx] = static_cast<int32_t>(StartingVal) +
+                    static_cast<int32_t>(Increment ? Value : 0);
         break;
       case ComponentType::F16: {
         // Downcasting is safe here since HLSLHalf_t will clamp if F is too
  • Check this box to apply formatting changes to this branch.

Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp
@github-project-automation github-project-automation bot moved this from New to In progress in HLSL Roadmap Apr 9, 2026
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp
Copy link
Copy Markdown
Collaborator

@bob80905 bob80905 left a comment

Choose a reason for hiding this comment

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

LGTM

@V-FEXrt V-FEXrt changed the title [SM6.10][HLK] Fix GetElement test, add tranpose to helper [SM6.10][Exec] Fix GetElement test, add transpose to helper Apr 9, 2026
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.

LGTUS @inbelic

Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
Comment thread tools/clang/unittests/HLSLExec/LinAlgTests.cpp Outdated
@V-FEXrt V-FEXrt merged commit a5877b6 into microsoft:main Apr 10, 2026
10 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in HLSL Roadmap Apr 10, 2026
@V-FEXrt V-FEXrt deleted the linalg-hlk-fixes branch April 10, 2026 16:43
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.

5 participants