tvm
|
Interface for user defined profiling metric collection. More...
#include <profiling.h>
Public Member Functions | |
virtual void | Init (Array< DeviceWrapper > devs)=0 |
Initialization call. Called before profiling has started. Any expensive precomputation should happen here. More... | |
virtual ObjectRef | Start (Device dev)=0 |
Start colling metrics for a function call. More... | |
virtual Map< String, ffi::Any > | Stop (ffi::ObjectRef obj)=0 |
Stop collecting metrics. More... | |
virtual | ~MetricCollectorNode () |
TVM_DECLARE_BASE_OBJECT_INFO (MetricCollectorNode, Object) | |
Static Public Attributes | |
static constexpr const char * | _type_key = "runtime.profiling.MetricCollector" |
Interface for user defined profiling metric collection.
Users can register their own collector by registering a packed function with the name "runtime.profiling.metrics.my_collector_name" where "my_collector_name" is the name of their collector. This function should take an Array of Device as input which contains the devices the collector will be run on.
MetricCollectorNode
s will be called in the following fashion.
|
inlinevirtual |
|
pure virtual |
Initialization call. Called before profiling has started. Any expensive precomputation should happen here.
devs | The list of devices this collector will be run on. |
|
pure virtual |
Start colling metrics for a function call.
dev | The device the call will be run on. |
Stop
call. If the device is not supported, this function will return a nullptr ObjectRef.
|
pure virtual |
Stop collecting metrics.
obj | The object created by the corresponding Start call. |
tvm::runtime::profiling::MetricCollectorNode::TVM_DECLARE_BASE_OBJECT_INFO | ( | MetricCollectorNode | , |
Object | |||
) |
|
staticconstexpr |