Skip to content
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

3D NoC #2649

Merged
merged 42 commits into from
Sep 17, 2024
Merged

3D NoC #2649

merged 42 commits into from
Sep 17, 2024

Conversation

soheilshahrouz
Copy link
Contributor

@soheilshahrouz soheilshahrouz commented Jul 16, 2024

Description

Generalizing the NoC data structures, architecture description and routing algorithms to 3D (multi-layer) FPGAs.

Motivation and Context

VTR is mostly 3D now, but the NoCs are still only 2D.

How Has This Been Tested?

Created a new arch file and ran synthetic benchmarks on this new 3D NoC arch within the 3D Stratix IV arch. The 10x10 2D mesh is replaced by two 7x7 meshes stacked on top of each other. All the benchmarks passed, and the QoR metrics are slightly better as the 3D NoC topology shortens some traffic flows.

CI has been updated to run some tests on this 3D architecture.

Types of changes

  • New feature (change which adds functionality)

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

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool libarchfpga Library for handling FPGA Architecture descriptions labels Jul 16, 2024
@vaughnbetz
Copy link
Contributor

Some CI test failures due to vtr::isclose getting one float and one double; you'll have to explicitly cast or change a constant or some such (@soheilshahrouz tells me he has float constants and double variables so that is probably it).

@vaughnbetz
Copy link
Contributor

Until CI is sorted please run the major nightly tests on wintermute and list the results here.

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.

Looks good. A few changes. Also:

  • Check UP/DOWN are consistently changed to NORTH/SOUTH
  • We should have at least one test for each routing algorithm (can be separate PR).

libs/libarchfpga/src/physical_types.h Outdated Show resolved Hide resolved
libs/libarchfpga/src/read_xml_arch_file_noc_tag.cpp Outdated Show resolved Hide resolved
libs/libvtrutil/src/vtr_util.h Show resolved Hide resolved
libs/libvtrutil/src/vtr_vector.h Outdated Show resolved Hide resolved
vpr/src/noc/noc_traffic_flows.h Show resolved Hide resolved
vpr/src/noc/odd_even_routing.cpp Outdated Show resolved Hide resolved
vpr/src/noc/odd_even_routing.cpp Show resolved Hide resolved
vpr/src/noc/west_first_routing.cpp Outdated Show resolved Hide resolved
vpr/src/noc/west_first_routing.cpp Outdated Show resolved Hide resolved
vpr/src/place/initial_noc_placement.cpp Outdated Show resolved Hide resolved
@vaughnbetz
Copy link
Contributor

re-launched CI. I also suggest one QoR test (Titan or VTR, could be just a circuit or two if you wish) to confirm no unexpected slowdown, and a test on the NoC designs to confirm the same.
Other than that I think this is ready to merge -- is that right?

@vaughnbetz
Copy link
Contributor

@soheilshahrouz tells me there is a strange behaviour: the NoC centroid move is working, but when enabled the initial temperature is very low (3 orders of magnitude lower). This did not occur in the earlier, FPL 2024 code. Only affects NoC designs. The QoR is very bad due to this lower temperature, so we aren't just finding a very good solution quickly.
It's not clear when the regression occurred; could have been when the 3D NoC support was added or could have been earlier.

Action after this is figured out: turn this move type on by default, or have a CI test for it.

@vaughnbetz
Copy link
Contributor

Almost ready for merge ... NoC centroid move problem is resolved (was a memory bug).
Please get QoR results (2D and 3D) and we can merge this.

@soheilshahrouz soheilshahrouz changed the title [WIP] 3D NoC 3D NoC Sep 17, 2024
@soheilshahrouz
Copy link
Contributor Author

QoR results on a subset of synthetic benchmarks on a 2D noc to measure if the introduction of 3D NoC support has slowed down NoC optimization in 2D architectures

Metric Master 3D Ratio
Pack Time 333.1751111 339.1172979 1.018
Place WL 550050.0964 543046.6124 0.987
Place Time 372.4883381 365.6559439 0.981
Total Swap 4183327.301 4189977.075 1.002
Place CPD 7.164124389 7.170530009 1.001
Agg BW 1.22E+07 1.22E+07 0.997
Agg Lat 2.94E-07 2.93E-07 0.999
Latency Overrun 0.00000000024 0.00000000024 1
Congestion 0.016 0.016 1
Congested Links 0.16 0.16 1

@vaughnbetz
Copy link
Contributor

3D seems to have slightly improved things :). Merging!

@vaughnbetz vaughnbetz merged commit 6595b26 into master Sep 17, 2024
52 checks passed
@vaughnbetz vaughnbetz deleted the 3d_noc branch September 17, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code libarchfpga Library for handling FPGA Architecture descriptions libvtrutil VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants