Revert "[LPT] Assign + ReadValue transformation (#8690)" (#9457)

This reverts commit c5824b8494.
This commit is contained in:
Alexander Zhogov authored and GitHub committed 2021-12-27 18:25:11 +03:00
1 parent 7d198a8535
commit d51f337934
19 files changed
+135 -847

No files matched your search

@@ -5,7 +5,6 @@
#include "int_executable.hpp"
#include <cstring>
#include <openvino/op/util/variable_context.hpp>
#include "evaluates_map.hpp"
#include "ngraph/except.hpp"
@@ -88,10 +87,6 @@ bool runtime::interpreter::INTExecutable::call(const vector<shared_ptr<runtime::
results_map[output] = output_count;
}
EvaluationContext eval_context;
ov::op::util::VariableContext variable_context;
eval_context.emplace("VariableContext", variable_context);
// for each ordered op in the graph
for (const auto& op : m_nodes) {
if (dynamic_pointer_cast<op::Parameter>(op) != nullptr) {
@@ -148,20 +143,8 @@ bool runtime::interpreter::INTExecutable::call(const vector<shared_ptr<runtime::
if (m_performance_counters_enabled) {
m_timer_map[op].start();
}
if (auto var_extension = std::dynamic_pointer_cast<ov::op::util::VariableExtension>(cloned_node)) {
auto variable = var_extension->get_variable();
if (!variable_context.get_variable_value(variable)) {
auto h_tensor = std::make_shared<ngraph::HostTensor>(cloned_node->get_input_element_type(0),
cloned_node->get_input_shape(0));
std::vector<float> data(ov::shape_size(cloned_node->get_input_shape(0)), 0);
h_tensor->write(data.data(), data.size() * sizeof(float));
variable_context.set_variable_value(variable, std::make_shared<VariableValue>(h_tensor));
}
}
// Call evaluate for cloned_node with static shapes
if (!cloned_node->evaluate(op_outputs, op_inputs, eval_context)) {
if (!cloned_node->evaluate(op_outputs, op_inputs)) {
evaluate_node(cloned_node, op_outputs, op_inputs);
}
if (m_performance_counters_enabled) {
@@ -85,7 +85,6 @@ NGRAPH_OP(NonMaxSuppression, op::v5)
NGRAPH_OP(RNNSequence, op::v5)
NGRAPH_OP(Round, op::v5)
NGRAPH_OP(Assign, ngraph::op::v6)
NGRAPH_OP(CTCGreedyDecoderSeqLen, op::v6)
NGRAPH_OP(ExperimentalDetectronDetectionOutput, op::v6)
NGRAPH_OP(ExperimentalDetectronGenerateProposalsSingleImage, op::v6)
@@ -94,7 +93,6 @@ NGRAPH_OP(ExperimentalDetectronROIFeatureExtractor, op::v6)
NGRAPH_OP(ExperimentalDetectronTopKROIs, op::v6)
NGRAPH_OP(GatherElements, op::v6)
NGRAPH_OP(MVN, ngraph::op::v6)
NGRAPH_OP(ReadValue, ngraph::op::v6)
NGRAPH_OP(DFT, op::v7)
NGRAPH_OP(Einsum, op::v7)