|
| | GpuMmaMatmulNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph &parent, const MmaBlockSize &mma_block_size, types::PrimitiveType input_type, types::PrimitiveType acc_type, const data_flow::ImplementationType &impl_type) |
| const MmaBlockSize & | mma_block_size () const |
| types::PrimitiveType | input_type () const |
| types::PrimitiveType | acc_type () const |
| symbolic::Expression | m () const |
| | M dimension (rows of A / rows of the accumulator).
|
| symbolic::Expression | n () const |
| | N dimension (columns of B / columns of the accumulator).
|
| symbolic::Expression | k () const |
| | K dimension (contraction dimension of A and B for a single MMA step).
|
| void | validate (const Function &function) const override |
| | Validate the code node's configuration.
|
| symbolic::SymbolSet | symbols () const override |
| | Get all symbols used in this node.
|
| void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| void | replace (const symbolic::ExpressionMapping &replacements) override |
| std::unique_ptr< data_flow::DataFlowNode > | clone (size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph &parent) const override |
| | Clone this node for graph transformations.
|
| std::string | toStr () const override |
| | Convert node to string representation.
|
| symbolic::Expression | flop () const override |
| | Calculate floating point operations for this node.
|
| data_flow::PointerAccessType | pointer_access_type (int input_idx) const override |
| | Describes what a pointer is used for.
|
| | LibraryNode (const LibraryNode &data_node)=delete |
| LibraryNode & | operator= (const LibraryNode &)=delete |
| virtual | ~LibraryNode ()=default |
| ElementType | type_id () const override |
| | Returns the type of the element.
|
| const LibraryNodeCode & | code () const |
| | Get the operation code.
|
| const ImplementationType & | implementation_type () const |
| | Get the implementation type (const).
|
| ImplementationType & | implementation_type () |
| | Get the implementation type (mutable).
|
| void | set_implementation_type (const ImplementationType &impl_type) |
| bool | side_effect () const override |
| | Check if this node has side effects.
|
| PointerAccessType | pointer_access_type (const Memlet &edge) const |
| virtual bool | relocalize_operand (int input_idx, const math::tensor::TensorLayout &packed) |
| | Repoint the operand at input_idx to a locally staged buffer.
|
| virtual bool | can_relocalize_operand (int input_idx, const math::tensor::TensorLayout &packed) const |
| | Side-effect-free predicate mirroring relocalize_operand: whether the operand at input_idx can be repointed at the buffer view packed.
|
| virtual std::optional< SubgroupAccess > | operand_access (int input_idx, unsigned subgroup_size) const |
| | The elements one subgroup of subgroup_size lanes reads from the operand at input_idx, if the node declares them.
|
| EdgeRemoveOption | can_remove_out_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const override |
| | Is the edge in question removable, or will this make the node its an output on invalid?
|
| EdgeRemoveOption | can_remove_in_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const override |
| bool | pointer_use_creates_side_effects (const DataFlowGraph &dataflow, const Function &func) |
| | CodeNode (const CodeNode &data_node)=delete |
| CodeNode & | operator= (const CodeNode &)=delete |
| const std::vector< std::string > & | outputs () const |
| | Get output connector names (const).
|
| const std::vector< std::string > & | inputs () const |
| | Get input connector names (const).
|
| std::vector< std::string > & | outputs () |
| | Get output connector names (mutable).
|
| std::vector< std::string > & | inputs () |
| | Get input connector names (mutable).
|
| const std::string & | output (size_t index) const |
| | Get output connector name by index.
|
| const std::string & | input (size_t index) const |
| | Get input connector name by index.
|
| bool | has_constant_input (size_t index) const |
| | Check if an input is connected to a constant node.
|
| | DataFlowNode (const DataFlowNode &data_node)=delete |
| DataFlowNode & | operator= (const DataFlowNode &)=delete |
| graph::Vertex | vertex () const |
| | Get the graph vertex for this node.
|
| const DataFlowGraph & | get_parent () const |
| | Get the parent dataflow graph (const).
|
| DataFlowGraph & | get_parent () |
| | Get the parent dataflow graph (mutable).
|
| virtual bool | update_edge_removed (const std::string &out_conn) |
| | Element (size_t element_id, const DebugInfo &debug_info) |
| virtual | ~Element ()=default |
| size_t | element_id () const |
| const DebugInfo & | debug_info () const |
| void | set_debug_info (const DebugInfo &debug_info) |
| void | add_metadata (const std::string &key, const std::string &value) |
| void | remove_metadata (const std::string &key) |
| const std::string & | metadata (const std::string &key) const |
| const std::string * | metadata_if_exists (const std::string &key) const |
| const std::unordered_map< std::string, std::string > & | metadata () const |
| std::string_view | element_type () const |
| | Returns the type of the element as a human-readable string.
|
|
| static bool | classof (const Element &element) |
| static bool | classof (const Element &element) |
| | LLVM-style RTTI predicate: true if element is a CodeNode.
|
| static bool | classof (const Element &element) |
| | LLVM-style RTTI predicate: true if element is a DataFlowNode.
|
| | LibraryNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent, const LibraryNodeCode &code, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs, const bool side_effect, const ImplementationType &implementation_type) |
| | Protected constructor for library nodes.
|
| | CodeNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs) |
| | Protected constructor for code nodes.
|
| | DataFlowNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent) |
| | Protected constructor for dataflow nodes.
|
| LibraryNodeCode | code_ |
| | Operation identifier (e.g., "GEMM", "Add").
|
| bool | side_effect_ |
| | Whether this node has side effects.
|
| ImplementationType | implementation_type_ |
| | How to implement this node.
|
| std::vector< std::string > | outputs_ |
| | Names of output connectors.
|
| std::vector< std::string > | inputs_ |
| | Names of input connectors.
|
| size_t | element_id_ |
| DebugInfo | debug_info_ |
| std::unordered_map< std::string, std::string > | metadata_ |
A single GPU tensor-core matrix-multiply-accumulate (MMA) step.
Unlike math::tensor::MatMulNode, this is a code-generation leaf node dedicated to MMA usage. It performs one Y += A * B MMA on mma fragments A and B into the accumulator behind its Y input, which is expected to be a preinitialized accumulator fragment (see GpuMmaFillNode).
It has no K loop (iterating K is done externally), does not add C, and does not store the result back. Y is an input treated like a pointer to the accumulator storage. So
Decl(fragAcc)
for (
int k = 0;
k < K;
k += mma_k_size) {
Decl(fragA, fragB)
GpuMmaLoad(fragB,
A+offset, ...layout)
GpuMmaLoad(fragA,
B+offset, ...layout)
}
or write acc to ptr and add manually there)
Prepares (declares and zero-initializes) a GPU MMA accumulator fragment.
Definition gpu_mma_fill_node.h:19
types::PrimitiveType acc_type() const
Definition gpu_mma_matmul_node.h:72
types::PrimitiveType input_type() const
Definition gpu_mma_matmul_node.h:69
symbolic::Expression k() const
K dimension (contraction dimension of A and B for a single MMA step).
Definition gpu_mma_matmul_node.h:85
@ A
Definition gpu_mma_fragment.h:14
@ B
Definition gpu_mma_fragment.h:14
would achieve the same as an entire MMA Matmul before
Currently reuses TensorLayouts for convenience, but is very strict. They need to have immediate shape, shape must be divisible by mma_block sizes and strides must follow gemm-semantics (there can be one stride that is customizable, the other must be 1 to represent either col-major or row-major with leading dimension). Types must be supported by the underlying hardware