From dde9ec96f471127e5b6d8dfaeffce024b6326f1a Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 13 Feb 2018 15:24:04 +0000 Subject: COMPMID-909: Enabling in-place computation for batchnormalization and activation at graph level Change-Id: I84d4a212629b21794451ab5fb5c5b187b5e28f98 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120127 Reviewed-by: Georgios Pinitas Tested-by: Jenkins --- src/graph/SubGraph.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/graph/SubGraph.cpp') diff --git a/src/graph/SubGraph.cpp b/src/graph/SubGraph.cpp index f62b2617c5..b1cbb9cc95 100644 --- a/src/graph/SubGraph.cpp +++ b/src/graph/SubGraph.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -67,6 +67,10 @@ std::unique_ptr SubGraph::construct(const GraphContext &ctx, std::unique_ } graph->add_tensor_object(std::move(_input)); + // Make sure first and last nodes of the subgraph always do operations out-of-place + _nodes.front()->set_supports_in_place(false); + _nodes.back()->set_supports_in_place(false); + // Construct nodes for(auto &node : _nodes) { -- cgit v1.2.1