|
tvm
|
Interface for user defined profiling metric collection. More...
#include <profiling.h>
Public Member Functions | |
| virtual void | Init (ffi::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 ffi::Map< ffi::String, ffi::Any > | Stop (ffi::ObjectRef obj)=0 |
| Stop collecting metrics. More... | |
| virtual | ~MetricCollectorNode () |
| TVM_FFI_DECLARE_OBJECT_INFO ("runtime.profiling.MetricCollector", MetricCollectorNode, Object) | |
Static Public Attributes | |
| static constexpr const bool | _type_mutable = true |
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.
MetricCollectorNodes 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_FFI_DECLARE_OBJECT_INFO | ( | "runtime.profiling.MetricCollector" | , |
| MetricCollectorNode | , | ||
| Object | |||
| ) |
|
staticconstexpr |