24.02.1
|
Instrument creating measurements based on the information returned by clGetEventProfilingInfo for each OpenCL kernel executed. More...
#include <SchedulerTimer.h>
Data Structures | |
struct | kernel_info |
Kernel information. More... | |
Public Types | |
using | LayerData = std::map< std::string, std::string > |
Public Types inherited from Instrument | |
using | MeasurementsMap = std::map< std::string, Measurement > |
Map of measurements. More... | |
Public Member Functions | |
SchedulerClock (ScaleFactor scale_factor) | |
Construct a Scheduler timer. More... | |
SchedulerClock (const SchedulerClock &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
SchedulerClock & | operator= (const SchedulerClock &)=delete |
Prevent instances of this class from being copied. More... | |
SchedulerClock & | operator= (SchedulerClock &&)=default |
Use the default move assignment operator. More... | |
SchedulerClock (SchedulerClock &&)=default | |
Use the default move constructor. More... | |
~SchedulerClock ()=default | |
Use the default destructor. More... | |
std::string | id () const override |
Identifier for the instrument. More... | |
void | test_start () override |
Start of the test. More... | |
void | start () override |
Start measuring. More... | |
void | test_stop () override |
End of the test. More... | |
Instrument::MeasurementsMap | measurements () const override |
Return the latest measurements. More... | |
std::string | instrument_header () const override |
Return JSON formatted instrument header string. More... | |
Public Member Functions inherited from Instrument | |
Instrument ()=default | |
Default constructor. More... | |
Instrument (const Instrument &)=default | |
Allow instances of this class to be copy constructed. More... | |
Instrument (Instrument &&)=default | |
Allow instances of this class to be move constructed. More... | |
Instrument & | operator= (const Instrument &)=default |
Allow instances of this class to be copied. More... | |
Instrument & | operator= (Instrument &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~Instrument ()=default |
Default destructor. More... | |
virtual void | stop () |
Stop measuring. More... | |
virtual MeasurementsMap | test_measurements () const |
Return the latest test measurements. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Instrument | |
template<typename T , ScaleFactor scale> | |
static std::unique_ptr< Instrument > | make_instrument () |
Helper function to create an instrument of the given type. More... | |
Instrument creating measurements based on the information returned by clGetEventProfilingInfo for each OpenCL kernel executed.
Definition at line 63 of file SchedulerTimer.h.
using LayerData = std::map<std::string, std::string> |
Definition at line 66 of file SchedulerTimer.h.
SchedulerClock | ( | ScaleFactor | scale_factor | ) |
Construct a Scheduler timer.
[in] | scale_factor | Measurement scale factor. |
Definition at line 139 of file SchedulerTimer.cpp.
References arm_compute::test::framework::instruments_info.
|
delete |
Prevent instances of this class from being copy constructed.
|
default |
Use the default move constructor.
|
default |
Use the default destructor.
|
overridevirtual |
Identifier for the instrument.
Implements Instrument.
Definition at line 40 of file SchedulerTimer.cpp.
|
overridevirtual |
Return JSON formatted instrument header string.
Reimplemented from Instrument.
Definition at line 287 of file SchedulerTimer.cpp.
|
overridevirtual |
Return the latest measurements.
Reimplemented from Instrument.
Definition at line 251 of file SchedulerTimer.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, name, and arm_compute::support::cpp11::to_string().
|
delete |
Prevent instances of this class from being copied.
|
default |
Use the default move assignment operator.
|
overridevirtual |
Start measuring.
Called just before the run of the test starts
Reimplemented from Instrument.
Definition at line 222 of file SchedulerTimer.cpp.
|
overridevirtual |
Start of the test.
Called before the test set up starts
Reimplemented from Instrument.
Definition at line 158 of file SchedulerTimer.cpp.
References ARM_COMPUTE_ERROR_ON, Scheduler::CUSTOM, arm_compute::mlgo::parser::end(), TaskExecutor::execute_function, arm_compute::utility::for_each(), Scheduler::get(), TaskExecutor::get(), Scheduler::get_type(), DataLayerVisitor::layer_data(), ISchedulerUser::scheduler(), and Scheduler::set().
|
overridevirtual |
End of the test.
Called after the test teardown ended
Reimplemented from Instrument.
Definition at line 228 of file SchedulerTimer.cpp.
References arm_compute::mlgo::parser::end(), TaskExecutor::execute_function, arm_compute::utility::for_each(), TaskExecutor::get(), ISchedulerUser::restore_scheduler(), and Scheduler::set().