FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
fusion_planner.h File Reference

Identifies maximal fusion-legality domains in a finalized DAG. More...

#include "stage/fusion.h"
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  fz::FusionGeometry
 Geometry accumulated while extending one candidate fusion chain. More...
 
struct  fz::FusionGroup
 One maximal fusion-legality domain, in producer→consumer order. More...
 

Namespaces

namespace  fz
 

Enumerations

enum class  fz::FusionCompatibility : uint8_t
 Exact reason a stage spec cannot extend an accumulated group geometry.
 

Functions

FusionCompatibility fz::extendFusionGeometry (FusionGeometry &geometry, const FusionSpec &next)
 Validate and, on success, extend geometry with next.
 
std::vector< FusionGroupfz::planFusionGroups (const CompressionDAG &dag)
 

Detailed Description

Identifies maximal fusion-legality domains in a finalized DAG.

The planner is pure analysis: it walks the compress DAG and returns the linear chains within which fused execution plans may be considered. It does not require one implementation to cover the whole maximal chain: a later pass enumerates contiguous subspans, finds registered/generated implementations, and selects non-overlapping profitable candidates. Unmatched stages keep running staged.

A group is a maximal chain where every stage opts into fusion (Stage::getFusionSpec()), the chain is strictly linear (no fan-in/out inside it), conventional block-local/cooperative members share one block size, and a Cooperative coder, if present, terminates the chain (nothing fuses past a variable-length coder). A TileAdaptive selector instead owns a larger tile made of equal immediate downstream coder units. See docs/codebase_notes.md CN-FUSE-PROOF.