diff --git a/test/gtest/conv3d_test.cpp b/test/gtest/conv3d_test.cpp index cd31e17625..6c0fec65bb 100644 --- a/test/gtest/conv3d_test.cpp +++ b/test/gtest/conv3d_test.cpp @@ -25,24 +25,12 @@ *******************************************************************************/ #include #include -#include #include #include "../conv3d.hpp" #include "get_handle.hpp" -MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) - namespace conv3d_test { -static bool IsTestRunWith(const char* float_arg) -{ - assert(float_arg != nullptr); - if(!MIOPEN_TEST_ALL) - return true; // standalone run - return env::enabled(MIOPEN_TEST_ALL) && env::value(MIOPEN_TEST_FLOAT_ARG) == float_arg; -} - void GetArgs(const std::string& param, std::vector& tokens) { std::stringstream ss(param); @@ -127,16 +115,6 @@ std::vector GetTestCases(const std::string& precision) using namespace conv3d_test; -TEST_P(GPU_Conv3d_Test_FP32, FloatTest_conv3d_test) -{ - if(IsTestRunWith("--float")) - { - Run3dDriver(miopenFloat); - } - else - { - GTEST_SKIP(); - } -}; +TEST_P(GPU_Conv3d_Test_FP32, FloatTest_conv3d_test) { Run3dDriver(miopenFloat); }; INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv3d_Test_FP32, testing::Values(GetTestCases("--float"))); diff --git a/test/gtest/conv_igemm_dynamic_xdlops_half.cpp b/test/gtest/conv_igemm_dynamic_xdlops_half.cpp index bd448c37c7..f737db9ae5 100644 --- a/test/gtest/conv_igemm_dynamic_xdlops_half.cpp +++ b/test/gtest/conv_igemm_dynamic_xdlops_half.cpp @@ -29,23 +29,11 @@ #include "../conv2d.hpp" #include "get_handle.hpp" -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_FIND_MODE) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_DEBUG_FIND_ONLY_SOLVER) -MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) namespace conv_igemm_dynamic_xdlops_half { -static bool SkipTest(const std::string& float_arg) -{ - if(!MIOPEN_TEST_ALL) - return false; - if(env::enabled(MIOPEN_TEST_ALL)) - if(env::value(MIOPEN_TEST_FLOAT_ARG) == float_arg) - return false; - return true; -} - void SetupEnvVar() { env::update(MIOPEN_FIND_MODE, "normal"); @@ -151,7 +139,7 @@ using namespace conv_igemm_dynamic_xdlops_half; TEST_P(GPU_Conv2dHalf_conv_igemm_dynamic_xdlops_FP16, HalfTest_conv_igemm_dynamic_xdlops_half) { const auto& handle = get_handle(); - if(IsTestSupportedForDevice(handle) && !SkipTest("--half")) + if(IsTestSupportedForDevice(handle)) { Run2dDriver(miopenHalf); } diff --git a/test/gtest/conv_igemm_dynamic_xdlops_nhwc_bf16.cpp b/test/gtest/conv_igemm_dynamic_xdlops_nhwc_bf16.cpp index a5ddfe2a0c..ae6011604b 100644 --- a/test/gtest/conv_igemm_dynamic_xdlops_nhwc_bf16.cpp +++ b/test/gtest/conv_igemm_dynamic_xdlops_nhwc_bf16.cpp @@ -29,23 +29,11 @@ #include "../conv2d.hpp" #include "get_handle.hpp" -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_FIND_MODE) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_DEBUG_FIND_ONLY_SOLVER) -MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) namespace conv_igemm_dynamic_xdlops_nhwc_bf16 { -static bool SkipTest(const std::string& float_arg) -{ - if(!MIOPEN_TEST_ALL) - return false; - if(env::enabled(MIOPEN_TEST_ALL)) - if(env::value(MIOPEN_TEST_FLOAT_ARG) == float_arg) - return false; - return true; -} - void SetupEnvVar() { env::update(MIOPEN_FIND_MODE, "normal"); @@ -208,7 +196,7 @@ using namespace conv_igemm_dynamic_xdlops_nhwc_bf16; TEST_P(GPU_Conv2d_BFP16, Bf16Test_conv_igemm_dynamic_xdlops_nhwc_bf16) { const auto& handle = get_handle(); - if(IsTestSupportedForDevice(handle) && !SkipTest("--bfloat16")) + if(IsTestSupportedForDevice(handle)) { Run2dDriver(miopenBFloat16); } diff --git a/test/gtest/conv_igemm_dynamic_xdlops_nhwc_nchw.cpp b/test/gtest/conv_igemm_dynamic_xdlops_nhwc_nchw.cpp index 4ae49e3991..03907f773e 100644 --- a/test/gtest/conv_igemm_dynamic_xdlops_nhwc_nchw.cpp +++ b/test/gtest/conv_igemm_dynamic_xdlops_nhwc_nchw.cpp @@ -29,25 +29,13 @@ #include "../conv2d.hpp" #include "get_handle.hpp" -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_FIND_MODE) MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_DEBUG_FIND_ONLY_SOLVER) -MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) namespace env = miopen::env; namespace conv_igemm_dynamic_xdlops_nhwc_nchw { -static bool SkipTest(const std::string& float_arg) -{ - if(!MIOPEN_TEST_ALL) - return false; - if(env::enabled(MIOPEN_TEST_ALL)) - if(env::value(MIOPEN_TEST_FLOAT_ARG) == float_arg) - return false; - return true; -} - void SetupEnvVar() { env::update(MIOPEN_FIND_MODE, "normal"); @@ -295,7 +283,7 @@ TEST_P(GPU_Conv2d_conv_igemm_dynamic_xdlops_nhwc_nchw_FP32, FloatTest_conv_igemm_dynamic_xdlops_nhwc_nchw) { const auto& handle = get_handle(); - if(IsTestSupportedForDevice(handle) && !SkipTest("--float")) + if(IsTestSupportedForDevice(handle)) { Run2dDriver(miopenFloat); } @@ -309,7 +297,7 @@ TEST_P(GPU_Conv2d_conv_igemm_dynamic_xdlops_nhwc_nchw_FP16, HalfTest_conv_igemm_dynamic_xdlops_nhwc_nchw) { const auto& handle = get_handle(); - if(IsTestSupportedForDevice(handle) && !SkipTest("--half")) + if(IsTestSupportedForDevice(handle)) { Run2dDriver(miopenHalf); } diff --git a/test/gtest/conv_igemm_mlir_bwd_wrw.cpp b/test/gtest/conv_igemm_mlir_bwd_wrw.cpp index a5d5f99567..3d81f2f8d8 100644 --- a/test/gtest/conv_igemm_mlir_bwd_wrw.cpp +++ b/test/gtest/conv_igemm_mlir_bwd_wrw.cpp @@ -31,7 +31,6 @@ #include "../conv2d.hpp" MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_MLIR) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) namespace { @@ -74,7 +73,7 @@ auto GetTestCases() using TestCase = decltype(GetTestCases())::value_type; -bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR) || env::disabled(MIOPEN_TEST_ALL); } +bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR); } bool IsTestSupportedForDevice() { diff --git a/test/gtest/conv_igemm_mlir_fwd.cpp b/test/gtest/conv_igemm_mlir_fwd.cpp index 9451255ab4..1055fbb98c 100644 --- a/test/gtest/conv_igemm_mlir_fwd.cpp +++ b/test/gtest/conv_igemm_mlir_fwd.cpp @@ -31,7 +31,6 @@ #include "../conv2d.hpp" MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_MLIR) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) namespace { @@ -61,7 +60,7 @@ auto GetTestCases() using TestCase = decltype(GetTestCases())::value_type; -bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR) || env::disabled(MIOPEN_TEST_ALL); } +bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR); } bool IsTestSupportedForDevice() { diff --git a/test/gtest/conv_igemm_mlir_xdlops_bwd_wrw.cpp b/test/gtest/conv_igemm_mlir_xdlops_bwd_wrw.cpp index e30509ec60..5af2265b82 100644 --- a/test/gtest/conv_igemm_mlir_xdlops_bwd_wrw.cpp +++ b/test/gtest/conv_igemm_mlir_xdlops_bwd_wrw.cpp @@ -32,7 +32,6 @@ #include "../conv2d.hpp" MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_MLIR) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) namespace { @@ -77,7 +76,7 @@ auto GetTestCases() using TestCase = decltype(GetTestCases())::value_type; -bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR) || env::disabled(MIOPEN_TEST_ALL); } +bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR); } bool IsTestSupportedForDevice() { @@ -88,15 +87,15 @@ bool IsTestSupportedForDevice() } // namespace -class GPU_Conv2dDefault_FP16 : public FloatTestCase> +class GPU_Conv2dDefault_FP32 : public FloatTestCase> { }; -TEST_P(GPU_Conv2dDefault_FP16, HalfTest_conv_igemm_mlir_xdlops_bwd_wrw) +TEST_P(GPU_Conv2dDefault_FP32, FloatTest_conv_igemm_mlir_xdlops_bwd_wrw) { if(IsTestSupportedForDevice() && !SkipTest()) { - invoke_with_params(db_check); + invoke_with_params(db_check); } else { @@ -105,4 +104,4 @@ TEST_P(GPU_Conv2dDefault_FP16, HalfTest_conv_igemm_mlir_xdlops_bwd_wrw) }; // Half for FWD, BWD, WRW -INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP16, testing::Values(GetTestCases())); +INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases())); diff --git a/test/gtest/conv_igemm_mlir_xdlops_fwd.cpp b/test/gtest/conv_igemm_mlir_xdlops_fwd.cpp index e8cf204fc4..54ef1da5d2 100644 --- a/test/gtest/conv_igemm_mlir_xdlops_fwd.cpp +++ b/test/gtest/conv_igemm_mlir_xdlops_fwd.cpp @@ -32,7 +32,6 @@ #include "../conv2d.hpp" MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_MLIR) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) namespace { @@ -62,7 +61,7 @@ auto GetTestCases() using TestCase = decltype(GetTestCases())::value_type; -bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR) || env::disabled(MIOPEN_TEST_ALL); } +bool SkipTest() { return !env::enabled(MIOPEN_TEST_MLIR); } bool IsTestSupportedForDevice() { @@ -73,7 +72,7 @@ bool IsTestSupportedForDevice() } // namespace -class GPU_Conv2dDefault_FP16 : public FloatTestCase> +class GPU_Conv2dDefault_FP32 : public FloatTestCase> { }; @@ -81,11 +80,11 @@ class GPU_Conv2dDefault_I8 : public Int8TestCase> { }; -TEST_P(GPU_Conv2dDefault_FP16, HalfTest_conv_igemm_mlir_xdlops_fwd) +TEST_P(GPU_Conv2dDefault_FP32, FloatTest_conv_igemm_mlir_xdlops_fwd) { if(IsTestSupportedForDevice() && !SkipTest()) { - invoke_with_params(db_check); + invoke_with_params(db_check); } else { @@ -106,6 +105,6 @@ TEST_P(GPU_Conv2dDefault_I8, Int8Test_conv_igemm_mlir_xdlops_fwd) }; // Half for FWD, BWD, WRW -INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP16, testing::Values(GetTestCases())); +INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_FP32, testing::Values(GetTestCases())); // Int8 for FWD INSTANTIATE_TEST_SUITE_P(Full, GPU_Conv2dDefault_I8, testing::Values(GetTestCases())); diff --git a/test/gtest/conv_trans.cpp b/test/gtest/conv_trans.cpp index d13dbdadf7..6caea926c8 100644 --- a/test/gtest/conv_trans.cpp +++ b/test/gtest/conv_trans.cpp @@ -26,12 +26,9 @@ #include #include #include -#include #include "../conv2d.hpp" #include "get_handle.hpp" -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) - namespace env = miopen::env; namespace conv_trans { @@ -148,7 +145,7 @@ using namespace conv_trans; TEST_P(GPU_conv_trans_FP32, FloatTest_conv_trans) { const auto& handle = get_handle(); - if(IsTestSupportedForDevice(handle) && env::enabled(MIOPEN_TEST_ALL)) + if(IsTestSupportedForDevice(handle)) { Run2dDriver(miopenFloat); } diff --git a/test/gtest/deepbench_rnn.cpp b/test/gtest/deepbench_rnn.cpp index eecd5593f1..acf0cbaea3 100644 --- a/test/gtest/deepbench_rnn.cpp +++ b/test/gtest/deepbench_rnn.cpp @@ -30,7 +30,6 @@ #include "get_handle.hpp" MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_DEEPBENCH) -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) namespace env = miopen::env; @@ -52,7 +51,6 @@ class GPU_DeepBenchRNN_FP32 : public testing::TestWithParam params = GPU_DeepBenchRNN_FP32::GetParam(); for(const auto& test_value : params) diff --git a/test/gtest/fused_conv_bias_res_add_activ.cpp b/test/gtest/fused_conv_bias_res_add_activ.cpp index e1daaf55cc..6f015931c8 100644 --- a/test/gtest/fused_conv_bias_res_add_activ.cpp +++ b/test/gtest/fused_conv_bias_res_add_activ.cpp @@ -26,26 +26,18 @@ #include #include #include -#include #include "tensor_util.hpp" #include "get_handle.hpp" #include "conv3d_test_case.hpp" -MIOPEN_DECLARE_ENV_VAR_BOOL(MIOPEN_TEST_ALL) -MIOPEN_DECLARE_ENV_VAR_STR(MIOPEN_TEST_FLOAT_ARG) - namespace conv_bias_act_res_add_fwd { bool TestIsApplicable() { - const auto float_arg = env::value(MIOPEN_TEST_FLOAT_ARG); /// \todo Check against specific ASCIs. - return ::IsDeviceSupportedForCK() && - (float_arg == "--half" // So far only test for fp16 is implemented. - || float_arg.empty()) // Empty when gtest is run without parameters. - && !env::disabled(MIOPEN_TEST_ALL); // Not disabled when gtest is run without parameters. + return ::IsDeviceSupportedForCK(); } std::vector ConvTestConfigs()