docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
tile_copy_node.h File Reference
#include "sdfg/data_flow/library_node.h"
#include <functional>
#include <string>
#include "sdfg/codegen/dispatchers/block_dispatcher.h"
#include "sdfg/serializer/json_serializer.h"
#include "sdfg/tiles/tiled_copy.h"

Go to the source code of this file.

Classes

class  sdfg::tiles::TileCopyNode
 A tiled copy carried as a value TiledCopy plan. More...
class  sdfg::tiles::TileCopyNodeSerializer
class  sdfg::tiles::TileCopyNodeDispatcher
 Reference (sequential, scalar) dispatcher for TileCopyNode. More...

Namespaces

namespace  sdfg
namespace  sdfg::tiles

Typedefs

using sdfg::tiles::GuardedLoadFn
 Renders a guarded (ragged-tile) copy-in load for the cooperative copy loop: a statement declaring type var that holds the bytes -wide value at (base)[index] (an element index into the flat elem_bytes -sized element pointer base), or zero where the in-scope __tc_ok predicate is false.

Functions

bool sdfg::tiles::provably_multiple_of (symbolic::Expression e, long long m, const TileCopyNode &node)
 True if e is a multiple of m for all values of its symbols: the indvar of each loop enclosing node is rewritten as init + stride * t; any other symbol is an unknown integer.
bool sdfg::tiles::guard_axis_aligned (const TileCopyNode &node, size_t axis, long long factor)
 Every guard dim on tile axis has a base and exclusive bound that are multiples of factor, so a factor-aligned run of coordinates along it is entirely in or entirely out of bounds.
size_t sdfg::tiles::widest_legal_transfer (const TileCopyNode &node, CopyAtom atom, const std::vector< size_t > &widths)
 The first of widths (bytes, widest first) at which each lane of node can move one contiguous multi-element run under atom, or 0.
std::string sdfg::tiles::emit_tile_copy_stmt (codegen::LanguageExtension &language_extension, const TileCopyNode &node, const std::string &dst_expr, const std::string &src_expr, types::PrimitiveType elem, const symbolic::Expression &index)
 The single-element copy statement dst[dst_geo(index)] = src[src_geo(index)]; for the tile coordinate index, addressing both bare-pointer sides as flat elem pointers via the plan's layouts.
std::string sdfg::tiles::emit_predicated_guarded_load (const std::string &type, const std::string &var, const std::string &base, const std::string &index)
 Vendor-agnostic GuardedLoadFn: a predicated load into a zero-initialized value (CUDA: @p LDG; AMDGPU: an exec-masked load).
void sdfg::tiles::emit_cooperative_copy_loop (codegen::LanguageExtension &language_extension, codegen::PrettyPrinter &stream, const TileCopyNode &node, const std::string &dst_expr, const std::string &src_expr, types::PrimitiveType elem, const std::function< std::string(const std::string &dst_addr, const std::string &src_addr, size_t bytes)> &async_stmt={}, const GuardedLoadFn &guarded_load={})
 Emit the block-cooperative staging loop for node into stream: every thread of the enclosing kernel block strides the flat tile from its flat index by the block thread count.

Variables

data_flow::LibraryNodeCode sdfg::tiles::LibraryNodeType_TileCopy {"tile_copy"}