Halide
17.0.2
Halide compiler and libraries
|
A schedule for a Function of a Halide pipeline. More...
#include <Schedule.h>
Public Member Functions | |
FuncSchedule (IntrusivePtr< FuncScheduleContents > c) | |
FuncSchedule (const FuncSchedule &other)=default | |
FuncSchedule () | |
FuncSchedule | deep_copy (std::map< FunctionPtr, FunctionPtr > &copied_map) const |
Return a deep copy of this FuncSchedule. More... | |
bool & | async () |
Is the production of this Function done asynchronously. More... | |
bool | async () const |
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... | |
bool & | memoized () |
This flag is set to true if the schedule is memoized. More... | |
bool | memoized () const |
This flag is set to true if the schedule is memoized. More... | |
Expr & | memoize_eviction_key () |
This flag is set to true if the schedule is memoized and has an attached eviction key. More... | |
Expr | memoize_eviction_key () const |
This flag is set to true if the schedule is memoized and has an attached eviction key. More... | |
const std::vector< StorageDim > & | storage_dims () const |
The list and order of dimensions used to store this function. More... | |
std::vector< StorageDim > & | storage_dims () |
The list and order of dimensions used to store this function. More... | |
MemoryType | memory_type () const |
The memory type (heap/stack/shared/etc) used to back this Func. More... | |
MemoryType & | memory_type () |
The memory type (heap/stack/shared/etc) used to back this Func. More... | |
const std::vector< Bound > & | bounds () const |
You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor. More... | |
std::vector< Bound > & | bounds () |
You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor. More... | |
const std::vector< Bound > & | estimates () const |
You may explicitly specify an estimate of some of the function dimensions. More... | |
std::vector< Bound > & | estimates () |
You may explicitly specify an estimate of some of the function dimensions. More... | |
const std::map< std::string, Internal::FunctionPtr > & | wrappers () const |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage. More... | |
std::map< std::string, Internal::FunctionPtr > & | wrappers () |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage. More... | |
void | add_wrapper (const std::string &f, const Internal::FunctionPtr &wrapper) |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage. More... | |
const LoopLevel & | store_level () const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
const LoopLevel & | compute_level () const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
const LoopLevel & | hoist_storage_level () const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
LoopLevel & | store_level () |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
LoopLevel & | compute_level () |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
LoopLevel & | hoist_storage_level () |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level. More... | |
A schedule for a Function of a Halide pipeline.
This schedule is applied to all stages of the Function. 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 590 of file Schedule.h.
|
inline |
Definition at line 594 of file Schedule.h.
|
default |
Halide::Internal::FuncSchedule::FuncSchedule | ( | ) |
FuncSchedule Halide::Internal::FuncSchedule::deep_copy | ( | std::map< FunctionPtr, FunctionPtr > & | copied_map | ) | const |
Return a deep copy of this FuncSchedule.
It recursively deep copies all called functions, schedules, specializations, and reduction domains. This method takes a map of <old FunctionContents, deep-copied version> as input and would use the deep-copied FunctionContents from the map if exists instead of creating a new deep-copy to avoid creating deep-copies of the same FunctionContents multiple times.
bool& Halide::Internal::FuncSchedule::memoized | ( | ) |
This flag is set to true if the schedule is memoized.
bool Halide::Internal::FuncSchedule::memoized | ( | ) | const |
This flag is set to true if the schedule is memoized.
Expr& Halide::Internal::FuncSchedule::memoize_eviction_key | ( | ) |
This flag is set to true if the schedule is memoized and has an attached eviction key.
Expr Halide::Internal::FuncSchedule::memoize_eviction_key | ( | ) | const |
This flag is set to true if the schedule is memoized and has an attached eviction key.
bool& Halide::Internal::FuncSchedule::async | ( | ) |
Is the production of this Function done asynchronously.
bool Halide::Internal::FuncSchedule::async | ( | ) | const |
const std::vector<StorageDim>& Halide::Internal::FuncSchedule::storage_dims | ( | ) | const |
The list and order of dimensions used to store this function.
The first dimension in the vector corresponds to the innermost dimension for storage (i.e. which dimension is tightly packed in memory)
std::vector<StorageDim>& Halide::Internal::FuncSchedule::storage_dims | ( | ) |
The list and order of dimensions used to store this function.
The first dimension in the vector corresponds to the innermost dimension for storage (i.e. which dimension is tightly packed in memory)
MemoryType Halide::Internal::FuncSchedule::memory_type | ( | ) | const |
The memory type (heap/stack/shared/etc) used to back this Func.
MemoryType& Halide::Internal::FuncSchedule::memory_type | ( | ) |
The memory type (heap/stack/shared/etc) used to back this Func.
const std::vector<Bound>& Halide::Internal::FuncSchedule::bounds | ( | ) | const |
You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor.
See Func::bound and Func::align_bounds and Func::align_extent.
std::vector<Bound>& Halide::Internal::FuncSchedule::bounds | ( | ) |
You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor.
See Func::bound and Func::align_bounds and Func::align_extent.
const std::vector<Bound>& Halide::Internal::FuncSchedule::estimates | ( | ) | const |
You may explicitly specify an estimate of some of the function dimensions.
std::vector<Bound>& Halide::Internal::FuncSchedule::estimates | ( | ) |
You may explicitly specify an estimate of some of the function dimensions.
const std::map<std::string, Internal::FunctionPtr>& Halide::Internal::FuncSchedule::wrappers | ( | ) | const |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage.
If the string 'f' is empty, it means replace all calls to the function by all other functions (excluding itself) in the pipeline with the global identity wrapper. See Func::in and Func::clone_in for more details.
std::map<std::string, Internal::FunctionPtr>& Halide::Internal::FuncSchedule::wrappers | ( | ) |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage.
If the string 'f' is empty, it means replace all calls to the function by all other functions (excluding itself) in the pipeline with the global identity wrapper. See Func::in and Func::clone_in for more details.
void Halide::Internal::FuncSchedule::add_wrapper | ( | const std::string & | f, |
const Internal::FunctionPtr & | wrapper | ||
) |
Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage.
If the string 'f' is empty, it means replace all calls to the function by all other functions (excluding itself) in the pipeline with the global identity wrapper. See Func::in and Func::clone_in for more details.
const LoopLevel& Halide::Internal::FuncSchedule::store_level | ( | ) | const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
const LoopLevel& Halide::Internal::FuncSchedule::compute_level | ( | ) | const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
const LoopLevel& Halide::Internal::FuncSchedule::hoist_storage_level | ( | ) | const |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
LoopLevel& Halide::Internal::FuncSchedule::store_level | ( | ) |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
LoopLevel& Halide::Internal::FuncSchedule::compute_level | ( | ) |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
LoopLevel& Halide::Internal::FuncSchedule::hoist_storage_level | ( | ) |
At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at
void Halide::Internal::FuncSchedule::accept | ( | IRVisitor * | ) | const |
Pass an IRVisitor through to all Exprs referenced in the Schedule.
void Halide::Internal::FuncSchedule::mutate | ( | IRMutator * | ) |
Pass an IRMutator through to all Exprs referenced in the Schedule.