Skip to content

Improved parallel router: add NetlistRouter #2411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Improved parallel router: add NetlistRouter #2411

merged 2 commits into from
Nov 14, 2023

Conversation

duck2
Copy link
Contributor

@duck2 duck2 commented Oct 6, 2023

This adds a common NetlistRouter interface for the serial and parallel routers and removes the code duplication between route_timing.cpp and route_parallel.cpp. route_timing.* is divided into three files:

  • route_net.* (net routing utils)
  • route_utils.cpp (top-level routing utils)
  • route.cpp (only the top-level route())

Unlike try_timing_driven_route_tmpl(), route() no longer manages a ConnectionRouter, so it doesn't need to be templated.

ConnectionRouter no longer retries with a full-device bounding box by itself. The "retry with full BB" flag is bubbled up and it's up to the NetlistRouter to retry the connection/net properly.

Will experiment with high-fanout behavior in ConnectionRouter and whether clipping HF BBs hurts QoR in the serial case. It's mandatory in the parallel case, so would be nice if it doesn't affect QoR and we won't have to add branches there.

How Has This Been Tested?

  • CI tests
  • Will attach QoR from Titan & VTR

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@duck2 duck2 changed the title Improved parallel router: add NetlistRouter and refactor code Improved parallel router: add NetlistRouter and refactor router code Oct 6, 2023
@duck2 duck2 changed the title Improved parallel router: add NetlistRouter and refactor router code Improved parallel router: add NetlistRouter Oct 6, 2023
@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Oct 6, 2023
@duck2
Copy link
Contributor Author

duck2 commented Oct 7, 2023

It looks like there's a single min_chan_width_route_time failure and a segfault in a unit test... no idea why. Can update the golden result for the first failure, since that can vary wildly. Waiting for initial titan results.

@duck2
Copy link
Contributor Author

duck2 commented Oct 7, 2023

titan_quick_qor, serial routing, placement seed=10 (both runs did placement to make sure we didn't break it):
titan_10_t1.xlsx

Metric 15c5340 This
max_vpr_mem 1 1.000
pack_time 1 0.991
placed_wirelength_est 1 1.000
place_time 1 1.001
placed_CPD_est 1 1.000
routed_wirelength 1 1.000
critical_path_delay 1 0.990
geomean_nonvirtual_intradomain_critical_path_delay 1 0.992
crit_path_route_time 1 1.014

@duck2
Copy link
Contributor Author

duck2 commented Oct 7, 2023

Nightly koios, extracted from GH runners. No .xlsx file -- had to manually get the data from the artifacts because it looks like the parser isn't getting the CPD & runtime values. Koios runs are fixed chan width, so they should be parsed by something like vpr_titan.txt, not vpr_standard.txt.

Circuit Runtime (8e59d59) This Ratio CPD (8e59d59) This Ratio
bwave_like.float.small.v 98.37 98.06 0.997 7.849 7.563 0.964
dnnweaver.v 91.02 124.54 1.368 10.287 11.632 1.131
tdarknet_like.small.v 85.81 82.670 0.963 19.866 17.566 0.884
proxy.5.v 23.60 23.06 0.977 8.712 8.712 1.000
proxy.7.v 45.94 46.25 1.007 9.053 9.079 1.003
proxy.8.v 24.04 24.63 1.025 8.632 8.632 1.000
Geomean 1.048 0.994

@duck2
Copy link
Contributor Author

duck2 commented Oct 7, 2023

VTR benchmarks extracted from GH runners: vtr_gh_t1.xlsx

circuit Runtime (8e59d59) This Ratio CPD (8e59d59) This Ratio WL (8e59d59) This Ratio W_min (8e59d59) This Ratio
arm_core.v 13.94 14.95 1.072 22.914 22.914 1.000 184307 184307 1.000 116 116 1.000
bgm.v 15.43 9.88 0.640 20.283 20.283 1.000 402334 402334 1.000 74 74 1.000
stereovision1.v 9.31 9.1 0.977 5.441 5.441 1.000 131011 131011 1.000 88 88 1.000
stereovision2.v 17.92 18.57 1.036 13.719 13.719 1.000 422372 422372 1.000 96 96 1.000
LU8PEEng.v 20.18 21.8 1.080 74.240 74.240 1.000 340308 340308 1.000 96 96 1.000
LU32PEEng.v 81.52 83.43 1.023 73.170 73.170 1.000 1348522 1348522 1.000 132 132 1.000
mcml.v 36.91 36.71 0.995 45.477 45.456 1.000 999026 997319 0.998 142 144 1.014
Geomean 0.962 1.000 1.000 1.002

Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting changes and moving functions around.
QoR looks good; once these updates are made it's good to merge.

@duck2 duck2 force-pushed the par_router3_1 branch 6 times, most recently from 27051c2 to 1bcace2 Compare November 11, 2023 20:25
@vaughnbetz
Copy link
Contributor

@duck2: is this ready to merge?

  • there was a unit test seg fault --> resolved?
  • serial QoR looks good.
  • Any need to test parallel QoR, or just merge and test later?

@vaughnbetz
Copy link
Contributor

@soheilshahrouz : the unit test failure is a NoC test that removes and adds a link (it seg faults). It's hard to see how Fahri's code could cause that so I suspect it's a pre-existing weakness. Can you take a look?

@soheilshahrouz
Copy link
Contributor

@soheilshahrouz : the unit test failure is a NoC test that removes and adds a link (it seg faults). It's hard to see how Fahri's code could cause that so I suspect it's a pre-existing weakness. Can you take a look?

Is this test failure different than the one mentioned in the link below?
#2357 (comment)

@vaughnbetz
Copy link
Contributor

Not sure. @ducks2?

also: clip high-fanout BBs by original BBs to avoid
data races in the parallel case
@duck2 duck2 merged commit 7597c28 into master Nov 14, 2023
@duck2 duck2 deleted the par_router3_1 branch November 14, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants