From a719d15f9d5b32c36df125695e2df49ce198c248 Mon Sep 17 00:00:00 2001 From: Jehandad Khan Date: Thu, 21 Dec 2023 20:05:49 +0000 Subject: [PATCH] Build discrete tests by default, build unified tests in package --- Jenkinsfile | 5 +++-- test/CMakeLists.txt | 1 + test/gtest/CMakeLists.txt | 2 +- test/gtest/fused_conv_bias_res_add_activ.cpp | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8fb407d4af..62ba460487 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,6 +48,7 @@ def cmake_build(Map conf=[:]){ if (package_build == true) { config_targets = "package" + setup_args = " -DMIOPEN_TEST_DISCRETE=OFF " + setup_args } def miopen_install_path = "${env.WORKSPACE}/install" @@ -938,7 +939,7 @@ pipeline { } agent{ label rocmnode("gfx908") } environment{ - setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1" + setup_flags=" -DMIOPEN_TEST_DBSYNC=1" config_targets='test_db_sync' execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync' } @@ -957,7 +958,7 @@ pipeline { } agent{ label rocmnode("gfx90a") } environment{ - setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1" + setup_flags=" -DMIOPEN_TEST_DBSYNC=1" config_targets='test_db_sync' execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync' } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2671bc6f34..6a5d5bba20 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -68,6 +68,7 @@ option( MIOPEN_TEST_CONV "" OFF) option( MIOPEN_TEST_DEEPBENCH "" OFF) option( MIOPEN_TEST_DRIVER_ITER_MODE "" OFF) option( MIOPEN_TEST_COMPOSABLEKERNEL "Test with composable_kernel library" ${MIOPEN_USE_COMPOSABLEKERNEL} ) +option( MIOPEN_TEST_DISCRETE "Build Discrete Test Binaries" ON) set_var_to_condition(MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT MIOPEN_BUILD_DRIVER) option( MIOPEN_TEST_WITH_MIOPENDRIVER "Use MIOpenDriver in tests" ${MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT}) diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index f3d92a610a..0818f76d2a 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -48,7 +48,7 @@ foreach(SOURCE ${SKIP_TESTS}) list(REMOVE_ITEM TESTS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE}) endforeach() -if( DISCRETE_GTEST ) +if( MIOPEN_TEST_DISCRETE ) foreach(TEST ${TESTS}) get_filename_component(BASE_NAME ${TEST} NAME_WE) add_gtest(test_${BASE_NAME} ${BASE_NAME}.cpp) diff --git a/test/gtest/fused_conv_bias_res_add_activ.cpp b/test/gtest/fused_conv_bias_res_add_activ.cpp index a3d066d82d..4fe66b95b7 100644 --- a/test/gtest/fused_conv_bias_res_add_activ.cpp +++ b/test/gtest/fused_conv_bias_res_add_activ.cpp @@ -70,7 +70,7 @@ struct ConvFwdBiasResAddFixture conv_desc = conv_config.GetConv(); miopen::TensorDescriptor output_desc = - conv_desc.GetForwardOutputTensor(input.desc, weights.desc, GetDataType()); + conv_desc.GetForwardOutputTensor(input.desc, weights.desc, miopen_type()); output = tensor{tensor_layout, output_desc.GetLengths()}; std::fill(output.begin(), output.end(), std::numeric_limits::quiet_NaN()); @@ -100,7 +100,7 @@ struct ConvFwdBiasResAddFixture auto&& handle = get_handle(); miopen::TensorDescriptor output_desc = - conv_desc.GetForwardOutputTensor(input.desc, weights.desc, GetDataType()); + conv_desc.GetForwardOutputTensor(input.desc, weights.desc, miopen_type()); ref_out = tensor{tensor_layout, output_desc.GetLengths()}; ref_out = ref_conv_fwd(input, weights, output, conv_desc);