24#ifndef TVM_RUNTIME_TIMER_H_
25#define TVM_RUNTIME_TIMER_H_
27#include <tvm/ffi/function.h>
77class Timer :
public ffi::ObjectRef {
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Base class for all timer implementations.
Definition timer.h:41
virtual int64_t SyncAndGetElapsedNanos()=0
Synchronize timer state and return elapsed time between Start and Stop.
virtual void Stop()=0
Stop the timer.
virtual void Start()=0
Start the timer.
static constexpr const bool _type_mutable
Definition timer.h:67
virtual ~TimerNode()
Definition timer.h:65
TVM_FFI_DECLARE_OBJECT_INFO("runtime.TimerNode", TimerNode, ffi::Object)
Timer for a specific device.
Definition timer.h:77
static TVM_RUNTIME_DLL Timer Start(Device dev)
Get a device specific timer.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Timer, ffi::ObjectRef, TimerNode)
Abstract device memory management API.
ffi::Function WrapTimeEvaluator(ffi::Function f, Device dev, int number, int repeat, int min_repeat_ms, int limit_zero_time_iterations, int cooldown_interval_ms, int repeats_to_cooldown, int cache_flush_bytes=0, ffi::Function f_preproc=nullptr)
Wrap a timer function to measure the time cost of a given packed function.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40
#define TVM_RUNTIME_DLL
Definition base.h:92
A device-independent managed Tensor abstraction.