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()>;
138 ICHECK(
f_done !=
nullptr) <<
"PyRunnerFuture's Done method not implemented!";
146 ICHECK(
f_result !=
nullptr) <<
"PyRunnerFuture's Result method not implemented!";
180 using FRun = ffi::TypedFunction<ffi::Array<RunnerFuture>(ffi::Array<RunnerInput>)>;
190 virtual ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs) = 0;
200 class Runner :
public runtime::ObjectRef {
207 explicit Runner(ObjectPtr<RunnerNode> data) : ObjectRef(data) { TVM_FFI_ICHECK(data !=
nullptr); }
227 ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs)
final {
228 ICHECK(
f_run !=
nullptr) <<
"PyRunner's Run method not implemented!";
229 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.