docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::tiles::ReductionBufferAnalysis Class Reference

Infer reduction footprints and verify explicitly materialized buffers. More...

#include <sdfg/tiles/analysis/reduction_buffer_analysis.h>

Inheritance diagram for sdfg::tiles::ReductionBufferAnalysis:
[legend]

Public Member Functions

 ReductionBufferAnalysis (StructuredSDFG &sdfg)
 Bind the subject graph; AnalysisManager initializes dependencies through run().
std::string name () const override
ReductionBufferInfo buffer (structured_control_flow::Reduce &reduction, const std::string &container) const
 Infer an independent result, including bounded or unsupported results.
ReductionBufferInfo require (structured_control_flow::Reduce &reduction, const std::string &container) const
 Require an exact footprint, throwing InvalidSDFGException otherwise.
ReductionBufferInfo estimate_schedule (structured_control_flow::Reduce &reduction, const std::string &container, ReductionBufferInfo footprint, const ReductionScheduleProposal &proposal) const
 Reprice a caller-owned exact footprint under a read-only schedule override.
ReductionBufferInfo estimate_interchange (structured_control_flow::Reduce &reduction, const std::string &container, ReductionBufferInfo footprint, const transformations::LoopSwap &proposal) const
 Recompute geometry and allocation ownership from proposed symbolic interchange headers.
ReductionBufferInfo estimate_geometry (structured_control_flow::Reduce &reduction, const std::string &container, ReductionBufferInfo footprint, const std::vector< ReductionLoopDomain > &inner_domains) const
 Recompute an exact footprint from deepest-first domains without changing allocation topology.
bool supports_interchange (const transformations::LoopSwap &proposal) const
 Check interchange analytically without constructing a proposal graph.
bool supports_schedule (structured_control_flow::StructuredLoop &loop, const structured_control_flow::ScheduleType &schedule) const
 Check exactness and materialized-buffer compatibility for a proposed schedule, including sibling reductions in the enclosing nest.
std::vector< structured_control_flow::Reduce * > affected_reductions (structured_control_flow::StructuredLoop &loop) const
 Return GPU reductions at, above, or below loop in the current graph.
ReductionKernelInfo kernel (const structured_control_flow::StructuredLoop &root) const
 Sum shared allocation contributions at or below root, charging each owner once.
bool is_partial_buffer (const std::string &container) const
 Whether a GPU reduction schedule references container as a private or shared partial.
Public Member Functions inherited from sdfg::analysis::Analysis
 Analysis (StructuredSDFG &sdfg)
 Analysis (StructuredSDFG &sdfg, const Options &options)
virtual ~Analysis ()=default
virtual bool invalidate (structured_control_flow::ControlFlowNode &changed)
 Updates the analysis after a change confined to the subtree of changed.
 Analysis (const Analysis &a)=delete
Analysis & operator= (const Analysis &)=delete

Protected Member Functions

void run (analysis::AnalysisManager &analysis_manager) override
 Bind the manager and options for dependency queries.
Protected Member Functions inherited from sdfg::analysis::Analysis
template<class T>
T option (const OptionKey< T > &key, T fallback=T{}) const

Additional Inherited Members

Protected Attributes inherited from sdfg::analysis::Analysis
StructuredSDFG & sdfg_
symbolic::Assumptions additional_assumptions_
const Options * options_ = &Options::empty()

Detailed Description

Infer reduction footprints and verify explicitly materialized buffers.

Queries return independently owned results without caching or changing the SDFG. Callers may retain results while their graph remains unchanged and must invalidate dependent analyses after changing bounds, schedules, accesses, or container types. Device capacity limits and strategy selection are outside this analysis.

Constructor & Destructor Documentation

◆ ReductionBufferAnalysis()

sdfg::tiles::ReductionBufferAnalysis::ReductionBufferAnalysis ( StructuredSDFG & sdfg)
explicit

Bind the subject graph; AnalysisManager initializes dependencies through run().

Member Function Documentation

◆ affected_reductions()

std::vector< structured_control_flow::Reduce * > sdfg::tiles::ReductionBufferAnalysis::affected_reductions ( structured_control_flow::StructuredLoop & loop) const

Return GPU reductions at, above, or below loop in the current graph.

◆ buffer()

ReductionBufferInfo sdfg::tiles::ReductionBufferAnalysis::buffer ( structured_control_flow::Reduce & reduction,
const std::string & container ) const

Infer an independent result, including bounded or unsupported results.

◆ estimate_geometry()

ReductionBufferInfo sdfg::tiles::ReductionBufferAnalysis::estimate_geometry ( structured_control_flow::Reduce & reduction,
const std::string & container,
ReductionBufferInfo footprint,
const std::vector< ReductionLoopDomain > & inner_domains ) const

Recompute an exact footprint from deepest-first domains without changing allocation topology.

Caller-owned source results must describe the unchanged accumulator; no body is visited.

◆ estimate_interchange()

ReductionBufferInfo sdfg::tiles::ReductionBufferAnalysis::estimate_interchange ( structured_control_flow::Reduce & reduction,
const std::string & container,
ReductionBufferInfo footprint,
const transformations::LoopSwap & proposal ) const

Recompute geometry and allocation ownership from proposed symbolic interchange headers.

◆ estimate_schedule()

ReductionBufferInfo sdfg::tiles::ReductionBufferAnalysis::estimate_schedule ( structured_control_flow::Reduce & reduction,
const std::string & container,
ReductionBufferInfo footprint,
const ReductionScheduleProposal & proposal ) const

Reprice a caller-owned exact footprint under a read-only schedule override.

The footprint must describe this accumulator in the unchanged source graph. Does not visit body memlets, copy the graph, or validate materialized buffers. Returned ownership uses source node IDs; materialized is false for estimates.

◆ is_partial_buffer()

bool sdfg::tiles::ReductionBufferAnalysis::is_partial_buffer ( const std::string & container) const

Whether a GPU reduction schedule references container as a private or shared partial.

◆ kernel()

ReductionKernelInfo sdfg::tiles::ReductionBufferAnalysis::kernel ( const structured_control_flow::StructuredLoop & root) const

Sum shared allocation contributions at or below root, charging each owner once.

Unknown costs, duplicate named allocations, or overflow are unsupported.

◆ name()

std::string sdfg::tiles::ReductionBufferAnalysis::name ( ) const
overridevirtual
Returns
"ReductionBufferAnalysis".

Implements sdfg::analysis::Analysis.

◆ require()

ReductionBufferInfo sdfg::tiles::ReductionBufferAnalysis::require ( structured_control_flow::Reduce & reduction,
const std::string & container ) const

Require an exact footprint, throwing InvalidSDFGException otherwise.

Exactness alone does not imply materialization; check the result's materialized flag.

◆ run()

void sdfg::tiles::ReductionBufferAnalysis::run ( analysis::AnalysisManager & analysis_manager)
overrideprotectedvirtual

Bind the manager and options for dependency queries.

Implements sdfg::analysis::Analysis.

◆ supports_interchange()

bool sdfg::tiles::ReductionBufferAnalysis::supports_interchange ( const transformations::LoopSwap & proposal) const

Check interchange analytically without constructing a proposal graph.

Malformed nesting throws; moving materialized reductions is unsupported.

◆ supports_schedule()

bool sdfg::tiles::ReductionBufferAnalysis::supports_schedule ( structured_control_flow::StructuredLoop & loop,
const structured_control_flow::ScheduleType & schedule ) const

Check exactness and materialized-buffer compatibility for a proposed schedule, including sibling reductions in the enclosing nest.

Uses analytical allocation effects for exact source footprints. Unknown effects are unsupported.


The documentation for this class was generated from the following file: