Skip to main content

default_passes

Function default_passes 

Source
pub fn default_passes() -> Vec<Box<dyn OptimizationPass>>
Expand description

The device-independent Phase-1 pass pipeline, in run order.

ConstantFolding  →  DeadNodeElimination  →  OpFusion

Constant folding runs first so it can materialize shape-computation constants, then dead-node elimination prunes any node left unreachable, and finally op fusion collapses recognized op sequences.

Deferred passes (each in its eventual pipeline slot; see the crate-level docs for why): after ConstantFolding would come ShapeInference; after OpFusion would come AttentionFusionPass, then LayoutPropagation, PlacementOptimizer, TransferInsertion, InPlaceDetection, MemoryPlanning, CudaGraphRegionDetection, and OverlapScheduling.