tvm
Loading...
Searching...
No Matches
measure_candidate.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
21#define TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
22
23#include <tvm/ffi/container/array.h>
24#include <tvm/ffi/reflection/registry.h>
25#include <tvm/ir/prim/expr.h>
26#include <tvm/runtime/base.h>
29
30namespace tvm {
31namespace s_tir {
32namespace meta_schedule {
33
35class MeasureCandidateObj : public ffi::Object {
36 public:
37 explicit MeasureCandidateObj(ffi::UnsafeInit tag) : sch(tag) {}
38
39 explicit MeasureCandidateObj(s_tir::Schedule sch) : sch(std::move(sch)) {}
43 ffi::Array<ArgInfo> args_info;
44
45 static void RegisterReflection() {
46 namespace refl = tvm::ffi::reflection;
47 refl::ObjectDef<MeasureCandidateObj>()
48 .def_ro("sch", &MeasureCandidateObj::sch)
49 .def_ro("args_info", &MeasureCandidateObj::args_info);
50 }
51 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateObj,
52 ffi::Object);
53};
54
59class MeasureCandidate : public ffi::ObjectRef {
60 public:
66 TVM_DLL MeasureCandidate(s_tir::Schedule sch, ffi::Array<ArgInfo> args_info);
69};
70
71} // namespace meta_schedule
72} // namespace s_tir
73} // namespace tvm
74
75#endif // TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
Managed reference to ScheduleObj.
Definition schedule.h:887
The schedule (with input shapes) to be measured.
Definition measure_candidate.h:35
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateObj, ffi::Object)
MeasureCandidateObj(ffi::UnsafeInit tag)
Definition measure_candidate.h:37
ffi::Array< ArgInfo > args_info
The argument information, e.g., (shape, dtype) for tensors.
Definition measure_candidate.h:43
s_tir::Schedule sch
The schedule for measurement.
Definition measure_candidate.h:41
MeasureCandidateObj(s_tir::Schedule sch)
Definition measure_candidate.h:39
static void RegisterReflection()
Definition measure_candidate.h:45
Managed reference to MeasureCandidateObj.
Definition measure_candidate.h:59
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(MeasureCandidate, ffi::ObjectRef, MeasureCandidateObj)
MeasureCandidate(s_tir::Schedule sch, ffi::Array< ArgInfo > args_info)
Constructor of MeasureCandidate.
TIR expressions.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23