diff options
author | Declan-ARM <decmce01@arm.com> | 2024-03-12 16:40:25 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2024-03-13 10:07:56 +0000 |
commit | 7c75e336fbeeec052a1cb90c68d1caece332c176 (patch) | |
tree | 8fac689c1b4192522f5fa98bccbfab12b8e08afe /src/armnn/ArmNNProfilingServiceInitialiser.cpp | |
parent | 93bbf00d968101fb9a9174ad011b655ca7100546 (diff) | |
download | armnn-7c75e336fbeeec052a1cb90c68d1caece332c176.tar.gz |
IVGCVSW-7853 Assert audit and removal
* src/armnn
* src/armnn/layers
Signed-off-by: Declan-ARM <decmce01@arm.com>
Change-Id: Ic78cbbb59e90fbb15f893205a358c45264243721
Diffstat (limited to 'src/armnn/ArmNNProfilingServiceInitialiser.cpp')
-rw-r--r-- | src/armnn/ArmNNProfilingServiceInitialiser.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/armnn/ArmNNProfilingServiceInitialiser.cpp b/src/armnn/ArmNNProfilingServiceInitialiser.cpp index bbed43ae4c..7ca3fc1bd8 100644 --- a/src/armnn/ArmNNProfilingServiceInitialiser.cpp +++ b/src/armnn/ArmNNProfilingServiceInitialiser.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022 Arm Ltd. All rights reserved. +// Copyright © 2022,2024 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // @@ -40,7 +40,11 @@ void ArmNNProfilingServiceInitialiser::InitialiseProfilingService(arm::pipe::IPr networkLoads, "The number of networks loaded at runtime", networks); - ARMNN_ASSERT(loadedNetworksCounter); + if (!loadedNetworksCounter) + { + throw armnn::NullPointerException("loadedNetworksCounter must not be null."); + } + profilingService.InitializeCounterValue(loadedNetworksCounter->m_Uid); } // Register a counter for the number of unloaded networks @@ -57,7 +61,7 @@ void ArmNNProfilingServiceInitialiser::InitialiseProfilingService(arm::pipe::IPr networkUnloads, "The number of networks unloaded at runtime", networks); - ARMNN_ASSERT(unloadedNetworksCounter); + profilingService.InitializeCounterValue(unloadedNetworksCounter->m_Uid); } std::string backends("backends"); @@ -75,7 +79,7 @@ void ArmNNProfilingServiceInitialiser::InitialiseProfilingService(arm::pipe::IPr backendsRegistered, "The number of registered backends", backends); - ARMNN_ASSERT(registeredBackendsCounter); + profilingService.InitializeCounterValue(registeredBackendsCounter->m_Uid); // Due to backends being registered before the profiling service becomes active, @@ -97,7 +101,7 @@ void ArmNNProfilingServiceInitialiser::InitialiseProfilingService(arm::pipe::IPr backendsUnregistered, "The number of unregistered backends", backends); - ARMNN_ASSERT(unregisteredBackendsCounter); + profilingService.InitializeCounterValue(unregisteredBackendsCounter->m_Uid); } // Register a counter for the number of inferences run @@ -115,7 +119,7 @@ void ArmNNProfilingServiceInitialiser::InitialiseProfilingService(arm::pipe::IPr inferencesRun, "The number of inferences run", inferences); - ARMNN_ASSERT(inferencesRunCounter); + profilingService.InitializeCounterValue(inferencesRunCounter->m_Uid); } } |