diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-01-10 17:34:20 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-01-11 12:20:47 +0000 |
commit | 992d6dc57d8463729910b688f0fb5825d0d3ccf2 (patch) | |
tree | 87b504d174848169550240f300f359dd57aaa1fd /src/armnn/Profiling.cpp | |
parent | 1f0ff35236c1dd05954735f7fed9c2807770479e (diff) | |
download | armnn-992d6dc57d8463729910b688f0fb5825d0d3ccf2.tar.gz |
IVGCVSW-2454 Refactor ArmNN to support pluggable backends from a separate
code base
* Made the virtual functions in ILayerSupport.hpp pure
* Created a LayerSupportBase class with the default implementation of
the interface
* Made the backend layer support classes inherit from the base
class, instead of directly from the interface
* Refactored the profiler and the profiling event classes to use
the BackendId instead of the Compute
* Implemented a proper MemCopy support method
* Changed Compute to BackendId in the profiling API and objects
* Removed static references to pluggable backends
!android-nn-driver:492
Change-Id: Id6332b5f48c980819e0a09adc818d1effd057296
Diffstat (limited to 'src/armnn/Profiling.cpp')
-rw-r--r-- | src/armnn/Profiling.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/armnn/Profiling.cpp b/src/armnn/Profiling.cpp index 4caa31905c..c153eb67fa 100644 --- a/src/armnn/Profiling.cpp +++ b/src/armnn/Profiling.cpp @@ -132,7 +132,7 @@ void Profiler::AnalyzeEventSequenceAndWriteResults(ItertType first, ItertType la << std::setw(20) << durationMs << std::setw(20) << startTimeMs << std::setw(20) << stopTimeMs - << std::setw(20) << GetComputeDeviceAsCString(eventPtr->GetComputeDevice()) + << std::setw(20) << eventPtr->GetBackendId().Get() << std::endl; } outStream << std::endl; @@ -194,10 +194,12 @@ void Profiler::EnableProfiling(bool enableProfiling) m_ProfilingEnabled = enableProfiling; } -Event* Profiler::BeginEvent(Compute compute, const std::string& label, std::vector<InstrumentPtr>&& instruments) +Event* Profiler::BeginEvent(const BackendId& backendId, + const std::string& label, + std::vector<InstrumentPtr>&& instruments) { Event* parent = m_Parents.empty() ? nullptr : m_Parents.top(); - m_EventSequence.push_back(std::make_unique<Event>(label, this, parent, compute, std::move(instruments))); + m_EventSequence.push_back(std::make_unique<Event>(label, this, parent, backendId, std::move(instruments))); Event* event = m_EventSequence.back().get(); event->Start(); |