pub struct CompilePipeline {
pub target: FusionTarget,
pub opts: FusionOptions,
pub arena_alignment: usize,
pub assert_fusion_clean: bool,
pub supported_ops: Option<&'static [OpKind]>,
pub kernel_dispatch: KernelDispatchConfig,
}Expand description
End-to-end compiler pipeline configuration.
Fields§
§target: FusionTarget§opts: FusionOptions§arena_alignment: usize§assert_fusion_clean: boolWhen true, [compile_hir] / [compile_graph] panic if fusion
diagnostics report missed block-level patterns.
supported_ops: Option<&'static [OpKind]>Backend op claim set. When Some and non-empty, fusion passes
are gated on these kinds and the optimized graph is legalized
afterward. When None, supported_for_target is used.
kernel_dispatch: KernelDispatchConfigNative vs common IR lowering for logical kernels (see rlx_ir::logical_kernel).
Implementations§
Source§impl CompilePipeline
impl CompilePipeline
pub fn new(target: FusionTarget) -> CompilePipeline
pub fn with_assert_fusion_clean(self, assert: bool) -> CompilePipeline
Sourcepub fn lower_hir(hir: HirModule) -> Result<MirModule, LowerError>
pub fn lower_hir(hir: HirModule) -> Result<MirModule, LowerError>
HIR → MIR (block lowering only).
Sourcepub fn preprocess_mir(mir: MirModule) -> MirModule
pub fn preprocess_mir(mir: MirModule) -> MirModule
Optional cleanup before fusion (DCE + control-flow lowering).
pub fn with_supported_ops(self, ops: &'static [OpKind]) -> CompilePipeline
pub fn with_kernel_dispatch( self, policy: KernelDispatchPolicy, ) -> CompilePipeline
pub fn with_kernel_dispatch_config( self, config: KernelDispatchConfig, ) -> CompilePipeline
Sourcepub fn optimize_with_report(&self, mir: MirModule) -> (MirModule, FusionReport)
pub fn optimize_with_report(&self, mir: MirModule) -> (MirModule, FusionReport)
Run fusion + cleanup passes on MIR, returning fusion diagnostics.
Sourcepub fn plan_lir(&self, mir: MirModule) -> LirModule
pub fn plan_lir(&self, mir: MirModule) -> LirModule
MIR → LIR (memory plan + schedule + phases + I/O manifest).
Sourcepub fn plan_lir_with_options(
&self,
mir: MirModule,
opts: MemoryPlanOptions,
) -> LirModule
pub fn plan_lir_with_options( &self, mir: MirModule, opts: MemoryPlanOptions, ) -> LirModule
MIR → LIR with explicit boundary allocation policy.
Sourcepub fn specialize_lir(&self, lir: &LirModule, binding: &DimBinding) -> LirModule
pub fn specialize_lir(&self, lir: &LirModule, binding: &DimBinding) -> LirModule
Bind symbolic dims and re-run buffer planning on specialized MIR.
Sourcepub fn compile_hir(&self, hir: HirModule) -> Result<CompileResult, LowerError>
pub fn compile_hir(&self, hir: HirModule) -> Result<CompileResult, LowerError>
HIR → LIR in one call with fusion report.
Sourcepub fn compile_mir(&self, mir: MirModule) -> CompileResult
pub fn compile_mir(&self, mir: MirModule) -> CompileResult
Legacy MIR entry: optimize + plan with fusion report.
Sourcepub fn compile_graph(&self, graph: Graph) -> CompileResult
pub fn compile_graph(&self, graph: Graph) -> CompileResult
Legacy entry: optimize an existing graph and plan buffers.
Sourcepub fn compile_module(
&self,
module: GraphModule,
) -> Result<CompileResult, LowerError>
pub fn compile_module( &self, module: GraphModule, ) -> Result<CompileResult, LowerError>
Unified entry for GraphModule at any pipeline stage.
Source§impl CompilePipeline
impl CompilePipeline
Sourcepub fn compile_training(
&self,
module: GraphModule,
wrt: &[NodeId],
) -> Result<TrainingCompileResult, TrainingCompileError>
pub fn compile_training( &self, module: GraphModule, wrt: &[NodeId], ) -> Result<TrainingCompileResult, TrainingCompileError>
HIR/MIR → forward LIR (fused) + backward LIR (AD + cleanup), shared weights.
Sourcepub fn compile_training_mir(
&self,
mir: MirModule,
wrt: &[NodeId],
) -> TrainingCompileResult
pub fn compile_training_mir( &self, mir: MirModule, wrt: &[NodeId], ) -> TrainingCompileResult
MIR → forward LIR (fused) + backward LIR (AD + cleanup), shared weights.
Sourcepub fn optimize_backward(&self, mir: MirModule) -> MirModule
pub fn optimize_backward(&self, mir: MirModule) -> MirModule
Cleanup passes for backward MIR — no forward-only fusion.
Trait Implementations§
Source§impl Clone for CompilePipeline
impl Clone for CompilePipeline
Source§fn clone(&self) -> CompilePipeline
fn clone(&self) -> CompilePipeline
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more