docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
tile_analysis.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <optional>
5#include <string>
6#include <utility>
7#include <vector>
8
13#include "sdfg/tiles/tile.h"
14
15namespace sdfg {
16namespace tiles {
17
23private:
24 mutable std::map<std::pair<const structured_control_flow::ControlFlowNode*, std::string>, std::optional<tiles::Tile>>
25 tiles_;
26
28 analysis::AnalysisManager* analysis_manager_ = nullptr;
29
32 std::optional<tiles::Tile>
33 compute_tile(const structured_control_flow::ControlFlowNode& scope, const std::string& container) const;
34
35protected:
36 void run(analysis::AnalysisManager& analysis_manager) override;
37
38public:
40
41 std::string name() const override {
42 return "TileAnalysis";
43 }
44
46 const tiles::Tile* tile(const structured_control_flow::ControlFlowNode& scope, const std::string& container) const;
47
51 bool reads = false;
52 bool writes = false;
53 bool aliased = false;
54 };
55
60 static AccessSummary
61 summarize(const StructuredSDFG& sdfg, structured_control_flow::StructuredLoop& loop, const std::string& container);
62};
63
68
71const std::vector<analysis::MemoryTileGroup>* tile_groups(
73 const std::string& container,
74 analysis::AnalysisManager& analysis_manager
75);
76
81
89 const std::string& container,
90 analysis::AnalysisManager& analysis_manager
91);
92
93} // namespace tiles
94} // namespace sdfg
Definition structured_sdfg.h:30
Definition analysis.h:53
Definition analysis.h:12
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
Base class for structured loop constructs.
Definition structured_loop.h:244
const tiles::Tile * tile(const structured_control_flow::ControlFlowNode &scope, const std::string &container) const
The tile for container at loop scope scope, or nullptr if none.
TileAnalysis(StructuredSDFG &sdfg)
static AccessSummary summarize(const StructuredSDFG &sdfg, structured_control_flow::StructuredLoop &loop, const std::string &container)
Classify container's accesses within loop via the pointer analyzers.
void run(analysis::AnalysisManager &analysis_manager) override
std::string name() const override
Definition tile_analysis.h:41
A container's staged region: source maps a tile coordinate to the global element, axes is the thread/...
Definition tile.h:156
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
Analysis for inferring memory layouts of memlets.
Definition gpu_tile_target.h:13
const std::vector< analysis::MemoryTileGroup > * tile_groups(structured_control_flow::StructuredLoop &loop, const std::string &container, analysis::AnalysisManager &analysis_manager)
All tile groups MemoryLayoutAnalysis formed for container at loop (nullptr if none).
const analysis::MemoryTileGroup * localizable_tile(structured_control_flow::StructuredLoop &loop, const std::string &container, analysis::AnalysisManager &analysis_manager)
The single localizable tile group of container at loop, or nullptr.
bool is_constant_bounded(const analysis::MemoryTileGroup *group)
True iff group is a real tile whose extents are all compile-time integer constants (the constant-boun...
symbolic::Expression tile_element_count(const analysis::MemoryTileGroup *group)
Scalar slots a packed buffer for group would occupy (product of extents): a compile-time integer iff ...
Definition analysis.h:7
Definition memory_layout_analysis.h:78
How a container is accessed within a loop, read straight off the dataflow (memlet types),...
Definition tile_analysis.h:50
bool aliased
the pointer escapes, is overwritten, or is captured by a library node
Definition tile_analysis.h:53
bool writes
a computational write of the container
Definition tile_analysis.h:52
bool reads
a computational read of the container
Definition tile_analysis.h:51
Schedule-aware tile vocabulary: a Tile is a Layout (geometry from MemoryLayoutAnalysis) partitioned o...