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

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

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

Public Member Functions

 GpuMmaExpander (const GpuArch *arch, const MmaBlockSize *block_size_hint=nullptr, const BlockCounts *wave_tile_hint=nullptr)
virtual ~GpuMmaExpander ()=default
const LibNodeExpander * for_lib_node (const data_flow::LibraryNode &node) const override
 Prefiltering of libnodes.
LibNodeExpander::ExpandOutcome handle_expand (LibNodeExpander::ExpandContext &context, structured_control_flow::Block &block, math::tensor::MatMulNode &node) const override
Public Member Functions inherited from sdfg::passes::CodeLibNodeExpander< math::tensor::MatMulNode >
 CodeLibNodeExpander (const data_flow::LibraryNodeCode &code)
const data_flow::LibraryNodeCode & code () const
 The fixed library node code this expander dispatches on.
const data_flow::LibraryNodeCode * matched_code () const override
 If this expander dispatches on a single, fixed library node code, expose it here.
Public Member Functions inherited from sdfg::passes::TypedLibNodeExpander< math::tensor::MatMulNode >
const LibNodeExpander * for_lib_node (const data_flow::LibraryNode &node) const override
 Prefiltering of libnodes.
virtual LibNodeExpander::ExpandOutcome handle_expand (LibNodeExpander::ExpandContext &context, structured_control_flow::Block &block, math::tensor::MatMulNode &node) const=0
Public Member Functions inherited from sdfg::passes::LibNodeExpander
virtual ~LibNodeExpander ()=default
virtual ExpandOutcome handle_expand (ExpandContext &context, structured_control_flow::Block &block, data_flow::LibraryNode &node) const =0

Static Public Member Functions

static void create_fragment_load (passes::LibNodeExpander::AccessNodeExpand &standalone, types::PrimitiveType input_type, const data_flow::ImplementationType &impl_type, const DebugInfo &org_debug_info, builder::StructuredSDFGBuilder &builder, std::string frag_name, const MmaBlockSize &mma_block_size, MmaFragmentType frag_type, const GpuMmaFromMemoryLayout &from_memory, unsigned input_index, const char *operand_label, Block &block)
static void create_fragment_store (passes::LibNodeExpander::AccessNodeExpand &standalone, types::PrimitiveType output_type, const data_flow::ImplementationType &impl_type, const DebugInfo &org_debug_info, builder::StructuredSDFGBuilder &builder, std::string frag_name, const MmaBlockSize &mma_block_size, MmaFragmentType frag_type, const GpuMmaFromMemoryLayout &to_memory, unsigned input_index, const char *operand_label, Block &block)
static void create_eltwise_add_block (AccessNodeExpand &standalone, const MmaBlockSize &mma_block_size, types::PrimitiveType acc_type, types::PrimitiveType output_type, const data_flow::ImplementationType &impl_type, const DebugInfo &debug_info, builder::StructuredSDFGBuilder &builder, const std::string &c_frag_name, const std::string &acc_frag_name, const std::string &store_frag_name, Block &block)
static passes::LibNodeExpander::ExpandOutcome expand_mma_standalone (LibNodeExpander::AccessNodeExpand &standalone, const GpuArch &arch, GpuMmaTiling &mma_tiling, const math::tensor::TensorLayout &layout_a, const math::tensor::TensorLayout &layout_b, const math::tensor::TensorLayout &layout_y, types::PrimitiveType input_type, types::PrimitiveType output_type, bool include_c_add, const DebugInfo &org_debug_info, const std::array< int, 3 > &args_order, bool ragged=false, int k_block_multiple=1)
static void create_fragment_mma (LibNodeExpander::AccessNodeExpand &standalone, const GpuArch &arch, GpuMmaTiling &mma_tiling, types::PrimitiveType input_type, const std::string &frag_a, const std::string &frag_b, const std::string &frag_acc, const data_flow::ImplementationType &impl_type, const DebugInfo &org_debug_info, builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &block)

Protected Member Functions

virtual bool matches_possible_mma_pattern (const math::tensor::MatMulNode &node) const

Protected Attributes

const GpuArch * arch_
const MmaBlockSize * block_size_hint_ = nullptr
const BlockCounts * wave_tile_hint_ = nullptr

Additional Inherited Members

Public Types inherited from sdfg::passes::LibNodeExpander
enum class  InputUse {
  Skip = 0 , Scalar , IndirectRead , IndirectWrite ,
  IndirectReadWrite
}

Constructor & Destructor Documentation

◆ GpuMmaExpander()

sdfg::gpu::GpuMmaExpander::GpuMmaExpander ( const GpuArch * arch,
const MmaBlockSize * block_size_hint = nullptr,
const BlockCounts * wave_tile_hint = nullptr )
inline

◆ ~GpuMmaExpander()

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

Member Function Documentation

◆ create_eltwise_add_block()

void sdfg::gpu::GpuMmaExpander::create_eltwise_add_block ( AccessNodeExpand & standalone,
const MmaBlockSize & mma_block_size,
types::PrimitiveType acc_type,
types::PrimitiveType output_type,
const data_flow::ImplementationType & impl_type,
const DebugInfo & debug_info,
builder::StructuredSDFGBuilder & builder,
const std::string & c_frag_name,
const std::string & acc_frag_name,
const std::string & store_frag_name,
Block & block )
static

◆ create_fragment_load()

void sdfg::gpu::GpuMmaExpander::create_fragment_load ( passes::LibNodeExpander::AccessNodeExpand & standalone,
types::PrimitiveType input_type,
const data_flow::ImplementationType & impl_type,
const DebugInfo & org_debug_info,
builder::StructuredSDFGBuilder & builder,
std::string frag_name,
const MmaBlockSize & mma_block_size,
MmaFragmentType frag_type,
const GpuMmaFromMemoryLayout & from_memory,
unsigned input_index,
const char * operand_label,
Block & block )
static

◆ create_fragment_mma()

void sdfg::gpu::GpuMmaExpander::create_fragment_mma ( LibNodeExpander::AccessNodeExpand & standalone,
const GpuArch & arch,
GpuMmaTiling & mma_tiling,
types::PrimitiveType input_type,
const std::string & frag_a,
const std::string & frag_b,
const std::string & frag_acc,
const data_flow::ImplementationType & impl_type,
const DebugInfo & org_debug_info,
builder::StructuredSDFGBuilder & builder,
structured_control_flow::Block & block )
static

◆ create_fragment_store()

void sdfg::gpu::GpuMmaExpander::create_fragment_store ( passes::LibNodeExpander::AccessNodeExpand & standalone,
types::PrimitiveType output_type,
const data_flow::ImplementationType & impl_type,
const DebugInfo & org_debug_info,
builder::StructuredSDFGBuilder & builder,
std::string frag_name,
const MmaBlockSize & mma_block_size,
MmaFragmentType frag_type,
const GpuMmaFromMemoryLayout & to_memory,
unsigned input_index,
const char * operand_label,
Block & block )
static

◆ expand_mma_standalone()

passes::LibNodeExpander::ExpandOutcome sdfg::gpu::GpuMmaExpander::expand_mma_standalone ( LibNodeExpander::AccessNodeExpand & standalone,
const GpuArch & arch,
GpuMmaTiling & mma_tiling,
const math::tensor::TensorLayout & layout_a,
const math::tensor::TensorLayout & layout_b,
const math::tensor::TensorLayout & layout_y,
types::PrimitiveType input_type,
types::PrimitiveType output_type,
bool include_c_add,
const DebugInfo & org_debug_info,
const std::array< int, 3 > & args_order,
bool ragged = false,
int k_block_multiple = 1 )
static

◆ for_lib_node()

const LibNodeExpander * sdfg::gpu::GpuMmaExpander::for_lib_node ( const data_flow::LibraryNode & node) const
overridevirtual

Prefiltering of libnodes.

Allows that an expander sub-divides based on types, codes or impl-types or sth. more elaborate, because we get ready to transform

Parameters
node
Returns
nullptr if not applicable

Reimplemented from sdfg::passes::CodeLibNodeExpander< math::tensor::MatMulNode >.

◆ handle_expand()

LibNodeExpander::ExpandOutcome sdfg::gpu::GpuMmaExpander::handle_expand ( LibNodeExpander::ExpandContext & context,
structured_control_flow::Block & block,
math::tensor::MatMulNode & node ) const
override

◆ matches_possible_mma_pattern()

virtual bool sdfg::gpu::GpuMmaExpander::matches_possible_mma_pattern ( const math::tensor::MatMulNode & node) const
protectedvirtual

Member Data Documentation

◆ arch_

const GpuArch* sdfg::gpu::GpuMmaExpander::arch_
protected

◆ block_size_hint_

const MmaBlockSize* sdfg::gpu::GpuMmaExpander::block_size_hint_ = nullptr
protected

◆ wave_tile_hint_

const BlockCounts* sdfg::gpu::GpuMmaExpander::wave_tile_hint_ = nullptr
protected

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