ArmNN
 24.02
NeonInterceptorScheduler.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "NeonTimer.hpp"
8 #include "WallClockTimer.hpp"
9 
10 #include <arm_compute/runtime/IScheduler.h>
11 #include <arm_compute/runtime/Scheduler.h>
12 #include <arm_compute/core/CPP/ICPPKernel.h>
13 
14 namespace armnn
15 {
16 
17 class NeonInterceptorScheduler : public arm_compute::IScheduler
18 {
19 public:
20  NeonInterceptorScheduler(arm_compute::IScheduler &realScheduler);
21  ~NeonInterceptorScheduler() = default;
22 
23  void set_num_threads(unsigned int numThreads) override;
24 
25  unsigned int num_threads() const override;
26 
27  void schedule(arm_compute::ICPPKernel *kernel, const Hints &hints) override;
28 
29  void run_workloads(std::vector<Workload> &workloads) override;
30 
31  void run_tagged_workloads(std::vector<Workload> &workloads, const char *tag) override;
32 
33  void SetKernels(NeonTimer::KernelMeasurements* kernels) { m_Kernels = kernels; }
34  NeonTimer::KernelMeasurements* GetKernels() { return m_Kernels; }
35 
36  void schedule_op(arm_compute::ICPPKernel* kernel,
37  const Hints& hints,
38  const arm_compute::Window& window,
39  arm_compute::ITensorPack& tensors ) override;
40 private:
42  arm_compute::IScheduler& m_RealScheduler;
43 };
44 
45 } // namespace armnn
armnn::NeonInterceptorScheduler
Definition: NeonInterceptorScheduler.hpp:17
armnn::NeonInterceptorScheduler::SetKernels
void SetKernels(NeonTimer::KernelMeasurements *kernels)
Definition: NeonInterceptorScheduler.hpp:33
armnn::NeonInterceptorScheduler::set_num_threads
void set_num_threads(unsigned int numThreads) override
Definition: NeonInterceptorScheduler.cpp:15
armnn::NeonInterceptorScheduler::schedule
void schedule(arm_compute::ICPPKernel *kernel, const Hints &hints) override
Definition: NeonInterceptorScheduler.cpp:25
WallClockTimer.hpp
armnn::NeonInterceptorScheduler::GetKernels
NeonTimer::KernelMeasurements * GetKernels()
Definition: NeonInterceptorScheduler.hpp:34
armnn::NeonInterceptorScheduler::run_workloads
void run_workloads(std::vector< Workload > &workloads) override
Definition: NeonInterceptorScheduler.cpp:35
armnn::NeonInterceptorScheduler::NeonInterceptorScheduler
NeonInterceptorScheduler(arm_compute::IScheduler &realScheduler)
Definition: NeonInterceptorScheduler.cpp:10
armnn::NeonInterceptorScheduler::~NeonInterceptorScheduler
~NeonInterceptorScheduler()=default
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::NeonInterceptorScheduler::run_tagged_workloads
void run_tagged_workloads(std::vector< Workload > &workloads, const char *tag) override
Definition: NeonInterceptorScheduler.cpp:45
armnn::NeonInterceptorScheduler::num_threads
unsigned int num_threads() const override
Definition: NeonInterceptorScheduler.cpp:20
NeonTimer.hpp
armnn::NeonInterceptorScheduler::schedule_op
void schedule_op(arm_compute::ICPPKernel *kernel, const Hints &hints, const arm_compute::Window &window, arm_compute::ITensorPack &tensors) override
Definition: NeonInterceptorScheduler.cpp:55
armnn::NeonTimer::KernelMeasurements
std::vector< Measurement > KernelMeasurements
Definition: NeonTimer.hpp:24