Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Halide::Internal::StageSchedule Class Reference

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 (const std::vector< ReductionVariable > &rvars, const std::vector< Split > &splits, const std::vector< Dim > &dims, const std::vector< PrefetchDirective > &prefetches, const FuseLoopLevel &fuse_level, const std::vector< FusedPair > &fused_pairs, bool touched, bool allow_race_conditions, bool atomic, bool override_atomic_associativity_test)
StageSchedule | get_copy () const
| Return a copy of this StageSchedule.
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).
bool | touched () const
const std::vector< ReductionVariable > & | rvars () const
| RVars of reduction domain associated with this schedule if there is any.
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.
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.
std::vector< Dim > & | dims ()
const std::vector< PrefetchDirective > & | prefetches () const
| You may perform prefetching in some of the dimensions of a function.
std::vector< PrefetchDirective > & | prefetches ()
const FuseLoopLevel & | fuse_level () const
| Innermost loop level of fused loop nest for this function stage.
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.
std::vector< FusedPair > & | fused_pairs ()
bool | allow_race_conditions () const
| Are race conditions permitted?
bool & | allow_race_conditions ()
bool | atomic () const
| Use atomic update?
bool & | atomic ()
bool | override_atomic_associativity_test () const
| Atomic updates are only allowed on associative reductions.
bool & | override_atomic_associativity_test ()
void | accept (IRVisitor *) const
| Pass an IRVisitor through to all Exprs referenced in the Schedule.
void | mutate (IRMutator *)
| Pass an IRMutator through to all Exprs referenced in the Schedule.

## Detailed Description

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 680 of file Schedule.h.

## Constructor & Destructor Documentation

## ◆ StageSchedule() [1/4]

Halide::Internal::StageSchedule::StageSchedule | ( | IntrusivePtr< StageScheduleContents > | c | ) |
| inline

Definition at line 684 of file Schedule.h.

## ◆ StageSchedule() [2/4]

Halide::Internal::StageSchedule::StageSchedule | ( | const StageSchedule & | other | ) |
| default

## ◆ StageSchedule() [3/4]

Halide::Internal::StageSchedule::StageSchedule | ( |  | ) |

## ◆ StageSchedule() [4/4]

Halide::Internal::StageSchedule::StageSchedule | ( | const std::vector< ReductionVariable > & | rvars,
|  | const std::vector< Split > & | splits,
|  | const std::vector< Dim > & | dims,
|  | const std::vector< PrefetchDirective > & | prefetches,
|  | const FuseLoopLevel & | fuse_level,
|  | const std::vector< FusedPair > & | fused_pairs,
|  | bool | touched,
|  | bool | allow_race_conditions,
|  | bool | atomic,
|  | bool | override_atomic_associativity_test
| ) |  |

## Member Function Documentation

## ◆ get_copy()

StageSchedule Halide::Internal::StageSchedule::get_copy | ( |  | ) | const

Return a copy of this StageSchedule.

## ◆ touched() [1/2]

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.

## ◆ touched() [2/2]

bool Halide::Internal::StageSchedule::touched | ( |  | ) | const

## ◆ rvars() [1/2]

const std::vector< ReductionVariable > & Halide::Internal::StageSchedule::rvars | ( |  | ) | const

RVars of reduction domain associated with this schedule if there is any.

Referenced by Halide::SimdOpCheckTest::check_one().

## ◆ rvars() [2/2]

std::vector< ReductionVariable > & Halide::Internal::StageSchedule::rvars | ( |  | ) |

## ◆ splits() [1/2]

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

## ◆ splits() [2/2]

std::vector< Split > & Halide::Internal::StageSchedule::splits | ( |  | ) |

## ◆ dims() [1/2]

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.

## ◆ dims() [2/2]

std::vector< Dim > & Halide::Internal::StageSchedule::dims | ( |  | ) |

## ◆ prefetches() [1/2]

const std::vector< PrefetchDirective > & Halide::Internal::StageSchedule::prefetches | ( |  | ) | const

You may perform prefetching in some of the dimensions of a function.

See Func::prefetch

## ◆ prefetches() [2/2]

std::vector< PrefetchDirective > & Halide::Internal::StageSchedule::prefetches | ( |  | ) |

## ◆ fuse_level() [1/2]

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

## ◆ fuse_level() [2/2]

FuseLoopLevel & Halide::Internal::StageSchedule::fuse_level | ( |  | ) |

## ◆ fused_pairs() [1/2]

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

## ◆ fused_pairs() [2/2]

std::vector< FusedPair > & Halide::Internal::StageSchedule::fused_pairs | ( |  | ) |

## ◆ allow_race_conditions() [1/2]

bool Halide::Internal::StageSchedule::allow_race_conditions | ( |  | ) | const

Are race conditions permitted?

## ◆ allow_race_conditions() [2/2]

bool & Halide::Internal::StageSchedule::allow_race_conditions | ( |  | ) |

## ◆ atomic() [1/2]

bool Halide::Internal::StageSchedule::atomic | ( |  | ) | const

Use atomic update?

## ◆ atomic() [2/2]

bool & Halide::Internal::StageSchedule::atomic | ( |  | ) |

## ◆ override_atomic_associativity_test() [1/2]

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.

## ◆ override_atomic_associativity_test() [2/2]

bool & Halide::Internal::StageSchedule::override_atomic_associativity_test | ( |  | ) |

## ◆ accept()

void Halide::Internal::StageSchedule::accept | ( | IRVisitor * |  | ) | const

Pass an IRVisitor through to all Exprs referenced in the Schedule.

## ◆ mutate()

void Halide::Internal::StageSchedule::mutate | ( | IRMutator * |  | ) |

Pass an IRMutator through to all Exprs referenced in the Schedule.

The documentation for this class was generated from the following file:

- src/Schedule.h