33 : m_BackendProfiling(
std::move(backendProfiling))
41 return m_BackendProfiling;
46 std::unique_ptr<profiling::IRegisterBackendCounters> counterRegistrar =
47 m_BackendProfiling->GetCounterRegistrationInterface(currentMaxGlobalCounterId);
49 std::string categoryName(
"MockCounters");
50 counterRegistrar->RegisterCategory(categoryName);
51 uint16_t nextMaxGlobalCounterId =
52 counterRegistrar->RegisterCounter(0, categoryName, 0, 0, 1.f,
"Mock Counter One",
"Some notional counter");
54 nextMaxGlobalCounterId = counterRegistrar->RegisterCounter(1, categoryName, 0, 0, 1.f,
"Mock Counter Two",
55 "Another notional counter");
57 std::string units(
"microseconds");
58 nextMaxGlobalCounterId = counterRegistrar->RegisterCounter(2, categoryName, 0, 0, 1.f,
"Mock MultiCore Counter",
59 "A dummy four core counter", units, 4);
60 return nextMaxGlobalCounterId;
65 if (capturePeriod == 0 || counterIds.size() == 0)
67 m_ActiveCounters.clear();
69 else if (capturePeriod == 15939u)
74 m_ActiveCounters = counterIds;
80 std::vector<profiling::CounterValue> counterValues;
82 for (
auto counterId : m_ActiveCounters)
99 std::vector<uint16_t> m_ActiveCounters;
114 return m_sharedContext.get();
119 m_sharedContext = shared;
123 std::shared_ptr<MockBackendProfilingContext> m_sharedContext;
135 return GetIdStatic();
MockBackendProfilingContext(IBackendInternal::IBackendProfilingPtr &backendProfiling)
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
void SetProfilingContextPtr(std::shared_ptr< MockBackendProfilingContext > shared)
std::vector< OptimizationPtr > Optimizations
bool IsOutputSupported(const TensorInfo &, Optional< std::string &>) const override
~MockBackendInitialiser()
A Convolution2dDescriptor for the Convolution2dLayer.
bool IsInputSupported(const TensorInfo &, Optional< std::string &>) const override
Copyright (c) 2020 ARM Limited.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
const BackendId & GetId() const override
The SubgraphView class represents a subgraph of a Graph.
Optional< std::string > ActivateCounters(uint32_t capturePeriod, const std::vector< uint16_t > &counterIds)
std::unique_ptr< armnn::profiling::IBackendProfiling > IBackendProfilingPtr
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
bool IsConvolution2dSupported(const TensorInfo &, const TensorInfo &, const Convolution2dDescriptor &, const TensorInfo &, const Optional< TensorInfo > &, Optional< std::string &>) const override
static MockBackendProfilingService & Instance()
bool IsAdditionSupported(const TensorInfo &, const TensorInfo &, const TensorInfo &, Optional< std::string &>) const override
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
bool EnableProfiling(bool)
MockBackendProfilingContext * GetContext()
std::vector< profiling::Timestamp > ReportCounterValues()
IBackendInternal::IBackendProfilingPtr & GetBackendProfiling()
std::shared_ptr< armnn::profiling::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace...
uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterId)
std::unique_ptr< IBackendContext > IBackendContextPtr