docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
tile_target.h File Reference

The complete target-specific contract of the tile algebra. More...

Go to the source code of this file.

Classes

class  sdfg::tiles::TileTarget

Namespaces

namespace  sdfg
namespace  sdfg::tiles

Detailed Description

The complete target-specific contract of the tile algebra.

Everything else in the tiles API is target-neutral: Layout, Tile, LocalityPlan, PackedBuffer, TiledCopy, and the Level / Space lattices. A backend (CUDA, ROCm, OpenMP, Tenstorrent, ...) makes its schedules and memory legible to that neutral core by implementing a handful of per-target facts:

  1. how its loop schedules cooperate -> classify (a schedule -> AxisSchedule),
  2. which memory tier backs each cooperation level -> space (a Level -> Space),
  3. whether a schedule can drive a cooperative staging copy -> supports_cooperative_staging,
  4. which concrete buffer realizes a memory tier -> storage_type (a Space -> StorageType),
  5. its SIMD lane width for bank-conflict avoidance -> lane_width,
  6. the banks of a banked memory tier (optional) -> bank_model.

(has_scratchpad is derived from space, not implemented.) These are the only places the tile algebra needs to know a target exists. A TileTarget replaces the hard-coded "CUDA_Offload" / "ROCM_Offload" / NV_Shared / gpu_warp_size checks that would otherwise scatter through AxisSchedule::classify and LocalStorage. New targets (including externally linked ones) plug in by implementing this interface and registering it; no edit to the tiles core is required.