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

Maps a schedule value() to the TileTarget that owns it. More...

#include <sdfg/tiles/tile_target_registry.h>

Public Member Functions

void register_target (const std::string &schedule_value, std::shared_ptr< TileTarget > target)
const TileTarget * get (const std::string &schedule_value) const
 The target owning schedule_value, or nullptr if none is registered.
data_flow::ImplementationType implementation_type (const std::string &schedule_value) const
 The implementation selector the target owning schedule_value stamps onto its tile codegen library nodes, or data_flow::ImplementationType_NONE when no target is registered.
std::optional< AxisSchedule > classify (const structured_control_flow::ScheduleType &sched) const
 Classify sched into cooperation facts via the owning target, or the neutral fallback when none is registered (std::nullopt for a sequential loop, else device-wide global cooperation without a scratchpad).
std::optional< Level > classify_level (const structured_control_flow::ScheduleType &sched) const
 The cooperation Level for sched, or std::nullopt when no registered target treats it as a scratchpad (device-parallel) schedule.
bool drives_cooperative_copy (const structured_control_flow::ScheduleType &sched) const
 True when sched is a group-level schedule whose parallel threads can drive a cooperative shared-memory staging copy (a genuine offload schedule).

Static Public Member Functions

static TileTargetRegistry & instance ()

Detailed Description

Maps a schedule value() to the TileTarget that owns it.

A target registers its TileTarget under each schedule value it owns (e.g. CUDA under "CUDA" and "CUDA_Offload") in its register_*_plugin. The tile algebra resolves the owner by sched.value(); unregistered schedules fall back to the neutral rule in AxisSchedule::classify. First registration wins.

Member Function Documentation

◆ classify()

std::optional< AxisSchedule > sdfg::tiles::TileTargetRegistry::classify ( const structured_control_flow::ScheduleType & sched) const

Classify sched into cooperation facts via the owning target, or the neutral fallback when none is registered (std::nullopt for a sequential loop, else device-wide global cooperation without a scratchpad).

This is the classification seam a caller reaches through its own context's registry.

◆ classify_level()

std::optional< Level > sdfg::tiles::TileTargetRegistry::classify_level ( const structured_control_flow::ScheduleType & sched) const

The cooperation Level for sched, or std::nullopt when no registered target treats it as a scratchpad (device-parallel) schedule.

◆ drives_cooperative_copy()

bool sdfg::tiles::TileTargetRegistry::drives_cooperative_copy ( const structured_control_flow::ScheduleType & sched) const

True when sched is a group-level schedule whose parallel threads can drive a cooperative shared-memory staging copy (a genuine offload schedule).

◆ get()

const TileTarget * sdfg::tiles::TileTargetRegistry::get ( const std::string & schedule_value) const
inline

The target owning schedule_value, or nullptr if none is registered.

◆ implementation_type()

data_flow::ImplementationType sdfg::tiles::TileTargetRegistry::implementation_type ( const std::string & schedule_value) const
inline

The implementation selector the target owning schedule_value stamps onto its tile codegen library nodes, or data_flow::ImplementationType_NONE when no target is registered.

Lets a transformation pick the right backend dispatcher without naming CUDA/ROCm.

◆ instance()

TileTargetRegistry & sdfg::tiles::TileTargetRegistry::instance ( )
inlinestatic

◆ register_target()

void sdfg::tiles::TileTargetRegistry::register_target ( const std::string & schedule_value,
std::shared_ptr< TileTarget > target )
inline

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