Skip to content

Commit 00a8237

Browse files
committed
cleanup
1 parent 86d2815 commit 00a8237

1 file changed

Lines changed: 1 addition & 39 deletions

File tree

tools/clang/unittests/HLSLExec/LinAlgTests.cpp

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This file is distributed under the University of Illinois Open Source //
66
// License. See LICENSE.TXT for details. //
77
// //
8-
// Execution tests for dx::linalg builtins (Proposal 0035, SM 6.10). //
8+
// Execution tests for dx::linalg builtins //
99
// //
1010
///////////////////////////////////////////////////////////////////////////////
1111

@@ -52,10 +52,6 @@ static int elemSize(ComponentType CT) {
5252
}
5353
}
5454

55-
// ===========================================================================
56-
// ShaderOp construction helpers
57-
// ===========================================================================
58-
5955
/// Create a ShaderOp for a compute shader dispatch.
6056
static std::unique_ptr<st::ShaderOp>
6157
createComputeOp(const char *Source, const char *Target, const char *RootSig,
@@ -129,14 +125,9 @@ runShaderOp(ID3D12Device *Device, dxc::SpecificDllLoader &DxcSupport,
129125
Device, DxcSupport, nullptr, std::move(InitCallback), std::move(OpSet));
130126
}
131127

132-
// ===========================================================================
133-
// Shader compilation helper
134-
// ===========================================================================
135-
136128
/// Compiles an HLSL shader using the DXC API to verify it is well-formed.
137129
/// This runs without a D3D12 device, so it works even when no SM 6.10
138130
/// hardware is available. Fails the test (via VERIFY) on compile error.
139-
140131
static void compileShader(dxc::SpecificDllLoader &DxcSupport,
141132
const char *Source, const char *Target,
142133
const std::string &Args) {
@@ -190,10 +181,6 @@ static void compileShader(dxc::SpecificDllLoader &DxcSupport,
190181
}
191182
}
192183

193-
// ===========================================================================
194-
// Test parameters
195-
// ===========================================================================
196-
197184
struct MatrixParams {
198185
ComponentType CompType;
199186
int M;
@@ -217,10 +204,6 @@ struct MatrixParams {
217204
size_t totalBytes() const { return totalElements() * elemSize(CompType); }
218205
};
219206

220-
// ===========================================================================
221-
// Compiler arguments builder
222-
// ===========================================================================
223-
224207
static std::string buildCompilerArgs(const MatrixParams &Params, int Stride,
225208
const char *ExtraDefines = nullptr) {
226209
std::stringstream SS;
@@ -240,10 +223,6 @@ static std::string buildCompilerArgs(const MatrixParams &Params, int Stride,
240223
return SS.str();
241224
}
242225

243-
// ===========================================================================
244-
// Verification helpers
245-
// ===========================================================================
246-
247226
static bool verifyFloatBuffer(const void *Actual, const float *Expected,
248227
size_t Count, bool Verbose,
249228
float Tolerance = 0.0f) {
@@ -284,10 +263,6 @@ static bool verifyIntBuffer(const void *Actual, const int32_t *Expected,
284263
return Success;
285264
}
286265

287-
// ===========================================================================
288-
// Test class
289-
// ===========================================================================
290-
291266
class DxilConf_SM610_LinAlg {
292267
public:
293268
BEGIN_TEST_CLASS(DxilConf_SM610_LinAlg)
@@ -319,10 +294,6 @@ class DxilConf_SM610_LinAlg {
319294
std::optional<D3D12SDKSelector> D3D12SDK;
320295
};
321296

322-
// ===========================================================================
323-
// Class setup
324-
// ===========================================================================
325-
326297
bool DxilConf_SM610_LinAlg::setupClass() {
327298
WEX::TestExecution::SetVerifyOutput VerifySettings(
328299
WEX::TestExecution::VerifyOutputSettings::LogOnlyFailures);
@@ -357,7 +328,6 @@ bool DxilConf_SM610_LinAlg::setupClass() {
357328
L"test.");
358329
return false;
359330
}
360-
// No device — tests will compile shaders and skip execution.
361331
}
362332
}
363333

@@ -380,10 +350,6 @@ bool DxilConf_SM610_LinAlg::setupMethod() {
380350
return true;
381351
}
382352

383-
// ===========================================================================
384-
// Load/Store roundtrip
385-
// ===========================================================================
386-
387353
static const char LoadStoreShader[] = R"(
388354
RWByteAddressBuffer Input : register(u0);
389355
RWByteAddressBuffer Output : register(u1);
@@ -502,10 +468,6 @@ void DxilConf_SM610_LinAlg::LoadStoreRoundtrip_Wave_I32() {
502468
runLoadStoreRoundtrip(D3DDevice, DxcSupport, Params, VerboseLogging);
503469
}
504470

505-
// ===========================================================================
506-
// Splat + Store
507-
// ===========================================================================
508-
509471
static const char SplatStoreShader[] = R"(
510472
RWByteAddressBuffer Output : register(u0);
511473

0 commit comments

Comments
 (0)