Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions tools/clang/unittests/HLSLExec/LinAlgTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static void runSplatStore(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << "-DFILL_VALUE=" << FillValue;
ExtraDefs << std::showpoint << "-DFILL_VALUE=" << FillValue << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down Expand Up @@ -624,7 +624,7 @@ static const char ElementAccessShader[] = R"(
// flatten the 2D index into a 1D index then scale by element size
// Always store row-major and work it out in the test runner
uint coordToByteOffset(uint2 coord) {
return (coord.y * M_DIM + coord.x) * ELEM_SIZE;
return (coord.x * N_DIM + coord.y) * ELEM_SIZE;
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.

Good catch. It sure can be confusing for x to be row and y to be column, but makes most sense in context.

}

[WaveSize(4, 64)]
Expand Down Expand Up @@ -935,9 +935,10 @@ static void runMatMatMul(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << std::showpoint;
ExtraDefs << " -DK_DIM=" << K;
ExtraDefs << " -DA_FILL=" << AFill;
ExtraDefs << " -DB_FILL=" << BFill;
ExtraDefs << " -DA_FILL=" << AFill << "F";
ExtraDefs << " -DB_FILL=" << BFill << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down Expand Up @@ -1017,10 +1018,11 @@ static void runMatMatMulAccum(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << std::showpoint;
ExtraDefs << " -DK_DIM=" << K;
ExtraDefs << " -DA_FILL=" << AFill;
ExtraDefs << " -DB_FILL=" << BFill;
ExtraDefs << " -DC_FILL=" << CFill;
ExtraDefs << " -DA_FILL=" << AFill << "F";
ExtraDefs << " -DB_FILL=" << BFill << "F";
ExtraDefs << " -DC_FILL=" << CFill << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down Expand Up @@ -1094,8 +1096,9 @@ static void runMatAccum(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << " -DLHS_FILL=" << LHSFill;
ExtraDefs << " -DRHS_FILL=" << RHSFill;
ExtraDefs << std::showpoint;
ExtraDefs << " -DLHS_FILL=" << LHSFill << "F";
ExtraDefs << " -DRHS_FILL=" << RHSFill << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down Expand Up @@ -1551,8 +1554,9 @@ static void runStoreMemory(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << std::showpoint;
ExtraDefs << " -DOFFSET=" << 0;
ExtraDefs << " -DFILL_VALUE=" << FillValue;
ExtraDefs << " -DFILL_VALUE=" << FillValue << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down Expand Up @@ -1631,8 +1635,9 @@ static void runAccumulateMemory(ID3D12Device *Device,
const size_t BufferSize = Params.totalBytes();

std::stringstream ExtraDefs;
ExtraDefs << std::showpoint;
ExtraDefs << " -DOFFSET=" << 0;
ExtraDefs << " -DFILL_VALUE=" << FillValue;
ExtraDefs << " -DFILL_VALUE=" << FillValue << "F";

std::string Args = buildCompilerArgs(Params, ExtraDefs.str().c_str());

Expand Down
Loading