19 #ifndef TVM_TIR_SCHEDULE_SCHEDULE_H_ 20 #define TVM_TIR_SCHEDULE_SCHEDULE_H_ 45 static constexpr
const char* _type_key =
"tir.BlockRV";
66 static constexpr
const char* _type_key =
"tir.LoopRV";
99 static constexpr
const char* _type_key =
"tir.Schedule";
139 virtual For Get(
const LoopRV& loop_rv)
const = 0;
174 virtual void RemoveRV(
const BlockRV& block_rv) = 0;
179 virtual void RemoveRV(
const LoopRV& loop_rv) = 0;
184 virtual void RemoveRV(
const ExprRV& expr_rv) = 0;
205 virtual Array<ExprRV> SamplePerfectTile(
const LoopRV& loop_rv,
int n,
int max_innermost_factor,
268 virtual void Reorder(
const Array<LoopRV>& ordered_loop_rvs) = 0;
279 virtual void Parallel(
const LoopRV& loop_rv) = 0;
289 virtual void Vectorize(
const LoopRV& loop_rv) = 0;
306 virtual void Unroll(
const LoopRV& loop_rv) = 0;
317 virtual BlockRV CacheRead(
const BlockRV& block_rv,
int read_buffer_index,
318 const String& storage_scope) = 0;
328 virtual BlockRV CacheWrite(
const BlockRV& block_rv,
int write_buffer_index,
329 const String& storage_scope) = 0;
347 virtual void ComputeAt(
const BlockRV& block_rv,
const LoopRV& loop_rv,
348 bool preserve_unit_loops) = 0;
364 virtual void ReverseComputeAt(
const BlockRV& block_rv,
const LoopRV& loop_rv,
365 bool preserve_unit_loops) = 0;
376 virtual void ComputeInline(
const BlockRV& block) = 0;
388 virtual void ReverseComputeInline(
const BlockRV& block) = 0;
423 virtual BlockRV RFactor(
const LoopRV& loop_rv,
int factor_axis) = 0;
437 virtual void StorageAlign(
const BlockRV& block_rv,
int buffer_index,
int axis,
int factor,
443 virtual void EnterPostproc() = 0;
499 #endif // TVM_TIR_SCHEDULE_SCHEDULE_H_ IterVar thread_axis(Range dom, std::string tag)
Create a new IterVar that represents an axis in thread.
Base node of all statements.
Definition: stmt.h:38
void VisitAttrs(tvm::AttrVisitor *v)
Definition: schedule.h:44
Managed reference to BlockNode.
Definition: stmt.h:1164
Random number generator. It provides a generic interface consistent with std::uniform_random_bit_gene...
Type Bind(const Type &type, const Map< TypeVar, Type > &args_map)
Bind free type variables in the type.
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:36
Managed reference to LoopRVNode.
Definition: schedule.h:74
Managed reference to ForNode.
Definition: stmt.h:871
StmtSRef GetSRef(const Stmt &stmt) const
Get the block/loop sref corresponding to the specific statement.
Definition: schedule.h:169
Managed reference to StmtSRefNode.
Definition: block_scope.h:102
base class of all object containers.
Definition: object.h:165
#define TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:737
ScheduleErrorRenderLevel
The level of detailed error message rendering.
Definition: schedule.h:30
Render a detailed error message.
Managed reference to ScheduleNode.
Definition: schedule.h:461
int64_t TRandState
Definition: random_engine.h:53
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
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:270
Container of all statements.
Definition: stmt.h:57
Reference to string objects.
Definition: string.h:129
Render the error in fast mode.
const Object * get() const
Definition: object.h:539
The user-facing schedule class.
Definition: schedule.h:93
Managed reference to ScheduleStateNode.
Definition: state.h:190
Base class of all object reference.
Definition: object.h:504
virtual IRModule mod() const
Get the IRModule associated with this schedule.
Definition: schedule.h:104
This file defines ScheduleState, the core data structure of TensorIR scheduling.
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:664
Managed reference class to IRModuleNode.
Definition: module.h:352
A random variable that evaluates to a TensorIR for loop.
Definition: schedule.h:63
A random variable that evaluates to a TensorIR block.
Definition: schedule.h:42
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
void VisitAttrs(tvm::AttrVisitor *v)
Definition: schedule.h:65
Reference to PrimExprNode.
Definition: expr.h:109
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:271
constexpr runtime::NullOptType NullOpt
Definition: optional.h:155
std::vector< std::string > Split(const std::string &str, const std::string &sub)
Split str according to substring.
Definition: einsum.h:425
#define TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:721
Managed reference to BlockRVNode.
Definition: schedule.h:53
Base node of all primitive expressions.
Definition: expr.h:82