rlx-fusion 0.2.6

Fusion passes and fused-op decomposition for RLX MIR
Documentation

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

  • passPass trait 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-style DotGeneralMatMul + reshapes.
  • control_flowLowerControlFlow, while unrolling helpers.
  • fk_fusion — FKL-style passes (FuseRegionPrologue, FuseBatchPreprocess, MarkBatchSliceRegions, DecomposeFusionRegions). See docs/fk-fusion.md.
  • fk_graphs — shared test/builder graphs (batch_narrow_relu_primitive_graph, …).

Consumers

  • rlx-compile — orchestrates fusion in CompilePipeline / fusion_passes_for_supported.
  • rlx-autodiff — unfuses before reverse-mode AD when a fused op has no VJP rule.

Build / test

cargo test -p rlx-fusion

License

GPL-3.0-only.