drt: preserve top-layer wrong-way tracks#10875
Conversation
|
Welcome to OpenROAD! Thanks for opening your first PR.
Please ensure:
|
There was a problem hiding this comment.
Code Review
This pull request removes the logic that limits grid graph layers and fixed-shape costing to the TOP_ROUTING_LAYER threshold. Specifically, it removes the layer-skipping checks based on the grid graph's minimum/maximum layer numbers and the top routing layer configuration in both FlexDR_init.cpp and FlexGridGraph.cpp. There are no review comments, so I have no feedback to provide.
|
@mguthaus FYI |
|
Sounds like it's best to keep it removed. I'm not an expert in the DRT module and was just going for an easy reduction but obviously this isn't that. |
|
The regression is narrower than the grid needing the full stack. The top routing layer gets its wrong-way edges from the tracks of the layer above it, and those track coords also feed the maze x/y coordinate union. So trimming the upper layers out of initTracks deleted all wrong-way edges on the top routing layer plus some nodes below, which is what breaks the maze search here. None of that needs grid z-planes above the top routing layer, and that's where the memory win comes from. So we can keep collecting tracks one layer above TOP_ROUTING_LAYER while still trimming the z dimension. |
Signed-off-by: Naveen Venkat <archgen.guest@nyayanidhi.in>
ec98015 to
6d51dd4
Compare
|
Thanks, this was the right split. I updated the patch to keep the reduced z dimension and collect track coordinates from only the first routing layer above TOP_ROUTING_LAYER. The supplied replay now passes both original failure points, completes iterations 0 and 1, and enters iteration 2 before the 20-minute cap. No DRT-0255 appears. Peak reported memory was 1650 MB, compared with about 1900 MB for the full-grid rollback. I also rebased onto current master and reran all 26 DRT tests, the DRT lint build, and the stamped OpenROAD build. |
| // Do not add z planes above TOP_ROUTING_LAYER. Keep tracks from the first | ||
| // routing layer above it because initEdges uses those coordinates for | ||
| // wrong-way edges on the top routing layer. | ||
| const bool aboveTop = currLayerNum > router_cfg_->TOP_ROUTING_LAYER; | ||
| if (aboveTop && collectedAboveTopTracks) { | ||
| continue; | ||
| } | ||
| collectedAboveTopTracks = aboveTop; |
There was a problem hiding this comment.
Easier to read and interpret.
| // Do not add z planes above TOP_ROUTING_LAYER. Keep tracks from the first | |
| // routing layer above it because initEdges uses those coordinates for | |
| // wrong-way edges on the top routing layer. | |
| const bool aboveTop = currLayerNum > router_cfg_->TOP_ROUTING_LAYER; | |
| if (aboveTop && collectedAboveTopTracks) { | |
| continue; | |
| } | |
| collectedAboveTopTracks = aboveTop; | |
| if (currLayerNum - 2 > router_cfg_->TOP_ROUTING_LAYER) { | |
| continue; | |
| } |
Fixes #10873.
The regression came from dropping all track data above TOP_ROUTING_LAYER. The top routing layer uses coordinates from the next routing layer to create wrong-way edges and to build the maze x/y coordinate union. Removing those coordinates left valid routes without a path.
Keep the reduced z dimension, but collect tracks from the first routing layer above TOP_ROUTING_LAYER. That preserves the memory optimization while restoring the missing top-layer topology.
Tested on the GCP Linux VM: