From c567b2e964c01c576a6e670ee85a1ca3920ef4ce Mon Sep 17 00:00:00 2001 From: Jun Liu Date: Mon, 18 Dec 2023 15:54:32 -0800 Subject: [PATCH 1/5] [HotFix] revert #2580 and re-enable smoke tests (#2616) * Revert "[gtest] conversion for code coverage tests (#2580)" This reverts commit c5a2384dc0f29682ed51aeccf9b981dbdf7e058f. * re-enable smoke tests in CI * remove problematic github action --- .github/workflows/update_develop_nightly.yml | 20 -- Jenkinsfile | 6 +- 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 + 16 files changed, 165 insertions(+), 1028 deletions(-) delete mode 100644 .github/workflows/update_develop_nightly.yml 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/.github/workflows/update_develop_nightly.yml b/.github/workflows/update_develop_nightly.yml deleted file mode 100644 index a8b5aabdb9..0000000000 --- a/.github/workflows/update_develop_nightly.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync branch - -on: - pull_request: - workflow_dispatch: - push: - branches: - - develop -jobs: - sync-branch: - name: Update nightly branch - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@main - - uses: connor-baer/action-sync-branch@main - with: - branch: develop_nightly - token: ${{ secrets.GITHUB_TOKEN }} - force: false \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 7e07d3deba..a103509f23 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -436,15 +436,15 @@ pipeline { description: "") booleanParam( name: "BUILD_SMOKE_FP32", - defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false, + defaultValue: true, description: "") booleanParam( name: "BUILD_SMOKE_AUX1", - defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false, + defaultValue: true, description: "") booleanParam( name: "BUILD_SMOKE_FP16_BF16_INT8", - defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false, + defaultValue: true, description: "") booleanParam( name: "BUILD_FULL_TESTS", 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