@@ -46,7 +46,7 @@ def parse_args():
46
46
)
47
47
48
48
parser .add_argument (
49
- "--titan_version" , default = "2.0 .0" , help = "Titan release version to download"
49
+ "--titan_version" , default = "2.1 .0" , help = "Titan release version to download"
50
50
)
51
51
parser .add_argument (
52
52
"--vtr_flow_dir" ,
@@ -198,7 +198,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
198
198
for filename in filenames :
199
199
src_file_path = os .path .join (dirpath , filename )
200
200
dst_file_path = None
201
- for benchmark_subdir in [ "titan_new" , "titan23" , "other_benchmarks" ] :
201
+ for benchmark_subdir in get_benchmark_subdirs ( args ) :
202
202
if compare_versions (args .titan_version , "2" ) >= 1 :
203
203
# if it is a 2.0.0 titan release or later use device family in the benchmark directory
204
204
device_families = get_device_families (args )
@@ -252,7 +252,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
252
252
253
253
254
254
def create_titan_blif_subdirs (titan_benchmarks_extract_dir , args ):
255
- for benchmark_subdir in [ "titan_new" , "titan23" , "other_benchmarks" ] :
255
+ for benchmark_subdir in get_benchmark_subdirs ( args ) :
256
256
titan_benchmark_subdir = os .path .join (titan_benchmarks_extract_dir , benchmark_subdir )
257
257
if os .path .exists (titan_benchmark_subdir ):
258
258
shutil .rmtree (titan_benchmark_subdir )
@@ -286,7 +286,7 @@ def determine_sdc_name(dirpath):
286
286
287
287
def extract_callback (members , args ):
288
288
for tarinfo in members :
289
- for benchmark_subdir in [ "titan_new" , "titan23" , "other_benchmarks" ] :
289
+ for benchmark_subdir in get_benchmark_subdirs ( args ) :
290
290
291
291
if compare_versions (args .titan_version , "2" ) >= 1 :
292
292
# if it is a 2.0.0 titan release or later use device family in the benchmark directory
@@ -321,6 +321,15 @@ def extract_callback(members, args):
321
321
print (tarinfo .name )
322
322
yield tarinfo
323
323
324
+ def get_benchmark_subdirs (args ):
325
+ """
326
+ Decide which benchmark subdirectories to use depending on version
327
+ """
328
+ if compare_versions (args .titan_version , "2.1.0" ) >= 1 :
329
+ # version is 2.1.0 or higher
330
+ return ["titanium" , "titan23" , "other_benchmarks" ]
331
+ else :
332
+ return ["titan_new" , "titan23" , "other_benchmarks" ]
324
333
325
334
def compare_versions (version1 , version2 ):
326
335
"""
0 commit comments