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_META_SCHEDULE_MEASURE_CANDIDATE_H_
21 #define TVM_META_SCHEDULE_MEASURE_CANDIDATE_H_
22 
23 #include <tvm/ffi/container/array.h>
24 #include <tvm/ffi/reflection/registry.h>
26 #include <tvm/runtime/object.h>
28 
29 namespace tvm {
30 namespace meta_schedule {
31 
33 class MeasureCandidateNode : public runtime::Object {
34  public:
38  Array<ArgInfo> args_info;
39 
40  static void RegisterReflection() {
41  namespace refl = tvm::ffi::reflection;
42  refl::ObjectDef<MeasureCandidateNode>()
43  .def_ro("sch", &MeasureCandidateNode::sch)
44  .def_ro("args_info", &MeasureCandidateNode::args_info);
45  }
46 
47  static constexpr const char* _type_key = "meta_schedule.MeasureCandidate";
49 };
50 
55 class MeasureCandidate : public runtime::ObjectRef {
56  public:
62  TVM_DLL MeasureCandidate(tir::Schedule sch, Array<ArgInfo> args_info);
64 };
65 
66 } // namespace meta_schedule
67 } // namespace tvm
68 
69 #endif // TVM_META_SCHEDULE_MEASURE_CANDIDATE_H_
The schedule (with input shapes) to be measured.
Definition: measure_candidate.h:33
tir::Schedule sch
The schedule for measurement.
Definition: measure_candidate.h:36
static constexpr const char * _type_key
Definition: measure_candidate.h:47
Array< ArgInfo > args_info
The argument information, e.g., (shape, dtype) for tensors.
Definition: measure_candidate.h:38
static void RegisterReflection()
Definition: measure_candidate.h:40
TVM_DECLARE_FINAL_OBJECT_INFO(MeasureCandidateNode, Object)
Managed reference to MeasureCandidateNode.
Definition: measure_candidate.h:55
TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS(MeasureCandidate, ObjectRef, MeasureCandidateNode)
MeasureCandidate(tir::Schedule sch, Array< ArgInfo > args_info)
Constructor of MeasureCandidate.
Managed reference to ScheduleNode.
Definition: schedule.h:880
Definition: repr_printer.h:91
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37
A managed object in the TVM runtime.