25 std::vector<TileAxis> axes_;
26 bool loop_is_outermost_ =
false;
27 bool loop_has_scratchpad_ =
false;
28 bool has_scratchpad_descendant_ =
false;
31 bool enclosing_cooperative_ =
false;
39 std::vector<TileAxis>
axes,
54 const std::vector<TileAxis>&
axes,
58 const std::vector<TileAxis>&
axes()
const {
62 return loop_is_outermost_;
65 return loop_has_scratchpad_;
68 return has_scratchpad_descendant_;
71 return enclosing_cooperative_;
Base class for structured loop constructs.
Definition structured_loop.h:244
bool has_scratchpad_descendant() const
Definition locality.h:67
std::vector< TileAxis > private_axes() const
The scratchpad per-thread axes (indvar in a tile base) — each owns a buffer slot.
bool has_cooperative_at(Level level) const
True when a cooperative scratchpad axis at level exists.
bool enclosing_cooperative() const
Definition locality.h:70
LocalityPlan(std::vector< TileAxis > axes, bool loop_is_outermost=false, bool loop_has_scratchpad=false, bool has_scratchpad_descendant=false, bool enclosing_cooperative=false)
Construct a plan from known axes and loop-context flags (e.g.
Definition locality.h:38
bool loop_has_scratchpad() const
Definition locality.h:64
bool loop_is_outermost() const
Definition locality.h:61
std::vector< TileAxis > cooperative_axes() const
The scratchpad cooperative axes (the shared/copy parallelism axes).
std::optional< Space > required_space(bool container_written) const
The memory space this tile must be staged in, or std::nullopt when the schedule cannot be safely loca...
bool has_global_cooperative() const
True when a cooperative axis backed only by global memory exists (no private stack fits: a host-paral...
const std::vector< TileAxis > & axes() const
Definition locality.h:58
bool inside_scratchpad_scope() const
True when a scratchpad-scheduled axis encloses us (we are inside a device kernel).
static LocalityPlan analyze(structured_control_flow::StructuredLoop &loop, const std::vector< TileAxis > &axes, analysis::AnalysisManager &analysis_manager)
Analyze the placement of a tile with the given axes at loop (TileAxis::enclosing produces the axes; T...
bool has_scratchpad_cooperative() const
True when any cooperative scratchpad axis exists (threads share the tile on-chip).
Definition gpu_tile_target.h:13
structured_control_flow::StructuredLoop * find_block_scheduled_descendant(structured_control_flow::StructuredLoop &loop, analysis::AnalysisManager &analysis_manager)
First block-level GPU-offloaded loop in loop's body (a cooperative copy / consumer axis for enclosing...
Level
Cooperation scope of a parallel axis, coarsest to finest — target-neutral tiers (OpenCL/SYCL vocabula...
Definition tile.h:32
Schedule-aware tile vocabulary: a Tile is a Layout (geometry from MemoryLayoutAnalysis) partitioned o...