|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Proof-of-concept replacer that turns a matmul-shaped EinsumCluster into a MatMulNode. More...
#include <sdfg/einsum/replacers/einsum2matmul.h>
Classes | |
| struct | MatMulAnalysis |
| Results of the applicability analysis that are reused by the replacement step. More... | |
Public Member Functions | |
| std::string | name () const override |
| math::tensor::TensorLayout | build_tensor_layout (const EinsumIndexing &indexing, bool swapped, const symbolic::Expression &outer_dim, const symbolic::Expression &inner_dim, const symbolic::Expression &outer_offset, const symbolic::Expression &inner_offset, const symbolic::Expression &external_offset) const |
| ReplaceOutcome | replace (EinsumReplacementContext &context, const EinsumCluster &cluster) const override |
| virtual bool | can_be_applied (const EinsumCluster &cluster) const |
| Checks whether this replacer could be applied to the given cluster. | |
| bool | analyze (const EinsumCluster &cluster, MatMulAnalysis &result) const |
| Runs the applicability analysis for the canonical MatMul form. | |
| Public Member Functions inherited from sdfg::einsum::EinsumReplacer | |
| virtual | ~EinsumReplacer ()=default |
Proof-of-concept replacer that turns a matmul-shaped EinsumCluster into a MatMulNode.
Mirrors the applicability check of the Einsum2Gemm transformation, but operates on the non-destructive EinsumCluster and materializes a math::tensor::MatMulNode in a fresh sequence + block after the original computation.
POC limitations: only the canonical, non-transposed form C[i,j] += A[i,k] * B[k,j] with exactly two multiplicand inputs and zero initialization is supported.
| bool sdfg::einsum::Einsum2MatMul::analyze | ( | const EinsumCluster & | cluster, |
| MatMulAnalysis & | result ) const |
Runs the applicability analysis for the canonical MatMul form.
| math::tensor::TensorLayout sdfg::einsum::Einsum2MatMul::build_tensor_layout | ( | const EinsumIndexing & | indexing, |
| bool | swapped, | ||
| const symbolic::Expression & | outer_dim, | ||
| const symbolic::Expression & | inner_dim, | ||
| const symbolic::Expression & | outer_offset, | ||
| const symbolic::Expression & | inner_offset, | ||
| const symbolic::Expression & | external_offset ) const |
|
virtual |
Checks whether this replacer could be applied to the given cluster.
Runs the same applicability analysis as replace() but discards the result.
Reimplemented in sdfg::gpu::GpuMmaEinsumReplacer.
|
inlineoverridevirtual |
Implements sdfg::einsum::EinsumReplacer.
|
overridevirtual |
Implements sdfg::einsum::EinsumReplacer.
Reimplemented in sdfg::gpu::GpuMmaEinsumReplacer.