rlx-compile
HIR → MIR → LIR compile pipeline for RLX: CompilePipeline, backend
legalization, memory planning, precision / PTQ passes.
Depends on rlx-ir and rlx-fusion.
What's here
compiler—CompilePipeline,CompileResult, pipeline inspect hooks.fusion_pipeline—fusion_passes,fusion_passes_for_supported, backend-aware pass lists.legalize/legalize_broadcast— rewrite graphs for a target device.memory— liveness analysis and arena slot assignment.precision— auto-mixed precision policy (f32 ↔ f16/bf16 around matmul).quant_insert/quant_propagate— PTQ Q/DQ insertion and propagation.const_fold,dce,inline,promote_params,svg.param_specialize— bake fixedOp::Paramtensors intoOp::Constantbefore DCE / constant folding (CompileOptions::param_bindingsin runtime).algebraic_simplify— same-shapex*0,x*1,x+0rewrites (safe only when constant rank matches output; no scalar-broadcast folding).
Kernel dispatch transparency
prepare_graph_for_backend_with_report and friends produce a
KernelDispatchReport (native vs common-IR vs rewritten vs unsupported).
The runtime uses the same legalization path as compile; see the root
README.md for env vars
(RLX_DISPATCH_REPORT, RLX_KERNEL_DISPATCH).
Install
[]
= "0.2"
Build / test
License
GPL-3.0-only.