assignment.resolve_backend
def resolve_backend(cost: torch.Tensor, backend: Backend | str = Backend.AUTO) -> strReturn the op name that ``solve()`` would dispatch to.
Useful for debugging AUTO routing and for asserting which backend fires
in a test or benchmark.
Parameters
| Name | Type | Description |
|---|---|---|
| cost | torch.Tensor | Cost matrix (N, M) or (B, N, M) on the target device. |
| backend = Backend.AUTO | Backend | str | Backend hint. Non-``AUTO`` values are echoed back as their string value (e.g. ``"munkres"``). |
Returns
op_name — Exact ``torch.ops.assignment.<name>`` key — e.g. ``"jonker_compact"``, ``"munkres"``, ``"lawler"``, ``"greedy"``.
Source: torchmatch/assignment/_solve.py:291