Skip to content

Commit 05c85a8

Browse files
SrivatsanSrivat97
authored andcommitted
Adding instructions to run the synthetic and MLP benchmarks
1 parent e16c684 commit 05c85a8

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
###################################################
2+
# NoC MLP Designs Files
3+
###################################################
4+
5+
This directory contains benchmarks which handle the parallel processing of
6+
Multilayer Perceptrons (MLPs). Each benchmark is designed to handle different MLP
7+
configurations.
8+
9+
Benchmark Structure:
10+
|---<Benchmark>
11+
| |---<Benchmark>.blif - Is the netlist file for the given benchmark
12+
|---<Benchmark>.flows - Is the NoC traffic flows file associated with the given benchmark
13+
(A benchmark can have multiple traffic flows files)
14+
|---verilog - Contains design files needed to generate the netlist file for the benchmark
15+
|---shared_verilog - Contains design files needed by all benchmarks to generate thier netlist files
16+
17+
Running the benchmarks:
18+
Pre-requisite
19+
- Ensure VPR is built (refer to 'https://docs.verilogtorouting.org/en/latest/' for build instructions)
20+
- Set 'VTR_ROOT' as environment variable pointing to the location of the VTR source tree
21+
- Ensure python version 3.6.9 or higher is installed
22+
- Copy over the netlist files from 'https://drive.google.com/drive/folders/135QhmfgUaGnK2ZEfbfEXtdm1BfS7YoG7?usp=sharing'.
23+
The file structure in the previous link is similiar to structure found in '$VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP'.
24+
Place the netlist files in the appropriate folder locations.
25+
26+
Running single instance:
27+
- Below is the general command which can be used to run any MLP benchmark except MLP_2_phase_optimization/:
28+
29+
$VTR_ROOT/build/vpr/vpr $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/mlp_benchmarks.stratixiv_arch.timing_with_a_embedded_4X4_mesh_noc_topology.xml \
30+
<circuit_netlist_file_location>.blif --device EP4SE820 --route_chan_width 300 --noc on --noc_flows_file <flows_file_location>.flows \
31+
--noc_routing_algorithm xy_routing
32+
33+
- For example, to run VPR on the MLP_1 benchmark the command is as follows:
34+
35+
$VTR_ROOT/build/vpr/vpr $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/mlp_benchmarks.stratixiv_arch.timing_with_a_embedded_4X4_mesh_noc_topology.xml \
36+
$VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_1/mlp_1.blif --device EP4SE820 --route_chan_width 300 \
37+
--noc on --noc_flows_file $VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_1/mlp_1.flows \
38+
--noc_routing_algorithm xy_routing
39+
40+
Running multiple instances:
41+
- The script ($VTR_ROOT/vtr_flow/scripts/noc/noc_benchmark_test.py) runs multiple runs of VPR on a given benchmark and outputs averaged metric
42+
information over all runs
43+
- For example, the command to run 5 iterations of VPR (using 1 thread) on the MLP_1 benchmark using the above script is as follows:
44+
45+
<path_to_python_interpreter> $VTR_ROOT/vtr_flow/scripts/noc/noc_benchmark_test.py \
46+
-tests_folder_location $VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_1/mlp_1.blif \
47+
-arch_file $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/mlp_benchmarks.stratixiv_arch.timing_with_a_embedded_4X4_mesh_noc_topology.xml \
48+
-vpr_executable $VTR_ROOT/build/vpr/vpr --device EP4SE820 -flow_file $VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_1/mlp_1.flows \
49+
-noc_routing_algorithm xy_routing -number_of_seeds 5 -number_of_threads 1 -route
50+
51+
- The above command will generate an output file in the run directory that contains all the place and route metrics. This is a txt file with a name which matches the
52+
the flows file provided. So for the command shown above the output file is 'mlp_1.txt'
53+
54+
Special benchmarks:
55+
MLP_2_phase_optimization/MLP_2_phase_optimization_step_1
56+
- This benchmark is unique in that it mainly consists of NoC routers to prioritize NoC placement and uses a custom architecture file
57+
- To run a single instance of this benchmark just change the arch file from the command above to
58+
'$VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/mlp_2_phase_optimization_step_1.stratixiv_arch.timing_with_a_embedded_4X4_mesh_noc_topology.xml'
59+
- To run the benchmark using the automated script just pass in the arch file below with the '-arch_file' option:
60+
'$VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/mlp_2_phase_optimization_step_1.stratixiv_arch.timing_with_a_embedded_4X4_mesh_noc_topology.xml'
61+
62+
MLP_2_phase_optimization/MLP_2_phase_optimization_step_2
63+
- This benchmark is unique in that the NoC placement is already provided through the MLP_2_phase_optimization_step_1 benchmark. So the placement
64+
of the NoC routers needs to be locked. A
65+
- To run a single instance of this benchmark, pass in the following command line parameter and its value to the command shown above:
66+
'--fix_clusters $VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_2_phase_optimization/MLP_2_phase_optimization_step_2/MLP_two_phase_optimization_step_two_constraints.place'
67+
- To run the benchmarkusing the automated script just pass in the following command line parameter and its value to the script command above:
68+
'-fix_clusters $VTR_ROOT/vtr_flow/benchmarks/noc/Large_Designs/MLP/MLP_2_phase_optimization/MLP_2_phase_optimization_step_2/MLP_two_phase_optimization_step_two_constraints.place'
69+
Expected run time:
70+
- These benchmarks are quite large so the maximum expected run time for a single run is a few hours
71+
- To speed up the run time with multiple VPR runs the thread count can be increased from 1. Set thread count equal to number seeds for fastest run time.
72+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
###################################################
2+
# NoC Synthetic Designs Files
3+
###################################################
4+
5+
Benchmark Structure:
6+
|---<Benchmark>
7+
| |---<Benchmark>.blif - Is the netlist file for the given benchmark
8+
|---<Benchmark>.flows - Is the NoC traffic flows file associated with the given benchmark
9+
(A benchmark can have multiple traffic flows files)
10+
|---verilog - Contains design files needed to generate the netlist file for the benchmark
11+
|---shared_verilog - Contains design files needed by all benchmarks to generate thier netlist files
12+
13+
Running the benchmarks:
14+
Pre-requisite
15+
- Ensure VPR is built (refer to 'https://docs.verilogtorouting.org/en/latest/' for build instructions)
16+
- Set 'VTR_ROOT' as environment variable pointing to the location of the VTR source tree
17+
- Ensure python version 3.6.9 or higher is installed
18+
19+
Running single instance:
20+
- Below is the general command which can be used to run any synthetic benchmark:
21+
22+
$VTR_ROOT/build/vpr/vpr $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/stratixiv_arch.timing_with_a_embedded_10X10_mesh_noc_topology.xml \
23+
<circuit_netlist_file_location>.blif --device EP4SE20 --route_chan_width 300 --noc on --noc_flows_file <flows_file_location>.flows \
24+
--noc_routing_algorithm xy_routing
25+
26+
- For example, to run VPR on the complex_2_noc_1D_chain benchmark the command is as follows:
27+
28+
$VTR_ROOT/build/vpr/vpr $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/stratixiv_arch.timing_with_a_embedded_10X10_mesh_noc_topology.xml \
29+
$VTR_ROOT/vtr_flow/benchmarks/noc/Synthetic_Designs/complex_2_noc_1D_chain/complex_2_noc_1D_chain.blif --device EP4SE20 --route_chan_width 300 \
30+
--noc on --noc_flows_file $VTR_ROOT/vtr_flow/benchmarks/noc/Synthetic_Designs/complex_2_noc_1D_chain/complex_2_noc_1D_chain.flows \
31+
--noc_routing_algorithm xy_routing
32+
33+
Running multiple instances:
34+
- The script ($VTR_ROOT/vtr_flow/scripts/noc/noc_benchmark_test.py) runs multiple runs of VPR on a given benchmark and outputs averaged metric
35+
information over all runs
36+
- For example, the command to run 5 iterations of VPR (using 1 thread) on the complex_2_noc_1D_chain benchmark using the above script is as follows:
37+
38+
<path_to_python_interpreter> $VTR_ROOT/vtr_flow/scripts/noc/noc_benchmark_test.py \
39+
-tests_folder_location $VTR_ROOT/vtr_flow/benchmarks/noc/Synthetic_Designs/complex_2_noc_1D_chain/complex_2_noc_1D_chain.blif \
40+
-arch_file $VTR_ROOT/vtr_flow/arch/noc/mesh_noc_topology/stratixiv_arch.timing_with_a_embedded_10X10_mesh_noc_topology.xml \
41+
-vpr_executable $VTR_ROOT/build/vpr/vpr --device EP4SE20 -flow_file $VTR_ROOT/vtr_flow/benchmarks/noc/Synthetic_Designs/complex_2_noc_1D_chain/complex_2_noc_1D_chain.flows \
42+
-noc_routing_algorithm xy_routing -noc_swap_percentage 40 -number_of_seeds 5 -number_of_threads 1
43+
44+
- The above command will generate an output file in the run directory that contains all the place and route metrics. This is a txt file with a name which matches the
45+
the flows file provided. So for the command shown above the outout file is 'complex_2_noc_1D_chain.txt'
46+
47+
Expected run time:
48+
- These benchmarks are quite small so the maximum expected run time for a single run is ~30 minutes
49+
- To speed up the run time with multiple VPR runs the thread count can be increased from 1. Set thread count equal to number seeds for fastest run time.
50+

0 commit comments

Comments
 (0)