docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
gpu_mma_fragment_store_node.h
Go to the documentation of this file.
1#pragma once
2
7#include "sdfg/types/type.h"
8
9namespace sdfg::gpu {
10
12
20 MmaBlockSize block_size_;
21 MmaFragmentType fragment_type_;
23 types::PrimitiveType element_type_;
24
25public:
26 static constexpr auto FRAG_INPUT_IDX = 0;
27 static constexpr auto PTR_INPUT_IDX = 1;
28
30 size_t element_id,
31 const DebugInfo& debug_info,
38 const data_flow::ImplementationType& impl_type
39 );
40
42 return layout_;
43 }
44 const MmaBlockSize& block_size() const {
45 return block_size_;
46 }
48 return fragment_type_;
49 }
51 return element_type_;
52 }
53
54 void validate(const Function& function) const override;
55
56 symbolic::SymbolSet symbols() const override;
57
58 void replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) override;
59 void replace(const symbolic::ExpressionMapping& replacements) override;
60
61 std::unique_ptr<data_flow::DataFlowNode>
62 clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const override;
63
64 std::string toStr() const override;
65
67
68 bool can_relocalize_operand(int input_idx, const math::tensor::TensorLayout& packed) const override;
69 bool relocalize_operand(int input_idx, const math::tensor::TensorLayout& packed) override;
70};
71
73public:
74 nlohmann::json serialize(const data_flow::LibraryNode& library_node) override;
77 ) override;
78};
79
80} // namespace sdfg::gpu
Definition element.h:30
size_t element_id() const
const DebugInfo & debug_info() const
Definition function.h:43
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Definition data_flow_graph.h:29
graph::Vertex vertex() const
Get the graph vertex for this node.
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
Definition gpu_mma_fragment_store_node.h:72
nlohmann::json serialize(const data_flow::LibraryNode &library_node) override
Serialize a library node to JSON.
data_flow::LibraryNode & deserialize(const nlohmann::json &j, builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &parent) override
Deserialize a library node from JSON.
MmaFragmentType fragment_type() const
Definition gpu_mma_fragment_store_node.h:47
symbolic::SymbolSet symbols() const override
Get all symbols used in this node.
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.
void replace(const symbolic::ExpressionMapping &replacements) override
std::string toStr() const override
Convert node to string representation.
GpuMmaFragmentStoreNode(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph &parent, const MmaBlockSize &block_size, MmaFragmentType fragment_type, const GpuMmaFromMemoryLayout &layout, types::PrimitiveType element_type, const data_flow::ImplementationType &impl_type)
static constexpr auto PTR_INPUT_IDX
Definition gpu_mma_fragment_store_node.h:27
data_flow::PointerAccessType pointer_access_type(int input_idx) const override
Describes what a pointer is used for.
bool relocalize_operand(int input_idx, const math::tensor::TensorLayout &packed) override
Repoint the operand at input_idx to a locally staged buffer.
void replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
const MmaBlockSize & block_size() const
Definition gpu_mma_fragment_store_node.h:44
void validate(const Function &function) const override
Validate the code node's configuration.
const GpuMmaFromMemoryLayout & layout() const
Definition gpu_mma_fragment_store_node.h:41
bool can_relocalize_operand(int input_idx, const math::tensor::TensorLayout &packed) const override
Side-effect-free predicate mirroring relocalize_operand: whether the operand at input_idx can be repo...
static constexpr auto FRAG_INPUT_IDX
Definition gpu_mma_fragment_store_node.h:26
types::PrimitiveType element_type() const
Definition gpu_mma_fragment_store_node.h:50
The metadata associated with a addressing a tensor in elements Meant to be used with TensorNodes to d...
Definition tensor_layout.h:20
Base class for library node serialization.
Definition json_serializer.h:195
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
std::set< Symbol, SymEngine::RCPBasicKeyLess > SymbolSet
Ordered set of symbols.
Definition symbolic.h:95
SymEngine::map_basic_basic ExpressionMapping
Definition symbolic.h:109
Library node definitions for calling functions beyond simple instructions.
Definition function_builder.h:10
StringEnum ImplementationType
Implementation type identifier for library nodes.
Definition library_node.h:75
StringEnum LibraryNodeCode
Definition library_node.h:65
std::unique_ptr< PointerAccessMeta, PtrAccessDeleter > PointerAccessType
Definition pointer_metadata.h:32
Definition cuda_arch.h:11
data_flow::LibraryNodeCode LibraryNodeType_GpuMmaFragmentStore("gpu::MmaFragmentStore")
MmaFragmentType
Definition gpu_mma_fragment.h:14
boost::graph_traits< Graph >::vertex_descriptor Vertex
Definition graph.h:25
PrimitiveType
Enumeration of all primitive data types supported by sdfglib.
Definition type.h:35
Describes how a single MMA fragment maps to memory relative to a base pointer.
Definition gpu_mma_fragment.h:163
Definition gpu_mma_fragment.h:16
Symbolic system for integer-based symbol analysis.
Core type system definitions for sdfglib.