Skip to content

Commit

Permalink
Move HETERO/BATCH tests to HETERO/BATCH test binaries (openvinotoolki…
Browse files Browse the repository at this point in the history
…t#23823)

### Details:
 - Move remaining BATCH/HETERO test cases out of CPU/GPU tests

### Tickets:
 - *CVS-133977*

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
  • Loading branch information
3 people authored Apr 25, 2024
1 parent 683e0a7 commit 2d8ac08
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: ${{ github.workspace }}/bin/intel64/Release/ov_proxy_plugin_tests

- name: Run OV Hetero Func tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_hetero_func_tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_hetero_func_tests --gtest_filter="*smoke*"

- name: Run IR frontend tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_ir_frontend_tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/job_cxx_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:
if: fromJSON(inputs.affected-components).AUTO_BATCH.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml
${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml --gtest_filter="*smoke*"
- name: Proxy Plugin func tests
if: fromJSON(inputs.affected-components).PROXY.test
Expand All @@ -256,7 +256,7 @@ jobs:
if: fromJSON(inputs.affected-components).HETERO.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml
${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml --gtest_filter="*smoke*"
- name: Upload Test Results
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ jobs:
if: always()
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml
${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml --gtest_filter="*smoke*"
- name: Proxy Plugin func tests
if: always()
Expand All @@ -457,7 +457,7 @@ jobs:
if: ${{ 'false' }} # Ticket: 134425
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml
${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml --gtest_filter="*smoke*"
- name: Upload Test Results
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).AUTO_BATCH.test
run: |
. "${{ env.INSTALL_DIR }}/setupvars.ps1"
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml --gtest_filter="*smoke*"
- name: Proxy Plugin func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).PROXY.test
Expand All @@ -772,7 +772,7 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).HETERO.test
run: |
. "${{ env.INSTALL_DIR }}/setupvars.ps1"
${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml
${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml --gtest_filter="*smoke*"
- name: Upload Test Results
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/auto_batch/tests/functional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ov_add_test_target(
openvino_auto_batch_plugin
ADD_CPPLINT
LABELS
OV UNIT AUTO_BATCH
OV AUTO_BATCH
)

ov_set_threading_interface_for(${TARGET_NAME})
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const std::vector<bool> get_vs_set{true, false};
const std::vector<size_t> num_streams{1, 2};
const std::vector<size_t> num_requests{1, 3, 8, 9, 16, 64};
const std::vector<size_t> num_batch{1, 4, 8, 16, 32, 64, 128, 256};
INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
INSTANTIATE_TEST_SUITE_P(smoke_TEMPLATE_AutoBatching,
AutoBatching_Test,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
::testing::ValuesIn(get_vs_set),
Expand All @@ -22,7 +22,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
::testing::ValuesIn(num_batch)),
AutoBatching_Test::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
INSTANTIATE_TEST_SUITE_P(smoke_TEMPLATE_AutoBatching,
AutoBatching_Test_DetectionOutput,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_TEMPLATE),
::testing::ValuesIn(get_vs_set),
Expand All @@ -31,6 +31,42 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoBatching_test,
::testing::ValuesIn(num_batch)),
AutoBatching_Test_DetectionOutput::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_CPU_AutoBatching,
AutoBatching_Test,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_CPU),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
::testing::ValuesIn(num_batch)),
AutoBatching_Test::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_CPU_AutoBatching,
AutoBatching_Test_DetectionOutput,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_CPU),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
::testing::ValuesIn(num_batch)),
AutoBatching_Test_DetectionOutput::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_GPU_AutoBatching,
AutoBatching_Test,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_GPU),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
::testing::ValuesIn(num_batch)),
AutoBatching_Test::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_GPU_AutoBatching,
AutoBatching_Test_DetectionOutput,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_GPU),
::testing::ValuesIn(get_vs_set),
::testing::ValuesIn(num_streams),
::testing::ValuesIn(num_requests),
::testing::ValuesIn(num_batch)),
AutoBatching_Test_DetectionOutput::getTestCaseName);

const std::vector<ov::AnyMap> default_properties = {
{ov::auto_batch_timeout(1000)},
};
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/hetero/tests/functional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#

set(TARGET_NAME ov_hetero_func_tests)

ov_add_test_target(
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
mock_engine
openvino_hetero_plugin
LINK_LIBRARIES
openvino::funcSharedTests
openvino::runtime::dev
gtest
gtest_main
Expand Down
13 changes: 13 additions & 0 deletions src/plugins/hetero/tests/functional/core_config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "shared_test_classes/base/ov_subgraph.hpp"

namespace ov {
namespace test {

void core_configuration(ov::test::SubgraphBaseTest* test) {}

} // namespace test
} // namespace ov
46 changes: 46 additions & 0 deletions src/plugins/hetero/tests/functional/hetero_synthetic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "behavior/ov_plugin/hetero_synthetic.hpp"

#include <vector>

#include "openvino/core/visibility.hpp"

#if defined(OPENVINO_ARCH_ARM) || defined(OPENVINO_ARCH_ARM64)
const char* cpu_plugin_file_name = "openvino_arm_cpu_plugin";
#elif defined(OPENVINO_ARCH_X86) || defined(OPENVINO_ARCH_X86_64)
const char* cpu_plugin_file_name = "openvino_intel_cpu_plugin";
#elif defined(OPENVINO_ARCH_RISCV64)
const char* cpu_plugin_file_name = "openvino_riscv_cpu_plugin";
#else
# error "Undefined system processor"
#endif

namespace {
using ov::test::behavior::OVHeteroSyntheticTest;
using ov::test::behavior::PluginParameter;

// this tests load plugin by library name: this is not available during static linkage
#ifndef OPENVINO_STATIC_LIBRARY

INSTANTIATE_TEST_SUITE_P(nightly_SingleMajorNode,
OVHeteroSyntheticTest,
::testing::Combine(::testing::Values(std::vector<PluginParameter>{
{"CPU0", cpu_plugin_file_name},
{"CPU1", cpu_plugin_file_name}}),
::testing::ValuesIn(OVHeteroSyntheticTest::_singleMajorNodeFunctions)),
OVHeteroSyntheticTest::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(nightly_RandomMajorNodes,
OVHeteroSyntheticTest,
::testing::Combine(::testing::Values(std::vector<PluginParameter>{
{"CPU0", cpu_plugin_file_name},
{"CPU1", cpu_plugin_file_name}}),
::testing::ValuesIn(OVHeteroSyntheticTest::_randomMajorNodeFunctions)),
OVHeteroSyntheticTest::getTestCaseName);

#endif // !OPENVINO_STATIC_LIBRARY

} // namespace
17 changes: 17 additions & 0 deletions src/plugins/hetero/tests/functional/set_device_name.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "set_device_name.hpp"

#include <stdexcept>
#include <string>

#include "openvino/core/except.hpp"

namespace ov {
namespace test {
void set_device_suffix(const std::string& suffix) {
OPENVINO_THROW(suffix.empty(), "The suffix can't be used for TEMPLATE device!");
}
} // namespace test
} // namespace ov
15 changes: 15 additions & 0 deletions src/plugins/hetero/tests/functional/skip_tests_config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "functional_test_utils/skip_tests_config.hpp"

#include <string>
#include <vector>

#include "openvino/core/core_visibility.hpp"

std::vector<std::string> disabledTestPatterns() {
std::vector<std::string> retVector{};
return retVector;
}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 2d8ac08

Please sign in to comment.