5
5
import tqdm
6
6
import argparse
7
7
8
- def aggregateTacoBenches (folder , outfile , labelSet = None ):
8
+ def aggregateTacoBenches (folder , outfile , taco = False , labelSet = None ):
9
9
first = True
10
10
outputFile = open (outfile , 'w+' )
11
11
writer = csv .writer (outputFile , delimiter = ',' )
@@ -20,8 +20,9 @@ def aggregateTacoBenches(folder, outfile, labelSet=None):
20
20
with open (fname , 'r' ) as f :
21
21
# Discard the first 10 lines. This corresponds to the
22
22
# google-benchmark generated header.
23
- # for i in range(0, 10):
24
- # f.readline()
23
+ if taco :
24
+ for i in range (0 , 10 ):
25
+ f .readline ()
25
26
# Open the rest of the file as a CSV.
26
27
reader = csv .reader (f )
27
28
# Attempt to read the header from CSV. If this fails,
@@ -52,5 +53,6 @@ def aggregateTacoBenches(folder, outfile, labelSet=None):
52
53
parser .add_argument ('target_directory' , type = str , help = "Directory containing CSV's to aggregate" )
53
54
parser .add_argument ('output_csv_name' , type = str , help = "Name of the CSV to generate" )
54
55
parser .add_argument ('--label_set_file' , type = str , default = None , help = 'Set to output all valid labels seen to a file' )
56
+ parser .add_argument ('--taco' , action = 'store_true' , help = 'Flag to aggregate TACO csvs, default is numpy' )
55
57
args = parser .parse_args ()
56
- aggregateTacoBenches (args .target_directory , args .output_csv_name , labelSet = args .label_set_file )
58
+ aggregateTacoBenches (args .target_directory , args .output_csv_name , taco = args . taco , labelSet = args .label_set_file )
0 commit comments