Skip to content

Commit

Permalink
Make MlasTestFixture::mlas_tester an inline variable. (#18263)
Browse files Browse the repository at this point in the history
Make MlasTestFixture::mlas_tester an inline variable. With this change we no longer need to define `MlasTestFixture<T>::mlas_tester` outside of the class definition.
  • Loading branch information
edgchen1 authored Nov 3, 2023
1 parent 4c4d79a commit 2ec1f94
Show file tree
Hide file tree
Showing 26 changed files with 1 addition and 254 deletions.
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ class MlasActivationTest : public MlasTestBase {
}
};

template <>
MlasActivationTest* MlasTestFixture<MlasActivationTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
return is_short_execute ? MlasDirectShortExecuteTests<MlasActivationTest>::RegisterShortExecute() : 0;
});
6 changes: 0 additions & 6 deletions onnxruntime/test/mlas/unittest/test_blkq8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ class MlasBlkQ8ShortExeTest : public MlasTestFixture<MlasBlkQ8Test<Threaded>> {
size_t M_, K_;
};

template <>
MlasBlkQ8Test<true>* MlasTestFixture<MlasBlkQ8Test<true>>::mlas_tester(nullptr);

template <>
MlasBlkQ8Test<false>* MlasTestFixture<MlasBlkQ8Test<false>>::mlas_tester(nullptr);

static size_t BlkQ8ReisterShortTests() {
size_t cnt = 0;
cnt += MlasBlkQ8ShortExeTest<true>::RegisterShortExecuteTests();
Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_blockq4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ class MlasBlockwiseQdqTest : public MlasTestBase {
MlasBlockwiseQdqTest() = default;
};

template <>
MlasBlockwiseQdqTest* MlasTestFixture<MlasBlockwiseQdqTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
size_t count = 0;
if (is_short_execute) {
Expand Down
5 changes: 0 additions & 5 deletions onnxruntime/test/mlas/unittest/test_conv2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include "test_conv2d.h"
#include "test_conv2d_fixture.h"

template <>
MlasConv2DTest<false>* MlasTestFixture<MlasConv2DTest<false>>::mlas_tester(nullptr);
template <>
MlasConv2DTest<true>* MlasTestFixture<MlasConv2DTest<true>>::mlas_tester(nullptr);

static size_t Conv2dRegistLongExecute() {
size_t count = MlasLongExecuteTests<MlasConv2DTest<false>>::RegisterLongExecute();
if (GetMlasThreadPool() != nullptr) {
Expand Down
5 changes: 0 additions & 5 deletions onnxruntime/test/mlas/unittest/test_conv2d_nchwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include "test_conv2d_nchwc.h"
#include "test_conv2d_fixture.h"

template <>
MlasNchwcConv2DTest<false>* MlasTestFixture<MlasNchwcConv2DTest<false>>::mlas_tester(nullptr);
template <>
MlasNchwcConv2DTest<true>* MlasTestFixture<MlasNchwcConv2DTest<true>>::mlas_tester(nullptr);

static size_t Conv2dNchwcRegistLongExecute() {
size_t count = 0;

Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class MlasComputeExpTest : public MlasTestBase {
}
};

template <>
MlasComputeExpTest* MlasTestFixture<MlasComputeExpTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
// no long execute needed
return is_short_execute ? MlasDirectShortExecuteTests<MlasComputeExpTest>::RegisterShortExecute() : 0;
Expand Down
18 changes: 0 additions & 18 deletions onnxruntime/test/mlas/unittest/test_fgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@
#include <memory>
#include <sstream>

template <>
MlasFgemmTest<float, false, false>* MlasTestFixture<MlasFgemmTest<float, false, false>>::mlas_tester(nullptr);
template <>
MlasFgemmTest<float, false, true>* MlasTestFixture<MlasFgemmTest<float, false, true>>::mlas_tester(nullptr);
template <>
MlasFgemmTest<float, true, false>* MlasTestFixture<MlasFgemmTest<float, true, false>>::mlas_tester(nullptr);
template <>
MlasFgemmTest<float, true, true>* MlasTestFixture<MlasFgemmTest<float, true, true>>::mlas_tester(nullptr);

#ifdef MLAS_SUPPORTS_GEMM_DOUBLE

template <>
MlasFgemmTest<double, false, false>* MlasTestFixture<MlasFgemmTest<double, false, false>>::mlas_tester(nullptr);
template <>
MlasFgemmTest<double, false, true>* MlasTestFixture<MlasFgemmTest<double, false, true>>::mlas_tester(nullptr);

#endif

static size_t FGemmRegistLongExecute() {
size_t count = 0;

Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_fp16_activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ class MlasFp16ActivationTest : public MlasTestBase {
}
};

template <>
MlasFp16ActivationTest* MlasTestFixture<MlasFp16ActivationTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
return is_short_execute ? MlasDirectShortExecuteTests<MlasFp16ActivationTest>::RegisterShortExecute() : 0;
});
Expand Down
36 changes: 0 additions & 36 deletions onnxruntime/test/mlas/unittest/test_halfgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,42 +89,6 @@ class HalfGemmShortExecuteTest : public MlasTestFixture<MlasHalfGemmTest<AType,
bool hasBias_;
};

template <>
MlasHalfGemmTest<float, MLFp16, false, false>* MlasTestFixture<MlasHalfGemmTest<float, MLFp16, false, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, MLFp16, false, true>* MlasTestFixture<MlasHalfGemmTest<float, MLFp16, false, true>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, MLFp16, true, false>* MlasTestFixture<MlasHalfGemmTest<float, MLFp16, true, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, MLFp16, true, true>* MlasTestFixture<MlasHalfGemmTest<float, MLFp16, true, true>>::mlas_tester(nullptr);

template <>
MlasHalfGemmTest<MLFp16, float, false, false>* MlasTestFixture<MlasHalfGemmTest<MLFp16, float, false, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, float, false, true>* MlasTestFixture<MlasHalfGemmTest<MLFp16, float, false, true>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, float, true, false>* MlasTestFixture<MlasHalfGemmTest<MLFp16, float, true, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, float, true, true>* MlasTestFixture<MlasHalfGemmTest<MLFp16, float, true, true>>::mlas_tester(nullptr);

template <>
MlasHalfGemmTest<float, float, false, false>* MlasTestFixture<MlasHalfGemmTest<float, float, false, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, float, false, true>* MlasTestFixture<MlasHalfGemmTest<float, float, false, true>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, float, true, false>* MlasTestFixture<MlasHalfGemmTest<float, float, true, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<float, float, true, true>* MlasTestFixture<MlasHalfGemmTest<float, float, true, true>>::mlas_tester(nullptr);

template <>
MlasHalfGemmTest<MLFp16, MLFp16, false, false>* MlasTestFixture<MlasHalfGemmTest<MLFp16, MLFp16, false, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, MLFp16, false, true>* MlasTestFixture<MlasHalfGemmTest<MLFp16, MLFp16, false, true>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, MLFp16, true, false>* MlasTestFixture<MlasHalfGemmTest<MLFp16, MLFp16, true, false>>::mlas_tester(nullptr);
template <>
MlasHalfGemmTest<MLFp16, MLFp16, true, true>* MlasTestFixture<MlasHalfGemmTest<MLFp16, MLFp16, true, true>>::mlas_tester(nullptr);

static size_t HalfGemmRegistLongExecute() {
size_t count = 0;

Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_minmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class MlasFindMinMaxElementsTest : public MlasTestBase {
}
};

template <>
MlasFindMinMaxElementsTest* MlasTestFixture<MlasFindMinMaxElementsTest>::mlas_tester(nullptr);

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
Expand Down
14 changes: 0 additions & 14 deletions onnxruntime/test/mlas/unittest/test_pool2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
#include "test_pool2d.h"
#include "test_pool2d_fixture.h"

template <>
MlasPool2DTest<MlasMaximumPooling, false>* MlasTestFixture<MlasPool2DTest<MlasMaximumPooling, false>>::mlas_tester(nullptr);
template <>
MlasPool2DTest<MlasAveragePoolingExcludePad, false>* MlasTestFixture<MlasPool2DTest<MlasAveragePoolingExcludePad, false>>::mlas_tester(nullptr);
template <>
MlasPool2DTest<MlasAveragePoolingIncludePad, false>* MlasTestFixture<MlasPool2DTest<MlasAveragePoolingIncludePad, false>>::mlas_tester(nullptr);

template <>
MlasPool2DTest<MlasMaximumPooling, true>* MlasTestFixture<MlasPool2DTest<MlasMaximumPooling, true>>::mlas_tester(nullptr);
template <>
MlasPool2DTest<MlasAveragePoolingExcludePad, true>* MlasTestFixture<MlasPool2DTest<MlasAveragePoolingExcludePad, true>>::mlas_tester(nullptr);
template <>
MlasPool2DTest<MlasAveragePoolingIncludePad, true>* MlasTestFixture<MlasPool2DTest<MlasAveragePoolingIncludePad, true>>::mlas_tester(nullptr);

static size_t Pool2dRegistLongExecute() {
size_t count = 0;
count += MlasLongExecuteTests<MlasPool2DTest<MlasMaximumPooling, false>>::RegisterLongExecute();
Expand Down
14 changes: 0 additions & 14 deletions onnxruntime/test/mlas/unittest/test_pool2d_nchwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
#include "test_pool2d_nchwc.h"
#include "test_pool2d_fixture.h"

template <>
MlasNchwcPool2DTest<MlasMaximumPooling, false>* MlasTestFixture<MlasNchwcPool2DTest<MlasMaximumPooling, false>>::mlas_tester(nullptr);
template <>
MlasNchwcPool2DTest<MlasAveragePoolingExcludePad, false>* MlasTestFixture<MlasNchwcPool2DTest<MlasAveragePoolingExcludePad, false>>::mlas_tester(nullptr);
template <>
MlasNchwcPool2DTest<MlasAveragePoolingIncludePad, false>* MlasTestFixture<MlasNchwcPool2DTest<MlasAveragePoolingIncludePad, false>>::mlas_tester(nullptr);

template <>
MlasNchwcPool2DTest<MlasMaximumPooling, true>* MlasTestFixture<MlasNchwcPool2DTest<MlasMaximumPooling, true>>::mlas_tester(nullptr);
template <>
MlasNchwcPool2DTest<MlasAveragePoolingExcludePad, true>* MlasTestFixture<MlasNchwcPool2DTest<MlasAveragePoolingExcludePad, true>>::mlas_tester(nullptr);
template <>
MlasNchwcPool2DTest<MlasAveragePoolingIncludePad, true>* MlasTestFixture<MlasNchwcPool2DTest<MlasAveragePoolingIncludePad, true>>::mlas_tester(nullptr);

static size_t Pool2dNchwcRegistLongExecute() {
size_t count = 0;
if (MlasNchwcGetBlockSize() > 1) {
Expand Down
14 changes: 0 additions & 14 deletions onnxruntime/test/mlas/unittest/test_pool3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
#include "test_pool3d.h"
#include "test_pool3d_fixture.h"

template <>
MlasPool3DTest<MlasMaximumPooling, false>* MlasTestFixture<MlasPool3DTest<MlasMaximumPooling, false>>::mlas_tester(nullptr);
template <>
MlasPool3DTest<MlasAveragePoolingExcludePad, false>* MlasTestFixture<MlasPool3DTest<MlasAveragePoolingExcludePad, false>>::mlas_tester(nullptr);
template <>
MlasPool3DTest<MlasAveragePoolingIncludePad, false>* MlasTestFixture<MlasPool3DTest<MlasAveragePoolingIncludePad, false>>::mlas_tester(nullptr);

template <>
MlasPool3DTest<MlasMaximumPooling, true>* MlasTestFixture<MlasPool3DTest<MlasMaximumPooling, true>>::mlas_tester(nullptr);
template <>
MlasPool3DTest<MlasAveragePoolingExcludePad, true>* MlasTestFixture<MlasPool3DTest<MlasAveragePoolingExcludePad, true>>::mlas_tester(nullptr);
template <>
MlasPool3DTest<MlasAveragePoolingIncludePad, true>* MlasTestFixture<MlasPool3DTest<MlasAveragePoolingIncludePad, true>>::mlas_tester(nullptr);

static size_t Pool3dRegistLongExecute() {
size_t count = 0;
count += MlasLongExecuteTests<MlasPool3DTest<MlasMaximumPooling, false>>::RegisterLongExecute();
Expand Down
13 changes: 0 additions & 13 deletions onnxruntime/test/mlas/unittest/test_q4gemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,6 @@ class Q4GemmShortExecuteTest : public MlasTestFixture<MlasQ4GemmTest<QType, Thre
bool hasBias_;
};

template <>
MlasQ4GemmTest<BlkQ4Sym, false>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Sym, false>>::mlas_tester(nullptr);
template <>
MlasQ4GemmTest<BlkQ4Sym, true>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Sym, true>>::mlas_tester(nullptr);
template <>
MlasQ4GemmTest<BlkQ4Zp8, false>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Zp8, false>>::mlas_tester(nullptr);
template <>
MlasQ4GemmTest<BlkQ4Zp8, true>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Zp8, true>>::mlas_tester(nullptr);
template <>
MlasQ4GemmTest<BlkQ4Sym128, false>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Sym128, false>>::mlas_tester(nullptr);
template <>
MlasQ4GemmTest<BlkQ4Sym128, true>* MlasTestFixture<MlasQ4GemmTest<BlkQ4Sym128, true>>::mlas_tester(nullptr);

static size_t Q4GemmRegistShortExecute() {
size_t count = 0;

Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_q4qdq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ class MlasQ4dqTest : public MlasTestBase {
MlasQ4dqTest() = default;
};

template <>
MlasQ4dqTest* MlasTestFixture<MlasQ4dqTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
if (MlasQ4GemmPackBSize(BlkQ4Sym, 32, 32) == 0) {
return (size_t)0;
Expand Down
13 changes: 0 additions & 13 deletions onnxruntime/test/mlas/unittest/test_q8q4gemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,6 @@ class Q8Q4GemmShortExecuteTest : public MlasTestFixture<MlasQ8Q4GemmTest<QType,
bool hasBias_;
};

template <>
MlasQ8Q4GemmTest<BlkQ4Sym, false>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Sym, false>>::mlas_tester(nullptr);
template <>
MlasQ8Q4GemmTest<BlkQ4Sym, true>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Sym, true>>::mlas_tester(nullptr);
template <>
MlasQ8Q4GemmTest<BlkQ4Zp8, false>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Zp8, false>>::mlas_tester(nullptr);
template <>
MlasQ8Q4GemmTest<BlkQ4Zp8, true>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Zp8, true>>::mlas_tester(nullptr);
template <>
MlasQ8Q4GemmTest<BlkQ4Sym128, false>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Sym128, false>>::mlas_tester(nullptr);
template <>
MlasQ8Q4GemmTest<BlkQ4Sym128, true>* MlasTestFixture<MlasQ8Q4GemmTest<BlkQ4Sym128, true>>::mlas_tester(nullptr);

static size_t Q8Q4GemmRegistShortExecute() {
size_t count = 0;

Expand Down
54 changes: 0 additions & 54 deletions onnxruntime/test/mlas/unittest/test_qgemm.cpp
Original file line number Diff line number Diff line change
@@ -1,60 +1,6 @@
#include "test_qgemm.h"
#include "test_qgemm_fixture.h"

template <>
MlasQgemmTest<uint8_t, int8_t, int32_t, false, false>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, int32_t, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, int32_t, false, true>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, int32_t, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, int32_t, true, false>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, int32_t, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, int32_t, true, true>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, int32_t, true, true>>::mlas_tester(nullptr);

template <>
MlasQgemmTest<int8_t, int8_t, int32_t, false, false>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, int32_t, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, int32_t, false, true>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, int32_t, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, int32_t, true, false>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, int32_t, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, int32_t, true, true>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, int32_t, true, true>>::mlas_tester(nullptr);

template <>
MlasQgemmTest<uint8_t, uint8_t, int32_t, false, false>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, int32_t, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, int32_t, false, true>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, int32_t, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, int32_t, true, false>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, int32_t, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, int32_t, true, true>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, int32_t, true, true>>::mlas_tester(nullptr);

template <>
MlasQgemmTest<uint8_t, int8_t, float, false, false>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, float, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, float, false, true>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, float, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, float, true, false>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, float, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, int8_t, float, true, true>* MlasTestFixture<MlasQgemmTest<uint8_t, int8_t, float, true, true>>::mlas_tester(nullptr);

template <>
MlasQgemmTest<int8_t, int8_t, float, false, false>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, float, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, float, false, true>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, float, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, float, true, false>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, float, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<int8_t, int8_t, float, true, true>* MlasTestFixture<MlasQgemmTest<int8_t, int8_t, float, true, true>>::mlas_tester(nullptr);

template <>
MlasQgemmTest<uint8_t, uint8_t, float, false, false>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, float, false, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, float, false, true>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, float, false, true>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, float, true, false>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, float, true, false>>::mlas_tester(nullptr);
template <>
MlasQgemmTest<uint8_t, uint8_t, float, true, true>* MlasTestFixture<MlasQgemmTest<uint8_t, uint8_t, float, true, true>>::mlas_tester(nullptr);

static size_t QGemmRegistLongExecute() {
size_t count = 0;

Expand Down
5 changes: 0 additions & 5 deletions onnxruntime/test/mlas/unittest/test_qlinear_binaryop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ class MlasQLinearMulTest : public MlasQLinearBinaryOpTest {
}
};

template <>
MlasQLinearAddTest* MlasTestFixture<MlasQLinearAddTest>::mlas_tester(nullptr);
template <>
MlasQLinearMulTest* MlasTestFixture<MlasQLinearMulTest>::mlas_tester(nullptr);

static bool UNUSED_VARIABLE added_to_main = AddTestRegister([](bool is_short_execute) {
size_t count = 0;
if (is_short_execute) {
Expand Down
5 changes: 0 additions & 5 deletions onnxruntime/test/mlas/unittest/test_qlinear_gavgpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ class MlasQLinearGlobalAveragePoolTest : public MlasTestBase {
}
};

template <>
MlasQLinearGlobalAveragePoolTest<int8_t>* MlasTestFixture<MlasQLinearGlobalAveragePoolTest<int8_t>>::mlas_tester(nullptr);
template <>
MlasQLinearGlobalAveragePoolTest<uint8_t>* MlasTestFixture<MlasQLinearGlobalAveragePoolTest<uint8_t>>::mlas_tester(nullptr);

template <>
const std::vector<int8_t> MlasQLinearGlobalAveragePoolTest<int8_t>::ZeroPoints = {-128, -110, 1, 103, 127};

Expand Down
9 changes: 0 additions & 9 deletions onnxruntime/test/mlas/unittest/test_quantizelinear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,6 @@ class MlasQuantizeLinearTest : public MlasTestBase {
}
};

template <>
MlasQuantizeLinearTest<int8_t>* MlasTestFixture<MlasQuantizeLinearTest<int8_t>>::mlas_tester(nullptr);
template <>
MlasQuantizeLinearTest<uint8_t>* MlasTestFixture<MlasQuantizeLinearTest<uint8_t>>::mlas_tester(nullptr);
template <>
MlasQuantizeLinearTest<int16_t>* MlasTestFixture<MlasQuantizeLinearTest<int16_t>>::mlas_tester(nullptr);
template <>
MlasQuantizeLinearTest<uint16_t>* MlasTestFixture<MlasQuantizeLinearTest<uint16_t>>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
size_t count = 0;
if (is_short_execute) {
Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_reorder_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ class MlasReorderOutputTest : public MlasTestBase {
}
};

template <>
MlasReorderOutputTest* MlasTestFixture<MlasReorderOutputTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
return (MlasNchwcGetBlockSize() > 1 && is_short_execute)
? MlasDirectShortExecuteTests<MlasReorderOutputTest>::RegisterShortExecute()
Expand Down
3 changes: 0 additions & 3 deletions onnxruntime/test/mlas/unittest/test_scaleoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class MlasScaleOutputTest : public MlasTestBase {
}
};

template <>
MlasScaleOutputTest* MlasTestFixture<MlasScaleOutputTest>::mlas_tester(nullptr);

static UNUSED_VARIABLE bool added_to_main = AddTestRegister([](bool is_short_execute) {
return is_short_execute ? MlasDirectShortExecuteTests<MlasScaleOutputTest>::RegisterShortExecute() : 0;
});
Loading

0 comments on commit 2ec1f94

Please sign in to comment.