docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
redundant_zero_init_elimination.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
10
11namespace sdfg {
12namespace gpu {
14} // namespace gpu
15
16namespace transformations {
17
26public:
31
32private:
34 std::string container_;
35
36 bool valid_ = true;
37 bool has_mma_ = false;
38 bool has_store_ = false;
39 std::vector<CFragmentLoad> c_loads_;
40
42 bool only_maps_or_branches_enclose(const structured_control_flow::Block& block) const;
43
44public:
47 analysis::AnalysisManager& analysis_manager,
49 const std::string& container
50 );
51
52 bool visit() override;
53
55
57 bool valid() const {
58 return valid_;
59 }
60 bool has_mma() const {
61 return has_mma_;
62 }
63 bool has_store() const {
64 return has_store_;
65 }
66 const std::vector<CFragmentLoad>& c_loads() const {
67 return c_loads_;
68 }
69};
70
102
103public:
105
106 std::string name() const override;
107
109
111
112 void to_json(nlohmann::json& j) const override;
113
115};
116
117} // namespace transformations
118} // namespace sdfg
Definition structured_sdfg.h:30
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
Loads a single MMA fragment from memory.
Definition gpu_mma_fragment_load_node.h:19
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
Base class for structured loop constructs.
Definition structured_loop.h:244
bool has_store() const
Definition redundant_zero_init_elimination.h:63
bool valid() const
The container is only used by fragment stores and C-fragment loads only nested in maps and branches.
Definition redundant_zero_init_elimination.h:57
bool has_mma() const
Definition redundant_zero_init_elimination.h:60
const std::vector< CFragmentLoad > & c_loads() const
Definition redundant_zero_init_elimination.h:66
bool accept(structured_control_flow::Block &node) override
MmaNestOutputUses(StructuredSDFG &sdfg, analysis::AnalysisManager &analysis_manager, structured_control_flow::StructuredLoop &nest, const std::string &container)
static RedundantZeroInitElimination from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
RedundantZeroInitElimination(structured_control_flow::StructuredLoop &loop)
void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
std::string name() const override
Get the name of this transformation.
void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
Base class for all SDFG transformations.
Definition transformation.h:25
Definition immutable_structured_sdfg_visitor.h:10
Definition function_builder.h:10
Definition cuda_arch.h:11
Definition loop_parallelization.h:8
Definition analysis.h:7
Definition redundant_zero_init_elimination.h:27
gpu::GpuMmaFragmentLoadNode * node
Definition redundant_zero_init_elimination.h:29
structured_control_flow::Block * block
Definition redundant_zero_init_elimination.h:28