tvm
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/runtime/object.h>
28 
29 namespace tvm {
30 namespace s_tir {
31 namespace meta_schedule {
32 
34 class MeasureCandidateNode : public runtime::Object {
35  public:
39  ffi::Array<ArgInfo> args_info;
40 
41  static void RegisterReflection() {
42  namespace refl = tvm::ffi::reflection;
43  refl::ObjectDef<MeasureCandidateNode>()
44  .def_ro("sch", &MeasureCandidateNode::sch)
45  .def_ro("args_info", &MeasureCandidateNode::args_info);
46  }
47  TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateNode,
48  Object);
49 };
50 
55 class MeasureCandidate : public runtime::ObjectRef {
56  public:
62  TVM_DLL MeasureCandidate(s_tir::Schedule sch, ffi::Array<ArgInfo> args_info);
64 };
65 
66 } // namespace meta_schedule
67 } // namespace s_tir
68 } // namespace tvm
69 
70 #endif // TVM_S_TIR_META_SCHEDULE_MEASURE_CANDIDATE_H_
Managed reference to ScheduleNode.
Definition: schedule.h:897
The schedule (with input shapes) to be measured.
Definition: measure_candidate.h:34
ffi::Array< ArgInfo > args_info
The argument information, e.g., (shape, dtype) for tensors.
Definition: measure_candidate.h:39
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.meta_schedule.MeasureCandidate", MeasureCandidateNode, Object)
s_tir::Schedule sch
The schedule for measurement.
Definition: measure_candidate.h:37
static void RegisterReflection()
Definition: measure_candidate.h:41
Managed reference to MeasureCandidateNode.
Definition: measure_candidate.h:55
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(MeasureCandidate, ObjectRef, MeasureCandidateNode)
MeasureCandidate(s_tir::Schedule sch, ffi::Array< ArgInfo > args_info)
Constructor of MeasureCandidate.
Definition: repr_printer.h:91
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37
A managed object in the TVM runtime.