Remove ngraph from some sources (#19966)

This commit is contained in:
Ilya Churaev
2023-09-21 06:27:30 +04:00
committed by GitHub
parent 69e9124eb7
commit 4a0e3fc77f
7 changed files with 15 additions and 19 deletions

View File

@@ -1,12 +1,13 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <cfloat>
#include "ngraph/ngraph.hpp"
#include <cfloat>
#include <memory>
#include "openvino/core/model.hpp"
#include "transformations/utils/utils.hpp"
namespace ov {
struct MemBandwidthPressure {
@@ -24,7 +25,7 @@ struct MemBandwidthPressure {
};
static MemBandwidthPressure MemBandwidthPressureTolerance(
const std::shared_ptr<ngraph::Function> nGraphFunc,
const std::shared_ptr<ov::Model> model,
const float cache_size,
const float memThresholdAssumeLimited = MemBandwidthPressure::LIMITED) {
int total_convs = 0, mem_limited_convs = 0, compute_convs = 0, total_gemms = 0, mem_limited_gemms = 0,
@@ -32,16 +33,16 @@ static MemBandwidthPressure MemBandwidthPressureTolerance(
auto memLimitedFactor = [&](size_t size_data_moved, int datatype_size = 4) -> float {
return (cache_size / (size_data_moved * datatype_size));
};
auto isLowPrecision = [&](ngraph::element::Type type) -> bool {
return (type == ngraph::element::i8) || (type == ngraph::element::u8);
auto isLowPrecision = [&](ov::element::Type type) -> bool {
return (type == ov::element::i8) || (type == ov::element::u8);
};
auto isHalfPrecision = [&](ngraph::element::Type type) -> bool {
return (type == ngraph::element::bf16) || (type == ngraph::element::f16);
auto isHalfPrecision = [&](ov::element::Type type) -> bool {
return (type == ov::element::bf16) || (type == ov::element::f16);
};
float worst_case = MemBandwidthPressure::UNKNOWN;
// Traverse nGraph Function in topological order
for (auto& node : nGraphFunc->get_ordered_ops()) {
// Traverse OpenVINO Model in topological order
for (auto& node : model->get_ordered_ops()) {
const auto node_name = node->get_type_info().name;
if (std::strcmp("MatMul", node_name) && std::strcmp("Convolution", node_name) &&
std::strcmp("ConvolutionBackpropData", node_name)) {

View File

@@ -1,7 +1,5 @@
#include "check_network_batchable.hpp"
#include "ie_ngraph_utils.hpp"
#include "ngraph/opsets/opset.hpp"
#include "openvino/core/dimension_tracker.hpp"
#include "openvino/op/detection_output.hpp"
#include "openvino/op/ops.hpp"

View File

@@ -16,7 +16,6 @@
#include "details/ie_exception.hpp"
#include "file_utils.h"
#include "itt.hpp"
#include "ngraph/opsets/opset6.hpp"
#include "openvino/pass/manager.hpp"
#include "transformations/hash.hpp"
#include "transformations/rt_info/fused_names_attribute.hpp"

View File

@@ -7,7 +7,6 @@
#include <exception>
#include "any_copy.hpp"
#include "ie_ngraph_utils.hpp"
#include "ie_remote_blob.hpp"
#include "openvino/core/except.hpp"
#include "openvino/runtime/iremote_context.hpp"

View File

@@ -7,7 +7,6 @@
#include <memory>
#include "ie_blob.h"
#include "ie_ngraph_utils.hpp"
#include "ie_remote_blob.hpp"
#include "openvino/runtime/iremote_tensor.hpp"
#include "openvino/runtime/properties.hpp"

View File

@@ -39,8 +39,8 @@ void update_v10_model(std::shared_ptr<ov::Model>& model, bool frontendMode = fal
const auto outputs = model->outputs();
for (size_t i = 0; i < outputs.size(); ++i) {
if (!frontendMode) {
const auto ngraph_type = outputs[i].get_element_type();
const auto legacy_type = InferenceEngine::details::toLegacyType(ngraph_type, false);
const auto ov_type = outputs[i].get_element_type();
const auto legacy_type = InferenceEngine::details::toLegacyType(ov_type, false);
prepost.output(i).tensor().set_element_type(legacy_type);
}
for (const auto& name : outputs[i].get_names()) {

View File

@@ -43,7 +43,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(HeteroTests::HeteroSyntheticTest::_randomMajorNodeFunctions)),
HeteroSyntheticTest::getTestCaseName);
static std::vector<std::function<std::shared_ptr<ngraph::Function>()>> dynamicBuilders = {
static std::vector<std::function<std::shared_ptr<ov::Model>()>> dynamicBuilders = {
[] {
return ngraph::builder::subgraph::makeConvPoolReluNonZero();
},