aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2022-02-25 15:33:28 +0000
committerCathal Corbett <cathal.corbett@arm.com>2022-03-01 11:44:14 +0000
commit5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab (patch)
tree23a3a0d5ca5143924277f34c98d36cf7b99430a7 /include
parent1fc448ad2455ad31b96a3891f847125a3295d75a (diff)
downloadarmnn-5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab.tar.gz
IVGCVSW-6704 Change the namespace from armnn::profiling to arm::pipe
* Updated ABI version to 29 due to being the first ABI break in 22.05 !android-nn-driver:7226 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36
Diffstat (limited to 'include')
-rw-r--r--include/armnn/BackendId.hpp5
-rw-r--r--include/armnn/BackendRegistry.hpp18
-rw-r--r--include/armnn/INetwork.hpp2
-rw-r--r--include/armnn/IProfiler.hpp6
-rw-r--r--include/armnn/IRuntime.hpp2
-rw-r--r--include/armnn/Types.hpp18
-rw-r--r--include/armnn/Version.hpp2
-rw-r--r--include/armnn/backends/IBackendInternal.hpp4
-rw-r--r--include/armnn/backends/IWorkload.hpp2
-rw-r--r--include/armnn/backends/Workload.hpp6
-rw-r--r--include/armnn/backends/profiling/IBackendProfiling.hpp22
-rw-r--r--include/armnn/backends/profiling/IBackendProfilingContext.hpp11
-rw-r--r--include/armnn/profiling/ILocalPacketHandler.hpp24
-rw-r--r--include/armnn/profiling/ISendTimelinePacket.hpp8
-rw-r--r--include/armnn/profiling/ProfilingOptions.hpp14
15 files changed, 70 insertions, 74 deletions
diff --git a/include/armnn/BackendId.hpp b/include/armnn/BackendId.hpp
index 5849dea8fb..45e2ca8d86 100644
--- a/include/armnn/BackendId.hpp
+++ b/include/armnn/BackendId.hpp
@@ -169,8 +169,8 @@ namespace armnn
namespace profiling
{
- // Static constant describing ArmNN as a dummy backend
- static const BackendId BACKEND_ID("ARMNN");
+// Static constant describing ArmNN as a dummy backend
+static const BackendId BACKEND_ID("ARMNN");
} // profiling
inline std::ostream& operator<<(std::ostream& os, const BackendId& id)
@@ -193,4 +193,3 @@ using BackendIdVector = std::vector<BackendId>;
using BackendIdSet = std::unordered_set<BackendId>;
} // namespace armnn
-
diff --git a/include/armnn/BackendRegistry.hpp b/include/armnn/BackendRegistry.hpp
index 0d09607de2..08e164c549 100644
--- a/include/armnn/BackendRegistry.hpp
+++ b/include/armnn/BackendRegistry.hpp
@@ -15,13 +15,19 @@
#include <unordered_map>
#include <functional>
-namespace armnn
+namespace arm
+{
+namespace pipe
{
-namespace profiling
+class ProfilingService;
+
+} // namespace arm
+} // namespace pipe
+
+namespace armnn
{
- class ProfilingService;
-}
+
class IBackendInternal;
using IBackendInternalUniquePtr = std::unique_ptr<IBackendInternal>;
using MemoryOptimizerStrategiesMapRef = std::unordered_map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>>;
@@ -38,7 +44,7 @@ public:
size_t Size() const;
BackendIdSet GetBackendIds() const;
std::string GetBackendIdsAsString() const;
- void SetProfilingService(armnn::Optional<profiling::ProfilingService&> profilingService);
+ void SetProfilingService(armnn::Optional<arm::pipe::ProfilingService&> profilingService);
void RegisterAllocator(const BackendId& id, std::shared_ptr<ICustomAllocator> alloc);
std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> GetAllocators();
void RegisterMemoryOptimizerStrategy(const BackendId& id, std::shared_ptr<IMemoryOptimizerStrategy> strategy);
@@ -72,7 +78,7 @@ private:
BackendRegistry& operator=(const BackendRegistry&) = delete;
FactoryStorage m_Factories;
- armnn::Optional<profiling::ProfilingService&> m_ProfilingService;
+ armnn::Optional<arm::pipe::ProfilingService&> m_ProfilingService;
std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomMemoryAllocatorMap;
std::unordered_map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>> m_MemoryOptimizerStrategyMap;
};
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 173e8d548a..d962fe715b 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -783,7 +783,7 @@ public:
Status PrintGraph();
Status SerializeToDot(std::ostream& stream) const;
- profiling::ProfilingGuid GetGuid() const;
+ arm::pipe::ProfilingGuid GetGuid() const;
size_t GetNumInputs() const;
size_t GetNumOutputs() const;
diff --git a/include/armnn/IProfiler.hpp b/include/armnn/IProfiler.hpp
index 1b450d0151..209777671b 100644
--- a/include/armnn/IProfiler.hpp
+++ b/include/armnn/IProfiler.hpp
@@ -54,12 +54,12 @@ private:
void AddLayerDetails(const std::string& name,
const DescriptorType& desc,
const WorkloadInfo& infos,
- const profiling::ProfilingGuid guid);
+ const arm::pipe::ProfilingGuid guid);
Event* BeginEvent(const BackendId& backendId,
const std::string& label,
std::vector<InstrumentPtr>&& instruments,
- const Optional<profiling::ProfilingGuid>& guid);
+ const Optional<arm::pipe::ProfilingGuid>& guid);
std::unique_ptr<ProfilerImpl> pProfilerImpl;
@@ -69,7 +69,7 @@ private:
friend inline void ProfilingUpdateDescriptions(const std::string& name,
const DescriptorType& desc,
const WorkloadInfo& infos,
- const profiling::ProfilingGuid guid);
+ const arm::pipe::ProfilingGuid guid);
// Friend functions for unit testing, see ProfilerTests.cpp.
friend size_t GetProfilerEventSequenceSize(armnn::IProfiler* profiler);
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index 042271fc2b..debb2d6896 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -146,7 +146,7 @@ public:
uint32_t m_CapturePeriod;
/// The format of the file used for outputting profiling data.
std::string m_FileFormat;
- std::vector<armnn::profiling::ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
+ std::vector<arm::pipe::ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
};
ExternalProfilingOptions m_ProfilingOptions;
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index 880a6dd816..a804f55468 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -12,6 +12,19 @@
#include "Exceptions.hpp"
#include "Deprecated.hpp"
+namespace arm
+{
+namespace pipe
+{
+
+class ProfilingGuid;
+
+} // namespace armn
+} // namespace pipe
+
+/// Define LayerGuid type.
+using LayerGuid = arm::pipe::ProfilingGuid;
+
namespace armnn
{
@@ -357,11 +370,6 @@ private:
SizeType m_NumDimMappings;
};
-namespace profiling { class ProfilingGuid; }
-
-/// Define LayerGuid type.
-using LayerGuid = profiling::ProfilingGuid;
-
class ITensorHandle;
/// Define the type of callback for the Debug layer to call
diff --git a/include/armnn/Version.hpp b/include/armnn/Version.hpp
index 7e172246e3..d41c4ec8af 100644
--- a/include/armnn/Version.hpp
+++ b/include/armnn/Version.hpp
@@ -10,7 +10,7 @@
#define STRINGIFY_MACRO(s) #s
// ArmNN version components
-#define ARMNN_MAJOR_VERSION 28
+#define ARMNN_MAJOR_VERSION 29
#define ARMNN_MINOR_VERSION 0
#define ARMNN_PATCH_VERSION 0
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp
index c64150a484..06fa5edde8 100644
--- a/include/armnn/backends/IBackendInternal.hpp
+++ b/include/armnn/backends/IBackendInternal.hpp
@@ -86,8 +86,8 @@ public:
using IWorkloadFactoryPtr = std::unique_ptr<IWorkloadFactory>;
using IBackendContextPtr = std::unique_ptr<IBackendContext>;
/// This is the bridge between backend and backend profiling we'll keep it in the backend namespace.
- using IBackendProfilingContextPtr = std::shared_ptr<armnn::profiling::IBackendProfilingContext>;
- using IBackendProfilingPtr = std::unique_ptr<armnn::profiling::IBackendProfiling>;
+ using IBackendProfilingContextPtr = std::shared_ptr<arm::pipe::IBackendProfilingContext>;
+ using IBackendProfilingPtr = std::unique_ptr<arm::pipe::IBackendProfiling>;
using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
using IBackendSpecificModelContextPtr = std::shared_ptr<IBackendModelContext>;
diff --git a/include/armnn/backends/IWorkload.hpp b/include/armnn/backends/IWorkload.hpp
index ce3914bc5a..20be01658e 100644
--- a/include/armnn/backends/IWorkload.hpp
+++ b/include/armnn/backends/IWorkload.hpp
@@ -29,7 +29,7 @@ public:
virtual void ExecuteAsync(WorkingMemDescriptor& desc) = 0;
- virtual profiling::ProfilingGuid GetGuid() const = 0;
+ virtual arm::pipe::ProfilingGuid GetGuid() const = 0;
// SupportsTensorHandleReplacement signals that a given workload is capable of
// replacing any of its I/O tensors via ReplaceInput/OutputTensorHandle
diff --git a/include/armnn/backends/Workload.hpp b/include/armnn/backends/Workload.hpp
index 21109480dc..ddcc5a8f0a 100644
--- a/include/armnn/backends/Workload.hpp
+++ b/include/armnn/backends/Workload.hpp
@@ -32,7 +32,7 @@ public:
BaseWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info)
: m_Data(descriptor),
- m_Guid(profiling::ProfilingService::GetNextGuid())
+ m_Guid(arm::pipe::ProfilingService::GetNextGuid())
{
m_Data.Validate(info);
}
@@ -52,7 +52,7 @@ public:
const QueueDescriptor& GetData() const { return m_Data; }
- profiling::ProfilingGuid GetGuid() const final { return m_Guid; }
+ arm::pipe::ProfilingGuid GetGuid() const final { return m_Guid; }
virtual bool SupportsTensorHandleReplacement() const override
{
@@ -75,7 +75,7 @@ public:
protected:
QueueDescriptor m_Data;
- const profiling::ProfilingGuid m_Guid;
+ const arm::pipe::ProfilingGuid m_Guid;
private:
std::mutex m_AsyncWorkloadMutex;
diff --git a/include/armnn/backends/profiling/IBackendProfiling.hpp b/include/armnn/backends/profiling/IBackendProfiling.hpp
index beb7755741..a04f3c1b99 100644
--- a/include/armnn/backends/profiling/IBackendProfiling.hpp
+++ b/include/armnn/backends/profiling/IBackendProfiling.hpp
@@ -12,10 +12,10 @@
#include <memory>
#include <vector>
-namespace armnn
+namespace arm
{
-namespace profiling
+namespace pipe
{
struct CounterValue
@@ -55,11 +55,13 @@ public:
virtual uint16_t RegisterDevice(const std::string& deviceName,
uint16_t cores = 0,
- const Optional<std::string>& parentCategoryName = EmptyOptional()) = 0;
+ const armnn::Optional<std::string>& parentCategoryName
+ = armnn::EmptyOptional()) = 0;
virtual uint16_t RegisterCounterSet(const std::string& counterSetName,
uint16_t count = 0,
- const Optional<std::string>& parentCategoryName = EmptyOptional()) = 0;
+ const armnn::Optional<std::string>& parentCategoryName
+ = armnn::EmptyOptional()) = 0;
virtual uint16_t RegisterCounter(const uint16_t uid,
const std::string& parentCategoryName,
@@ -68,10 +70,10 @@ public:
double multiplier,
const std::string& name,
const std::string& description,
- const Optional<std::string>& units = EmptyOptional(),
- const Optional<uint16_t>& numberOfCores = EmptyOptional(),
- const Optional<uint16_t>& deviceUid = EmptyOptional(),
- const Optional<uint16_t>& counterSetUid = EmptyOptional()) = 0;
+ const armnn::Optional<std::string>& units = armnn::EmptyOptional(),
+ const armnn::Optional<uint16_t>& numberOfCores = armnn::EmptyOptional(),
+ const armnn::Optional<uint16_t>& deviceUid = armnn::EmptyOptional(),
+ const armnn::Optional<uint16_t>& counterSetUid = armnn::EmptyOptional()) = 0;
virtual ~IRegisterBackendCounters() {}
};
@@ -99,6 +101,6 @@ public:
};
-} // namespace profiling
+} // namespace pipe
-} // namespace armnn \ No newline at end of file
+} // namespace arm \ No newline at end of file
diff --git a/include/armnn/backends/profiling/IBackendProfilingContext.hpp b/include/armnn/backends/profiling/IBackendProfilingContext.hpp
index 77959e959b..2e3df48227 100644
--- a/include/armnn/backends/profiling/IBackendProfilingContext.hpp
+++ b/include/armnn/backends/profiling/IBackendProfilingContext.hpp
@@ -8,9 +8,9 @@
#include <armnn/IRuntime.hpp>
#include <vector>
-namespace armnn
+namespace arm
{
-namespace profiling
+namespace pipe
{
class IBackendProfilingContext
@@ -19,12 +19,13 @@ public:
virtual ~IBackendProfilingContext()
{}
virtual uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterID) = 0;
- virtual Optional<std::string> ActivateCounters(uint32_t capturePeriod, const std::vector<uint16_t>& counterIds) = 0;
+ virtual armnn::Optional<std::string> ActivateCounters(uint32_t capturePeriod, const std::vector<uint16_t>&
+ counterIds) = 0;
virtual std::vector<Timestamp> ReportCounterValues() = 0;
virtual bool EnableProfiling(bool flag) = 0;
virtual bool EnableTimelineReporting(bool flag) = 0;
};
using IBackendProfilingContextUniquePtr = std::unique_ptr<IBackendProfilingContext>;
-} // namespace profiling
-} // namespace armnn \ No newline at end of file
+} // namespace pipe
+} // namespace arm \ No newline at end of file
diff --git a/include/armnn/profiling/ILocalPacketHandler.hpp b/include/armnn/profiling/ILocalPacketHandler.hpp
index af1b0f88b8..bf7bdbc5c4 100644
--- a/include/armnn/profiling/ILocalPacketHandler.hpp
+++ b/include/armnn/profiling/ILocalPacketHandler.hpp
@@ -7,6 +7,7 @@
#include <armnn/utility/IgnoreUnused.hpp>
+#include "../../../profiling/common/include/TargetEndianess.hpp"
#include <cstdint>
#include <memory>
@@ -17,21 +18,8 @@ namespace arm
{
namespace pipe
{
- class Packet;
-} // namespace pipe
-} // namespace arm
-
-namespace armnn
-{
-
-namespace profiling
-{
-enum class TargetEndianness
-{
- BeWire,
- LeWire
-};
+class Packet;
// the handlers need to be able to do two
// things to service the FileOnlyProfilingConnection
@@ -45,7 +33,7 @@ public:
virtual void SetEndianess(const TargetEndianness& endianness) = 0;
- virtual void ReturnPacket(arm::pipe::Packet& packet) = 0;
+ virtual void ReturnPacket(Packet& packet) = 0;
virtual void Close() = 0;
};
@@ -62,7 +50,7 @@ public:
virtual std::vector<uint32_t> GetHeadersAccepted() = 0;
/// process the packet
- virtual void HandlePacket(const arm::pipe::Packet& packet) = 0;
+ virtual void HandlePacket(const Packet& packet) = 0;
/// Set a profiling connection on the handler. Only need to implement this
/// function if the handler will be writing data back to the profiled application.
@@ -73,6 +61,6 @@ public:
using ILocalPacketHandlerPtr = std::unique_ptr<ILocalPacketHandler>;
using ILocalPacketHandlerSharedPtr = std::shared_ptr<ILocalPacketHandler>;
-} // namespace profiling
+} // namespace pipe
-} // namespace armnn \ No newline at end of file
+} // namespace arm \ No newline at end of file
diff --git a/include/armnn/profiling/ISendTimelinePacket.hpp b/include/armnn/profiling/ISendTimelinePacket.hpp
index c5da5219f7..4785e04ef8 100644
--- a/include/armnn/profiling/ISendTimelinePacket.hpp
+++ b/include/armnn/profiling/ISendTimelinePacket.hpp
@@ -9,10 +9,10 @@
#include <string>
#include <vector>
-namespace armnn
+namespace arm
{
-namespace profiling
+namespace pipe
{
enum class ProfilingRelationshipType
@@ -56,6 +56,6 @@ public:
uint64_t attributeGuid) = 0;
};
-} // namespace profiling
+} // namespace pipe
-} // namespace armnn
+} // namespace arm
diff --git a/include/armnn/profiling/ProfilingOptions.hpp b/include/armnn/profiling/ProfilingOptions.hpp
index 50cd50e5c3..6b4472ca63 100644
--- a/include/armnn/profiling/ProfilingOptions.hpp
+++ b/include/armnn/profiling/ProfilingOptions.hpp
@@ -16,14 +16,6 @@ namespace pipe
{
/// The lowest performance data capture interval we support is 10 miliseconds.
constexpr unsigned int LOWEST_CAPTURE_PERIOD = 10000u;
-} // namespace pipe
-} // namespace arm
-
-namespace armnn
-{
-
-namespace profiling
-{
struct ProfilingOptions {
ProfilingOptions()
@@ -45,9 +37,9 @@ struct ProfilingOptions {
uint32_t m_CapturePeriod;
/// The format of the file used for outputting profiling data.
std::string m_FileFormat;
- std::vector <armnn::profiling::ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
+ std::vector <ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
};
-} // namespace profiling
+} // namespace pipe
-} // namespace armnn
+} // namespace arm