42 #ifndef TVM_AUTO_SCHEDULER_SEARCH_POLICY_H_ 43 #define TVM_AUTO_SCHEDULER_SEARCH_POLICY_H_ 50 #include <unordered_set> 55 namespace auto_scheduler {
57 class ProgramMeasurer;
58 class SearchPolicyNode;
73 static constexpr
const char*
_type_key =
"auto_scheduler.SearchCallback";
95 static constexpr
const char*
_type_key =
"auto_scheduler.PreloadMeasuredStates";
118 static constexpr
const char* always_unroll_inner =
"auto_scheduler_always_unroll_inner";
120 static constexpr
const char* no_split_at_inner =
"auto_scheduler_no_split_at_inner";
122 static constexpr
const char* simplify_const_tensor_indices =
123 "auto_scheduler_simplify_const_tensor_indices";
140 v->Visit(
"search_task", &search_task);
141 v->Visit(
"verbose", &verbose);
153 virtual State Search(
int num_measure_trials,
int early_stopping,
int num_measures_per_round,
177 static constexpr
const char*
_type_key =
"auto_scheduler.SearchPolicy";
206 #endif // TVM_AUTO_SCHEDULER_SEARCH_POLICY_H_ Definitions and helper macros for IR/AST nodes.
Callback function to be called by the search process. This interface allows to do extra initializatio...
Definition: search_policy.h:65
Attribute keys of ops used for SearchPolicy.
Definition: search_policy.h:116
String filename
The name of the record log file.
Definition: search_policy.h:91
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
std::unordered_set< std::string > measured_states_set_
The set of already measured states. We store the string format of a state for redundancy check...
Definition: search_policy.h:186
Managed reference to StateNode.
Definition: loop_state.h:272
SearchTask search_task
The current search task.
Definition: search_policy.h:132
base class of all object containers.
Definition: object.h:167
#define TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:744
std::vector< State > measured_states_vector_
The array of already measured states. The good states can be used as the initial population in evolut...
Definition: search_policy.h:189
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
virtual void Callback(SearchPolicyNode *policy)=0
Run the registered callback function.
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
TVM_DECLARE_BASE_OBJECT_INFO(SearchCallbackNode, Object)
Managed reference to SearchCallbackNode.
Definition: search_policy.h:81
Distributed measurement infrastructure to measure the runtime costs of tensor programs. These functions are responsible for building the tvm module, uploading it to remote devices, recording the running time costs, and checking the correctness of the output.
static constexpr const char * _type_key
Definition: search_policy.h:73
Reference to string objects.
Definition: string.h:98
The base class of search policies.
Definition: search_policy.h:129
Managed reference to SearchPolicyNode.
Definition: search_policy.h:198
Base class of all object reference.
Definition: object.h:511
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:671
Managed reference to ProgramMeasurerNode.
Definition: measure.h:520
int verbose
Verbose level to control the screen output during schedule search. 0 for silent, 1 to output state & ...
Definition: search_policy.h:137
Managed reference to PreloadMeasuredStatesNode.
Definition: search_policy.h:103
Managed reference to SearchTaskNode.
Definition: search_task.h:148
Meta information and hardware parameters for a search task.
Preload measured states from a log file. This can resume the state of the search policy.
Definition: search_policy.h:88
std::vector< float > measured_states_throughputs_
The throughputs of already measured states.
Definition: search_policy.h:191
void VisitAttrs(AttrVisitor *v)
Definition: search_policy.h:139