What problem does it solve?
Working on Elodin's Cranelift JIT backend requires navigating a dual-ABI compiler pipeline, a StableHLO parser, a tensor runtime, and XLA reference comparisons, and this Skill consolidates the commands, file map, and debugging workflows needed to modify libs/cranelift-mlir/ correctly.
Core Features & Use Cases
- Op Implementation Guidance: Step-by-step checklist for adding new StableHLO ops across the IR, parser, scalar and pointer-ABI lowering, tensor runtime, and golden tests.
- Correctness Debugging: Tick checkpoint diagnostic workflow comparing XLA reference outputs against Cranelift outputs element-by-element to isolate diverging simulation values.
- Regression Testing: Commands for per-op golden tests, full example regression runs with baselines, and large-constant cache verification.
- Use Case: A simulation example produces wrong attitude values under the Cranelift backend. Use this Skill to capture checkpoint data with ELODIN_CRANELIFT_DEBUG_DIR, run the checkpoint comparator test, identify the diverging output, and reduce it to a minimal tests/ops.rs reproducer before fixing the lowering code.
Quick Start
Ask the assistant to add a new StableHLO op to the Cranelift backend or to debug why a simulation example diverges from the XLA reference using the checkpoint diagnostic tool.