IVGCVSW-6814 Remove references to armnn:BackendId in the profiling code

Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: Ib399a5eee9e52882800ec3e02e4173424a7c19b1
diff --git a/src/backends/backendsCommon/test/BackendProfilingTests.cpp b/src/backends/backendsCommon/test/BackendProfilingTests.cpp
index 3651696..d262abc 100644
--- a/src/backends/backendsCommon/test/BackendProfilingTests.cpp
+++ b/src/backends/backendsCommon/test/BackendProfilingTests.cpp
@@ -155,8 +155,8 @@
     CounterIdMap counterIdMap;
     MockBackendSendCounterPacket sendCounterPacket;
 
-    const armnn::BackendId cpuAccId(armnn::Compute::CpuAcc);
-    const armnn::BackendId gpuAccId(armnn::Compute::GpuAcc);
+    const std::string cpuAccId(GetComputeDeviceAsCString(armnn::Compute::CpuAcc));
+    const std::string gpuAccId(GetComputeDeviceAsCString(armnn::Compute::GpuAcc));
 
     ProfilingOptions options;
     options.m_EnableProfiling = true;
@@ -173,7 +173,7 @@
     std::shared_ptr<IBackendProfilingContext> gpuProfilingContextPtr =
             std::make_shared<armnn::MockBackendProfilingContext>(gpuBackendProfilingPtr);
 
-    std::unordered_map<armnn::BackendId,
+    std::unordered_map<std::string,
             std::shared_ptr<IBackendProfilingContext>> backendProfilingContexts;
 
     backendProfilingContexts[cpuAccId] = cpuProfilingContextPtr;
@@ -222,7 +222,7 @@
     periodicCounterSelectionCommandHandler(PacketWriter(period, gpuCounters));
     periodicCounterCapture.Stop();
 
-    std::set<armnn::BackendId> activeIds = holder.GetCaptureData().GetActiveBackends();
+    std::set<std::string> activeIds = holder.GetCaptureData().GetActiveBackends();
     CHECK(activeIds.size() == 1);
     CHECK((activeIds.find(gpuAccId) != activeIds.end()));
 
@@ -403,8 +403,8 @@
     CounterIdMap counterIdMap;
     MockBackendSendCounterPacket sendCounterPacket;
 
-    const armnn::BackendId cpuAccId(armnn::Compute::CpuAcc);
-    const armnn::BackendId gpuAccId(armnn::Compute::GpuAcc);
+    const std::string cpuAccId(GetComputeDeviceAsCString(armnn::Compute::CpuAcc));
+    const std::string gpuAccId(GetComputeDeviceAsCString(armnn::Compute::GpuAcc));
 
     ProfilingOptions options;
     options.m_EnableProfiling = true;
@@ -417,7 +417,7 @@
     std::shared_ptr<IBackendProfilingContext> cpuProfilingContextPtr =
             std::make_shared<armnn::MockBackendProfilingContext>(cpuBackendProfilingPtr);
 
-    std::unordered_map<armnn::BackendId,
+    std::unordered_map<std::string,
             std::shared_ptr<IBackendProfilingContext>> backendProfilingContexts;
 
     uint16_t globalId = 5;
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
index 63ca741..a3dabd5 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
@@ -55,7 +55,7 @@
                 if(!backendContext.second->EnableProfiling(true))
                 {
                     throw armnn::BackendProfilingException(
-                            "Unable to enable profiling on Backend Id: " + backendContext.first.Get());
+                            "Unable to enable profiling on Backend Id: " + backendContext.first);
                 }
             }
         }
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
index 5bb3c95..9ea3bd4 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
@@ -23,7 +23,7 @@
 class ConnectionAcknowledgedCommandHandler final : public arm::pipe::CommandHandlerFunctor
 {
 
-typedef const std::unordered_map<armnn::BackendId, std::shared_ptr<IBackendProfilingContext>>&
+typedef const std::unordered_map<std::string, std::shared_ptr<IBackendProfilingContext>>&
     BackendProfilingContexts;
 
 public:
diff --git a/src/profiling/CounterDirectory.cpp b/src/profiling/CounterDirectory.cpp
index 5a7d8c6..ba4ca1c 100644
--- a/src/profiling/CounterDirectory.cpp
+++ b/src/profiling/CounterDirectory.cpp
@@ -6,9 +6,8 @@
 #include "CounterDirectory.hpp"
 #include "ProfilingUtils.hpp"
 
-#include <armnn/Exceptions.hpp>
+#include <armnn/BackendId.hpp>
 #include <armnn/utility/Assert.hpp>
-#include <armnn/utility/IgnoreUnused.hpp>
 
 #include <common/include/SwTrace.hpp>
 
@@ -178,7 +177,7 @@
     return counterSetPtr;
 }
 
-const Counter* CounterDirectory::RegisterCounter(const armnn::BackendId& backendId,
+const Counter* CounterDirectory::RegisterCounter(const std::string& /*backendId*/,
                                                  const uint16_t uid,
                                                  const std::string& parentCategoryName,
                                                  uint16_t counterClass,
@@ -191,8 +190,6 @@
                                                  const armnn::Optional<uint16_t>& deviceUid,
                                                  const armnn::Optional<uint16_t>& counterSetUid)
 {
-    IgnoreUnused(backendId);
-
     // Check that the given parent category name is valid
     if (parentCategoryName.empty() ||
             !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceNameCharPolicy>(parentCategoryName))
diff --git a/src/profiling/CounterDirectory.hpp b/src/profiling/CounterDirectory.hpp
index ee9b52e..4438042 100644
--- a/src/profiling/CounterDirectory.hpp
+++ b/src/profiling/CounterDirectory.hpp
@@ -36,7 +36,7 @@
                                          uint16_t count = 0,
                                          const armnn::Optional<std::string>& parentCategoryName
                                             = armnn::EmptyOptional()) override;
-    const Counter* RegisterCounter(const armnn::BackendId& backendId,
+    const Counter* RegisterCounter(const std::string& backendId,
                                    const uint16_t uid,
                                    const std::string& parentCategoryName,
                                    uint16_t counterClass,
diff --git a/src/profiling/CounterIdMap.cpp b/src/profiling/CounterIdMap.cpp
index bb57570..bff8e06 100644
--- a/src/profiling/CounterIdMap.cpp
+++ b/src/profiling/CounterIdMap.cpp
@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: MIT
 //
 #include "CounterIdMap.hpp"
-#include "armnn/BackendId.hpp"
 #include <armnn/Exceptions.hpp>
 #include <map>
 
@@ -14,9 +13,9 @@
 
 void CounterIdMap::RegisterMapping(uint16_t globalCounterId,
                                    uint16_t backendCounterId,
-                                   const armnn::BackendId& backendId)
+                                   const std::string& backendId)
 {
-    std::pair<uint16_t, armnn::BackendId> backendIdPair(backendCounterId, backendId);
+    std::pair<uint16_t, std::string> backendIdPair(backendCounterId, backendId);
     m_GlobalCounterIdMap[globalCounterId] = backendIdPair;
     m_BackendCounterIdMap[backendIdPair] = globalCounterId;
 }
@@ -27,9 +26,9 @@
     m_BackendCounterIdMap.clear();
 }
 
-uint16_t CounterIdMap::GetGlobalId(uint16_t backendCounterId, const armnn::BackendId& backendId) const
+uint16_t CounterIdMap::GetGlobalId(uint16_t backendCounterId, const std::string& backendId) const
 {
-    std::pair<uint16_t, armnn::BackendId> backendIdPair(backendCounterId, backendId);
+    std::pair<uint16_t, std::string> backendIdPair(backendCounterId, backendId);
     auto it = m_BackendCounterIdMap.find(backendIdPair);
     if (it == m_BackendCounterIdMap.end())
     {
@@ -40,7 +39,7 @@
     return it->second;
 }
 
-const std::pair<uint16_t, armnn::BackendId>& CounterIdMap::GetBackendId(uint16_t globalCounterId) const
+const std::pair<uint16_t, std::string>& CounterIdMap::GetBackendId(uint16_t globalCounterId) const
 {
     auto it = m_GlobalCounterIdMap.find(globalCounterId);
     if (it == m_GlobalCounterIdMap.end())
diff --git a/src/profiling/CounterIdMap.hpp b/src/profiling/CounterIdMap.hpp
index 7a3c361..3895594 100644
--- a/src/profiling/CounterIdMap.hpp
+++ b/src/profiling/CounterIdMap.hpp
@@ -4,7 +4,6 @@
 //
 #pragma once
 
-#include "armnn/BackendId.hpp"
 #include <map>
 
 namespace arm
@@ -15,8 +14,8 @@
 class ICounterMappings
 {
 public:
-    virtual uint16_t GetGlobalId(uint16_t backendCounterId, const armnn::BackendId& backendId) const = 0;
-    virtual const std::pair<uint16_t, armnn::BackendId>& GetBackendId(uint16_t globalCounterId) const = 0;
+    virtual uint16_t GetGlobalId(uint16_t backendCounterId, const std::string& backendId) const = 0;
+    virtual const std::pair<uint16_t, std::string>& GetBackendId(uint16_t globalCounterId) const = 0;
     virtual ~ICounterMappings() {}
 };
 
@@ -25,7 +24,7 @@
 public:
     virtual void RegisterMapping(uint16_t globalCounterId,
                                  uint16_t backendCounterId,
-                                 const armnn::BackendId& backendId) = 0;
+                                 const std::string& backendId) = 0;
     virtual void Reset() = 0;
     virtual ~IRegisterCounterMapping() {}
 };
@@ -38,13 +37,13 @@
     virtual ~CounterIdMap() {}
     void RegisterMapping(uint16_t globalCounterId,
                          uint16_t backendCounterId,
-                         const armnn::BackendId& backendId) override;
+                         const std::string& backendId) override;
     void Reset() override;
-    uint16_t GetGlobalId(uint16_t backendCounterId, const armnn::BackendId& backendId) const override;
-    const std::pair<uint16_t, armnn::BackendId>& GetBackendId(uint16_t globalCounterId) const override;
+    uint16_t GetGlobalId(uint16_t backendCounterId, const std::string& backendId) const override;
+    const std::pair<uint16_t, std::string>& GetBackendId(uint16_t globalCounterId) const override;
 private:
-    std::map<uint16_t, std::pair<uint16_t, armnn::BackendId>> m_GlobalCounterIdMap;
-    std::map<std::pair<uint16_t, armnn::BackendId>, uint16_t> m_BackendCounterIdMap;
+    std::map<uint16_t, std::pair<uint16_t, std::string>> m_GlobalCounterIdMap;
+    std::map<std::pair<uint16_t, std::string>, uint16_t> m_BackendCounterIdMap;
 };
 
 }    // namespace pipe
diff --git a/src/profiling/Holder.cpp b/src/profiling/Holder.cpp
index 0660080..6517a24 100644
--- a/src/profiling/Holder.cpp
+++ b/src/profiling/Holder.cpp
@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: MIT
 //
 
-#include <armnn/BackendId.hpp>
 #include "Holder.hpp"
 
 namespace arm
@@ -21,7 +20,7 @@
     return *this;
 }
 
-void CaptureData::SetActiveBackends(const std::set<armnn::BackendId>& activeBackends)
+void CaptureData::SetActiveBackends(const std::set<std::string>& activeBackends)
 {
     m_ActiveBackends = activeBackends;
 }
@@ -36,7 +35,7 @@
     m_CounterIds = counterIds;
 }
 
-const std::set<armnn::BackendId>& CaptureData::GetActiveBackends() const
+const std::set<std::string>& CaptureData::GetActiveBackends() const
 {
     return m_ActiveBackends;
 }
@@ -73,7 +72,7 @@
 
 void Holder::SetCaptureData(uint32_t capturePeriod,
                             const std::vector<uint16_t>& counterIds,
-                            const std::set<armnn::BackendId>& activeBackends)
+                            const std::set<std::string>& activeBackends)
 {
     std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex);
 
diff --git a/src/profiling/Holder.hpp b/src/profiling/Holder.hpp
index 612f8dc..10d393f 100644
--- a/src/profiling/Holder.hpp
+++ b/src/profiling/Holder.hpp
@@ -23,7 +23,7 @@
         : m_CapturePeriod(0)
         , m_CounterIds()
         , m_ActiveBackends(){}
-    CaptureData(uint32_t capturePeriod, std::vector<uint16_t>& counterIds, std::set<armnn::BackendId> activeBackends)
+    CaptureData(uint32_t capturePeriod, std::vector<uint16_t>& counterIds, std::set<std::string> activeBackends)
         : m_CapturePeriod(capturePeriod)
         , m_CounterIds(counterIds)
         , m_ActiveBackends(activeBackends){}
@@ -34,18 +34,18 @@
 
     CaptureData& operator=(const CaptureData& other);
 
-    void SetActiveBackends(const std::set<armnn::BackendId>& activeBackends);
+    void SetActiveBackends(const std::set<std::string>& activeBackends);
     void SetCapturePeriod(uint32_t capturePeriod);
     void SetCounterIds(const std::vector<uint16_t>& counterIds);
     uint32_t GetCapturePeriod() const;
     const std::vector<uint16_t>& GetCounterIds() const;
-    const std::set<armnn::BackendId>& GetActiveBackends() const;
+    const std::set<std::string>& GetActiveBackends() const;
     bool IsCounterIdInCaptureData(uint16_t counterId);
 
 private:
     uint32_t m_CapturePeriod;
     std::vector<uint16_t> m_CounterIds;
-    std::set<armnn::BackendId> m_ActiveBackends;
+    std::set<std::string> m_ActiveBackends;
 };
 
 class Holder
@@ -56,7 +56,7 @@
     CaptureData GetCaptureData() const;
     void SetCaptureData(uint32_t capturePeriod,
                         const std::vector<uint16_t>& counterIds,
-                        const std::set<armnn::BackendId>& activeBackends);
+                        const std::set<std::string>& activeBackends);
 
 private:
     mutable std::mutex m_CaptureThreadMutex;
diff --git a/src/profiling/ICounterDirectory.hpp b/src/profiling/ICounterDirectory.hpp
index f902f91..b6b513a 100644
--- a/src/profiling/ICounterDirectory.hpp
+++ b/src/profiling/ICounterDirectory.hpp
@@ -5,7 +5,6 @@
 
 #pragma once
 
-#include <armnn/BackendId.hpp>
 
 #include <string>
 #include <vector>
@@ -94,7 +93,7 @@
 {
 public:
     // Constructors
-    Counter(armnn::BackendId   backendId,
+    Counter(const std::string& backendId,
             uint16_t           counterUid,
             uint16_t           maxCounterUid,
             uint16_t           counterClass,
@@ -119,7 +118,7 @@
     {}
 
     // Fields
-    armnn::BackendId   m_BackendId;
+    std::string m_BackendId;
     uint16_t    m_Uid;
     uint16_t    m_MaxCounterUid;
     uint16_t    m_Class;
diff --git a/src/profiling/ICounterRegistry.hpp b/src/profiling/ICounterRegistry.hpp
index 1d257b8..9e04f60 100644
--- a/src/profiling/ICounterRegistry.hpp
+++ b/src/profiling/ICounterRegistry.hpp
@@ -6,7 +6,6 @@
 #pragma once
 
 #include <armnn/Optional.hpp>
-#include <armnn/BackendId.hpp>
 
 namespace arm
 {
@@ -30,7 +29,7 @@
                                                  uint16_t count,
                                                  const armnn::Optional<std::string>& parentCategoryName) = 0;
 
-    virtual const Counter* RegisterCounter(const armnn::BackendId& backendId,
+    virtual const Counter* RegisterCounter(const std::string& backendId,
                                            const uint16_t uid,
                                            const std::string& parentCategoryName,
                                            uint16_t counterClass,
diff --git a/src/profiling/IProfilingService.hpp b/src/profiling/IProfilingService.hpp
index 31d9b8d..b919522 100644
--- a/src/profiling/IProfilingService.hpp
+++ b/src/profiling/IProfilingService.hpp
@@ -46,7 +46,7 @@
     virtual ProfilingState ConfigureProfilingService(const ProfilingOptions& options,
                                                      bool resetProfilingService = false) = 0;
     // Store a profiling context returned from a backend that support profiling.
-    virtual void AddBackendProfilingContext(const armnn::BackendId backendId,
+    virtual void AddBackendProfilingContext(const std::string& backendId,
         std::shared_ptr<IBackendProfilingContext> profilingContext) = 0;
     virtual ICounterRegistry& GetCounterRegistry() = 0;
     virtual IRegisterCounterMapping& GetCounterMappingRegistry() = 0;
diff --git a/src/profiling/PeriodicCounterCapture.cpp b/src/profiling/PeriodicCounterCapture.cpp
index 11ad651..dd6d394 100644
--- a/src/profiling/PeriodicCounterCapture.cpp
+++ b/src/profiling/PeriodicCounterCapture.cpp
@@ -56,7 +56,7 @@
 }
 
 void PeriodicCounterCapture::DispatchPeriodicCounterCapturePacket(
-    const armnn::BackendId& backendId, const std::vector<Timestamp>& timestampValues)
+    const std::string& backendId, const std::vector<Timestamp>& timestampValues)
 {
     // Report counter values
     for (const auto& timestampInfo : timestampValues)
@@ -122,7 +122,7 @@
 
         // Report counter values for each active backend
         auto activeBackends = currentCaptureData.GetActiveBackends();
-        for_each(activeBackends.begin(), activeBackends.end(), [&](const armnn::BackendId& backendId)
+        for_each(activeBackends.begin(), activeBackends.end(), [&](const std::string& backendId)
         {
             DispatchPeriodicCounterCapturePacket(
                 backendId, m_BackendProfilingContexts.at(backendId)->ReportCounterValues());
diff --git a/src/profiling/PeriodicCounterCapture.hpp b/src/profiling/PeriodicCounterCapture.hpp
index c442f42..9a678a8 100644
--- a/src/profiling/PeriodicCounterCapture.hpp
+++ b/src/profiling/PeriodicCounterCapture.hpp
@@ -32,8 +32,8 @@
                            ISendCounterPacket& packet,
                            IReadCounterValues& readCounterValue,
                            const ICounterMappings& counterIdMap,
-                           const std::unordered_map<armnn::BackendId,
-                           std::shared_ptr<IBackendProfilingContext>>& backendProfilingContexts)
+                           const std::unordered_map<std::string,
+                               std::shared_ptr<IBackendProfilingContext>>& backendProfilingContexts)
             : m_CaptureDataHolder(data)
             , m_IsRunning(false)
             , m_KeepRunning(false)
@@ -52,7 +52,7 @@
     CaptureData ReadCaptureData();
     void Capture(IReadCounterValues& readCounterValues);
     void DispatchPeriodicCounterCapturePacket(
-            const armnn::BackendId& backendId, const std::vector<Timestamp>& timestampValues);
+            const std::string& backendId, const std::vector<Timestamp>& timestampValues);
 
     const Holder&             m_CaptureDataHolder;
     bool                      m_IsRunning;
@@ -61,7 +61,7 @@
     IReadCounterValues&       m_ReadCounterValues;
     ISendCounterPacket&       m_SendCounterPacket;
     const ICounterMappings&   m_CounterIdMap;
-    const std::unordered_map<armnn::BackendId,
+    const std::unordered_map<std::string,
             std::shared_ptr<IBackendProfilingContext>>& m_BackendProfilingContexts;
 };
 
diff --git a/src/profiling/PeriodicCounterSelectionCommandHandler.cpp b/src/profiling/PeriodicCounterSelectionCommandHandler.cpp
index ae2aa0b9..49928bf 100644
--- a/src/profiling/PeriodicCounterSelectionCommandHandler.cpp
+++ b/src/profiling/PeriodicCounterSelectionCommandHandler.cpp
@@ -113,7 +113,7 @@
             return counterId > m_MaxArmCounterId;
         });
 
-        std::set<armnn::BackendId> activeBackends;
+        std::set<std::string> activeBackends;
         std::set<uint16_t> backendCounterIds = std::set<uint16_t>(backendIdStart, validCounterIds.end());
 
         if (m_BackendCounterMap.size() != 0)
@@ -166,13 +166,13 @@
     }
 }
 
-std::set<armnn::BackendId> PeriodicCounterSelectionCommandHandler::ProcessBackendCounterIds(
+std::set<std::string> PeriodicCounterSelectionCommandHandler::ProcessBackendCounterIds(
                                                                       const uint32_t capturePeriod,
                                                                       const std::set<uint16_t> newCounterIds,
                                                                       const std::set<uint16_t> unusedCounterIds)
 {
-    std::set<armnn::BackendId> changedBackends;
-    std::set<armnn::BackendId> activeBackends = m_CaptureDataHolder.GetCaptureData().GetActiveBackends();
+    std::set<std::string> changedBackends;
+    std::set<std::string> activeBackends = m_CaptureDataHolder.GetCaptureData().GetActiveBackends();
 
     for (uint16_t counterId : newCounterIds)
     {
@@ -195,7 +195,7 @@
             // If a backend has no counters associated with it we remove it from active backends and
             // send a capture period of zero with an empty vector, this will deactivate all the backends counters
             activeBackends.erase(backendId.second);
-            ActivateBackedCounters(backendId.second, 0, {});
+            ActivateBackendCounters(backendId.second, 0, {});
         }
         else
         {
@@ -208,7 +208,7 @@
     {
         for (auto backend : changedBackends)
         {
-            ActivateBackedCounters(backend, capturePeriod, m_BackendCounterMap[backend]);
+            ActivateBackendCounters(backend, capturePeriod, m_BackendCounterMap[backend]);
         }
     }
     // Otherwise update all the backends with the new capture period and any new/unused counters
@@ -216,7 +216,7 @@
     {
         for (auto backend : m_BackendCounterMap)
         {
-            ActivateBackedCounters(backend.first, capturePeriod, backend.second);
+            ActivateBackendCounters(backend.first, capturePeriod, backend.second);
         }
         if(capturePeriod == 0)
         {
diff --git a/src/profiling/PeriodicCounterSelectionCommandHandler.hpp b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
index e8cdf0e..4d94ba1 100644
--- a/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
+++ b/src/profiling/PeriodicCounterSelectionCommandHandler.hpp
@@ -35,7 +35,7 @@
     PeriodicCounterSelectionCommandHandler(uint32_t familyId,
                                            uint32_t packetId,
                                            uint32_t version,
-                                           const std::unordered_map<armnn::BackendId,
+                                           const std::unordered_map<std::string,
                                                    std::shared_ptr<IBackendProfilingContext>>&
                                                    backendProfilingContexts,
                                            const ICounterMappings& counterIdMap,
@@ -64,8 +64,8 @@
 
 private:
 
-    std::unordered_map<armnn::BackendId, std::vector<uint16_t>> m_BackendCounterMap;
-    const std::unordered_map<armnn::BackendId,
+    std::unordered_map<std::string, std::vector<uint16_t>> m_BackendCounterMap;
+    const std::unordered_map<std::string,
           std::shared_ptr<IBackendProfilingContext>>& m_BackendProfilingContexts;
     const ICounterMappings& m_CounterIdMap;
     Holder& m_CaptureDataHolder;
@@ -77,9 +77,9 @@
     ISendCounterPacket& m_SendCounterPacket;
     const ProfilingStateMachine& m_StateMachine;
 
-    void ActivateBackedCounters(const armnn::BackendId backendId,
-                                const uint32_t capturePeriod,
-                                const std::vector<uint16_t> counterIds)
+    void ActivateBackendCounters(const std::string backendId,
+                                 const uint32_t capturePeriod,
+                                 const std::vector<uint16_t> counterIds)
     {
         armnn::Optional<std::string> errorMsg =
                 m_BackendProfilingContexts.at(backendId)->ActivateCounters(capturePeriod, counterIds);
@@ -91,7 +91,7 @@
         }
     }
     void ParseData(const arm::pipe::Packet& packet, CaptureData& captureData);
-    std::set<armnn::BackendId> ProcessBackendCounterIds(const uint32_t capturePeriod,
+    std::set<std::string> ProcessBackendCounterIds(const uint32_t capturePeriod,
                                                         const std::set<uint16_t> newCounterIds,
                                                         const std::set<uint16_t> unusedCounterIds);
 
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp
index 2e67dc8..eba70e1 100644
--- a/src/profiling/ProfilingService.cpp
+++ b/src/profiling/ProfilingService.cpp
@@ -5,7 +5,6 @@
 
 #include "ProfilingService.hpp"
 
-#include <armnn/BackendId.hpp>
 #include <armnn/Logging.hpp>
 #include <armnn/utility/NumericCast.hpp>
 
@@ -194,7 +193,7 @@
 }
 
 // Store a profiling context returned from a backend that support profiling, and register its counters
-void ProfilingService::AddBackendProfilingContext(const armnn::BackendId backendId,
+void ProfilingService::AddBackendProfilingContext(const std::string& backendId,
     std::shared_ptr<IBackendProfilingContext> profilingContext)
 {
     ARMNN_ASSERT(profilingContext != nullptr);
@@ -262,7 +261,7 @@
 
 void ProfilingService::SetCaptureData(uint32_t capturePeriod,
                                       const std::vector<uint16_t>& counterIds,
-                                      const std::set<armnn::BackendId>& activeBackends)
+                                      const std::set<std::string>& activeBackends)
 {
     m_Holder.SetCaptureData(capturePeriod, counterIds, activeBackends);
 }
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index a4b02c1..7919c30 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -47,7 +47,7 @@
     using IProfilingConnectionPtr = std::unique_ptr<IProfilingConnection>;
     using CounterIndices = std::vector<std::atomic<uint32_t>*>;
     using CounterValues = std::list<std::atomic<uint32_t>>;
-    using BackendProfilingContext = std::unordered_map<armnn::BackendId,
+    using BackendProfilingContext = std::unordered_map<std::string,
                                                        std::shared_ptr<IBackendProfilingContext>>;
 
     ProfilingService(armnn::Optional<IReportStructure&> reportStructure = armnn::EmptyOptional())
@@ -154,7 +154,7 @@
     void Disconnect();
 
     // Store a profiling context returned from a backend that support profiling.
-    void AddBackendProfilingContext(const armnn::BackendId backendId,
+    void AddBackendProfilingContext(const std::string& backendId,
         std::shared_ptr<IBackendProfilingContext> profilingContext) override;
 
     // Enable the recording of timeline events and entities
@@ -177,7 +177,7 @@
     CaptureData GetCaptureData() override;
     void SetCaptureData(uint32_t capturePeriod,
                         const std::vector<uint16_t>& counterIds,
-                        const std::set<armnn::BackendId>& activeBackends);
+                        const std::set<std::string>& activeBackends);
 
     // Setters for the profiling service state
     void SetCounterValue(uint16_t counterUid, uint32_t value) override;
diff --git a/src/profiling/RegisterBackendCounters.hpp b/src/profiling/RegisterBackendCounters.hpp
index 34f9f3a..88234df 100644
--- a/src/profiling/RegisterBackendCounters.hpp
+++ b/src/profiling/RegisterBackendCounters.hpp
@@ -21,7 +21,7 @@
 public:
 
     RegisterBackendCounters(
-        uint16_t currentMaxGlobalCounterID, const armnn::BackendId& backendId, IProfilingService& profilingService)
+        uint16_t currentMaxGlobalCounterID, const std::string& backendId, IProfilingService& profilingService)
         : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID),
           m_BackendId(backendId),
           m_ProfilingService(profilingService),
@@ -54,7 +54,7 @@
 
 private:
     uint16_t m_CurrentMaxGlobalCounterID;
-    const armnn::BackendId& m_BackendId;
+    const std::string& m_BackendId;
     IProfilingService& m_ProfilingService;
     ICounterRegistry& m_CounterDirectory;
 };
diff --git a/src/profiling/backends/BackendProfiling.cpp b/src/profiling/backends/BackendProfiling.cpp
index 6c0f9b1..e29316ee 100644
--- a/src/profiling/backends/BackendProfiling.cpp
+++ b/src/profiling/backends/BackendProfiling.cpp
@@ -73,7 +73,7 @@
 
     for (auto globalCounterId : globalCounterIds) {
         // Get pair of local counterId and backendId using globalCounterId
-        const std::pair<uint16_t, armnn::BackendId>& backendCounterIdPair =
+        const std::pair<uint16_t, std::string>& backendCounterIdPair =
                 m_ProfilingService.GetCounterMappings().GetBackendId(globalCounterId);
         if (backendCounterIdPair.second == m_BackendId)
         {
diff --git a/src/profiling/backends/BackendProfiling.hpp b/src/profiling/backends/BackendProfiling.hpp
index 545234d..bedda5d 100644
--- a/src/profiling/backends/BackendProfiling.hpp
+++ b/src/profiling/backends/BackendProfiling.hpp
@@ -19,7 +19,7 @@
 public:
     BackendProfiling(const ProfilingOptions& options,
                      IProfilingService& profilingService,
-                     const armnn::BackendId& backendId)
+                     const std::string& backendId)
             : m_Options(options),
               m_ProfilingService(profilingService),
               m_BackendId(backendId) {}
@@ -45,7 +45,7 @@
 private:
     ProfilingOptions m_Options;
     IProfilingService& m_ProfilingService;
-    armnn::BackendId m_BackendId;
+    std::string m_BackendId;
 };
 
 }    // namespace pipe
diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp
index 5e7d31a..9314503 100644
--- a/src/profiling/test/ProfilingMocks.hpp
+++ b/src/profiling/test/ProfilingMocks.hpp
@@ -505,7 +505,7 @@
         return counterSetPtr;
     }
 
-    const Counter* RegisterCounter(const armnn::BackendId& backendId,
+    const Counter* RegisterCounter(const std::string& backendId,
                                    const uint16_t uid,
                                    const std::string& parentCategoryName,
                                    uint16_t counterClass,
@@ -676,7 +676,7 @@
 
     void RegisterMapping(uint16_t globalCounterId,
                          uint16_t backendCounterId,
-                         const armnn::BackendId& backendId)
+                         const std::string& backendId)
     {
         m_CounterMapping.RegisterMapping(globalCounterId, backendCounterId, backendId);
     }
diff --git a/src/profiling/test/ProfilingTestUtils.hpp b/src/profiling/test/ProfilingTestUtils.hpp
index 16c6dde..32a156e 100644
--- a/src/profiling/test/ProfilingTestUtils.hpp
+++ b/src/profiling/test/ProfilingTestUtils.hpp
@@ -8,7 +8,6 @@
 #include "ProfilingUtils.hpp"
 #include "Runtime.hpp"
 
-#include <armnn/BackendId.hpp>
 #include <armnn/Optional.hpp>
 #include <BufferManager.hpp>
 #include <ProfilingService.hpp>
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index cba6ebd..0a98af2 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -1786,7 +1786,7 @@
     const uint32_t packetId = 0x40000;
 
     uint32_t version = 1;
-    const std::unordered_map<armnn::BackendId,
+    const std::unordered_map<std::string,
             std::shared_ptr<IBackendProfilingContext>> backendProfilingContext;
     CounterIdMap counterIdMap;
     Holder holder;
@@ -2342,7 +2342,7 @@
 
     ProfilingStateMachine profilingStateMachine;
 
-    const std::unordered_map<armnn::BackendId,
+    const std::unordered_map<std::string,
             std::shared_ptr<IBackendProfilingContext>> backendProfilingContext;
     CounterIdMap counterIdMap;
     Holder data;
@@ -3382,8 +3382,8 @@
 
     uint16_t globalCounterIds = 0;
 
-    armnn::BackendId cpuRefId(armnn::Compute::CpuRef);
-    armnn::BackendId cpuAccId(armnn::Compute::CpuAcc);
+    std::string cpuRefId(GetComputeDeviceAsCString(armnn::Compute::CpuRef));
+    std::string cpuAccId(GetComputeDeviceAsCString(armnn::Compute::CpuAcc));
 
     std::vector<uint16_t> cpuRefCounters = {0, 1, 2, 3};
     std::vector<uint16_t> cpuAccCounters = {0, 1};
@@ -3399,12 +3399,12 @@
         ++globalCounterIds;
     }
 
-    CHECK(counterIdMap.GetBackendId(0) == (std::pair<uint16_t, armnn::BackendId>(0, cpuRefId)));
-    CHECK(counterIdMap.GetBackendId(1) == (std::pair<uint16_t, armnn::BackendId>(1, cpuRefId)));
-    CHECK(counterIdMap.GetBackendId(2) == (std::pair<uint16_t, armnn::BackendId>(2, cpuRefId)));
-    CHECK(counterIdMap.GetBackendId(3) == (std::pair<uint16_t, armnn::BackendId>(3, cpuRefId)));
-    CHECK(counterIdMap.GetBackendId(4) == (std::pair<uint16_t, armnn::BackendId>(0, cpuAccId)));
-    CHECK(counterIdMap.GetBackendId(5) == (std::pair<uint16_t, armnn::BackendId>(1, cpuAccId)));
+    CHECK(counterIdMap.GetBackendId(0) == (std::pair<uint16_t, std::string>(0, cpuRefId)));
+    CHECK(counterIdMap.GetBackendId(1) == (std::pair<uint16_t, std::string>(1, cpuRefId)));
+    CHECK(counterIdMap.GetBackendId(2) == (std::pair<uint16_t, std::string>(2, cpuRefId)));
+    CHECK(counterIdMap.GetBackendId(3) == (std::pair<uint16_t, std::string>(3, cpuRefId)));
+    CHECK(counterIdMap.GetBackendId(4) == (std::pair<uint16_t, std::string>(0, cpuAccId)));
+    CHECK(counterIdMap.GetBackendId(5) == (std::pair<uint16_t, std::string>(1, cpuAccId)));
 
     CHECK(counterIdMap.GetGlobalId(0, cpuRefId) == 0);
     CHECK(counterIdMap.GetGlobalId(1, cpuRefId) == 1);
@@ -3417,7 +3417,7 @@
 TEST_CASE("CheckRegisterBackendCounters")
 {
     uint16_t globalCounterIds = INFERENCES_RUN;
-    armnn::BackendId cpuRefId(armnn::Compute::CpuRef);
+    std::string cpuRefId(GetComputeDeviceAsCString(armnn::Compute::CpuRef));
 
     // Reset the profiling service to the uninitialized state
     ProfilingOptions options;
@@ -3474,8 +3474,8 @@
     ProfilingService profilingService;
     profilingService.ResetExternalProfilingOptions(options, true);
 
-    const armnn::BackendId cpuRefId(armnn::Compute::CpuRef);
-    const armnn::BackendId cpuAccId(armnn::Compute::CpuAcc);
+    const std::string cpuRefId(GetComputeDeviceAsCString(armnn::Compute::CpuRef));
+    const std::string cpuAccId(GetComputeDeviceAsCString(armnn::Compute::CpuAcc));
 
     // Create BackendProfiling for each backend
     BackendProfiling backendProfilingCpuRef(options, profilingService, cpuRefId);
@@ -3610,7 +3610,7 @@
 
     CaptureData captureData;
     MockProfilingService mockProfilingService(mockBuffer, options.m_EnableProfiling, captureData);
-    armnn::BackendId cpuRefId(armnn::Compute::CpuRef);
+    std::string cpuRefId(GetComputeDeviceAsCString(armnn::Compute::CpuRef));
 
     mockProfilingService.RegisterMapping(6, 0, cpuRefId);
     mockProfilingService.RegisterMapping(7, 1, cpuRefId);