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

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

Public Member Functions

int get_mma_blocks_m_per_wavefront () const
int get_mma_blocks_n_per_wavefront () const

Static Public Member Functions

static bool wave_tile_divides (const BlockCounts &wave_tiling, const BlockCounts &macro_block)
 Check that we can use the given wave tiling for the given macro block tiling, i.e.

Public Attributes

MmaBlockSize mma_block_size
 The MMA block size (m, n, k) in elements.
int threads_per_mma_wavefront = 0
 How many threads will work together on 1 MMA block.
BlockCounts wave_tiling
 How many MMA blocks will be grouped together in a single wavefront / warp.
BlockCounts macro_tiling
 How many MMA blocks will be grouped together in a macro block / on a SM or CU This controls how much data one block needs to handle and will typically need to be stored in block-shared memory.
types::PrimitiveType acc_type
 The type used by the MMA hardware to accumulate the results of the MMA operation.
int impl_details = 0
 implementation-specific details, e.g. for ROCm MFMA variant selection

Member Function Documentation

◆ get_mma_blocks_m_per_wavefront()

int sdfg::gpu::GpuMmaTiling::get_mma_blocks_m_per_wavefront ( ) const

◆ get_mma_blocks_n_per_wavefront()

int sdfg::gpu::GpuMmaTiling::get_mma_blocks_n_per_wavefront ( ) const

◆ wave_tile_divides()

bool sdfg::gpu::GpuMmaTiling::wave_tile_divides ( const BlockCounts & wave_tiling,
const BlockCounts & macro_block )
static

Check that we can use the given wave tiling for the given macro block tiling, i.e.

that the wave tiling divides the macro block tiling and that the number of threads per wave does not exceed 1024.

Parameters
wave_tiling
macro_block
Returns

Member Data Documentation

◆ acc_type

types::PrimitiveType sdfg::gpu::GpuMmaTiling::acc_type

The type used by the MMA hardware to accumulate the results of the MMA operation.

This may be different from the input and output types, e.g. for FP16 inputs and FP32 outputs. For a MatmulNode this would not be externally visible other in the precision of the results

◆ impl_details

int sdfg::gpu::GpuMmaTiling::impl_details = 0

implementation-specific details, e.g. for ROCm MFMA variant selection

◆ macro_tiling

BlockCounts sdfg::gpu::GpuMmaTiling::macro_tiling

How many MMA blocks will be grouped together in a macro block / on a SM or CU This controls how much data one block needs to handle and will typically need to be stored in block-shared memory.

◆ mma_block_size

MmaBlockSize sdfg::gpu::GpuMmaTiling::mma_block_size

The MMA block size (m, n, k) in elements.

While every underlying storage will only use 2 dimensions of this, this qualifies all the possible operations on it

◆ threads_per_mma_wavefront

int sdfg::gpu::GpuMmaTiling::threads_per_mma_wavefront = 0

How many threads will work together on 1 MMA block.

◆ wave_tiling

BlockCounts sdfg::gpu::GpuMmaTiling::wave_tiling

How many MMA blocks will be grouped together in a single wavefront / warp.

MMA BlockSize * wave_tiling != macro_tiling


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