|
docc 0.8.3 (0d44999b)
C++ API Reference
|
The built-in GPU backend for the tile algebra, shared by CUDA and ROCm. More...
#include <sdfg/targets/gpu/gpu_tile_target.h>
Public Member Functions | |
| GPUTileTarget (unsigned lane_width, std::string offload_value, data_flow::ImplementationType implementation_type, size_t min_async_bytes=4) | |
| std::optional< AxisSchedule > | classify (const structured_control_flow::ScheduleType &sched) const override |
Classify one loop's sched into target-neutral cooperation facts (AxisSchedule: level, spatial axis, parallel size, sync), or std::nullopt when the schedule does not shape storage (a sequential loop). | |
| Space | space (Level level) const override |
| The GPU scratchpad hierarchy: Device->Global, Group->Shared, Subgroup->Register. | |
| bool | supports_cooperative_staging (const structured_control_flow::ScheduleType &sched) const override |
Whether sched can host a block-cooperative shared-memory staging copy driven by its own parallel threads (i.e. | |
| types::StorageType | storage_type (Space space) const override |
| The concrete buffer that realizes an abstract cooperation Space on this target: e.g. | |
| unsigned | lane_width () const override |
| The SIMD lane / subgroup width, used only to keep a subgroup's cooperative stores bank-conflict-free (32 on NVIDIA, 64 on CDNA, 1 where there is no SIMD cooperation). | |
| std::optional< tiles::BankModel > | bank_model (tiles::Space space) const override |
| Shared memory (NVIDIA and CDNA LDS): 32 banks of 4 bytes. | |
| data_flow::ImplementationType | implementation_type () const override |
| The implementation selector this target stamps onto its tile codegen library nodes (cp.async / vector copy / pipeline commit+wait) so the owning target's dispatcher is chosen at codegen. | |
| size_t | min_async_bytes () const override |
| The narrowest per-lane async (CpAsync) transfer in bytes; narrower copies stay synchronous. | |
| Public Member Functions inherited from sdfg::tiles::TileTarget | |
| virtual | ~TileTarget ()=default |
| bool | has_scratchpad () const |
| Whether this target exposes any on-chip cooperative tier below global memory (a scratchpad hierarchy), derived from space. | |
| virtual bool | supports_async_staging (const types::StorageType &storage) const |
Whether staging buffers of storage can be multi-buffered so that a loop prefetches its next tile asynchronously while computing on the current one (SoftwarePipelining). | |
| virtual size_t | max_tile_elements () const |
| The most elements a staging buffer local to one of this target's loops may hold. | |
The built-in GPU backend for the tile algebra, shared by CUDA and ROCm.
Maps an offload schedule's target level to a cooperation Level and the abstract Space tiers to NVIDIA/CDNA buffers. lane_width is the warp/wavefront size (32 on NVIDIA, 64 on CDNA); offload_value is the *_Offload schedule value this instance owns (the legacy fused schedule is the other value it is registered under).
|
inline |
|
inlineoverridevirtual |
Shared memory (NVIDIA and CDNA LDS): 32 banks of 4 bytes.
Reimplemented from sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
Classify one loop's sched into target-neutral cooperation facts (AxisSchedule: level, spatial axis, parallel size, sync), or std::nullopt when the schedule does not shape storage (a sequential loop).
Replaces the target-string switch inside AxisSchedule::classify.
Implements sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
The implementation selector this target stamps onto its tile codegen library nodes (cp.async / vector copy / pipeline commit+wait) so the owning target's dispatcher is chosen at codegen.
CUDA returns "CUDA", ROCm "ROCM"; a target without these nodes returns data_flow::ImplementationType_NONE. This is the seam the pipelining/vectorization transformations reach through instead of hard-coding a backend.
Implements sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
The SIMD lane / subgroup width, used only to keep a subgroup's cooperative stores bank-conflict-free (32 on NVIDIA, 64 on CDNA, 1 where there is no SIMD cooperation).
Replaces gpu::gpu_warp_size in the padding heuristic.
Implements sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
The narrowest per-lane async (CpAsync) transfer in bytes; narrower copies stay synchronous.
Reimplemented from sdfg::tiles::TileTarget.
The GPU scratchpad hierarchy: Device->Global, Group->Shared, Subgroup->Register.
Implements sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
The concrete buffer that realizes an abstract cooperation Space on this target: e.g.
Shared -> NV_Shared / TT_L1, Global -> NV_Global, Register -> a thread-private stack/register block. Replaces the Space-to-StorageType switch in LocalStorage.
Implements sdfg::tiles::TileTarget.
|
inlineoverridevirtual |
Whether sched can host a block-cooperative shared-memory staging copy driven by its own parallel threads (i.e.
a genuine offload schedule), as opposed to a legacy fused whole-kernel schedule that cooperates at group level but cannot carry a separate copy Map. Distinguishes the two where classify alone maps both to Level::Group.
Implements sdfg::tiles::TileTarget.