Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTests] Rename non-unique test names (TEST, TEST_P, TEST_F, TYPED_TEST). Part 2. #3449

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
10 changes: 6 additions & 4 deletions test/gtest/conv_igemm_dynamic_dlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,22 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefault_FP16 : public HalfTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultIGemmDynamicDLops_FP16 : public HalfTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP16, HalfTest_conv_igemm_dynamic_dlops)
TEST_P(GPU_Conv2dDefaultIGemmDynamicDLops_FP16, HalfTest_conv_igemm_dynamic_dlops)
{
if(IsTestSupportedForDevice() && !SkipTest())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP16>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultIGemmDynamicDLops_FP16>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP16, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dDefaultIGemmDynamicDLops_FP16,
testing::Values(GetTestCases()));
20 changes: 12 additions & 8 deletions test/gtest/conv_igemm_dynamic_xdlops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,39 +116,43 @@ bool IsTestSupportedForDevice(const miopen::Handle& handle)
} // namespace conv_igemm_dynamic_xdlops
using namespace conv_igemm_dynamic_xdlops;

class GPU_Conv2dDefault_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultIGemmDynamicXDLops_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

class GPU_Conv2dDefault_FP16 : public HalfTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultIGemmDynamicXDLops_FP16 : public HalfTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP32, FloatTest_conv_igemm_dynamic_xdlops)
TEST_P(GPU_Conv2dDefaultIGemmDynamicXDLops_FP32, FloatTest_conv_igemm_dynamic_xdlops)
{
const auto& handle = get_handle();
if(IsTestSupportedForDevice(handle))
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP32>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultIGemmDynamicXDLops_FP32>(default_check);
}
else
{
GTEST_SKIP();
}
};

TEST_P(GPU_Conv2dDefault_FP16, HalfTest_conv_igemm_dynamic_xdlops)
TEST_P(GPU_Conv2dDefaultIGemmDynamicXDLops_FP16, HalfTest_conv_igemm_dynamic_xdlops)
{
const auto& handle = get_handle();
if(IsTestSupportedForDevice(handle))
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP16>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultIGemmDynamicXDLops_FP16>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP16, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dDefaultIGemmDynamicXDLops_FP32,
testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dDefaultIGemmDynamicXDLops_FP16,
testing::Values(GetTestCases()));
24 changes: 12 additions & 12 deletions test/gtest/conv_igemm_mlir_fwd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,45 +67,45 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefaultMLIRTest_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmFwd_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};
class GPU_Conv2dDefaultMLIRTest_FP16 : public HalfTestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmFwd_FP16 : public HalfTestCase<std::vector<TestCase>>
{
};
class GPU_Conv2dDefaultMLIRTest_I8 : public Int8TestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmFwd_I8 : public Int8TestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefaultMLIRTest_FP32, FloatTest_conv_igemm_mlir_fwd)
TEST_P(GPU_Conv2dMLIRTestIGemmFwd_FP32, FloatTest_conv_igemm_mlir_fwd)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_FP32>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmFwd_FP32>(db_check);
}
else
{
GTEST_SKIP();
}
};

TEST_P(GPU_Conv2dDefaultMLIRTest_FP16, HalfTest_conv_igemm_mlir_fwd)
TEST_P(GPU_Conv2dMLIRTestIGemmFwd_FP16, HalfTest_conv_igemm_mlir_fwd)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_FP16>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmFwd_FP16>(db_check);
}
else
{
GTEST_SKIP();
}
};

TEST_P(GPU_Conv2dDefaultMLIRTest_I8, Int8Test_conv_igemm_mlir_fwd)
TEST_P(GPU_Conv2dMLIRTestIGemmFwd_I8, Int8Test_conv_igemm_mlir_fwd)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_I8>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmFwd_I8>(db_check);
}
else
{
Expand All @@ -114,8 +114,8 @@ TEST_P(GPU_Conv2dDefaultMLIRTest_I8, Int8Test_conv_igemm_mlir_fwd)
};

// Float for FWD, BWD, WRW
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dMLIRTestIGemmFwd_FP32, testing::Values(GetTestCases()));
// Half for FWD, BWD, WRW
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_FP16, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dMLIRTestIGemmFwd_FP16, testing::Values(GetTestCases()));
// Int8 for FWD
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_I8, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dMLIRTestIGemmFwd_I8, testing::Values(GetTestCases()));
10 changes: 6 additions & 4 deletions test/gtest/conv_igemm_mlir_xdlops_bwd_wrw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefaultMLIRTest_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmXDlopsBwdWrw_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefaultMLIRTest_FP32, FloatTest_conv_igemm_mlir_xdlops_bwd_wrw)
TEST_P(GPU_Conv2dMLIRTestIGemmXDlopsBwdWrw_FP32, FloatTest_conv_igemm_mlir_xdlops_bwd_wrw)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_FP32>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmXDlopsBwdWrw_FP32>(db_check);
}
else
{
Expand All @@ -100,4 +100,6 @@ TEST_P(GPU_Conv2dDefaultMLIRTest_FP32, FloatTest_conv_igemm_mlir_xdlops_bwd_wrw)
};

// Half for FWD, BWD, WRW
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dMLIRTestIGemmXDlopsBwdWrw_FP32,
testing::Values(GetTestCases()));
20 changes: 12 additions & 8 deletions test/gtest/conv_igemm_mlir_xdlops_fwd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefaultMLIRTest_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmXDLopsFwd_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

class GPU_Conv2dDefaultMLIRTest_I8 : public Int8TestCase<std::vector<TestCase>>
class GPU_Conv2dMLIRTestIGemmXDLopsFwd_I8 : public Int8TestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefaultMLIRTest_FP32, FloatTest_conv_igemm_mlir_xdlops_fwd)
TEST_P(GPU_Conv2dMLIRTestIGemmXDLopsFwd_FP32, FloatTest_conv_igemm_mlir_xdlops_fwd)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_FP32>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmXDLopsFwd_FP32>(db_check);
}
else
{
GTEST_SKIP();
}
};

TEST_P(GPU_Conv2dDefaultMLIRTest_I8, Int8Test_conv_igemm_mlir_xdlops_fwd)
TEST_P(GPU_Conv2dMLIRTestIGemmXDLopsFwd_I8, Int8Test_conv_igemm_mlir_xdlops_fwd)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultMLIRTest_I8>(db_check);
invoke_with_params<conv2d_driver, GPU_Conv2dMLIRTestIGemmXDLopsFwd_I8>(db_check);
}
else
{
Expand All @@ -101,6 +101,10 @@ TEST_P(GPU_Conv2dDefaultMLIRTest_I8, Int8Test_conv_igemm_mlir_xdlops_fwd)
};

// Half for FWD, BWD, WRW
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dMLIRTestIGemmXDLopsFwd_FP32,
testing::Values(GetTestCases()));
// Int8 for FWD
INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefaultMLIRTest_I8, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Full,
GPU_Conv2dMLIRTestIGemmXDLopsFwd_I8,
testing::Values(GetTestCases()));
4 changes: 2 additions & 2 deletions test/gtest/log_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#if MIOPEN_BACKEND_HIP
#include "log.hpp"

TEST(CPU_LOG_TEST_NONE, AssertLogCmdOutput)
TEST(CPU_LOG_TEST_ASSERT_NONE, AssertLogCmdOutput)
{
TestLogFun(miopen::debug::LogCmdConvolution, logConv, true);
}

TEST(CPU_LOG_TEST_NONE, AssertLogFindCmdOutput)
TEST(CPU_LOG_TEST_ASSERT_NONE, AssertLogFindCmdOutput)
{
TestLogFun(miopen::debug::LogCmdFindConvolution, logFindConv, true);
}
Expand Down
8 changes: 4 additions & 4 deletions test/gtest/log_test_neg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@
#if MIOPEN_BACKEND_HIP
#include "log.hpp"

TEST(CPU_LOG_TEST_NONE, AssertLogCmdOutput_Neg)
TEST(CPU_LOG_TEST_NEG_NONE, AssertLogCmdOutput_Neg)
{
TestLogFun(miopen::debug::LogCmdConvolution, logConv, false);
}

TEST(CPU_LOG_TEST_NONE, AssertLogFindCmdOutput_Neg)
TEST(CPU_LOG_TEST_NEG_NONE, AssertLogFindCmdOutput_Neg)
{
TestLogFun(miopen::debug::LogCmdFindConvolution, logFindConv, false);
}

TEST(CPU_LOG_TEST_NONE, AssertTestLogCmdCBAFusionOutput_Neg)
TEST(CPU_LOG_TEST_NEG_NONE, AssertTestLogCmdCBAFusionOutput_Neg)
{
TestLogCmdCBAFusion(miopen::debug::LogCmdFusion, logFusionConvBiasActiv, false);
}

TEST(CPU_LOG_TEST_NONE, AssertTestLogCmdBNormFusionOutput_Neg)
TEST(CPU_LOG_TEST_NEG_NONE, AssertTestLogCmdBNormFusionOutput_Neg)
{
TestLogCmdBNormFusion(miopen::debug::LogCmdFusion, logBnormActiv, false);
}
Expand Down
10 changes: 6 additions & 4 deletions test/gtest/regression_half_mi100.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,22 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefault_FP16 : public HalfTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultRegressionMI100_FP16 : public HalfTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP16, HalfTest_regression_half_mi100)
TEST_P(GPU_Conv2dDefaultRegressionMI100_FP16, HalfTest_regression_half_mi100)
{
if(IsTestSupportedForDevice())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP16>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultRegressionMI100_FP16>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Smoke, GPU_Conv2dDefault_FP16, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Smoke,
GPU_Conv2dDefaultRegressionMI100_FP16,
testing::Values(GetTestCases()));
10 changes: 6 additions & 4 deletions test/gtest/smoke_solver_ConvAsmImplicitGemmV4R1Dynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,22 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefault_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultGemmV4R1Dynamic_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP32, FloatTest_smoke_solver_ConvAsmImplicitGemmV4R1Dynamic)
TEST_P(GPU_Conv2dDefaultGemmV4R1Dynamic_FP32, FloatTest_smoke_solver_ConvAsmImplicitGemmV4R1Dynamic)
{
if(IsTestSupportedForDevice() && !SkipTest())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP32>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultGemmV4R1Dynamic_FP32>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Smoke, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Smoke,
GPU_Conv2dDefaultGemmV4R1Dynamic_FP32,
testing::Values(GetTestCases()));
10 changes: 6 additions & 4 deletions test/gtest/smoke_solver_ConvAsm_5x10_7x7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,22 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefault_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultAsm_5x10_7x7_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP32, FloatTest_smoke_solver_ConvAsm_5x10_7x7)
TEST_P(GPU_Conv2dDefaultAsm_5x10_7x7_FP32, FloatTest_smoke_solver_ConvAsm_5x10_7x7)
{
if(IsTestSupportedForDevice() && !SkipTest())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP32>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultAsm_5x10_7x7_FP32>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Smoke, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Smoke,
GPU_Conv2dDefaultAsm_5x10_7x7_FP32,
testing::Values(GetTestCases()));
10 changes: 6 additions & 4 deletions test/gtest/smoke_solver_ConvBinWinograd3x3U.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,22 @@ bool IsTestSupportedForDevice()

} // namespace

class GPU_Conv2dDefault_FP32 : public FloatTestCase<std::vector<TestCase>>
class GPU_Conv2dDefaultBinWinograd3x3U_FP32 : public FloatTestCase<std::vector<TestCase>>
{
};

TEST_P(GPU_Conv2dDefault_FP32, FloatTest_smoke_solver_ConvBinWinograd3x3U)
TEST_P(GPU_Conv2dDefaultBinWinograd3x3U_FP32, FloatTest_smoke_solver_ConvBinWinograd3x3U)
{
if(IsTestSupportedForDevice() && !SkipTest())
{
invoke_with_params<conv2d_driver, GPU_Conv2dDefault_FP32>(default_check);
invoke_with_params<conv2d_driver, GPU_Conv2dDefaultBinWinograd3x3U_FP32>(default_check);
}
else
{
GTEST_SKIP();
}
};

INSTANTIATE_TEST_SUITE_P(Smoke, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases()));
INSTANTIATE_TEST_SUITE_P(Smoke,
GPU_Conv2dDefaultBinWinograd3x3U_FP32,
testing::Values(GetTestCases()));
Loading
Loading