tvm
Classes | Functions
tvm::runtime::profiling Namespace Reference

Classes

struct  CallFrame
 
class  CountNode
 
class  DeviceWrapper
 Wrapper for Device. More...
 
struct  DeviceWrapperNode
 Wrapper for Device because Device is not passable across the PackedFunc interface. More...
 
class  DurationNode
 
class  MetricCollector
 Wrapper for MetricCollectorNode. More...
 
class  MetricCollectorNode
 Interface for user defined profiling metric collection. More...
 
class  PercentNode
 
class  Profiler
 
class  Report
 
class  ReportNode
 Data collected from a profiling run. Includes per-call metrics and per-device metrics. More...
 

Functions

MetricCollector CreatePAPIMetricCollector (Map< DeviceWrapper, Array< String >> metrics)
 Construct a metric collector that collects data from hardware performance counters using the Performance Application Programming Interface (PAPI). More...
 
String ShapeString (const std::vector< NDArray > &shapes)
 String representation of an array of NDArray shapes. More...
 
String ShapeString (NDArray shape, DLDataType dtype)
 String representation of shape encoded as an NDArray. More...
 
String ShapeString (const std::vector< int64_t > &shape, DLDataType dtype)
 String representation of a shape encoded as a vector. More...
 

Function Documentation

◆ CreatePAPIMetricCollector()

MetricCollector tvm::runtime::profiling::CreatePAPIMetricCollector ( Map< DeviceWrapper, Array< String >>  metrics)

Construct a metric collector that collects data from hardware performance counters using the Performance Application Programming Interface (PAPI).

Parameters
metricsA mapping from a device type to the metrics that should be collected on that device. You can find the names of available metrics by running papi_native_avail.

◆ ShapeString() [1/3]

String tvm::runtime::profiling::ShapeString ( const std::vector< NDArray > &  shapes)

String representation of an array of NDArray shapes.

Parameters
shapesArray of NDArrays to get the shapes of.
Returns
A textual representation of the shapes. For example: float32[2], int64[1, 2].

◆ ShapeString() [2/3]

String tvm::runtime::profiling::ShapeString ( NDArray  shape,
DLDataType  dtype 
)

String representation of shape encoded as an NDArray.

Parameters
shapeNDArray containing the shape.
dtypeThe dtype of the shape.
Returns
A textual representation of the shape. For example: float32[2].

◆ ShapeString() [3/3]

String tvm::runtime::profiling::ShapeString ( const std::vector< int64_t > &  shape,
DLDataType  dtype 
)

String representation of a shape encoded as a vector.

Parameters
shapeShape as a vector of integers.
dtypeThe dtype of the shape.
Returns
A textual representation of the shape. For example: float32[2].