File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,9 @@ def to_str(self):
238238 f"error failure probability str conversion '{ self } ' not supported yet"
239239 )
240240
241+ def __str__ (self ):
242+ return self .to_str ()
243+
241244
242245class BenchType (enum .Enum ):
243246 Latency = 0
Original file line number Diff line number Diff line change @@ -313,7 +313,10 @@ def perform_data_extraction(
313313 conversion_func ,
314314 )
315315
316- file_suffix = f"_{ operand_type .lower ()} "
316+ if layer != Layer .CoreCrypto :
317+ file_suffix = f"-{ operand_type .lower ()} "
318+ else :
319+ file_suffix = ""
317320 filename = utils .append_suffix_to_filename (output_filename , file_suffix , ".csv" )
318321
319322 utils .write_to_csv (
@@ -332,8 +335,10 @@ def perform_data_extraction(
332335 for array in generic_arrays :
333336 metadata_suffix = ""
334337 if array .metadata :
335- for key , value in array .metadata .items ():
336- metadata_suffix += f"_{ key } _{ value } "
338+ for value in array .metadata .values ():
339+ # In recent Python, dict keep insert order.
340+ # This call won't change metadata order in the suffix between runs.
341+ metadata_suffix += f"-{ value } " .lower ()
337342
338343 current_suffix = file_suffix + metadata_suffix
339344
Original file line number Diff line number Diff line change @@ -508,7 +508,10 @@ def _generate_core_crypto_showcase_arrays(
508508 BenchArray (
509509 array ,
510510 self .layer ,
511- metadata = {"pfail" : key .pfail , "noise" : key .noise_distribution },
511+ metadata = {
512+ "noise" : key .noise_distribution ,
513+ "pfail" : key .pfail ,
514+ },
512515 )
513516 )
514517
You can’t perform that action at this time.
0 commit comments