docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
stream_k.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
7
8namespace sdfg::gpu {
10}
11
12namespace sdfg {
13namespace transformations {
14
83class StreamK : public Transformation {
84 // Outermost GPU-offloaded parallel output-tile loop (the band converted to a
85 // 1-D persistent worker grid).
87
88 // Fixed persistent grid size (absolute block count).
89 size_t num_blocks_;
90
91 void apply_fragment_split(
93 analysis::AnalysisManager& analysis_manager,
95 );
96
97 void build_fragment_merge(
100 const std::vector<structured_control_flow::ReductionInfo>& reductions,
101 const std::map<std::string, const gpu::GpuMmaMatmulNode*>& accumulators,
102 const symbolic::Symbol& bid,
103 const symbolic::Expression& tile,
104 const symbolic::Expression& wave,
105 int64_t num_waves,
106 int64_t splits,
107 int64_t tiles
108 );
109
110public:
111 explicit StreamK(structured_control_flow::StructuredLoop& grid_loop, size_t num_blocks = 336);
112
113 virtual std::string name() const override;
114
115 virtual bool
117
118 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
119
120 virtual void to_json(nlohmann::json& j) const override;
121
122 static StreamK from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& j);
123};
124
125} // namespace transformations
126} // namespace sdfg
Definition analysis.h:53
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
A single GPU tensor-core matrix-multiply-accumulate (MMA) step.
Definition gpu_mma_matmul_node.h:42
Represents a loop with an associative/commutative reduction carried dependency.
Definition reduce.h:106
Base class for structured loop constructs.
Definition structured_loop.h:244
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
virtual void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
virtual bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
virtual std::string name() const override
Get the name of this transformation.
static StreamK from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
StreamK(structured_control_flow::StructuredLoop &grid_loop, size_t num_blocks=336)
Base class for all SDFG transformations.
Definition transformation.h:25
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
SymEngine::RCP< const SymEngine::Symbol > Symbol
Reference-counted pointer to a SymEngine Symbol.
Definition symbolic.h:71
Definition function_builder.h:10
Definition cuda_arch.h:11
Definition gpu_tile_target.h:13
Definition loop_parallelization.h:8
Definition analysis.h:7