45 bool has_scratchpad_ =
false;
46 unsigned spatial_axis_ = 0;
48 bool needs_sync_ =
false;
80 return has_scratchpad_;
92 return parallel_size_;
157 std::string container_;
159 std::vector<TileAxis> axes_;
161 bool writes_ =
false;
173 const std::vector<TileAxis>&
axes()
const {
Represents a schedule type for Map nodes.
Definition structured_loop.h:31
Base class for structured loop constructs.
Definition structured_loop.h:244
Target-neutral cooperation facts derived from one loop's schedule.
Definition tile.h:42
unsigned spatial_axis() const
Definition tile.h:88
static bool drives_cooperative_copy(const structured_control_flow::ScheduleType &sched)
True when sched is a group-level schedule whose parallel threads can drive a cooperative shared-memor...
Level level() const
Definition tile.h:82
bool has_scratchpad() const
Definition tile.h:79
static std::optional< Level > classify_level(const structured_control_flow::ScheduleType &sched)
The cooperation Level a target assigns to sched, or std::nullopt when no registered target treats it ...
const symbolic::Integer & parallel_size() const
Definition tile.h:91
AxisSchedule(Level level, Space space, bool has_scratchpad, unsigned spatial_axis=0, symbolic::Integer parallel_size=symbolic::integer(0), bool needs_sync=false, symbolic::Integer lanes=symbolic::integer(1))
Space space() const
Definition tile.h:85
const symbolic::Integer & lanes() const
Definition tile.h:97
static std::optional< AxisSchedule > classify(const structured_control_flow::ScheduleType &sched)
Classify a loop's schedule, or std::nullopt for a sequential loop (which does not shape storage).
bool needs_sync() const
Definition tile.h:94
How a tile relates to its enclosing parallel loop nest, and the storage space that relationship deman...
Definition locality.h:24
const symbolic::Symbol & indvar() const
Definition tile.h:133
Role role() const
Definition tile.h:136
const AxisSchedule & schedule() const
Definition tile.h:139
bool cooperative() const
Definition tile.h:148
const symbolic::Expression & init() const
Definition tile.h:142
static std::vector< TileAxis > enclosing(structured_control_flow::StructuredLoop &loop, const symbolic::MultiExpression &bases, const symbolic::Expression &offset=symbolic::integer(0))
The enclosing parallel axes of a tile with the given bases (min index per dim) and linearized offset:...
TileAxis(symbolic::Symbol indvar, Role role, AxisSchedule schedule, symbolic::Expression init=symbolic::integer(0), symbolic::Integer stride=symbolic::integer(1))
const symbolic::Integer & stride() const
Definition tile.h:145
Tile(std::string container, Layout source, std::vector< TileAxis > axes, bool reads, bool writes)
const std::string & container() const
Definition tile.h:167
LocalityPlan placement(structured_control_flow::StructuredLoop &loop, analysis::AnalysisManager &analysis_manager) const
The tile's placement in the enclosing parallel nest at loop — its axes plus loop-context flags,...
const Layout & source() const
Definition tile.h:170
bool reads() const
Definition tile.h:176
const std::vector< TileAxis > & axes() const
Definition tile.h:173
std::vector< TileAxis > private_axes() const
Space required_space() const
The memory space the tile must live in: the coarsest cooperative axis's space (Global > Shared > Regi...
bool writes() const
Definition tile.h:179
std::vector< TileAxis > cooperative_axes() const
Integer integer(int64_t value)
Creates an integer constant.
std::vector< Expression > MultiExpression
Vector of symbolic expressions for multi-dimensional operations.
Definition symbolic.h:89
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
SymEngine::RCP< const SymEngine::Symbol > Symbol
Reference-counted pointer to a SymEngine Symbol.
Definition symbolic.h:71
SymEngine::RCP< const SymEngine::Integer > Integer
Reference-counted pointer to a SymEngine Integer constant.
Definition symbolic.h:77
Definition gpu_tile_target.h:13
Space
Memory that backs cooperation at a level: Device/CPU -> Global (atomics/heap), Group -> Shared,...
Definition tile.h:36
@ Register
Definition tile.h:36
@ Global
Definition tile.h:36
@ Shared
Definition tile.h:36
math::tensor::TensorLayout Layout
The tiles geometry type is math::tensor::TensorLayout — the single source of truth for a (shape,...
Definition layout.h:11
Role
Whether the tile is per-iteration-private or shared across a parallel axis.
Definition tile.h:39
@ Private
Definition tile.h:39
@ Cooperative
Definition tile.h:39
Level
Cooperation scope of a parallel axis, coarsest to finest — target-neutral tiers (OpenCL/SYCL vocabula...
Definition tile.h:32
@ Group
Definition tile.h:32
@ Subgroup
Definition tile.h:32
@ Device
Definition tile.h:32