Skip to content

bloqade.lanes.compile.compile_squin_to_move_best

← Module overview

functioncompile_squin_to_move_bestsource

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

NameTypeDefaultDescription
mtir.Methodrequired
strategiesSequence[tuple[str, PlacementStrategyABC]]required
no_raiseboolTrue
layout_heuristicLayoutHeuristicABC | NoneNone

Returns

tuple[ir.Method, str]

source