Clarify routing documentation and refresh example figures
This commit is contained in:
parent
4a91df39da
commit
ab97281df3
1 changed files with 128 additions and 121 deletions
|
|
@ -6,9 +6,9 @@ Use these reports to investigate a change in planner selection, coverage, or run
|
|||
|
||||
- **A net is missing.** Compare the verified count with `max_routed`. If the count falls short of the bound, read `stages` for skipped or locked nets and look for the attempt where coverage stopped increasing. To see a run that reaches its bound of three routes out of four, try the [overloaded-gate benchmark](benchmarks.md#run-a-benchmark).
|
||||
|
||||
- **The chosen route changed.** Start at `stages[selected_stage]`. The `planner` identifies the source of the proposal and `mode` identifies the worker, so a bundle seed can be checked by an `off` worker. Use `planner_rejections` for constructive candidates that never reached selection.
|
||||
- **The chosen route changed.** Start at `stages[selected_stage]`. Read `planner` to identify how the candidate was created. Read `mode` to identify the worker that searched or verified it. A bundle candidate, for example, can be checked by a worker in `off` mode. Use `planner_rejections` to see why certain planners failed to produce a usable layout.
|
||||
|
||||
- **The run slowed down.** Group exclusive `timings` by policy and operation, including failed attempts. `duration_s` also includes orchestration. Use `run.metrics` and stage data for work across attempts. Detailed traces, corridor reports, and expanded states describe the selected attempt when present.
|
||||
- **The run slowed down.** Group `timings` by policy and operation to see where the time went, including failed attempts. Each duration excludes time recorded by nested operations. `duration_s` is the total automatic run time. Use `run.metrics` and stage data to compare work across attempts. The returned traces, corridor report, and expanded states come from the selected attempt when available.
|
||||
|
||||
## Route metrics
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ Pair each counter with a question about the work. Use a repeated wall-time compa
|
|||
| Similar expansions, more search time | Check `ray_cast_calls*` and `ray_cast_exact_geometry_checks` for visibility work. Compare dynamic `congestion_candidate_ids` with `congestion_exact_pair_checks` to see how much candidate geometry reaches exact tests. |
|
||||
| Verification dominates | Compare `verify_path_report_calls` with `verify_static_buffer_ops` and `verify_dynamic_exact_pair_checks`. This can distinguish repeated path checks from expensive checks of the same paths. |
|
||||
| Refinement takes longer | Compare `refinement_windows_considered`, `refinement_candidates_verified`, and `refinement_candidates_accepted`. Check whether the added windows buy a better path before enlarging the default budget. |
|
||||
| Attempts reach targets while verified coverage stays flat | Compare `iteration_conflict_edges` and `nets_carried_forward`. Inspect pair-local attempts and accepts after congestion stops. `pair_local_search_nodes_expanded` counts searches that returned a locally valid pair, so consult the attempt count to see failed searches. |
|
||||
| Attempts reach targets while verified coverage stays flat | Compare `iteration_conflict_edges` and `nets_carried_forward`. After congestion iterations finish, check how many pair repairs were tried and how many were installed. `pair_local_search_nodes_expanded` counts expansions from searches that produced a locally valid pair. Use `pair_local_search_attempts` to count every try. |
|
||||
|
||||
`nets_routed` and `nets_reached_target` count attempts. Use `result.is_valid` or `verified_net_ids` to count final successes. Duration counters ending in `_total_ns` can vary between identical runs. For the full field list, see the [`RouteMetrics` definition](../inire/results.py).
|
||||
|
||||
|
|
@ -31,18 +31,20 @@ Enable the `DiagnosticsOptions` flag for the question you want to answer.
|
|||
| Question | Flag and result |
|
||||
| --- | --- |
|
||||
| Which net consumed an iteration's budget? | `capture_iteration_trace` records `iteration_trace`. Inspect per-net `net_attempts` for expansions, pruning, congestion calls, and seed usage. |
|
||||
| Which two routes overlap after re-verification? | `capture_conflict_trace` records the conflicting net IDs and the indices of their overlapping path components. |
|
||||
| What pruning occurred near the final overlap? | `capture_frontier_trace` records `frontier_trace` for reached-but-colliding nets. Inspect the states and prune reasons sampled in that area. The diagnostic replay leaves the selected route fixed. |
|
||||
| Which routes have a clearance conflict? | `capture_conflict_trace` records the conflicting net IDs and the component indices in `conflict_trace`. |
|
||||
| Which candidate moves were pruned near the conflict? | `capture_frontier_trace` records `frontier_trace` for routes that reached their targets and still conflict with other nets. The trace samples moves and their prune reasons during a replay. |
|
||||
| What did the last unresolved iteration hand to pair-local repair? | `capture_pre_pair_frontier_trace` records `pre_pair_frontier_trace`. Check reroute order, conflict edges, and per-net attempt work immediately before repair. |
|
||||
| Where did the router explore? | `capture_expanded` records `expanded_nodes` for plotting. See the [fan-out example](../examples/07_large_scale_routing.py). |
|
||||
| Where did detailed search explore? | `capture_expanded` records positions and headings from the detailed routing iterations in `expanded_nodes`. Use `plot_expanded_nodes()` as in the [fan-out script](../examples/07_large_scale_routing.py). |
|
||||
|
||||
### Find overlapping components
|
||||
<a id="find-overlapping-components"></a>
|
||||
|
||||
1. Enable `capture_conflict_trace` in the run's `DiagnosticsOptions`. In the returned `run.conflict_trace`, use the entry whose `stage` is `"final"` to inspect the paths the run returned.
|
||||
### Find components in conflict
|
||||
|
||||
1. Enable `capture_conflict_trace` in `DiagnosticsOptions`. In `run.conflict_trace`, choose the entry with `stage="final"` to inspect the returned paths.
|
||||
2. Find the two net IDs in `conflict_edges`. In the matching `nets` entry, read `component_conflicts` for `self_component_index`, `other_net_id`, and `other_component_index`.
|
||||
3. Index each net's `path` in `run.results_by_net` using those zero-based indices. Plot the components' `physical_geometry` on the board and check their spacing against the required clearance. See whether both components compete for the same opening.
|
||||
3. Use those zero-based indices to look up components in each net's `path` in `run.results_by_net`. Plot their physical shapes to see where they approach each other. If their physical spacing looks sufficient, compare the installed proxy used by the [dynamic clearance check](architecture.md#geometry-and-refinement).
|
||||
|
||||
For an earlier stage such as `restored_best`, read the net and component indices from that entry. The final paths may have changed during repair.
|
||||
An earlier entry such as `restored_best` indexes the paths at that stage. Use the paths from the same stage for a geometry comparison. If verification failed with an empty conflict edge list, check the net's report for a keepout conflict, self-collision, or board boundary violation.
|
||||
|
||||
### Follow a late conflict into pair-local repair
|
||||
|
||||
|
|
@ -54,8 +56,8 @@ python -m scripts.record_conflict_trace \
|
|||
--output-dir /tmp/inire-trace
|
||||
```
|
||||
|
||||
1. Open `conflict_trace.json` and find `restored_best`. Six nets are complete and the conflict edges are `net_02` with `net_03` and `net_06` with `net_07`. For example, the entry for `net_02` reports that its component 1 overlaps component 1 of `net_03`. See the stage summary in the [recorded conflict trace](../archive/routing/conflict_trace.md#example_07_large_scale_routing_no_warm_start).
|
||||
2. Compare with `final`. All ten nets verified and the conflict edges are empty. The staged trace shows that repair resolved conflicts remaining after the congestion iterations.
|
||||
1. Open `conflict_trace.json` and find `restored_best`. Six nets pass verification. The conflicting pairs are `net_02` with `net_03` and `net_06` with `net_07`. For example, component 1 of `net_02` conflicts with component 1 of `net_03`. Compare the counts with the [recorded conflict trace](../archive/routing/conflict_trace.md#example_07_large_scale_routing_no_warm_start).
|
||||
2. Compare with `final`. All ten nets pass verification after repair, and the list of conflict edges is empty.
|
||||
3. To compare expansions and congestion work in the iterations leading up to repair, substitute `scripts.record_iteration_trace` in the command. If you need the reroute order and per-net work immediately before repair, substitute `scripts.record_pre_pair_frontier_trace` and compare with the [recorded pre-pair trace](../archive/routing/pre_pair_frontier_trace.md).
|
||||
|
||||
Use the returned result to count final successes. For live progress during routing, pass an [`iteration_callback`](user/api-reference.md#route-a-problem).
|
||||
|
|
@ -67,8 +69,9 @@ Use the returned result to count final successes. For live progress during routi
|
|||
3. If the run gets slower without more expansions, check the operation timings and use the counters above to pick a narrower trace or profile.
|
||||
|
||||
```sh
|
||||
# Run this from the baseline checkout.
|
||||
python -m scripts.routing_benchmark_parity capture /tmp/routing-before.json --case stress
|
||||
# Use the same options on the changed revision.
|
||||
# Run these from the changed checkout.
|
||||
python -m scripts.routing_benchmark_parity capture /tmp/routing-after.json --case stress
|
||||
python -m scripts.routing_benchmark_parity compare /tmp/routing-before.json /tmp/routing-after.json
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue