Removed runtime namespace (#10231)

This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2022-02-10 14:53:13 +03:00
1 parent d484411f39
commit ea26ec32b3
18 files changed
+58 -95

No files matched your search

+2 -2
View File
@@ -70,8 +70,8 @@ jobs:
env -C ~/work
./buildreleasenolto.sh
libopenvino_gapi_preproc.so
ov_intel_cpu_plugin
ov_intel_gpu_plugin
openvino_intel_cpu_plugin
openvino_intel_gpu_plugin
clDNN_unit_tests64
gpuFuncTests
displayName: Build Lin
@@ -51,10 +51,6 @@ namespace ie = InferenceEngine;
*/
using SupportedOpsMap = std::map<std::string, std::string>;
namespace runtime {
using ov::SupportedOpsMap;
} // namespace runtime
} // namespace ov
namespace std {
@@ -228,8 +228,4 @@ public:
explicit operator bool() const noexcept;
};
namespace runtime {
using ov::CompiledModel;
} // namespace runtime
} // namespace ov
@@ -678,8 +678,4 @@ public:
RemoteContext get_default_context(const std::string& device_name);
};
namespace runtime {
using ov::Core;
} // namespace runtime
} // namespace ov
@@ -23,9 +23,4 @@ class OPENVINO_RUNTIME_API Busy : public Exception {
using Exception::Exception;
};
namespace runtime {
using ov::Busy;
using ov::Cancelled;
} // namespace runtime
} // namespace ov
@@ -341,8 +341,4 @@ public:
bool operator==(const InferRequest& other) const noexcept;
};
namespace runtime {
using ov::InferRequest;
} // namespace runtime
} // namespace ov
@@ -59,7 +59,7 @@ using ThrottleLevel = ov::hint::Priority;
/**
* @brief This key instructs the GPU plugin to use OpenCL queue throttle hints
* as defined in https://www.khronos.org/registry/OpenCL/specs/opencl-2.1-extensions.pdf,
* chapter 9.19. This option should be used with ov::intl_gpu::hint::ThrottleLevel values.
* chapter 9.19. This option should be used with ov::intel_gpu::hint::ThrottleLevel values.
*/
static constexpr Property<ThrottleLevel> queue_throttle{"GPU_QUEUE_THROTTLE"};
@@ -62,8 +62,4 @@ struct ProfilingInfo {
std::string node_type;
};
namespace runtime {
using ov::ProfilingInfo;
} // namespace runtime
} // namespace ov
@@ -586,7 +586,7 @@ constexpr static const auto INT8 = "INT8"; //!< Device suppor
constexpr static const auto INT16 = "INT16"; //!< Device supports int16 inference
constexpr static const auto BIN = "BIN"; //!< Device supports binary inference
constexpr static const auto WINOGRAD = "WINOGRAD"; //!< Device supports winograd optimization
constexpr static const auto EXPORT_IMPORT = "EXPORT_IMPORT"; //!< Device supports model export and import
constexpr static const auto EXPORT_IMPORT = "EXPORT_IMPORT"; //!< Device supports compiled model export and import
} // namespace capability
} // namespace device
@@ -166,8 +166,4 @@ public:
Tensor create_host_tensor(const element::Type type, const Shape& shape);
};
namespace runtime {
using ov::RemoteContext;
} // namespace runtime
} // namespace ov
@@ -62,8 +62,4 @@ public:
std::string get_device_name() const;
};
namespace runtime {
using ov::RemoteTensor;
} // namespace runtime
} // namespace ov
@@ -78,8 +78,4 @@ public:
void set_state(const Tensor& state);
};
namespace runtime {
using ov::VariableState;
} // namespace runtime
} // namespace ov
@@ -345,8 +345,8 @@ void CheckNumberOfNodesWithTypeImpl(std::shared_ptr<const ov::Model> function, s
ASSERT_EQ(expectedCount, actualNodeCount) << "Unexpected count of the node type '" << nodeType << "' ";
}
void CheckNumberOfNodesWithType(ov::runtime::CompiledModel &execNet, std::string nodeType, size_t expectedCount) {
std::shared_ptr<const ov::Model> function = execNet.get_runtime_model();
void CheckNumberOfNodesWithType(ov::CompiledModel &compiledModel, std::string nodeType, size_t expectedCount) {
std::shared_ptr<const ov::Model> function = compiledModel.get_runtime_model();
CheckNumberOfNodesWithTypeImpl(function, nodeType, expectedCount);
}
@@ -169,6 +169,6 @@ const std::map<std::string, std::string> cpuBF16PluginConfig =
// utility functions
std::vector<CPUSpecificParams> filterCPUSpecificParams(std::vector<CPUSpecificParams>& paramsVector);
std::vector<CPUSpecificParams> filterCPUInfoForDevice(std::vector<CPUSpecificParams> CPUParams);
void CheckNumberOfNodesWithType(ov::runtime::CompiledModel &execNet, std::string nodeType, size_t expectedCount);
void CheckNumberOfNodesWithType(ov::CompiledModel &compiledModel, std::string nodeType, size_t expectedCount);
void CheckNumberOfNodesWithType(InferenceEngine::ExecutableNetwork &execNet, std::string nodeType, size_t expectedCount);
} // namespace CPUTestUtils
@@ -171,23 +171,23 @@ TEST_P(OVExecGraphImportExportTest, importExportedFunctionParameterResultOnly) {
std::stringstream strm;
execNet.export_model(strm);
ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration);
ov::CompiledModel importedCompiledModel = core->import_model(strm, targetDevice, configuration);
EXPECT_EQ(function->inputs().size(), 1);
EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size());
EXPECT_NO_THROW(importedExecNet.input());
EXPECT_NO_THROW(importedExecNet.input("data").get_node());
EXPECT_THROW(importedExecNet.input("param"), ov::Exception);
EXPECT_EQ(function->inputs().size(), importedCompiledModel.inputs().size());
EXPECT_NO_THROW(importedCompiledModel.input());
EXPECT_NO_THROW(importedCompiledModel.input("data").get_node());
EXPECT_THROW(importedCompiledModel.input("param"), ov::Exception);
EXPECT_EQ(function->outputs().size(), 1);
EXPECT_EQ(function->outputs().size(), importedExecNet.outputs().size());
EXPECT_NO_THROW(importedExecNet.output());
EXPECT_EQ(function->outputs().size(), importedCompiledModel.outputs().size());
EXPECT_NO_THROW(importedCompiledModel.output());
EXPECT_EQ(function->output(0).get_tensor().get_names(),
importedExecNet.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedExecNet.output("data").get_node());
EXPECT_THROW(importedExecNet.output("param"), ov::Exception);
importedCompiledModel.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedCompiledModel.output("data").get_node());
EXPECT_THROW(importedCompiledModel.output("param"), ov::Exception);
EXPECT_EQ(ov::element::Type(elementType), importedExecNet.input("data").get_element_type());
EXPECT_EQ(ov::element::Type(elementType), importedExecNet.output("data").get_element_type());
EXPECT_EQ(ov::element::Type(elementType), importedCompiledModel.input("data").get_element_type());
EXPECT_EQ(ov::element::Type(elementType), importedCompiledModel.output("data").get_element_type());
}
TEST_P(OVExecGraphImportExportTest, importExportedFunctionConstantResultOnly) {
@@ -211,22 +211,22 @@ TEST_P(OVExecGraphImportExportTest, importExportedFunctionConstantResultOnly) {
std::stringstream strm;
execNet.export_model(strm);
ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration);
ov::CompiledModel importedCompiledModel = core->import_model(strm, targetDevice, configuration);
EXPECT_EQ(function->inputs().size(), 0);
EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size());
EXPECT_THROW(importedExecNet.input(), ov::Exception);
EXPECT_THROW(importedExecNet.input("data"), ov::Exception);
EXPECT_THROW(importedExecNet.input("constant"), ov::Exception);
EXPECT_EQ(function->inputs().size(), importedCompiledModel.inputs().size());
EXPECT_THROW(importedCompiledModel.input(), ov::Exception);
EXPECT_THROW(importedCompiledModel.input("data"), ov::Exception);
EXPECT_THROW(importedCompiledModel.input("constant"), ov::Exception);
EXPECT_EQ(function->outputs().size(), 1);
EXPECT_EQ(function->outputs().size(), importedExecNet.outputs().size());
EXPECT_NO_THROW(importedExecNet.output());
EXPECT_EQ(function->outputs().size(), importedCompiledModel.outputs().size());
EXPECT_NO_THROW(importedCompiledModel.output());
EXPECT_EQ(function->output(0).get_tensor().get_names(),
importedExecNet.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedExecNet.output("data").get_node());
EXPECT_THROW(importedExecNet.output("constant"), ov::Exception);
importedCompiledModel.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedCompiledModel.output("data").get_node());
EXPECT_THROW(importedCompiledModel.output("constant"), ov::Exception);
EXPECT_EQ(ov::element::Type(elementType), importedExecNet.output("data").get_element_type());
EXPECT_EQ(ov::element::Type(elementType), importedCompiledModel.output("data").get_element_type());
}
TEST_P(OVExecGraphImportExportTest, readFromV10IR) {
@@ -415,28 +415,28 @@ TEST_P(OVExecGraphImportExportTest, importExportedIENetworkParameterResultOnly)
std::stringstream strm;
execNet.Export(strm);
ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration);
ov::CompiledModel importedCompiledModel = core->import_model(strm, targetDevice, configuration);
EXPECT_EQ(function->inputs().size(), 1);
EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size());
EXPECT_NO_THROW(importedExecNet.input());
EXPECT_NO_THROW(importedExecNet.input("data").get_node());
EXPECT_NO_THROW(importedExecNet.input("param").get_node());
EXPECT_EQ(function->inputs().size(), importedCompiledModel.inputs().size());
EXPECT_NO_THROW(importedCompiledModel.input());
EXPECT_NO_THROW(importedCompiledModel.input("data").get_node());
EXPECT_NO_THROW(importedCompiledModel.input("param").get_node());
EXPECT_EQ(function->outputs().size(), 1);
EXPECT_EQ(function->outputs().size(), importedExecNet.outputs().size());
EXPECT_NO_THROW(importedExecNet.output());
EXPECT_EQ(function->outputs().size(), importedCompiledModel.outputs().size());
EXPECT_NO_THROW(importedCompiledModel.output());
EXPECT_NE(function->output(0).get_tensor().get_names(),
importedExecNet.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedExecNet.output("data").get_node());
EXPECT_NO_THROW(importedExecNet.output("param").get_node());
importedCompiledModel.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedCompiledModel.output("data").get_node());
EXPECT_NO_THROW(importedCompiledModel.output("param").get_node());
const ov::element::Type outputType = elementType == ngraph::element::i32 ||
elementType == ngraph::element::i64 ? ngraph::element::i32 : ngraph::element::f32;
const ov::element::Type inputType = elementType ==
ngraph::element::f16 ? ngraph::element::Type_t::f32 : elementType;
EXPECT_EQ(inputType, importedExecNet.input("param").get_element_type());
EXPECT_EQ(outputType, importedExecNet.output("data").get_element_type());
EXPECT_EQ(inputType, importedCompiledModel.input("param").get_element_type());
EXPECT_EQ(outputType, importedCompiledModel.output("data").get_element_type());
}
TEST_P(OVExecGraphImportExportTest, importExportedIENetworkConstantResultOnly) {
@@ -463,24 +463,24 @@ TEST_P(OVExecGraphImportExportTest, importExportedIENetworkConstantResultOnly) {
std::stringstream strm;
execNet.Export(strm);
ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration);
ov::CompiledModel importedCompiledModel = core->import_model(strm, targetDevice, configuration);
EXPECT_EQ(function->inputs().size(), 0);
EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size());
EXPECT_THROW(importedExecNet.input(), ov::Exception);
EXPECT_THROW(importedExecNet.input("data"), ov::Exception);
EXPECT_THROW(importedExecNet.input("constant"), ov::Exception);
EXPECT_EQ(function->inputs().size(), importedCompiledModel.inputs().size());
EXPECT_THROW(importedCompiledModel.input(), ov::Exception);
EXPECT_THROW(importedCompiledModel.input("data"), ov::Exception);
EXPECT_THROW(importedCompiledModel.input("constant"), ov::Exception);
EXPECT_EQ(function->outputs().size(), 1);
EXPECT_EQ(function->outputs().size(), importedExecNet.outputs().size());
EXPECT_NO_THROW(importedExecNet.output());
EXPECT_EQ(function->outputs().size(), importedCompiledModel.outputs().size());
EXPECT_NO_THROW(importedCompiledModel.output());
EXPECT_NE(function->output(0).get_tensor().get_names(),
importedExecNet.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedExecNet.output("data").get_node());
EXPECT_NO_THROW(importedExecNet.output("constant").get_node());
importedCompiledModel.output(0).get_tensor().get_names());
EXPECT_NO_THROW(importedCompiledModel.output("data").get_node());
EXPECT_NO_THROW(importedCompiledModel.output("constant").get_node());
const auto outputType = elementType == ngraph::element::i32 ||
elementType == ngraph::element::i64 ? ngraph::element::i32 : ngraph::element::f32;
EXPECT_EQ(outputType, importedExecNet.output("data").get_element_type());
EXPECT_EQ(outputType, importedCompiledModel.output("data").get_element_type());
}
TEST_P(OVExecGraphImportExportTest, ieImportExportedFunction) {
@@ -26,14 +26,14 @@ void OVInferRequestPerfCountersTest::SetUp() {
TEST_P(OVInferRequestPerfCountersTest, NotEmptyAfterAsyncInfer) {
OV_ASSERT_NO_THROW(req.start_async());
OV_ASSERT_NO_THROW(req.wait());
std::vector<runtime::ProfilingInfo> perf;
std::vector<ov::ProfilingInfo> perf;
OV_ASSERT_NO_THROW(perf = req.get_profiling_info());
ASSERT_FALSE(perf.empty());
}
TEST_P(OVInferRequestPerfCountersTest, NotEmptyAfterSyncInfer) {
OV_ASSERT_NO_THROW(req.infer());
std::vector<runtime::ProfilingInfo> perf;
std::vector<ov::ProfilingInfo> perf;
OV_ASSERT_NO_THROW(perf = req.get_profiling_info());
ASSERT_FALSE(perf.empty());
}
@@ -61,7 +61,7 @@ TEST_P(OVHoldersTest, Orders) {
}
TEST_P(OVHoldersTest, LoadedState) {
std::vector<runtime::VariableState> states;
std::vector<ov::VariableState> states;
{
ov::Core core = createCoreWithTemplate();
auto compiled_model = core.compile_model(function, targetDevice);
@@ -92,7 +92,7 @@ TEST_P(OVHoldersTest, LoadedAny) {
}
TEST_P(OVHoldersTest, LoadedRemoteContext) {
runtime::RemoteContext ctx;
ov::RemoteContext ctx;
{
ov::Core core = createCoreWithTemplate();
auto compiled_model = core.compile_model(function, targetDevice);
@@ -70,7 +70,7 @@ TEST_P(OVRemoteTest, canCreateRemote) {
ASSERT_NE(params.find(param.first), params.end());
}
ASSERT_EQ(target_device, device);
runtime::RemoteTensor remote_tensor;
ov::RemoteTensor remote_tensor;
ASSERT_NO_THROW(remote_tensor = context.create_tensor(input->get_element_type(), input->get_shape(), tensor_parameters));
ASSERT_NO_THROW(params = remote_tensor.get_params());