19 #ifndef TVM_S_TIR_META_SCHEDULE_RUNNER_H_
20 #define TVM_S_TIR_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 {
45 namespace refl = tvm::ffi::reflection;
46 refl::ObjectDef<RunnerInputNode>()
68 ffi::Array<ArgInfo> args_info);
81 namespace refl = tvm::ffi::reflection;
82 refl::ObjectDef<RunnerResultNode>()
101 TVM_DLL
explicit RunnerResult(ffi::Optional<ffi::Array<FloatImm>> run_secs,
102 ffi::Optional<ffi::String> error_msg);
117 using FDone = ffi::TypedFunction<bool()>;
132 namespace refl = tvm::ffi::reflection;
133 refl::ObjectDef<RunnerFutureNode>();
141 TVM_FFI_ICHECK(
f_done !=
nullptr) <<
"PyRunnerFuture's Done method not implemented!";
149 TVM_FFI_ICHECK(
f_result !=
nullptr) <<
"PyRunnerFuture's Result method not implemented!";
183 using FRun = ffi::TypedFunction<ffi::Array<RunnerFuture>(ffi::Array<RunnerInput>)>;
193 virtual ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs) = 0;
196 namespace refl = tvm::ffi::reflection;
197 refl::ObjectDef<RunnerNode>();
215 explicit Runner(ffi::ObjectPtr<RunnerNode> data) : ffi::ObjectRef(data) {
216 TVM_FFI_ICHECK(data !=
nullptr);
235 namespace refl = tvm::ffi::reflection;
236 refl::ObjectDef<PyRunnerNode>();
239 ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs)
final {
240 TVM_FFI_ICHECK(
f_run !=
nullptr) <<
"PyRunner's Run method not implemented!";
241 return f_run(runner_inputs);
constexpr const char * device_type
The device type.
Definition: stmt.h:1011
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:37