Skip to content

Commit d8b79d6

Browse files
[Format] Fixed Python Formatting Issues
Run make format-py to fix all Python format issues.
1 parent e03872d commit d8b79d6

File tree

6 files changed

+51
-12
lines changed

6 files changed

+51
-12
lines changed

odin_ii/regression_test/tools/odin_config_maker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ def main(argv=None):
3434
print("\tDid not get any input options; use odin_config_maker.py -h for help.")
3535
return -1
3636
if options.individual is not None and options.directory is not None:
37-
print("\tThe -i and -d options are mutually exclusive; use odin_config_maker.py -h for help.")
37+
print(
38+
"\tThe -i and -d options are mutually exclusive; use odin_config_maker.py -h for help."
39+
)
3840
return -1
3941

4042
# Create our Config Files

odin_ii/usefull_tools/restore_blackboxed_latches_from_blif_file.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ def main():
5151
if args.inplace:
5252
print("Inplace Restortation:")
5353
elif not args.restoredBlifFile:
54-
print('\n\nERROR: Must Specify Either Inplace Restoration "-i,--inplace" or a file to restore to "-r\--restoredBlifFile"\nExiting...\n')
54+
print(
55+
'\n\nERROR: Must Specify Either Inplace Restoration "-i,--inplace" or a file to restore to "-r\--restoredBlifFile"\nExiting...\n'
56+
)
5557
parser.print_help()
5658
return -1
5759

5860
if not os.path.isfile(args.blifFileToRestore):
59-
print('\n\nERROR: BLIF File to Restore "{}" doesn not exist\nExiting...\n'.format(
60-
args.blifFileToRestore
61-
))
61+
print(
62+
'\n\nERROR: BLIF File to Restore "{}" doesn not exist\nExiting...\n'.format(
63+
args.blifFileToRestore
64+
)
65+
)
6266
parser.print_help()
6367
return -1
6468

vtr_flow/scripts/benchtracker/plotter-offline.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ def subplot_traverser(
226226
i.e.: y_sublist = y_raw_list[i]
227227
figure_name
228228
"""
229+
229230
# TODO: if some x,y series are all -1, then we should not create the figure
230231
def figure_traverser(
231232
self, y_sub_list, namemap, axis_left, xy_namemap, y_i, figure_name, plot_type="plot"
@@ -381,9 +382,38 @@ def main():
381382
data_collection = data_converter(data, ret["x"], ret["y"], filt_name_list)
382383

383384
print("########################################")
384-
print("---- Description: ----\n" + ">>\n" + "VPR benchmark experiment should have 2 types of data: \n" + "parameter: settings in for the experiment (e.g.: fc, wire length, switch block ...)\n" + "metrics: measurements from the VPR output (e.g.: min chan width, critical path delay ...)\n" + ">>\n" + "Data passed into this plotter should have already been classified into 3 axes: \n" + "one [x] axis (chosen from parameter)\n" + "multiple [y] axis (chosen from metrics)\n" + "multiple [filter] axis (all the unchosen parameters)\n" + ">>\n" + "For example, if the experiment has: \n" + "[arch, circuit, wire length, switch block, fc, min chan width, critical path delay, area, total wire length]\n" + "and you choose fc as x axis, [min chan width, critical path delay, area, total wire length] as y axes,\n" + "then filter axes are the unchosen parameters, i.e.: arch, circuit, wire length, switch block. ")
385+
print(
386+
"---- Description: ----\n"
387+
+ ">>\n"
388+
+ "VPR benchmark experiment should have 2 types of data: \n"
389+
+ "parameter: settings in for the experiment (e.g.: fc, wire length, switch block ...)\n"
390+
+ "metrics: measurements from the VPR output (e.g.: min chan width, critical path delay ...)\n"
391+
+ ">>\n"
392+
+ "Data passed into this plotter should have already been classified into 3 axes: \n"
393+
+ "one [x] axis (chosen from parameter)\n"
394+
+ "multiple [y] axis (chosen from metrics)\n"
395+
+ "multiple [filter] axis (all the unchosen parameters)\n"
396+
+ ">>\n"
397+
+ "For example, if the experiment has: \n"
398+
+ "[arch, circuit, wire length, switch block, fc, min chan width, critical path delay, area, total wire length]\n"
399+
+ "and you choose fc as x axis, [min chan width, critical path delay, area, total wire length] as y axes,\n"
400+
+ "then filter axes are the unchosen parameters, i.e.: arch, circuit, wire length, switch block. "
401+
)
385402
print("#########################################")
386-
print("---- Usage ----\n" + ">>\n" + "1. choose overlay axes among the filter axes (overlay axes will become legend in a single plot)\n" + '2. choose whether to whether to calculate the geo mean over the overlay axis ("merge" function)\n' + " (Notice: you can choose as many overlay axes as you like, but when you choose merge, it will only\n" + " calculate the geo mean over the last overlay axis. So for example, if your overlay axes are [fc, circuit],\n" + " the merge will only get geo mean over all the circuits rather that all the (circuit,fc) combination, and \n" + " fc will still be overlaid in the merged plot.)\n" + '3. the data after geo mean calcultion will be referred to as "gmean", and the data before the geo mean will be \n' + ' referred to as "raw", you can switch the overlay axes for both gmean data and raw data, for as many times \n' + ' as you like. But once you "merge" on a new axis, the old gmean data will be replaced by the new one, and further\n' + " operation will be acted on only the new gmean data.")
403+
print(
404+
"---- Usage ----\n"
405+
+ ">>\n"
406+
+ "1. choose overlay axes among the filter axes (overlay axes will become legend in a single plot)\n"
407+
+ '2. choose whether to whether to calculate the geo mean over the overlay axis ("merge" function)\n'
408+
+ " (Notice: you can choose as many overlay axes as you like, but when you choose merge, it will only\n"
409+
+ " calculate the geo mean over the last overlay axis. So for example, if your overlay axes are [fc, circuit],\n"
410+
+ " the merge will only get geo mean over all the circuits rather that all the (circuit,fc) combination, and \n"
411+
+ " fc will still be overlaid in the merged plot.)\n"
412+
+ '3. the data after geo mean calcultion will be referred to as "gmean", and the data before the geo mean will be \n'
413+
+ ' referred to as "raw", you can switch the overlay axes for both gmean data and raw data, for as many times \n'
414+
+ ' as you like. But once you "merge" on a new axis, the old gmean data will be replaced by the new one, and further\n'
415+
+ " operation will be acted on only the new gmean data."
416+
)
387417
while 1:
388418
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
389419
print("available axis to overlay: ")

vtr_flow/scripts/download_titan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def extract_callback(members, args):
321321
print(tarinfo.name)
322322
yield tarinfo
323323

324+
324325
def get_benchmark_subdirs(args):
325326
"""
326327
Decide which benchmark subdirectories to use depending on version
@@ -331,6 +332,7 @@ def get_benchmark_subdirs(args):
331332
else:
332333
return ["titan_new", "titan23", "other_benchmarks"]
333334

335+
334336
def compare_versions(version1, version2):
335337
"""
336338
Compares two release versions to see which once is more recent

vtr_flow/scripts/python_libs/vtr/parse_vtr_task.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ def check_two_files(
422422
for (arch, circuit, script_params), _ in first_results.all_metrics().items():
423423
first_primary_keys.append((arch, circuit, script_params))
424424

425-
426425
# Warn about any elements in first result file that are not found in second result file
427426
for arch, circuit, script_params in first_primary_keys:
428427
if second_results.metrics(arch, circuit, script_params) is None:
@@ -443,9 +442,11 @@ def check_two_files(
443442
"/".join(str((Path(config.config_dir).parent)).split("/")[-3:])
444443
)
445444
)
446-
print("Required case {}/{} missing from {} results: {}".format(
445+
print(
446+
"Required case {}/{} missing from {} results: {}".format(
447447
arch, circuit, first_name, first_results_filepath
448-
))
448+
)
449+
)
449450
num_qor_failures += 1
450451
continue
451452

vtr_flow/scripts/spice/run_spice.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
my_dir = ""
1111

1212
if len(sys.argv) < 9:
13-
print (
13+
print(
1414
"Usage: spice.py <tech_file> <tech_size> <Vdd> <P/N> <temp> <activity [hz]> <component_type> <size> <nmos_size>"
1515
)
1616
sys.exit()
@@ -37,7 +37,7 @@
3737
elif activity == "z":
3838
na = 1
3939
else:
40-
print ("Invalid activity type\n")
40+
print("Invalid activity type\n")
4141
sys.exit()
4242

4343
base_dir = os.path.join(my_dir)

0 commit comments

Comments
 (0)