19 #ifndef TVM_META_SCHEDULE_RUNNER_H_
20 #define TVM_META_SCHEDULE_RUNNER_H_
22 #include <tvm/ffi/container/array.h>
23 #include <tvm/ffi/function.h>
24 #include <tvm/ffi/optional.h>
25 #include <tvm/ffi/reflection/registry.h>
26 #include <tvm/ffi/string.h>
32 namespace meta_schedule {
46 refl::ObjectDef<RunnerInputNode>()
67 ffi::Array<ArgInfo> args_info);
81 refl::ObjectDef<RunnerResultNode>()
100 TVM_DLL
explicit RunnerResult(ffi::Optional<ffi::Array<FloatImm>> run_secs,
101 ffi::Optional<ffi::String> error_msg);
116 using FDone = ffi::TypedFunction<bool()>;
132 refl::ObjectDef<RunnerFutureNode>();
140 ICHECK(
f_done !=
nullptr) <<
"PyRunnerFuture's Done method not implemented!";
148 ICHECK(
f_result !=
nullptr) <<
"PyRunnerFuture's Result method not implemented!";
182 using FRun = ffi::TypedFunction<ffi::Array<RunnerFuture>(ffi::Array<RunnerInput>)>;
192 virtual ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs) = 0;
196 refl::ObjectDef<RunnerNode>();
207 class Runner :
public runtime::ObjectRef {
214 explicit Runner(ObjectPtr<RunnerNode> data) : ObjectRef(data) { TVM_FFI_ICHECK(data !=
nullptr); }
233 refl::ObjectDef<PyRunnerNode>();
236 ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs)
final {
237 ICHECK(
f_run !=
nullptr) <<
"PyRunner's Run method not implemented!";
238 return f_run(runner_inputs);
Definition: repr_printer.h:91
constexpr const char * device_type
The device type.
Definition: stmt.h:1063
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37
A managed object in the TVM runtime.