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

#include <sdfg/targets/cuda/cuda_arch.h>

Inheritance diagram for sdfg::gpu::cuda::CudaMmaSupport:
[legend]

Public Member Functions

 CudaMmaSupport (bool base_support, bool tf32_support, bool fp64_support)
bool supported_types (types::PrimitiveType input_type, types::PrimitiveType output_type) const override
types::PrimitiveType get_accumulator_type (types::PrimitiveType input_type, types::PrimitiveType output_type, types::PrimitiveType desired_acc_type) const override
data_flow::ImplementationType get_mma_impl_type (const GpuMmaTiling &tiling) const override
bool is_valid_block_size (const MmaBlockSize &block_size, types::PrimitiveType input_type, types::PrimitiveType acc_type) const override
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 override
void set_mma_fragment_storage_type (types::StorageType &storage_type, const GpuMmaTiling &size, MmaFragmentType type, MmaFragmentLayout layout) const override
std::vector< MmaBlockSize > get_supported_block_sizes (types::PrimitiveType input_type, types::PrimitiveType acc_type) const override
void emit_block_frag_type (std::ostream &os, codegen::LanguageExtension &lang_ext, const types::StorageType &storage_type, types::PrimitiveType element_type) const
Public Member Functions inherited from sdfg::gpu::GpuMmaSupport
virtual ~GpuMmaSupport ()=default
types::PrimitiveType get_accumulator_type (types::PrimitiveType input_type, types::PrimitiveType output_type) const
 GpuMmaSupport ()=default
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.

Static Public Member Functions

static void emit_block_frag_type (std::ostream &os, codegen::LanguageExtension &lang_ext, MmaFragmentType type, const MmaBlockSize &dims, MmaFragmentLayout layout, types::PrimitiveType scalar_type, std::optional< std::pair< int, int > > coop_dims)
static bool is_mma_type (const types::StorageType &storage)
Static Public Member Functions inherited from sdfg::gpu::GpuMmaSupport
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.

Public Attributes

const bool base_support
const bool tf32_support
const bool fp64_support

Static Public Attributes

static constexpr const char * MMA_STORAGE_TYPE = "CUDA_MMA"

Static Protected Attributes

static constexpr MmaBlockSize DEFAULT_BLOCK_SIZE = {16, 16, 16}
static constexpr int THREADS_PER_WAVEFRONT = 32

Additional Inherited Members

Static Protected Member Functions inherited from sdfg::gpu::GpuMmaSupport
static int get_storage_type_arg_as_int (const types::StorageType &storage, int idx)

Constructor & Destructor Documentation

◆ CudaMmaSupport()

sdfg::gpu::cuda::CudaMmaSupport::CudaMmaSupport ( bool base_support,
bool tf32_support,
bool fp64_support )
inline

Member Function Documentation

◆ emit_block_frag_type() [1/2]

void sdfg::gpu::cuda::CudaMmaSupport::emit_block_frag_type ( std::ostream & os,
codegen::LanguageExtension & lang_ext,
const types::StorageType & storage_type,
types::PrimitiveType element_type ) const

◆ emit_block_frag_type() [2/2]

void sdfg::gpu::cuda::CudaMmaSupport::emit_block_frag_type ( std::ostream & os,
codegen::LanguageExtension & lang_ext,
MmaFragmentType type,
const MmaBlockSize & dims,
MmaFragmentLayout layout,
types::PrimitiveType scalar_type,
std::optional< std::pair< int, int > > coop_dims )
static

◆ get_accumulator_type()

types::PrimitiveType sdfg::gpu::cuda::CudaMmaSupport::get_accumulator_type ( types::PrimitiveType input_type,
types::PrimitiveType output_type,
types::PrimitiveType desired_acc_type ) const
overridevirtual

◆ get_mma_impl_type()

data_flow::ImplementationType sdfg::gpu::cuda::CudaMmaSupport::get_mma_impl_type ( const GpuMmaTiling & tiling) const
overridevirtual

◆ get_mma_tiling()

std::optional< GpuMmaTiling > sdfg::gpu::cuda::CudaMmaSupport::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
overridevirtual

◆ get_supported_block_sizes()

std::vector< MmaBlockSize > sdfg::gpu::cuda::CudaMmaSupport::get_supported_block_sizes ( types::PrimitiveType input_type,
types::PrimitiveType acc_type ) const
overridevirtual

◆ is_mma_type()

bool sdfg::gpu::cuda::CudaMmaSupport::is_mma_type ( const types::StorageType & storage)
static

◆ is_valid_block_size()

bool sdfg::gpu::cuda::CudaMmaSupport::is_valid_block_size ( const MmaBlockSize & block_size,
types::PrimitiveType input_type,
types::PrimitiveType acc_type ) const
overridevirtual

◆ set_mma_fragment_storage_type()

void sdfg::gpu::cuda::CudaMmaSupport::set_mma_fragment_storage_type ( types::StorageType & storage_type,
const GpuMmaTiling & size,
MmaFragmentType type,
MmaFragmentLayout layout ) const
overridevirtual

◆ supported_types()

bool sdfg::gpu::cuda::CudaMmaSupport::supported_types ( types::PrimitiveType input_type,
types::PrimitiveType output_type ) const
overridevirtual

Member Data Documentation

◆ base_support

const bool sdfg::gpu::cuda::CudaMmaSupport::base_support

◆ DEFAULT_BLOCK_SIZE

MmaBlockSize sdfg::gpu::cuda::CudaMmaSupport::DEFAULT_BLOCK_SIZE = {16, 16, 16}
staticconstexprprotected

◆ fp64_support

const bool sdfg::gpu::cuda::CudaMmaSupport::fp64_support

◆ MMA_STORAGE_TYPE

const char* sdfg::gpu::cuda::CudaMmaSupport::MMA_STORAGE_TYPE = "CUDA_MMA"
staticconstexpr

◆ tf32_support

const bool sdfg::gpu::cuda::CudaMmaSupport::tf32_support

◆ THREADS_PER_WAVEFRONT

int sdfg::gpu::cuda::CudaMmaSupport::THREADS_PER_WAVEFRONT = 32
staticconstexprprotected

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