@@ -46,7 +46,7 @@ def parse_args():
4646 )
4747
4848 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"
5050 )
5151 parser .add_argument (
5252 "--vtr_flow_dir" ,
@@ -198,7 +198,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
198198 for filename in filenames :
199199 src_file_path = os .path .join (dirpath , filename )
200200 dst_file_path = None
201- for benchmark_subdir in [ "titan_new" , "titan23" , "other_benchmarks" ] :
201+ for benchmark_subdir in get_benchmark_subdirs ( args ) :
202202 if compare_versions (args .titan_version , "2" ) >= 1 :
203203 # if it is a 2.0.0 titan release or later use device family in the benchmark directory
204204 device_families = get_device_families (args )
@@ -252,7 +252,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
252252
253253
254254def 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 ) :
256256 titan_benchmark_subdir = os .path .join (titan_benchmarks_extract_dir , benchmark_subdir )
257257 if os .path .exists (titan_benchmark_subdir ):
258258 shutil .rmtree (titan_benchmark_subdir )
@@ -286,7 +286,7 @@ def determine_sdc_name(dirpath):
286286
287287def extract_callback (members , args ):
288288 for tarinfo in members :
289- for benchmark_subdir in [ "titan_new" , "titan23" , "other_benchmarks" ] :
289+ for benchmark_subdir in get_benchmark_subdirs ( args ) :
290290
291291 if compare_versions (args .titan_version , "2" ) >= 1 :
292292 # 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):
321321 print (tarinfo .name )
322322 yield tarinfo
323323
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" ]
324333
325334def compare_versions (version1 , version2 ):
326335 """
0 commit comments