docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::gpu::GpuMmaFromMemoryLayout Struct Reference

Describes how a single MMA fragment maps to memory relative to a base pointer. More...

#include <sdfg/targets/gpu/gpu_mma_fragment.h>

Public Member Functions

bool clipped () const
std::string toStr () const
void collect_symbols (symbolic::SymbolSet &syms) const
void replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression)
void replace (const symbolic::ExpressionMapping &replacements)
std::optional< math::tensor::TensorLayout > to_tensor_layout (const MmaBlockSize &block_size, MmaFragmentType frag) const
 The accessed tile; a clipped fragment reports its clipped (in-bounds) extents min(block, rows/cols).
bool matches_access_shape (const symbolic::MultiExpression &shape, const MmaBlockSize &block_size, MmaFragmentType frag) const
 Whether shape is this fragment's block shape or its clipped shape (see to_tensor_layout).

Static Public Member Functions

static std::optional< GpuMmaFromMemoryLayout > from_tensor_layout (const math::tensor::TensorLayout &layout)

Public Attributes

symbolic::Expression offset
 element offset added to the base pointer
symbolic::Expression ldstride
 leading-dimension stride
MmaFragmentLayout layout
 memory layout of the tile
symbolic::Expression rows = SymEngine::null
 Clip of a ragged fragment: only logical rows r < rows and columns c < cols (from the fragment origin) are in bounds; loads zero-fill the rest, stores skip it.
symbolic::Expression cols = SymEngine::null

Detailed Description

Describes how a single MMA fragment maps to memory relative to a base pointer.

Shared by the fragment load/store nodes. The tile it describes must follow GEMM semantics: one customizable leading-dimension stride, the other dimension contiguous (row- or column-major).

Member Function Documentation

◆ clipped()

bool sdfg::gpu::GpuMmaFromMemoryLayout::clipped ( ) const
inline

◆ collect_symbols()

void sdfg::gpu::GpuMmaFromMemoryLayout::collect_symbols ( symbolic::SymbolSet & syms) const

◆ from_tensor_layout()

std::optional< GpuMmaFromMemoryLayout > sdfg::gpu::GpuMmaFromMemoryLayout::from_tensor_layout ( const math::tensor::TensorLayout & layout)
static

◆ matches_access_shape()

bool sdfg::gpu::GpuMmaFromMemoryLayout::matches_access_shape ( const symbolic::MultiExpression & shape,
const MmaBlockSize & block_size,
MmaFragmentType frag ) const

Whether shape is this fragment's block shape or its clipped shape (see to_tensor_layout).

◆ replace() [1/2]

void sdfg::gpu::GpuMmaFromMemoryLayout::replace ( const symbolic::Expression old_expression,
const symbolic::Expression new_expression )

◆ replace() [2/2]

void sdfg::gpu::GpuMmaFromMemoryLayout::replace ( const symbolic::ExpressionMapping & replacements)

◆ to_tensor_layout()

std::optional< math::tensor::TensorLayout > sdfg::gpu::GpuMmaFromMemoryLayout::to_tensor_layout ( const MmaBlockSize & block_size,
MmaFragmentType frag ) const
nodiscard

The accessed tile; a clipped fragment reports its clipped (in-bounds) extents min(block, rows/cols).

◆ toStr()

std::string sdfg::gpu::GpuMmaFromMemoryLayout::toStr ( ) const

Member Data Documentation

◆ cols

symbolic::Expression sdfg::gpu::GpuMmaFromMemoryLayout::cols = SymEngine::null

◆ layout

MmaFragmentLayout sdfg::gpu::GpuMmaFromMemoryLayout::layout

memory layout of the tile

◆ ldstride

symbolic::Expression sdfg::gpu::GpuMmaFromMemoryLayout::ldstride

leading-dimension stride

◆ offset

symbolic::Expression sdfg::gpu::GpuMmaFromMemoryLayout::offset

element offset added to the base pointer

◆ rows

symbolic::Expression sdfg::gpu::GpuMmaFromMemoryLayout::rows = SymEngine::null

Clip of a ragged fragment: only logical rows r < rows and columns c < cols (from the fragment origin) are in bounds; loads zero-fill the rest, stores skip it.

Null = the whole block is in bounds. Values above the block extent or below zero are allowed (fully inside / fully outside).


The documentation for this struct was generated from the following file: