19#ifndef TVM_S_TIR_META_SCHEDULE_RUNNER_H_
20#define TVM_S_TIR_META_SCHEDULE_RUNNER_H_
23#include <tvm/ffi/container/array.h>
24#include <tvm/ffi/function.h>
25#include <tvm/ffi/optional.h>
26#include <tvm/ffi/reflection/registry.h>
27#include <tvm/ffi/string.h>
34namespace meta_schedule {
47 namespace refl = tvm::ffi::reflection;
48 refl::ObjectDef<RunnerInputObj>()
68 TVM_DLL
explicit RunnerInput(ffi::String artifact_path, ffi::String device_type,
69 ffi::Array<ArgInfo> args_info);
82 namespace refl = tvm::ffi::reflection;
83 refl::ObjectDef<RunnerResultObj>()
102 TVM_DLL
explicit RunnerResult(ffi::Optional<ffi::Array<FloatImm>> run_secs,
103 ffi::Optional<ffi::String> error_msg);
118 using FDone = ffi::TypedFunction<bool()>;
133 namespace refl = tvm::ffi::reflection;
134 refl::ObjectDef<RunnerFutureObj>();
142 TVM_FFI_ICHECK(
f_done !=
nullptr) <<
"PyRunnerFuture's Done method not implemented!";
150 TVM_FFI_ICHECK(
f_result !=
nullptr) <<
"PyRunnerFuture's Result method not implemented!";
184 using FRun = ffi::TypedFunction<ffi::Array<RunnerFuture>(ffi::Array<RunnerInput>)>;
194 virtual ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs) = 0;
197 namespace refl = tvm::ffi::reflection;
198 refl::ObjectDef<RunnerObj>();
216 explicit Runner(ffi::ObjectPtr<RunnerObj> data) : ffi::ObjectRef(data) {
217 TVM_FFI_ICHECK(data !=
nullptr);
236 namespace refl = tvm::ffi::reflection;
237 refl::ObjectDef<PyRunnerObj>();
240 ffi::Array<RunnerFuture>
Run(ffi::Array<RunnerInput> runner_inputs)
final {
241 TVM_FFI_ICHECK(
f_run !=
nullptr) <<
"PyRunner's Run method not implemented!";
242 return f_run(runner_inputs);
Parent compiler symbol visibility.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41