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/base.h>
24#include <tvm/ffi/container/array.h>
25#include <tvm/ffi/reflection/registry.h>
26#include <tvm/ir/prim/expr.h>
27#include <tvm/runtime/base.h>
30
31namespace tvm {
32namespace s_tir {
33namespace meta_schedule {
34
36class MeasureCandidateObj : public ffi::Object {
37 public:
38 explicit MeasureCandidateObj(ffi::UnsafeInit tag) : sch(tag) {}
39
40 explicit MeasureCandidateObj(s_tir::Schedule sch) : sch(std::move(sch)) {}
44 ffi::Array<ArgInfo> args_info;
45
46 static void RegisterReflection() {
47 namespace refl = tvm::ffi::reflection;
48 refl::ObjectDef<MeasureCandidateObj>()
49 .def_ro("sch", &MeasureCandidateObj::sch)
50 .def_ro("args_info", &MeasureCandidateObj::args_info);
51 }
52 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateObj,
53 ffi::Object);
54};
55
60class MeasureCandidate : public ffi::ObjectRef {
61 public:
67 TVM_DLL MeasureCandidate(s_tir::Schedule sch, ffi::Array<ArgInfo> args_info);
70};
71
72} // namespace meta_schedule
73} // namespace s_tir
74} // namespace tvm
75
76#endif // TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
TIR expressions.
Managed reference to ScheduleObj.
Definition schedule.h:888
The schedule (with input shapes) to be measured.
Definition measure_candidate.h:36
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateObj, ffi::Object)
MeasureCandidateObj(ffi::UnsafeInit tag)
Definition measure_candidate.h:38
ffi::Array< ArgInfo > args_info
The argument information, e.g., (shape, dtype) for tensors.
Definition measure_candidate.h:44
s_tir::Schedule sch
The schedule for measurement.
Definition measure_candidate.h:42
MeasureCandidateObj(s_tir::Schedule sch)
Definition measure_candidate.h:40
static void RegisterReflection()
Definition measure_candidate.h:46
Managed reference to MeasureCandidateObj.
Definition measure_candidate.h:60
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(MeasureCandidate, ffi::ObjectRef, MeasureCandidateObj)
MeasureCandidate(s_tir::Schedule sch, ffi::Array< ArgInfo > args_info)
Constructor of MeasureCandidate.
Parent compiler symbol visibility.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41