11 #include <boost/assert.hpp> 12 #include <boost/format.hpp> 18 static thread_local
auto g_Interceptor = std::make_shared<NeonInterceptorScheduler>(arm_compute::Scheduler::get());
24 BOOST_ASSERT(g_Interceptor->GetKernels() ==
nullptr);
25 g_Interceptor->SetKernels(&m_Kernels);
27 m_RealSchedulerType = arm_compute::Scheduler::get_type();
29 if(m_RealSchedulerType != arm_compute::Scheduler::Type::CUSTOM)
32 m_RealScheduler = &arm_compute::Scheduler::get();
33 arm_compute::Scheduler::set(std::static_pointer_cast<arm_compute::IScheduler>(g_Interceptor));
40 g_Interceptor->SetKernels(
nullptr);
41 arm_compute::Scheduler::set(m_RealSchedulerType);
42 m_RealScheduler =
nullptr;
47 std::vector<Measurement> measurements = m_Kernels;
48 unsigned int kernel_number = 0;
49 for (
auto & kernel : measurements)
51 std::string kernelName = std::string(this->
GetName()) +
"/" + std::to_string(kernel_number++) +
": " + kernel
53 kernel.m_Name = kernelName;
60 return "NeonKernelTimer";
std::vector< Measurement > GetMeasurements() const override
Copyright (c) 2020 ARM Limited.
const char * GetName() const override