Symbol assumptions for reasoning about bounds, constness, and evolution.
Map from symbols to their assumptions.
Definition assumptions.h:313
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
std::set< Symbol, SymEngine::RCPBasicKeyLess > SymbolSet
Ordered set of symbols.
Definition symbolic.h:95
SymEngine::RCP< const SymEngine::Boolean > Condition
Reference-counted pointer to a boolean condition expression.
Definition symbolic.h:86
SymEngine::map_basic_basic ExpressionMapping
Definition symbolic.h:109
Definition gpu_tile_target.h:13
symbolic::Expression simplify_tile_bound(const symbolic::Expression &max, const symbolic::Expression &base, const symbolic::Expression &size)
Simplify a tile's inclusive bound max for coordinates base + i, 0 <= i < size, preserving the predica...
symbolic::MultiExpression delinearize_rowmajor(const symbolic::Expression &flat, const symbolic::MultiExpression &sizes)
Row-major delinearization of a flat index into per-dim coordinates (dim 0 slowest),...
bool coalesce_sweep_order(TiledCopy &plan, TileGuard &guard)
Move the source's unit-stride tile dim last (lane-fastest in the row-major sweep),...
math::tensor::TensorLayout Layout
The tiles geometry type is math::tensor::TensorLayout — the single source of truth for a (shape,...
Definition layout.h:11
CopyPhase
Which half of a register-staged copy a node performs.
Definition tiled_copy.h:46
@ LoadRegs
source -> registers (_dst is the register array)
Definition tiled_copy.h:48
@ StoreRegs
registers -> destination (_src is the register array)
Definition tiled_copy.h:49
@ Full
source -> destination
Definition tiled_copy.h:47
CopyAtom
The per-lane transfer primitive a tiled copy lowers to.
Definition tiled_copy.h:24
@ CpAsync
a contiguous 4/8/16-byte async global->shared cp.async
Definition tiled_copy.h:27
@ CoalesceSync
2-D 16/32-bit copy into a column-major buffer that keeps global reads coalesced: each lane loads four...
Definition tiled_copy.h:30
@ ScalarSync
one element per lane, synchronous store
Definition tiled_copy.h:25
@ VectorSync
a contiguous 4/8/16-byte vector per lane, synchronous
Definition tiled_copy.h:26
CopyDirection
Which way the tile moves between the flat (global) side and the packed buffer.
Definition tiled_copy.h:38
@ Out
write the local buffer back to the global tile (copy-out / writeback)
Definition tiled_copy.h:40
@ In
read the global tile into the local buffer (copy-in / stage)
Definition tiled_copy.h:39
XOR-swizzle as a composition functor over a Layout.
Definition swizzle.h:21
Definition tiled_copy.h:69
symbolic::Expression base
global base of the tile along this dim
Definition tiled_copy.h:71
symbolic::Expression max
inclusive global upper bound
Definition tiled_copy.h:72
size_t axis
which tile coordinate (index into tile_sizes)
Definition tiled_copy.h:70
The ragged-tile boundary predicate, stored per-dim.
Definition tiled_copy.h:68
symbolic::Condition predicate(const symbolic::MultiExpression &coords) const
Predicate over explicit per-mode tile coordinates (one per tile_sizes).
bool simplify()
Simplify each dim's bound with simplify_tile_bound; returns true if any changed.
void collect_symbols(symbolic::SymbolSet &set) const
symbolic::Condition predicate(const symbolic::Expression &flat) const
Predicate over the flat index, row-major delinearized into tile_sizes.
void replace_symbols(const symbolic::ExpressionMapping &replacements)
bool trivial() const
Definition tiled_copy.h:77
std::vector< Dim > dims
un-discharged dims; empty ⇒ always valid
Definition tiled_copy.h:75
symbolic::MultiExpression tile_sizes
tile extents (the delinearization domain)
Definition tiled_copy.h:74
bool discharge(const symbolic::SymbolSet ¶meters, const symbolic::Assumptions &assumptions)
Drop dims provably full (base + size - 1 <= max) under the assumptions; returns true if any dim was d...
Definition tiled_copy.h:52
Layout src
tile-local coordinate -> global element
Definition tiled_copy.h:53
CopyAtom atom
Definition tiled_copy.h:55
Layout dst
tile-local coordinate -> local-buffer slot
Definition tiled_copy.h:54
Swizzle dst_swizzle
XOR-swizzle on the buffer (dst) offset; identity = plain.
Definition tiled_copy.h:56