IVGCVSW-6842 Replace ARMNN_ASSERT with ARM_PIPE_ASSERT in profiling code
Change-Id: Ie982ae603b7fb2793baf921232d32ce43f46d444
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index 3ac2272..6a30c65 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -5,6 +5,7 @@
#include "SendCounterPacket.hpp"
+#include <common/include/Assert.hpp>
#include <common/include/Constants.hpp>
#include <common/include/EncodeVersion.hpp>
#include <common/include/ProfilingException.hpp>
@@ -13,8 +14,7 @@
#include <armnn/Conversion.hpp>
#include <Processes.hpp>
-#include <armnn/utility/Assert.hpp>
-#include <common/include/NumericCast.hpp>
+#include <armnn/utility/NumericCast.hpp>
#include <fmt/format.h>
@@ -177,10 +177,10 @@
CategoryRecord& categoryRecord,
std::string& errorMessage)
{
- ARMNN_ASSERT(category);
+ ARM_PIPE_ASSERT(category);
const std::string& categoryName = category->m_Name;
- ARMNN_ASSERT(!categoryName.empty());
+ ARM_PIPE_ASSERT(!categoryName.empty());
// Remove any duplicate counters
std::vector<uint16_t> categoryCounters;
@@ -299,13 +299,13 @@
DeviceRecord& deviceRecord,
std::string& errorMessage)
{
- ARMNN_ASSERT(device);
+ ARM_PIPE_ASSERT(device);
uint16_t deviceUid = device->m_Uid;
const std::string& deviceName = device->m_Name;
uint16_t deviceCores = device->m_Cores;
- ARMNN_ASSERT(!deviceName.empty());
+ ARM_PIPE_ASSERT(!deviceName.empty());
// Device record word 0:
// 16:31 [16] uid: the unique identifier for the device
@@ -349,13 +349,13 @@
CounterSetRecord& counterSetRecord,
std::string& errorMessage)
{
- ARMNN_ASSERT(counterSet);
+ ARM_PIPE_ASSERT(counterSet);
uint16_t counterSetUid = counterSet->m_Uid;
const std::string& counterSetName = counterSet->m_Name;
uint16_t counterSetCount = counterSet->m_Count;
- ARMNN_ASSERT(!counterSetName.empty());
+ ARM_PIPE_ASSERT(!counterSetName.empty());
// Counter set record word 0:
// 16:31 [16] uid: the unique identifier for the counter_set
@@ -399,7 +399,7 @@
EventRecord& eventRecord,
std::string& errorMessage)
{
- ARMNN_ASSERT(counter);
+ ARM_PIPE_ASSERT(counter);
uint16_t counterUid = counter->m_Uid;
uint16_t maxCounterUid = counter->m_MaxCounterUid;
@@ -412,9 +412,9 @@
const std::string& counterDescription = counter->m_Description;
const std::string& counterUnits = counter->m_Units;
- ARMNN_ASSERT(counterClass == 0 || counterClass == 1);
- ARMNN_ASSERT(counterInterpolation == 0 || counterInterpolation == 1);
- ARMNN_ASSERT(counterMultiplier);
+ ARM_PIPE_ASSERT(counterClass == 0 || counterClass == 1);
+ ARM_PIPE_ASSERT(counterInterpolation == 0 || counterInterpolation == 1);
+ ARM_PIPE_ASSERT(counterMultiplier);
// Utils
const size_t uint32_t_size = sizeof(uint32_t);
@@ -453,7 +453,7 @@
// 0:63 [64] multiplier: internal data stream is represented as integer values, this allows scaling of
// those values as if they are fixed point numbers. Zero is not a valid value
uint32_t multiplier[2] = { 0u, 0u };
- ARMNN_ASSERT(sizeof(counterMultiplier) == sizeof(multiplier));
+ ARM_PIPE_ASSERT(sizeof(counterMultiplier) == sizeof(multiplier));
std::memcpy(multiplier, &counterMultiplier, sizeof(multiplier));
const uint32_t eventRecordWord3 = multiplier[0];
const uint32_t eventRecordWord4 = multiplier[1];