aboutsummaryrefslogtreecommitdiff
path: root/src/graph/mutators/InPlaceOperationMutator.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2020-06-17 16:08:10 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-06-18 10:45:09 +0000
commit19023835fa5a73dea2823edf667c711b03bc5060 (patch)
treedc2ba5a2e632a6e3c55def35bb7e0a89a7b6b625 /src/graph/mutators/InPlaceOperationMutator.cpp
parent350099ea9868aa6ec84d082fe6d5962fafc86aa4 (diff)
downloadComputeLibrary-19023835fa5a73dea2823edf667c711b03bc5060.tar.gz
Revert "COMPMID-3480: Perform in-place computations in NEArithmeticAdditionKernel"
This reverts commit 4a61653202afb018f4f259d3c144a735d73f0a20. Reason for revert: We will allow in-place computations by providing the same input1 (or input2) as output, thus avoiding changes in the interface. Change-Id: I7c8669e207e15731dc26dc366150bf960508a879 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3035 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/mutators/InPlaceOperationMutator.cpp')
-rw-r--r--src/graph/mutators/InPlaceOperationMutator.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/graph/mutators/InPlaceOperationMutator.cpp b/src/graph/mutators/InPlaceOperationMutator.cpp
index 327e985625..3b06537cd9 100644
--- a/src/graph/mutators/InPlaceOperationMutator.cpp
+++ b/src/graph/mutators/InPlaceOperationMutator.cpp
@@ -25,7 +25,6 @@
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Logger.h"
-#include "arm_compute/graph/backends/BackendRegistry.h"
namespace arm_compute
{
@@ -43,29 +42,13 @@ IGraphMutator::MutationType InPlaceOperationMutator::type() const
void InPlaceOperationMutator::mutate(Graph &g)
{
- std::set<NodeType> in_place_nodes =
- {
- NodeType::ActivationLayer,
- NodeType::BatchNormalizationLayer,
- NodeType::EltwiseLayer,
- NodeType::PrintLayer,
- };
+ std::set<NodeType> in_place_nodes = { NodeType::BatchNormalizationLayer, NodeType::ActivationLayer, NodeType::PrintLayer };
// Not interested in the order of nodes
for(auto &node : g.nodes())
{
if(node && in_place_nodes.find(node->type()) != std::end(in_place_nodes))
{
- // Validate node
- backends::IDeviceBackend &backend = backends::BackendRegistry::get().get_backend(node->assigned_target());
- Status status = backend.validate_node(*node);
-
- // If in-place computation is not supported, do nothing and go to next node
- if(!bool(status))
- {
- continue;
- }
-
// Get input edge
Edge *input_edge = node->input_edge(0);