Skip to content

Commit

Permalink
Remove GetGraph and include of Graph.hpp header from public header
Browse files Browse the repository at this point in the history
Remove deprecated GetGraph() from OptimizationViews. This method has
been deprecated for a long time and no backends still need it. Remove
include of Graph.hpp from the public headers.

Add includes elsewhere to deal with the header fallout.

Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: I8dae275a8a446d9d0e19be62684e9b3cd2fa493d
  • Loading branch information
MatthewARM authored and FrancisMurtagh-arm committed Apr 4, 2023
1 parent 6c50b8e commit c1c5f2a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
7 changes: 0 additions & 7 deletions include/armnn/backends/OptimizationViews.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <armnn/INetwork.hpp>
#include <armnn/backends/SubgraphView.hpp>
#include <vector>
#include "Graph.hpp"

namespace armnn
{
Expand Down Expand Up @@ -61,9 +60,6 @@ class OptimizationViews

bool Validate(const SubgraphView& originalSubgraph) const;

ARMNN_DEPRECATED_MSG_REMOVAL_DATE("GetGraph is deprecated. Use GetINetwork instead.", "23.08")
Graph& GetGraph() { return m_Graph; }

INetwork* GetINetwork() { return m_INetwork.get(); }
INetwork& GetINetworkRef() { return *m_INetwork; }

Expand All @@ -72,9 +68,6 @@ class OptimizationViews
Subgraphs m_FailedOptimizations; ///< Subgraphs from the original subgraph which cannot be supported
Subgraphs m_UntouchedSubgraphs; ///< Subgraphs from the original subgraph which remain unmodified

/// Graph object used only as a container for any layer generated by the optimization process
Graph m_Graph;

/// INetworkPtr object used only as a container for any layer generated by the optimization process
/// Also, can use to AddPrecompiledLayer to the SubstitutionPair
/// Use in favour of m_Graph which depreciates in 23.08
Expand Down
4 changes: 3 additions & 1 deletion src/armnnTestUtils/MockBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <backendsCommon/test/MockBackendId.hpp>
#include <SubgraphViewSelector.hpp>

#include "Layer.hpp"

namespace armnn
{

Expand Down Expand Up @@ -301,4 +303,4 @@ std::unique_ptr<ICustomAllocator> MockBackend::GetDefaultAllocator() const
return std::make_unique<DefaultAllocator>();
}

} // namespace armnn
} // namespace armnn
1 change: 1 addition & 0 deletions src/backends/backendsCommon/IBackendInternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <armnn/BackendOptions.hpp>
#include <armnn/backends/IBackendInternal.hpp>
#include <armnn/backends/WorkloadFactory.hpp>

namespace armnn
{
Expand Down
2 changes: 1 addition & 1 deletion src/backends/backendsCommon/test/TestDynamicBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "TestDynamicBackend.hpp"

#include <armnn/backends/IBackendInternal.hpp>

#include <armnn/backends/WorkloadFactory.hpp>
#include <armnn/utility/IgnoreUnused.hpp>

constexpr const char* TestDynamicBackendId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include <armnn/backends/IBackendInternal.hpp>
#include <armnn/utility/PolymorphicDowncast.hpp>

namespace armnn
{
Expand Down
1 change: 1 addition & 0 deletions src/backends/cl/test/ClBackendTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT
//

#include <backendsCommon/TensorHandleFactoryRegistry.hpp>
#include <cl/ClBackend.hpp>
#include <cl/ClTensorHandleFactory.hpp>
#include <cl/ClImportTensorHandleFactory.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/backends/neon/test/NeonBackendTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT
//

#include <backendsCommon/TensorHandleFactoryRegistry.hpp>
#include <neon/NeonBackend.hpp>
#include <neon/NeonTensorHandleFactory.hpp>

Expand Down
2 changes: 2 additions & 0 deletions src/backends/reference/test/RefBackendTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
// SPDX-License-Identifier: MIT
//

#include <backendsCommon/TensorHandleFactoryRegistry.hpp>
#include <reference/RefBackend.hpp>
#include <reference/RefTensorHandleFactory.hpp>

#include <armnn/backends/WorkloadFactory.hpp>
#include <doctest/doctest.h>

using namespace armnn;
Expand Down

0 comments on commit c1c5f2a

Please sign in to comment.