[IE TESTS] ie_class migration to the new test infrastructure (#1136)
This commit is contained in:
@@ -1,148 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "ie_class.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "gpu/gpu_context_api_dx.hpp"
|
||||
#elif defined ENABLE_LIBVA
|
||||
# include <gpu/gpu_context_api_va.hpp>
|
||||
#endif
|
||||
#include "gpu/gpu_context_api_ocl.hpp"
|
||||
|
||||
//
|
||||
// IE Class Common tests with <pluginName, deviceName params>
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassCommon, IEClassBasicTestP,
|
||||
::testing::Values(std::make_pair("clDNNPlugin", "GPU")));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassNetworkTestP, IEClassNetworkTestP,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
//
|
||||
// IE Class GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME,
|
||||
::testing::Values("GPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_STREAMS,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported,
|
||||
::testing::Values("GPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported,
|
||||
::testing::Values("GPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetAvailableDevices, IEClassGetAvailableDevices,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
//
|
||||
// IE Class GetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetConfigTest, IEClassGetConfigTest,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
//
|
||||
// Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
|
||||
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
|
||||
::testing::Values("GPU", "MULTI:GPU", "HETERO:GPU"));
|
||||
|
||||
//
|
||||
// Executable Network GetConfig / SetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
//
|
||||
// Hetero Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
// IE Class Query network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassQueryNetworkTest, IEClassQueryNetworkTest,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
// IE Class Load network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest,
|
||||
::testing::Values("GPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassLoadNetworkAfterCoreRecreateTest,
|
||||
::testing::Values("GPU"));
|
||||
@@ -1,177 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "ie_class.hpp"
|
||||
#include <gna/gna_config.hpp>
|
||||
|
||||
//
|
||||
// IE Class Common tests with <pluginName, deviceName params>
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassBasicTestP, IEClassBasicTestP,
|
||||
::testing::Values(std::make_pair("GNAPlugin", "GNA")));
|
||||
|
||||
// TODO
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassNetworkTestP, IEClassNetworkTestP,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
//
|
||||
// IE Class GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GNA", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GNA", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME,
|
||||
::testing::Values("GNA", "MULTI", "HETERO"));
|
||||
|
||||
// TODO: Issue: 30198
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
// TODO: Issue: 30199
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported,
|
||||
::testing::Values("GNA", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported,
|
||||
::testing::Values("GNA", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetAvailableDevices, IEClassGetAvailableDevices,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
//
|
||||
// IE Class GetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
nightly_IEClassGetConfigTest, IEClassGetConfigTest,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
//
|
||||
// Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GNA" /*, "MULTI:GNA", "HETERO:GNA" */));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GNA" /*, "MULTI:GNA", "HETERO:GNA" */));
|
||||
|
||||
// TODO: this metric is not supported by the plugin
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("GNA", "MULTI:GNA", "HETERO:GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
|
||||
::testing::Values("GNA"/*, "MULTI:GNA", "HETERO:GNA" */));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
|
||||
::testing::Values("GNA", /* "MULTI:GNA", */ "HETERO:GNA"));
|
||||
|
||||
//
|
||||
// Executable Network GetConfig / SetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkSupportedConfigTest, IEClassExecutableNetworkSupportedConfigTest,
|
||||
::testing::Combine(::testing::Values("GNA"),
|
||||
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_HW),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_EXACT),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_AUTO))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkUnsupportedConfigTest, IEClassExecutableNetworkUnsupportedConfigTest,
|
||||
::testing::Combine(::testing::Values("GNA"),
|
||||
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_FP32),
|
||||
std::make_pair(GNA_CONFIG_KEY(SCALE_FACTOR), "5"),
|
||||
std::make_pair(CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS), CONFIG_VALUE(YES)),
|
||||
std::make_pair(GNA_CONFIG_KEY(COMPACT_MODE), CONFIG_VALUE(NO)))));
|
||||
|
||||
using IEClassExecutableNetworkSetConfigFromFp32Test = IEClassExecutableNetworkGetMetricTestForSpecificConfig;
|
||||
TEST_P(IEClassExecutableNetworkSetConfigFromFp32Test, SetConfigFromFp32Throws) {
|
||||
Core ie;
|
||||
|
||||
std::map<std::string, std::string> initialConfig;
|
||||
initialConfig[GNA_CONFIG_KEY(DEVICE_MODE)] = GNAConfigParams::GNA_SW_FP32;
|
||||
ExecutableNetwork exeNetwork = ie.LoadNetwork(simpleNetwork, deviceName, initialConfig);
|
||||
|
||||
ASSERT_THROW(exeNetwork.SetConfig({ { configKey, configValue } }), InferenceEngineException);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkSetConfigFromFp32Test, IEClassExecutableNetworkSetConfigFromFp32Test,
|
||||
::testing::Combine(::testing::Values("GNA"),
|
||||
::testing::Values(std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_HW),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_EXACT),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_SW_FP32),
|
||||
std::make_pair(GNA_CONFIG_KEY(DEVICE_MODE), GNAConfigParams::GNA_AUTO))));
|
||||
|
||||
// IE Class Query network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassQueryNetworkTest, IEClassQueryNetworkTest,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
// IE Class Load network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassLoadNetworkTest, IEClassLoadNetworkTest,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
//
|
||||
// Hetero Executable Network GetMetric
|
||||
//
|
||||
|
||||
// TODO: verify hetero interop
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
// TODO: verify hetero interop
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
// TODO: verify hetero interop
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("GNA"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
|
||||
::testing::Values("GNA"));
|
||||
@@ -1,158 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "ie_class.hpp"
|
||||
|
||||
using namespace InferenceEngine::PluginConfigParams;
|
||||
|
||||
//
|
||||
// IE Class Common tests with <pluginName, deviceName params>
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassCommon, IEClassBasicTestP,
|
||||
::testing::Values(std::make_pair("MKLDNNPlugin", "CPU")));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassNetworkTestP, IEClassNetworkTestP,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassImportExportTestP, IEClassImportExportTestP,
|
||||
::testing::Values("HETERO:CPU"));
|
||||
|
||||
//
|
||||
// IE Class GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("CPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("CPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME,
|
||||
::testing::Values("CPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_STREAMS,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported,
|
||||
::testing::Values("CPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported,
|
||||
::testing::Values("CPU", "MULTI", "HETERO"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetAvailableDevices, IEClassGetAvailableDevices,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
//
|
||||
// IE Class GetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetConfigTest, IEClassGetConfigTest,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
//
|
||||
// Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
|
||||
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
|
||||
::testing::Values("CPU", "MULTI:CPU", "HETERO:CPU"));
|
||||
|
||||
//
|
||||
// Executable Network GetConfig / SetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
//
|
||||
// Hetero Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassHeteroExecutableNetworkGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_F(IEClassBasicTest, smoke_SetConfigAfterCreatedThrow) {
|
||||
Core ie;
|
||||
std::string value = { };
|
||||
|
||||
ASSERT_NO_THROW(ie.SetConfig({ { KEY_CPU_THREADS_NUM, "1" } }, "CPU"));
|
||||
ASSERT_NO_THROW(value = ie.GetConfig("CPU", KEY_CPU_THREADS_NUM).as<std::string>());
|
||||
ASSERT_EQ("1", value);
|
||||
|
||||
ASSERT_NO_THROW(ie.SetConfig({ { KEY_CPU_THREADS_NUM, "4" } }, "CPU"));
|
||||
ASSERT_NO_THROW(value = ie.GetConfig("CPU", KEY_CPU_THREADS_NUM).as<std::string>());
|
||||
ASSERT_EQ("4", value);
|
||||
}
|
||||
|
||||
// IE Class Query network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassQueryNetworkTest, IEClassQueryNetworkTest,
|
||||
::testing::Values("CPU"));
|
||||
|
||||
// IE Class Load network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest,
|
||||
::testing::Values("CPU"));
|
||||
@@ -18,7 +18,6 @@ file(GLOB SHARED_TESTS_SRC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lstm/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/network_tests/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graph_tools/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ie_class/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/transformations/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/transformations/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/transformations/common/*.cpp
|
||||
@@ -48,7 +47,6 @@ target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lstm
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common_single_layer_tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ie_class
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graph_tools
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/transformations
|
||||
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,10 @@ public:
|
||||
template<Precision::ePrecision P>
|
||||
class TestNoRegressionDynBatch : public Regression::RegressionTests,
|
||||
public WithParamInterface<CommonDynBatchFuncTestParams> {
|
||||
void SetUp() override {
|
||||
// PluginCache::;
|
||||
}
|
||||
|
||||
std::string getDeviceName() const override {
|
||||
return GetParam().deviceName;
|
||||
}
|
||||
@@ -49,7 +53,7 @@ using TestNoRegressionDynBatchFP32 = TestNoRegressionDynBatch<Precision::FP32>;
|
||||
TEST_P(TestNoRegressionDynBatchFP32, dynBatch) {
|
||||
int bl = get_batch_limit();
|
||||
int bsz = get_cur_batch();
|
||||
auto fnPtr = ngraph::builder::subgraph::makeSingleConv({static_cast<size_t>(bl), 4, 20, 20});
|
||||
auto fnPtr = ngraph::builder::subgraph::makeSingleConv({static_cast<size_t>(bl), 3, 24, 24});
|
||||
|
||||
CNNNetwork net(fnPtr);
|
||||
auto ieCore = PluginCache::get().ie();
|
||||
|
||||
@@ -23,7 +23,6 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
return {
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
// TODO: Issue 31197
|
||||
R"(.*(IEClassBasicTestP).*smoke_registerPluginsXMLUnicodePath.*)",
|
||||
R"(.*(myriadLayersTestsProposal_smoke).*Caffe.*)",
|
||||
R"(.*(myriadLayersTestsProposal_smoke).*CaffeNoClipBeforeNms.*)",
|
||||
R"(.*(myriadLayersTestsProposal_smoke).*CaffeClipAfterNms.*)",
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
// Copyright (C) 2018-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "ie_class.hpp"
|
||||
#include "vpu_tests_config.hpp"
|
||||
#include "common_test_utils/file_utils.hpp"
|
||||
|
||||
using IEClassExecutableNetworkGetMetricTest_nightly = IEClassExecutableNetworkGetMetricTest;
|
||||
using IEClassExecutableNetworkGetConfigTest_nightly = IEClassExecutableNetworkGetConfigTest;
|
||||
|
||||
using IEClassGetMetricTest_nightly = IEClassGetMetricTest;
|
||||
using IEClassGetConfigTest_nightly = IEClassGetConfigTest;
|
||||
|
||||
std::string devices[] = {
|
||||
std::string(vpu::tests::deviceName()),
|
||||
};
|
||||
|
||||
std::pair<std::string, std::string> plugins [] = {
|
||||
std::make_pair(std::string(vpu::tests::pluginName()) , std::string(vpu::tests::deviceName()) ),
|
||||
};
|
||||
|
||||
//
|
||||
// IE Class Common tests with <pluginName, deviceName params>
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassBasicTestP_smoke, IEClassBasicTestP,
|
||||
::testing::ValuesIn(plugins));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassNetworkTestP_smoke, IEClassNetworkTestP,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
//
|
||||
// IEClassNetworkTestP tests, customized to add SKIP_IF_CURRENT_TEST_IS_DISABLED()
|
||||
//
|
||||
|
||||
class IEClassNetworkTestP_VPU : public IEClassNetworkTestP {};
|
||||
|
||||
TEST_P(IEClassNetworkTestP_VPU, smoke_ImportNetworkNoThrowIfNoDeviceName) {
|
||||
SKIP_IF_CURRENT_TEST_IS_DISABLED();
|
||||
Core ie;
|
||||
std::stringstream strm;
|
||||
ExecutableNetwork executableNetwork;
|
||||
ASSERT_NO_THROW(executableNetwork = ie.LoadNetwork(actualNetwork, deviceName));
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork.Export(strm));
|
||||
if (!strm.str().empty() && deviceName.find("FPGA") != std::string::npos) {
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork = ie.ImportNetwork(strm));
|
||||
}
|
||||
if (nullptr != static_cast<IExecutableNetwork::Ptr&>(executableNetwork)) {
|
||||
ASSERT_NO_THROW(executableNetwork.CreateInferRequest());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(IEClassNetworkTestP_VPU, smoke_ImportNetworkNoThrowWithDeviceName) {
|
||||
SKIP_IF_CURRENT_TEST_IS_DISABLED();
|
||||
Core ie;
|
||||
std::stringstream strm;
|
||||
ExecutableNetwork executableNetwork;
|
||||
ASSERT_NO_THROW(executableNetwork = ie.LoadNetwork(actualNetwork, deviceName));
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork.Export(strm));
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork = ie.ImportNetwork(strm, deviceName));
|
||||
if (nullptr != static_cast<IExecutableNetwork::Ptr&>(executableNetwork)) {
|
||||
ASSERT_NO_THROW(executableNetwork.CreateInferRequest());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(IEClassNetworkTestP_VPU, smoke_ExportUsingFileNameImportFromStreamNoThrowWithDeviceName) {
|
||||
SKIP_IF_CURRENT_TEST_IS_DISABLED();
|
||||
Core ie;
|
||||
ExecutableNetwork executableNetwork;
|
||||
std::string fileName{"ExportedNetwork"};
|
||||
{
|
||||
ASSERT_NO_THROW(executableNetwork = ie.LoadNetwork(actualNetwork, deviceName));
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork.Export(fileName));
|
||||
}
|
||||
if (CommonTestUtils::fileExists(fileName)) {
|
||||
{
|
||||
std::ifstream strm(fileName);
|
||||
SKIP_IF_NOT_IMPLEMENTED(executableNetwork = ie.ImportNetwork(strm, deviceName));
|
||||
}
|
||||
ASSERT_EQ(0, remove(fileName.c_str()));
|
||||
}
|
||||
if (nullptr != static_cast<IExecutableNetwork::Ptr&>(executableNetwork)) {
|
||||
ASSERT_NO_THROW(executableNetwork.CreateInferRequest());
|
||||
}
|
||||
}
|
||||
|
||||
using IEClassNetworkTestP_VPU_GetMetric = IEClassNetworkTestP_VPU;
|
||||
TEST_P(IEClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsFP16) {
|
||||
Core ie;
|
||||
ASSERT_METRIC_SUPPORTED(METRIC_KEY(OPTIMIZATION_CAPABILITIES))
|
||||
|
||||
Parameter optimizationCapabilitiesParameter;
|
||||
ASSERT_NO_THROW(optimizationCapabilitiesParameter = ie.GetMetric(deviceName, METRIC_KEY(OPTIMIZATION_CAPABILITIES)));
|
||||
|
||||
const auto optimizationCapabilities = optimizationCapabilitiesParameter.as<std::vector<std::string>>();
|
||||
ASSERT_EQ(optimizationCapabilities.size(), 1);
|
||||
ASSERT_EQ(optimizationCapabilities.front(), METRIC_VALUE(FP16));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassGetMetricP, IEClassNetworkTestP_VPU_GetMetric,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassImportExportTestP, IEClassNetworkTestP_VPU,
|
||||
::testing::Values(std::string(vpu::tests::deviceName()), "HETERO:" + std::string(vpu::tests::deviceName())));
|
||||
|
||||
#if defined(ENABLE_MKL_DNN) && ENABLE_MKL_DNN
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
smoke_IEClassImportExportTestP_HETERO_CPU, IEClassNetworkTestP_VPU,
|
||||
::testing::Values("HETERO:" + std::string(vpu::tests::deviceName()) + ",CPU"));
|
||||
#endif
|
||||
|
||||
//
|
||||
// Executable Network GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest_nightly,
|
||||
IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest_nightly,
|
||||
IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest_nightly,
|
||||
IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest_nightly,
|
||||
IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetMetricTest_nightly,
|
||||
IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
//
|
||||
// Executable Network GetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassExecutableNetworkGetConfigTest_nightly,
|
||||
IEClassExecutableNetworkGetConfigTest,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
//
|
||||
// IE Class GetMetric
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_ThrowUnsupported,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_AVAILABLE_DEVICES,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_SUPPORTED_METRICS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetMetricTest_nightly,
|
||||
IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
//
|
||||
// IE Class GetConfig
|
||||
//
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetConfigTest_nightly,
|
||||
IEClassGetConfigTest,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassGetConfigTest_nightly,
|
||||
IEClassGetConfigTest_ThrowUnsupported,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
// IE Class Query network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
DISABLED_IEClassQueryNetworkTest_smoke,
|
||||
IEClassQueryNetworkTest,
|
||||
::testing::ValuesIn(devices));
|
||||
|
||||
// IE Class Load network
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
IEClassLoadNetworkTest_smoke,
|
||||
IEClassLoadNetworkTest,
|
||||
::testing::ValuesIn(devices));
|
||||
Reference in New Issue
Block a user