rlx-fusion
MIR fusion passes and unfuse_fused_for_autodiff for RLX. Depends on
rlx-ir only — no runtime or backend deps.
What's here
pass—Passtrait and canonical pass ordering helpers.fusion— pattern-match fusion (FuseMatMulBiasAct,FuseSwiGLU,FuseAttentionBlock, residual + norm fusions, …).fusion_report— missed-fusion diagnostics (MissReason,MissedFusion).unfuse— split fused ops for backends or AD (unfuse_fused_for_autodiff).lower_dot_general— XLA-styleDotGeneral→MatMul+ reshapes.control_flow—LowerControlFlow, while unrolling helpers.fk_fusion— FKL-style passes (FuseRegionPrologue,FuseBatchPreprocess,MarkBatchSliceRegions,DecomposeFusionRegions). Seedocs/fk-fusion.md.fk_graphs— shared test/builder graphs (batch_narrow_relu_primitive_graph, …).
Consumers
rlx-compile— orchestrates fusion inCompilePipeline/fusion_passes_for_supported.rlx-autodiff— unfuses before reverse-mode AD when a fused op has no VJP rule.
Build / test
License
GPL-3.0-only.