From f55328116ac4cb64341dd3c7c8dc79b8a1ee11af Mon Sep 17 00:00:00 2001 From: Jun Liu Date: Sun, 17 Dec 2023 22:11:46 -0800 Subject: [PATCH 1/3] Revert "[gtest] conversion for code coverage tests (#2580)" This reverts commit c5a2384dc0f29682ed51aeccf9b981dbdf7e058f. --- test/CMakeLists.txt | 22 +++ test/driver.hpp | 7 +- test/gtest/CMakeLists.txt | 2 +- test/gtest/conv3d_codecov.cpp | 172 --------------------- test/gtest/conv_2d.hpp | 66 +++++++++ test/gtest/conv_igemm_mlir_xdlops.cpp | 2 +- test/gtest/immed_conv2d_codecov.cpp | 206 -------------------------- test/gtest/immed_conv3d_codecov.cpp | 206 -------------------------- test/gtest/pooling2d_asymmetric.cpp | 136 ----------------- test/gtest/pooling2d_codecov.cpp | 136 ----------------- test/gtest/pooling2d_wide.cpp | 136 ----------------- test/immed_conv2d.cpp | 62 ++++++++ test/{conv3d.hpp => immed_conv3d.cpp} | 12 +- test/{pooling2d.hpp => pooling2d.cpp} | 2 + 14 files changed, 162 insertions(+), 1005 deletions(-) delete mode 100644 test/gtest/conv3d_codecov.cpp create mode 100644 test/gtest/conv_2d.hpp delete mode 100644 test/gtest/immed_conv2d_codecov.cpp delete mode 100644 test/gtest/immed_conv3d_codecov.cpp delete mode 100644 test/gtest/pooling2d_asymmetric.cpp delete mode 100644 test/gtest/pooling2d_codecov.cpp delete mode 100644 test/gtest/pooling2d_wide.cpp create mode 100644 test/immed_conv2d.cpp rename test/{conv3d.hpp => immed_conv3d.cpp} (91%) rename test/{pooling2d.hpp => pooling2d.cpp} (98%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ffaeb93228..d35ed0c43f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -673,6 +673,20 @@ function(add_custom_test NAME) set_tests_properties(${NAME} PROPERTIES DISABLED On) endif() endfunction() +if(${CODECOV_TEST}) + add_custom_test(test_conv3d_codecov + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --input 2 4 4 4 4 --weights 2 4 1 1 1 --pads_strides_dilations 0 0 0 1 1 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS} + ) + add_custom_test(test_immed_conv2d_codecov + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --input 2 2 14 14 --weights 8 2 3 3 --pads_strides_dilations 0 0 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS} + ) + add_custom_test(test_immed_conv3d_codecov + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --input 1 4 4 4 4 --weights 2 4 3 3 3 --pads_strides_dilations 0 0 0 1 1 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS} + ) + add_custom_test(test_pooling2d_codecov + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --input 1, 192, 28, 28 --lens 2 2 --strides 2 2 --pads 0 0 ${MIOPEN_TEST_FLAGS_ARGS} + ) +endif() if(${MIOPEN_TEST_WITH_MIOPENDRIVER}) add_custom_test(test_miopendriver_regression_issue_1576 SKIP_UNLESS_ALL GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED FLOAT_DISABLED HALF_ENABLED @@ -762,6 +776,14 @@ set(TEST_CONV_VERBOSE_F ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-backward-da set(TEST_CONV_VERBOSE_B ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-forward --disable-backward-weights) set(TEST_CONV_VERBOSE_W ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-forward --disable-backward-data) +add_custom_test(test_pooling2d_asymmetric SKIP_UNLESS_ALL HALF_ENABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --all --dataset 1 --limit 0 ${MIOPEN_TEST_FLAGS_ARGS} +) + +add_custom_test(test_pooling2d_wide SKIP_UNLESS_ALL HALF_ENABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED + COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --all --dataset 2 --limit 0 ${MIOPEN_TEST_FLAGS_ARGS} +) + set(IMPLICITGEMM_MLIR_ENV_F_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmFwdXdlops) set(IMPLICITGEMM_MLIR_ENV_B_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmBwdXdlops) set(IMPLICITGEMM_MLIR_ENV_W_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmWrWXdlops) diff --git a/test/driver.hpp b/test/driver.hpp index 97896d6c5d..825a0d4511 100644 --- a/test/driver.hpp +++ b/test/driver.hpp @@ -1242,11 +1242,6 @@ void test_drive_impl_1(std::string program_name, std::vector as) Driver d{}; d.program_name = program_name; - std::cout << program_name << " "; - for(const auto& str : as) - std::cout << str << " "; - std::cout << std::endl; - std::set keywords{ "--help", "-h", "--half", "--float", "--double", "--int8", "--bfloat16"}; d.parse(keyword_set{keywords}); @@ -1386,7 +1381,7 @@ template