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 {
32using namespace tvm::prim;
33namespace meta_schedule {
34
36class MeasureCandidateNode : public ffi::Object {
37 public:
41 ffi::Array<ArgInfo> args_info;
42
43 static void RegisterReflection() {
44 namespace refl = tvm::ffi::reflection;
45 refl::ObjectDef<MeasureCandidateNode>()
46 .def_ro("sch", &MeasureCandidateNode::sch)
47 .def_ro("args_info", &MeasureCandidateNode::args_info);
48 }
49 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateNode,
50 ffi::Object);
51};
52
57class MeasureCandidate : public ffi::ObjectRef {
58 public:
64 TVM_DLL MeasureCandidate(s_tir::Schedule sch, ffi::Array<ArgInfo> args_info);
67};
68
69} // namespace meta_schedule
70} // namespace s_tir
71} // namespace tvm
72
73#endif // TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Managed reference to ScheduleNode.
Definition schedule.h:887
The schedule (with input shapes) to be measured.
Definition measure_candidate.h:36
ffi::Array< ArgInfo > args_info
The argument information, e.g., (shape, dtype) for tensors.
Definition measure_candidate.h:41
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateNode, ffi::Object)
s_tir::Schedule sch
The schedule for measurement.
Definition measure_candidate.h:39
static void RegisterReflection()
Definition measure_candidate.h:43
Managed reference to MeasureCandidateNode.
Definition measure_candidate.h:57
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(MeasureCandidate, ffi::ObjectRef, MeasureCandidateNode)
MeasureCandidate(s_tir::Schedule sch, ffi::Array< ArgInfo > args_info)
Constructor of MeasureCandidate.
TIR expressions.
Definition builtin.h:25
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40