bloqade.lanes.compile.compile_squin_to_move_best
← Module overview
function
source
functioncompile_squin_to_move_best¶source
bloqade.lanes.compile.compile_squin_to_move_best
Signature
def compile_squin_to_move_best(mt: ir.Method, strategies: Sequence[tuple[str, PlacementStrategyABC]], no_raise: bool = True, layout_heuristic: LayoutHeuristicABC | None = None) -> tuple[ir.Method, str]Compile with each (label, strategy) and return the one producing
the fewest move.Move events.
Ties are resolved by earliest-in-list (caller-controlled preference).
The returned label names the winning strategy.
The three intra-stage heuristics
(DefaultTargetGenerator,
CongestionAwareTargetGenerator,
AODClusterTargetGenerator) each win on different circuit
shapes. Racing all three and keeping the best covers the per-circuit
variation without designing a meta-heuristic.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
mt | ir.Method | required | |
strategies | Sequence[tuple[str, PlacementStrategyABC]] | required | |
no_raise | bool | True | |
layout_heuristic | LayoutHeuristicABC | None | None |
Returns
tuple[ir.Method, str]