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

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

Inheritance diagram for sdfg::gpu::GpuMmaSupport:
[legend]

Public Member Functions

virtual ~GpuMmaSupport ()=default
virtual types::PrimitiveType get_accumulator_type (types::PrimitiveType input_type, types::PrimitiveType output_type, types::PrimitiveType desired_acc_type) const =0
types::PrimitiveType get_accumulator_type (types::PrimitiveType input_type, types::PrimitiveType output_type) const
 GpuMmaSupport ()=default
virtual bool is_valid_block_size (const MmaBlockSize &block_size, types::PrimitiveType input_type, types::PrimitiveType acc_type) const =0
virtual data_flow::ImplementationType get_mma_impl_type (const GpuMmaTiling &tiling) const =0
virtual bool supported_types (types::PrimitiveType input_type, types::PrimitiveType output_type) const =0
virtual std::optional< GpuMmaTiling > get_mma_tiling (const symbolic::MultiExpression &res_shape, types::PrimitiveType input_type, types::PrimitiveType acc_type, const MmaBlockSize *block_size_hint, const BlockCounts *wave_tile_hint) const =0
virtual std::optional< GpuMmaTiling > get_ragged_mma_tiling (const symbolic::MultiExpression &padded_shape, types::PrimitiveType input_type, types::PrimitiveType output_type, types::PrimitiveType acc_type, const MmaBlockSize *block_size_hint, const BlockCounts *wave_tile_hint) const
 Tiling for a ragged problem: padded_shape is a constant upper bound of each extent that need not be a multiple of the MMA block.
virtual void set_mma_fragment_storage_type (types::StorageType &storage_type, const GpuMmaTiling &tiling, MmaFragmentType type, MmaFragmentLayout layout) const =0
virtual std::vector< MmaBlockSize > get_supported_block_sizes (types::PrimitiveType input_type, types::PrimitiveType acc_type) const =0

Static Public Member Functions

static int get_integer_block_count (const symbolic::Expression &size, uint16_t block_size)
static int get_ceil_block_count (const symbolic::Expression &size, uint16_t block_size)
 ceil(size / block_size) for a positive integer size, otherwise 0.

Static Protected Member Functions

static int get_storage_type_arg_as_int (const types::StorageType &storage, int idx)

Constructor & Destructor Documentation

◆ ~GpuMmaSupport()

virtual sdfg::gpu::GpuMmaSupport::~GpuMmaSupport ( )
virtualdefault

◆ GpuMmaSupport()

sdfg::gpu::GpuMmaSupport::GpuMmaSupport ( )
default

Member Function Documentation

◆ get_accumulator_type() [1/2]

types::PrimitiveType sdfg::gpu::GpuMmaSupport::get_accumulator_type ( types::PrimitiveType input_type,
types::PrimitiveType output_type ) const
inline

◆ get_accumulator_type() [2/2]

virtual types::PrimitiveType sdfg::gpu::GpuMmaSupport::get_accumulator_type ( types::PrimitiveType input_type,
types::PrimitiveType output_type,
types::PrimitiveType desired_acc_type ) const
pure virtual

◆ get_ceil_block_count()

int sdfg::gpu::GpuMmaSupport::get_ceil_block_count ( const symbolic::Expression & size,
uint16_t block_size )
static

ceil(size / block_size) for a positive integer size, otherwise 0.

◆ get_integer_block_count()

int sdfg::gpu::GpuMmaSupport::get_integer_block_count ( const symbolic::Expression & size,
uint16_t block_size )
static

◆ get_mma_impl_type()

virtual data_flow::ImplementationType sdfg::gpu::GpuMmaSupport::get_mma_impl_type ( const GpuMmaTiling & tiling) const
pure virtual

◆ get_mma_tiling()

virtual std::optional< GpuMmaTiling > sdfg::gpu::GpuMmaSupport::get_mma_tiling ( const symbolic::MultiExpression & res_shape,
types::PrimitiveType input_type,
types::PrimitiveType acc_type,
const MmaBlockSize * block_size_hint,
const BlockCounts * wave_tile_hint ) const
pure virtual

◆ get_ragged_mma_tiling()

virtual std::optional< GpuMmaTiling > sdfg::gpu::GpuMmaSupport::get_ragged_mma_tiling ( const symbolic::MultiExpression & padded_shape,
types::PrimitiveType input_type,
types::PrimitiveType output_type,
types::PrimitiveType acc_type,
const MmaBlockSize * block_size_hint,
const BlockCounts * wave_tile_hint ) const
inlinevirtual

Tiling for a ragged problem: padded_shape is a constant upper bound of each extent that need not be a multiple of the MMA block.

Fragments crossing the exact extent are clipped (zero-filled loads, masked stores; see GpuMmaFromMemoryLayout::rows/cols). Targets without masked fragment transfers return nullopt.

Reimplemented in sdfg::gpu::rocm::RocmMmaSupport.

◆ get_storage_type_arg_as_int()

int sdfg::gpu::GpuMmaSupport::get_storage_type_arg_as_int ( const types::StorageType & storage,
int idx )
staticprotected

◆ get_supported_block_sizes()

virtual std::vector< MmaBlockSize > sdfg::gpu::GpuMmaSupport::get_supported_block_sizes ( types::PrimitiveType input_type,
types::PrimitiveType acc_type ) const
pure virtual

◆ is_valid_block_size()

virtual bool sdfg::gpu::GpuMmaSupport::is_valid_block_size ( const MmaBlockSize & block_size,
types::PrimitiveType input_type,
types::PrimitiveType acc_type ) const
pure virtual

◆ set_mma_fragment_storage_type()

virtual void sdfg::gpu::GpuMmaSupport::set_mma_fragment_storage_type ( types::StorageType & storage_type,
const GpuMmaTiling & tiling,
MmaFragmentType type,
MmaFragmentLayout layout ) const
pure virtual

◆ supported_types()

virtual bool sdfg::gpu::GpuMmaSupport::supported_types ( types::PrimitiveType input_type,
types::PrimitiveType output_type ) const
pure virtual

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