[SM6.10][Exec] Implement Remaining Smoke Tests#8366
Draft
V-FEXrt wants to merge 2 commits intomicrosoft:mainfrom
Draft
[SM6.10][Exec] Implement Remaining Smoke Tests#8366V-FEXrt wants to merge 2 commits intomicrosoft:mainfrom
V-FEXrt wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Contributor
You can test this locally with the following command:git-clang-format --diff 5f8d05f9b760ae2be0242cad8ed719d10058b98c bb28c903773aee5f3cb02f0f4c0e22f2dc37a263 -- tools/clang/unittests/HLSLExec/LinAlgTests.cppView the diff from clang-format here.diff --git a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
index 0de27387..1d420d1c 100644
--- a/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
+++ b/tools/clang/unittests/HLSLExec/LinAlgTests.cpp
@@ -634,8 +634,8 @@ static const char ElementSetShader[] = R"(
)";
static void runElementSet(ID3D12Device *Device,
- dxc::SpecificDllLoader &DxcSupport,
- const MatrixParams &Params, bool Verbose) {
+ dxc::SpecificDllLoader &DxcSupport,
+ const MatrixParams &Params, bool Verbose) {
const size_t NumElements = Params.totalElements();
const size_t MatrixSize = Params.totalBytes();
@@ -669,7 +669,6 @@ static void runElementSet(ID3D12Device *Device,
// Verify the front of the buffer is a list of elements of the expected type
VERIFY_IS_TRUE(verifyComponentBuffer(Params.CompType, OutData.data(),
Expected, NumElements, Verbose));
-
}
void DxilConf_SM610_LinAlg::ElementSet_Wave_16x16_F16() {
@@ -711,8 +710,9 @@ static const char CopyConvertShader[] = R"(
)";
static void runCopyConvert(ID3D12Device *Device,
- dxc::SpecificDllLoader &DxcSupport,
- const MatrixParams &Params, bool Verbose, bool Transpose) {
+ dxc::SpecificDllLoader &DxcSupport,
+ const MatrixParams &Params, bool Verbose,
+ bool Transpose) {
const size_t NumElements = Params.totalElements();
const size_t BufferSize = Params.totalBytes();
@@ -723,7 +723,8 @@ static void runCopyConvert(ID3D12Device *Device,
compileShader(DxcSupport, CopyConvertShader, "cs_6_10", Args, Verbose);
- auto Expected = makeExpected(Params.CompType, Params.M, Params.N, 1, /*Increment=*/true, Transpose);
+ auto Expected = makeExpected(Params.CompType, Params.M, Params.N, 1,
+ /*Increment=*/true, Transpose);
// Construct the ShaderOp: two UAV buffers, load from one, store to other.
auto Op = createComputeOp(CopyConvertShader, "cs_6_10", "UAV(u0), UAV(u1)",
@@ -759,7 +760,8 @@ void DxilConf_SM610_LinAlg::CopyConvert_Wave_16x16_F16() {
Params.Layout = LinalgMatrixLayout::RowMajor;
Params.NumThreads = 64;
Params.Enable16Bit = true;
- runCopyConvert(D3DDevice, DxcSupport, Params, VerboseLogging, /*Transpose=*/false);
+ runCopyConvert(D3DDevice, DxcSupport, Params, VerboseLogging,
+ /*Transpose=*/false);
}
void DxilConf_SM610_LinAlg::CopyConvert_Wave_16x16_F16_Transpose() {
@@ -772,7 +774,8 @@ void DxilConf_SM610_LinAlg::CopyConvert_Wave_16x16_F16_Transpose() {
Params.Layout = LinalgMatrixLayout::RowMajor;
Params.NumThreads = 64;
Params.Enable16Bit = true;
- runCopyConvert(D3DDevice, DxcSupport, Params, VerboseLogging, /*Transpose=*/true);
+ runCopyConvert(D3DDevice, DxcSupport, Params, VerboseLogging,
+ /*Transpose=*/true);
}
static const char MatMatMulShader[] = R"(
@@ -809,8 +812,9 @@ static const char MatMatMulShader[] = R"(
)";
static void runMatMatMul(ID3D12Device *Device,
- dxc::SpecificDllLoader &DxcSupport,
- const MatrixParams &Params, bool Verbose, MatrixDim K, float AFill, float BFill) {
+ dxc::SpecificDllLoader &DxcSupport,
+ const MatrixParams &Params, bool Verbose, MatrixDim K,
+ float AFill, float BFill) {
const size_t NumElements = Params.totalElements();
const size_t BufferSize = Params.totalBytes();
@@ -823,7 +827,8 @@ static void runMatMatMul(ID3D12Device *Device,
compileShader(DxcSupport, MatMatMulShader, "cs_6_10", Args, Verbose);
- auto Expected = makeExpected(Params.CompType, Params.M, Params.N, AFill * BFill * K, /*Increment=*/false);
+ auto Expected = makeExpected(Params.CompType, Params.M, Params.N,
+ AFill * BFill * K, /*Increment=*/false);
auto Op =
createComputeOp(MatMatMulShader, "cs_6_10", "UAV(u0)", Args.c_str());
@@ -848,7 +853,8 @@ void DxilConf_SM610_LinAlg::MatMatMul_Wave_16x16x16_F16() {
Params.Layout = LinalgMatrixLayout::RowMajor;
Params.NumThreads = 64;
Params.Enable16Bit = true;
- runMatMatMul(D3DDevice, DxcSupport, Params, VerboseLogging, /*K=*/16, /*AFill=*/2.0f, /*BFill=*/3.0f);
+ runMatMatMul(D3DDevice, DxcSupport, Params, VerboseLogging, /*K=*/16,
+ /*AFill=*/2.0f, /*BFill=*/3.0f);
}
} // namespace LinAlg
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP
Implements smoke tests for the remaining operations