aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2021-12-16 11:28:37 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2021-12-17 14:10:07 +0000
commit446707fbc95ffedc7b2e463679dfcef1e827f649 (patch)
tree267133674d698f1cf58ba40e45a37baea4c256fd
parent19bde17aa6971487d859f69dab980797bd7508b3 (diff)
downloadarmnn-446707fbc95ffedc7b2e463679dfcef1e827f649.tar.gz
Remove deprecated code for 22.02
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I9114288e705936b12129b01bfd482bbe1260f80b
-rw-r--r--include/armnn/IRuntime.hpp35
-rw-r--r--python/pyarmnn/src/pyarmnn/swig/modules/armnn_runtime.i22
-rw-r--r--python/pyarmnn/test/test_runtime.py9
3 files changed, 4 insertions, 62 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index bdfd9b224b..d85a3e3724 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -31,40 +31,7 @@ class IRuntime;
using IRuntimePtr = std::unique_ptr<IRuntime, void(*)(IRuntime* runtime)>;
struct INetworkProperties
-{
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Please use INetworkProperties constructor with MemorySource argument", "22.02")
- INetworkProperties(bool importEnabled = false,
- bool exportEnabled = false,
- bool asyncEnabled = false,
- bool profilingEnabled = false)
- : m_ImportEnabled(importEnabled),
- m_ExportEnabled(exportEnabled),
- m_AsyncEnabled(asyncEnabled),
- m_ProfilingEnabled(profilingEnabled),
- m_OutputNetworkDetailsMethod(ProfilingDetailsMethod::Undefined),
- m_InputSource(m_ImportEnabled ? MemorySource::Malloc : MemorySource::Undefined),
- m_OutputSource(m_ExportEnabled ? MemorySource::Malloc : MemorySource::Undefined),
- m_ExternalMemoryManagementEnabled(false)
- {}
-
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Please use INetworkProperties constructor without numThreads argument", "22.02")
- INetworkProperties(bool asyncEnabled,
- MemorySource inputSource,
- MemorySource outputSource,
- size_t numThreads,
- bool profilingEnabled = false)
- : m_ImportEnabled(inputSource != MemorySource::Undefined),
- m_ExportEnabled(outputSource != MemorySource::Undefined),
- m_AsyncEnabled(asyncEnabled),
- m_ProfilingEnabled(profilingEnabled),
- m_OutputNetworkDetailsMethod(ProfilingDetailsMethod::Undefined),
- m_InputSource(inputSource),
- m_OutputSource(outputSource),
- m_ExternalMemoryManagementEnabled(false)
- {
- armnn::IgnoreUnused(numThreads);
- }
-
+{
INetworkProperties(bool asyncEnabled,
MemorySource inputSource,
MemorySource outputSource,
diff --git a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_runtime.i b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_runtime.i
index e56464dd2f..42683ad933 100644
--- a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_runtime.i
+++ b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_runtime.i
@@ -312,27 +312,5 @@ public:
}
-%extend INetworkProperties {
- %feature("docstring",
- "
- Structure for holding network properties.
-
- Contains:
- m_ImportEnabled (bool): Enable import.
-
- m_ExportEnabled (bool): Enable export.
-
- ") INetworkProperties;
- INetworkProperties(bool importEnabled = false, bool exportEnabled = false) {
- ARMNN_NO_DEPRECATE_WARN_BEGIN
- return new INetworkProperties(importEnabled, exportEnabled);
- ARMNN_NO_DEPRECATE_WARN_END
- }
- %pythonprepend INetworkProperties(bool, bool) %{
- import warnings
- warnings.warn("Deprecated: Use constructor with MemorySource argument instead.", DeprecationWarning)
- %}
-}
-
}
diff --git a/python/pyarmnn/test/test_runtime.py b/python/pyarmnn/test/test_runtime.py
index e558e84e28..a37772c5df 100644
--- a/python/pyarmnn/test/test_runtime.py
+++ b/python/pyarmnn/test/test_runtime.py
@@ -156,7 +156,9 @@ def test_load_network_properties_provided(random_runtime):
opt_network, _ = ann.Optimize(network, preferred_backends,
runtime.GetDeviceSpec(), ann.OptimizerOptions())
- properties = ann.INetworkProperties(True, True)
+ inputSource = ann.MemorySource_Malloc
+ outputSource = ann.MemorySource_Malloc
+ properties = ann.INetworkProperties(False, inputSource, outputSource)
net_id, messages = runtime.LoadNetwork(opt_network, properties)
assert "" == messages
assert net_id == 0
@@ -184,11 +186,6 @@ def test_network_properties_constructor(random_runtime):
assert net_id == 0
-def test_network_properties_deprecated_constructor():
- with pytest.warns(DeprecationWarning):
- warnings.warn("Deprecated: Use constructor with MemorySource argument instead.", DeprecationWarning)
-
-
def test_unload_network_fails_for_invalid_net_id(random_runtime):
preferred_backends = random_runtime[0]
network = random_runtime[1]