aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2018-10-24 17:26:17 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-25 14:06:56 +0100
commit71007e4e16999ca96ab80941ca021b86342668d6 (patch)
tree4516f42757b7671235a21c66b1884ca73599b3e6
parent28dcab6c176a3938519809aa9da7321e4ede7623 (diff)
downloadarmnn-71007e4e16999ca96ab80941ca021b86342668d6.tar.gz
IVGCVSW-2059: Remove CL-specific code from Profiler
Change-Id: I279986b83c7a38b6d395f8a496382ffaebb9ed08
-rw-r--r--src/armnn/Profiling.cpp23
-rw-r--r--src/armnn/Profiling.hpp4
2 files changed, 0 insertions, 27 deletions
diff --git a/src/armnn/Profiling.cpp b/src/armnn/Profiling.cpp
index b749c80004..4caa31905c 100644
--- a/src/armnn/Profiling.cpp
+++ b/src/armnn/Profiling.cpp
@@ -9,10 +9,6 @@
#include <streamline_annotate.h>
#endif
-#if ARMCOMPUTECL_ENABLED
-#include <arm_compute/runtime/CL/CLFunctions.h>
-#endif
-
#include <algorithm>
#include <iomanip>
#include <iostream>
@@ -42,12 +38,6 @@ constexpr bool g_AggregateProfilingEventsByInference = true;
// It can be convenient for local tests.
constexpr bool g_WriteReportToStdOutOnProfilerDestruction = false;
-// Whether events denoting operations running on the GPU should force a sync before/after the event.
-// This is hardcoded to true for now as the profiling timings are not very useful without it.
-#if ARMCOMPUTECL_ENABLED
-constexpr bool g_ProfilingForceGpuSync = true;
-#endif
-
Measurement FindMeasurement(const std::string& name, const Event* event)
{
@@ -206,9 +196,6 @@ void Profiler::EnableProfiling(bool enableProfiling)
Event* Profiler::BeginEvent(Compute compute, const std::string& label, std::vector<InstrumentPtr>&& instruments)
{
- // We need to sync just before the begin event to not include time before the period we want to time.
- WaitForDevice(compute);
-
Event* parent = m_Parents.empty() ? nullptr : m_Parents.top();
m_EventSequence.push_back(std::make_unique<Event>(label, this, parent, compute, std::move(instruments)));
Event* event = m_EventSequence.back().get();
@@ -478,16 +465,6 @@ void Profiler::AnalyzeEventsAndWriteResults(std::ostream& outStream) const
}
}
-void Profiler::WaitForDevice(Compute compute) const
-{
-#if ARMCOMPUTECL_ENABLED
- if(compute == Compute::GpuAcc && g_ProfilingForceGpuSync)
- {
- arm_compute::CLScheduler::get().sync();
- }
-#endif
-}
-
std::uint32_t Profiler::GetEventColor(Compute compute) const
{
switch(compute)
diff --git a/src/armnn/Profiling.hpp b/src/armnn/Profiling.hpp
index 758b753386..ef6bfd5ffb 100644
--- a/src/armnn/Profiling.hpp
+++ b/src/armnn/Profiling.hpp
@@ -74,10 +74,6 @@ private:
uint32_t m_Count;
};
- // Waits for a compute device to finish working to guarantee correct timings.
- // Currently used exclusively when emitting profiling events denoting GPU work.
- void WaitForDevice(Compute compute) const;
-
template<typename EventIterType>
void AnalyzeEventSequenceAndWriteResults(EventIterType first, EventIterType last, std::ostream& outStream) const;