Closed KA7E closed 1 week ago
@AlexandreSinger can you help me figure out why these keep failing?
It looks like memory corruption. I looked at one of the strong regtests, and there are a huge number of failures due to vpr not completing. You can download the raw logs by clicking on the gear icon after clicking on a test:
2024-06-18T12:15:00.0635639Z [32;1m12:15:00[0m | log file : /root/vtr-verilog-to-routing/vtr-verilog-to-routing/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test7/titan_other_run_flat/run001/stratixiv_arch.timing.xml/sudoku_check_stratixiv_arch_timing.blif/common/vpr.out
You can see the vpr output by selecting the download log archive from the same gear icon, double clicking on a regression test and opening the big text.txt output file. That shows there is a segmentation fault at the end of placement (signal 11 is a seg fault), e.g.:
2024-06-18T12:05:27.4656365Z <Placement perturbation distribution by block and move type:
2024-06-18T12:05:27.4657772Z <------------------ ----------------- ---------------- ---------------- --------------- ------------
2024-06-18T12:05:27.4658857Z < Block Type Move Type (%) of Total Accepted(%) Rejected(%) Aborted(%)
2024-06-18T12:05:27.4660073Z <------------------ ----------------- ---------------- ---------------- --------------- ------------
2024-06-18T12:05:27.4661159Z <io Uniform 11.67 28.57 71.43 0.00
2024-06-18T12:05:27.4662149Z < Median 16.67 10.00 80.00 10.00
2024-06-18T12:05:27.4662998Z < Centroid 8.33 20.00 80.00 0.00
2024-06-18T12:05:27.4663864Z < W. Centroid 40.00 41.67 58.33 0.00
2024-06-18T12:05:27.4664778Z < W. Median 1.67 0.00 100.00 0.00
2024-06-18T12:05:27.4665714Z < Crit. Uniform 3.33 0.00 100.00 0.00
2024-06-18T12:05:27.4666674Z < Feasible Region 1.67 0.00 100.00 0.00
2024-06-18T12:05:27.4667495Z <
2024-06-18T12:05:27.4668064Z <clb Uniform 5.00 0.00 0.00 100.00
2024-06-18T12:05:27.4669003Z < Median 3.33 0.00 0.00 100.00
2024-06-18T12:05:27.4670857Z < W. Centroid 8.33 0.00 0.00 100.00
2024-06-18T12:05:27.4671675Z <
2024-06-18T12:05:27.4672021Z <
2024-06-18T12:05:27.4674310Z <Placement Quench timing analysis took 2.0208e-05 seconds (1.5038e-05 STA, 5.17e-06 slack) (1 full updates: 1 setup, 0 hold, 0 combined).
2024-06-18T12:05:27.4676676Z <Placement Total timing analysis took 0.0011949 seconds (0.00114186 STA, 5.3039e-05 slack) (Command terminated by signal 11
2024-06-18T12:05:27.4680085Z < Command being timed: "/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/vpr/vpr k6_N10_mem32K_40nm.xml multiclock --circuit_file multiclock.pre-vpr.blif --net_file ../../../../multiclock.net --verify_file_digests
I suggest running a circuit locally and bringing it up in the debugger to see the call stack, and/or you could run the sanitized build or valgrind.
Silly me, forgot to delete the old (unconditional) call to print_flat_placement when I moved it inside a function and added a condition. @vaughnbetz can you take a look once CI has finished?
Looks good; thanks.
Frontend modifications to incorporate legalizer.
Description
vpr_api.cpp:
SetupGrid.h: Added default arguments to create_device_grid so that it can be called with a fixed device layout without other args (that are only used when auto-sizing).
read_options.h/cpp: Added the following command line inputs: --legalize, enables the legalizer --flat_place_file, legalizer input file
--write_fix_clusters (default: fix_clusters.out), for legalizer placed clusters output
--write_flat_place (default: flat_place.out), for post-placement flat placement output
SetupVPR.cpp: Added the following fields to the FileNameOpts data structure:
CheckSetup.cpp:
read_place.h/cpp: Added an optional boolean input to print_place which defaults to true (in which case the function's behavior does not change). If false, the header is not printed, unplaced blocks (loc.x = -1) are skipped, and the net_file and net_id parameters are unused and can be set to nullptr. This is useful if the output will be used as a constraints (fix clusters) file.
added load_flat_place.h/cpp: Function to print a flat placement file. Function to load flat placement (impl coming soon).
Related Issue
Motivation and Context
Incorporates the legalizer.
How Has This Been Tested?
Verified that, if legalizer option is not enabled, vpr runs as usual with no QoR change. The legalization capability has been tested on all Titan23 benchmarks.
Types of changes
Checklist: