How a tile relates to its enclosing parallel loop nest, and the storage space that relationship demands.
More...
#include <sdfg/tiles/locality.h>
How a tile relates to its enclosing parallel loop nest, and the storage space that relationship demands.
A LocalityPlan is the tile's parallel TileAxis partition plus a few loop-context flags; required_space maps it to the memory Space a localizing transformation must stage the tile in (or std::nullopt when the schedule cannot be safely localized). Build one with Tile::placement, or directly with LocalityPlan::analyze.
◆ LocalityPlan() [1/2]
| sdfg::tiles::LocalityPlan::LocalityPlan |
( |
| ) |
|
|
default |
◆ LocalityPlan() [2/2]
| sdfg::tiles::LocalityPlan::LocalityPlan |
( |
std::vector< TileAxis > | axes, |
|
|
bool | loop_is_outermost = false, |
|
|
bool | loop_has_scratchpad = false, |
|
|
bool | has_scratchpad_descendant = false, |
|
|
bool | enclosing_cooperative = false ) |
|
inline |
Construct a plan from known axes and loop-context flags (e.g.
for tests or callers that already have the facts); analyze derives the flags instead.
◆ analyze()
Analyze the placement of a tile with the given axes at loop (TileAxis::enclosing produces the axes; Tile::placement is the usual entry).
Fills the loop-context flags from the surrounding nest.
◆ axes()
| const std::vector< TileAxis > & sdfg::tiles::LocalityPlan::axes |
( |
| ) |
const |
|
inline |
◆ cooperative_axes()
| std::vector< TileAxis > sdfg::tiles::LocalityPlan::cooperative_axes |
( |
| ) |
const |
The scratchpad cooperative axes (the shared/copy parallelism axes).
◆ enclosing_cooperative()
| bool sdfg::tiles::LocalityPlan::enclosing_cooperative |
( |
| ) |
const |
|
inline |
◆ has_cooperative_at()
| bool sdfg::tiles::LocalityPlan::has_cooperative_at |
( |
Level | level | ) |
const |
True when a cooperative scratchpad axis at level exists.
◆ has_global_cooperative()
| bool sdfg::tiles::LocalityPlan::has_global_cooperative |
( |
| ) |
const |
True when a cooperative axis backed only by global memory exists (no private stack fits: a host-parallel shared operand).
◆ has_scratchpad_cooperative()
| bool sdfg::tiles::LocalityPlan::has_scratchpad_cooperative |
( |
| ) |
const |
True when any cooperative scratchpad axis exists (threads share the tile on-chip).
◆ has_scratchpad_descendant()
| bool sdfg::tiles::LocalityPlan::has_scratchpad_descendant |
( |
| ) |
const |
|
inline |
◆ inside_scratchpad_scope()
| bool sdfg::tiles::LocalityPlan::inside_scratchpad_scope |
( |
| ) |
const |
True when a scratchpad-scheduled axis encloses us (we are inside a device kernel).
◆ loop_has_scratchpad()
| bool sdfg::tiles::LocalityPlan::loop_has_scratchpad |
( |
| ) |
const |
|
inline |
◆ loop_is_outermost()
| bool sdfg::tiles::LocalityPlan::loop_is_outermost |
( |
| ) |
const |
|
inline |
◆ private_axes()
| std::vector< TileAxis > sdfg::tiles::LocalityPlan::private_axes |
( |
| ) |
const |
The scratchpad per-thread axes (indvar in a tile base) — each owns a buffer slot.
◆ required_space()
| std::optional< Space > sdfg::tiles::LocalityPlan::required_space |
( |
bool | container_written | ) |
const |
The memory space this tile must be staged in, or std::nullopt when the schedule cannot be safely localized.
- Register — thread-private / sequential buffer (also a CPU stack buffer).
- Shared — block-shared GPU buffer.
- Global — grid-wide GPU buffer.
A cooperative CPU read tile replicates privately (Register); a cooperative write is a reduction/race and declines. A cooperative GPU read tile follows the coarsest cooperative level; warp-only cooperation is served by shuffles (declines).
The documentation for this class was generated from the following file: