|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Namespaces | |
| namespace | detail |
Classes | |
| class | LoopParallelization |
| Converts a single For loop into a sequential Map. More... | |
| class | LocalStorage |
| Local-storage transformation. More... | |
| class | SoftwarePipelining |
| Software-pipeline a sequential panel loop that cooperatively stages a shared-memory tile each iteration (the structure LocalStorage emits). More... | |
| class | TileFusion |
| Tile fusion transformation that merges two consecutive sibling tiled Maps. More... | |
| class | TileVectorizer |
| Widen every cooperative shared-staging copy in a subtree to the widest legal vector transfer. More... | |
| class | CollapseToDepth |
| Collapse a perfectly-nested map nest into a target number of loops. More... | |
| class | LoopConditionNormalize |
| Loop condition normalization to convert inequality conditions to relational comparisons. More... | |
| class | LoopDistribute |
| Loop distribution (loop fission) transformation. More... | |
| struct | LoopHeader |
| Bounds and step of a loop, keeping its induction variable. More... | |
| struct | LoopSwap |
| Two directly nested loops and their headers after swapping them. More... | |
| class | LoopIndvarFinalize |
| Computes closed-form final value of induction variable after loop. More... | |
| class | LoopInterchange |
| Loop interchange transformation that swaps two nested loops. More... | |
| class | LoopPeeling |
| Loop peeling for a perfectly nested chain of compound-condition loops. More... | |
| class | LoopRotate |
| Loop rotation transformation to convert negative stride to positive stride. More... | |
| class | LoopShift |
| Loop shift transformation to change loop initialization value. More... | |
| class | LoopSkewing |
| Loop skewing transformation for nested loops. More... | |
| class | LoopSplit |
| Loop splitting transformation at a symbolic boundary. More... | |
| class | LoopTiling |
| Loop tiling (blocking) transformation. More... | |
| class | LoopUnitStride |
| Loop unit stride transformation to convert non-unit stride loops to unit stride. More... | |
| class | MapCollapse |
| Map collapse transformation. More... | |
| class | MapDelinearize |
| Splits a map into nested maps along the divisions of its induction variable; the inverse of MapCollapse. More... | |
| class | MapFusion |
| Map fusion transformation that fuses two sequential maps. More... | |
| class | FusionConsumerSubsetVisitor |
| class | FusionConsumerUpdateVisitor |
| class | MultiLevelTiling |
| Multi-level loop tiling transformation. More... | |
| class | CUDAParallelizeNestedMap |
| Assigns a nested sequential map to the next available CUDA grid dimension. More... | |
| class | GPUConditionPropagation |
| class | GPUConditionPropagationScope |
| Root-anchored sweep of GPUConditionPropagation. More... | |
| class | BarrierFinder |
| class | GPULoopReordering |
| class | GPUOffloadNestedLoop |
| class | OffloadTransform |
| class | SideEffectFinder |
| class | ROCMParallelizeNestedMap |
| Assigns a nested sequential map to the next available ROCm grid dimension. More... | |
| class | OMPTransform |
| OMPTransform transformation for Map nodes. More... | |
| class | Recorder |
| Records transformation history for replay and analysis. More... | |
| class | MmaNestOutputUses |
| Collects the uses of an output container within a GPU MMA loop nest. More... | |
| class | RedundantZeroInitElimination |
| Eliminates a zero-initialization nest that is redundant before a GPU MMA matmul nest. More... | |
| class | Replayer |
| Replays recorded transformations on an SDFG. More... | |
| class | StreamK |
| Stream-K work decomposition: replace a static output-tile grid whose blocks each own one tile with a fixed persistent grid whose blocks each walk an equal contiguous slice of the flattened (tile x k-panel) iteration space, merging partially-owned tiles via the reduction. More... | |
| class | Transformation |
| Base class for all SDFG transformations. More... | |
| class | InvalidTransformationException |
| Exception thrown when a transformation cannot be applied. More... | |
| class | InvalidTransformationDescriptionException |
| Exception thrown when a transformation description is invalid. More... | |
| class | TrivialLoopElimination |
| Eliminates a trivial map, i.e., a map executing exactly one iteration. More... | |
| class | UnrollTransform |
| Marks a constant-trip loop for full unrolling. More... | |
| class | VectorizeTransform |
| VectorizeTransform transformation for StructuredLoop nodes. More... | |
| class | RPCNodeTransform |
Concepts | |
| concept | transformation_concept |
| Concept for types that are transformations. | |
| concept | replayable_transformation_concept |
| Concept for transformations that can be replayed from a JSON description. | |
Functions | |
| template<typename Visitor> | |
| decltype(auto) | dispatch_transformation (const std::string &transformation_name, const nlohmann::json &desc, Visitor &&visitor) |
| Central registry mapping transformation type names to their C++ types. | |
| template<typename T> requires replayable_transformation_concept<T> | |
| bool | verify_round_trip (builder::StructuredSDFGBuilder &builder, const nlohmann::json &desc, std::string &error_out) |
| Verify that a transformation's from_json and to_json are consistent inverses. | |
| bool | verify_transformation_round_trip (builder::StructuredSDFGBuilder &builder, const nlohmann::json &desc, std::string &error_out) |
Verify from_json/to_json consistency for the transformation named in desc. | |
| const std::string & | transformation_schema_text () |
| The transformation serialization schema as a JSON Schema (2020-12) document. | |
| const nlohmann::json & | transformation_schema () |
| The transformation serialization schema, parsed once. | |
| bool | validate_transformation_schema (const nlohmann::json &j, std::string &error_out) |
| Validate that a transformation description respects the serialization schema. | |
| decltype(auto) sdfg::transformations::dispatch_transformation | ( | const std::string & | transformation_name, |
| const nlohmann::json & | desc, | ||
| Visitor && | visitor ) |
Central registry mapping transformation type names to their C++ types.
This is the single source of truth that replaces the per-replayer if/else dispatch chains (base Replayer, EmbeddingReplayer, RecordingReplayer). For a given transformation_name, the matching transformation type T is resolved and the caller-supplied visitor is invoked as visitor.template operator()<T>(). The visitor decides what to do with the type (e.g. apply and record it), while this function owns the name-to-type mapping and the compile-time validation of each registered type.
| Visitor | A callable with a templated operator() (e.g. a C++20 generic lambda []<typename T>() { ... }). Its return value is forwarded back to the caller unchanged. |
| transformation_name | The registered transformation type name. |
| desc | The transformation description; used to resolve parameterized dispatch (e.g. the GPU backend of GPUOffloadNestedLoop). |
| visitor | The visitor invoked with the resolved transformation type. |
| InvalidTransformationDescriptionException | if the name is not registered. |
| const nlohmann::json & sdfg::transformations::transformation_schema | ( | ) |
The transformation serialization schema, parsed once.
| const std::string & sdfg::transformations::transformation_schema_text | ( | ) |
The transformation serialization schema as a JSON Schema (2020-12) document.
The schema is authored in opt/json/transformation.schema.json and embedded into the library at build time, so it travels with the binary and serves as the canonical, human-readable documentation of the contract enforced below.
|
inline |
Validate that a transformation description respects the serialization schema.
Every transformation's to_json() must produce an object with exactly this shape:
This is the single source of truth for the schema. It is consumed by the serialization tests and by the runtime invariants in the Recorder/Replayer.
| j | The transformation description to validate. |
| error_out | Populated with a human-readable reason when validation fails. |
| bool sdfg::transformations::verify_round_trip | ( | builder::StructuredSDFGBuilder & | builder, |
| const nlohmann::json & | desc, | ||
| std::string & | error_out ) |
Verify that a transformation's from_json and to_json are consistent inverses.
This is the semantic counterpart to validate_transformation_schema: while the schema validates the shape of a single description, this check validates that the registry's from_json factory and the transformation's to_json serialization agree with each other. Concretely it:
desc via T::from_json,desc, and| T | The transformation type (must satisfy replayable_transformation_concept). |
| builder | The SDFG builder whose elements the description refers to. |
| desc | The transformation description to round-trip. |
| error_out | Populated with a human-readable reason when verification fails. |
desc.
|
inline |
Verify from_json/to_json consistency for the transformation named in desc.
Resolves the transformation type through the registry and delegates to verify_round_trip. This ties every registered from_json factory to its to_json serialization through a single, name-driven entry point.
| builder | The SDFG builder whose elements the description refers to. |
| desc | The transformation description (must contain a string transformation_type). |
| error_out | Populated with a human-readable reason when verification fails. |
desc.