Halide
|
A schedule for a single stage of a Halide pipeline. More...
#include <Schedule.h>
Public Member Functions | |
StageSchedule (IntrusivePtr< StageScheduleContents > c) | |
StageSchedule (const StageSchedule &other)=default | |
StageSchedule () | |
StageSchedule | get_copy () const |
Return a copy of this StageSchedule. More... | |
bool & | touched () |
This flag is set to true if the dims list has been manipulated by the user (or if a ScheduleHandle was created that could have been used to manipulate it). More... | |
bool | touched () const |
const std::vector< ReductionVariable > & | rvars () const |
RVars of reduction domain associated with this schedule if there is any. More... | |
std::vector< ReductionVariable > & | rvars () |
const std::vector< Split > & | splits () const |
The traversal of the domain of a function can have some of its dimensions split into sub-dimensions. More... | |
std::vector< Split > & | splits () |
const std::vector< Dim > & | dims () const |
The list and ordering of dimensions used to evaluate this function, after all splits have taken place. More... | |
std::vector< Dim > & | dims () |
const std::vector< PrefetchDirective > & | prefetches () const |
You may perform prefetching in some of the dimensions of a function. More... | |
std::vector< PrefetchDirective > & | prefetches () |
const FuseLoopLevel & | fuse_level () const |
Innermost loop level of fused loop nest for this function stage. More... | |
FuseLoopLevel & | fuse_level () |
const std::vector< FusedPair > & | fused_pairs () const |
List of function stages that are to be fused with this function stage from the outermost loop to a certain loop level. More... | |
std::vector< FusedPair > & | fused_pairs () |
bool | allow_race_conditions () const |
Are race conditions permitted? More... | |
bool & | allow_race_conditions () |
bool | atomic () const |
Use atomic update? More... | |
bool & | atomic () |
bool | override_atomic_associativity_test () const |
Atomic updates are only allowed on associative reductions. More... | |
bool & | override_atomic_associativity_test () |
void | accept (IRVisitor *) const |
Pass an IRVisitor through to all Exprs referenced in the Schedule. More... | |
void | mutate (IRMutator *) |
Pass an IRMutator through to all Exprs referenced in the Schedule. More... | |
A schedule for a single stage of a Halide pipeline.
Right now this interface is basically a struct, offering mutable access to its innards. In the future it may become more encapsulated.
Definition at line 646 of file Schedule.h.
|
inline |
Definition at line 650 of file Schedule.h.
|
default |
Halide::Internal::StageSchedule::StageSchedule | ( | ) |
StageSchedule Halide::Internal::StageSchedule::get_copy | ( | ) | const |
Return a copy of this StageSchedule.
bool& Halide::Internal::StageSchedule::touched | ( | ) |
This flag is set to true if the dims list has been manipulated by the user (or if a ScheduleHandle was created that could have been used to manipulate it).
It controls the warning that occurs if you schedule the vars of the pure step but not the update steps.
bool Halide::Internal::StageSchedule::touched | ( | ) | const |
const std::vector<ReductionVariable>& Halide::Internal::StageSchedule::rvars | ( | ) | const |
RVars of reduction domain associated with this schedule if there is any.
std::vector<ReductionVariable>& Halide::Internal::StageSchedule::rvars | ( | ) |
const std::vector<Split>& Halide::Internal::StageSchedule::splits | ( | ) | const |
The traversal of the domain of a function can have some of its dimensions split into sub-dimensions.
See Func::split
std::vector<Split>& Halide::Internal::StageSchedule::splits | ( | ) |
const std::vector<Dim>& Halide::Internal::StageSchedule::dims | ( | ) | const |
The list and ordering of dimensions used to evaluate this function, after all splits have taken place.
The first dimension in the vector corresponds to the innermost for loop, and the last is the outermost. Also specifies what type of for loop to use for each dimension. Does not specify the bounds on each dimension. These get inferred from how the function is used, what the splits are, and any optional bounds in the list below.
Referenced by do_cost_model_schedule().
std::vector<Dim>& Halide::Internal::StageSchedule::dims | ( | ) |
const std::vector<PrefetchDirective>& Halide::Internal::StageSchedule::prefetches | ( | ) | const |
You may perform prefetching in some of the dimensions of a function.
See Func::prefetch
std::vector<PrefetchDirective>& Halide::Internal::StageSchedule::prefetches | ( | ) |
const FuseLoopLevel& Halide::Internal::StageSchedule::fuse_level | ( | ) | const |
Innermost loop level of fused loop nest for this function stage.
Fusion runs from outermost to this loop level. The stages being fused should not have producer/consumer relationship. See Func::compute_with and Func::compute_with
FuseLoopLevel& Halide::Internal::StageSchedule::fuse_level | ( | ) |
const std::vector<FusedPair>& Halide::Internal::StageSchedule::fused_pairs | ( | ) | const |
List of function stages that are to be fused with this function stage from the outermost loop to a certain loop level.
Those function stages are to be computed AFTER this function stage at the last fused loop level. This list is populated when realization_order() is called. See Func::compute_with
std::vector<FusedPair>& Halide::Internal::StageSchedule::fused_pairs | ( | ) |
bool Halide::Internal::StageSchedule::allow_race_conditions | ( | ) | const |
Are race conditions permitted?
bool& Halide::Internal::StageSchedule::allow_race_conditions | ( | ) |
bool Halide::Internal::StageSchedule::atomic | ( | ) | const |
Use atomic update?
bool& Halide::Internal::StageSchedule::atomic | ( | ) |
bool Halide::Internal::StageSchedule::override_atomic_associativity_test | ( | ) | const |
Atomic updates are only allowed on associative reductions.
We try to prove the associativity, but the user can override the associativity test and suppress compiler error if the prover fails to recognize the associativity or the user does not care.
bool& Halide::Internal::StageSchedule::override_atomic_associativity_test | ( | ) |
void Halide::Internal::StageSchedule::accept | ( | IRVisitor * | ) | const |
Pass an IRVisitor through to all Exprs referenced in the Schedule.
void Halide::Internal::StageSchedule::mutate | ( | IRMutator * | ) |
Pass an IRMutator through to all Exprs referenced in the Schedule.