mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-07 22:04:10 -05:00
chore(ci): small fixes on data_extractor filename generation
This is done to ease automated SVG tables for tfhe-rs public documentation.
This commit is contained in:
@@ -238,6 +238,9 @@ class ErrorFailureProbability(enum.IntEnum):
|
||||
f"error failure probability str conversion '{self}' not supported yet"
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return self.to_str()
|
||||
|
||||
|
||||
class BenchType(enum.Enum):
|
||||
Latency = 0
|
||||
|
||||
@@ -313,7 +313,10 @@ def perform_data_extraction(
|
||||
conversion_func,
|
||||
)
|
||||
|
||||
file_suffix = f"_{operand_type.lower()}"
|
||||
if layer != Layer.CoreCrypto:
|
||||
file_suffix = f"-{operand_type.lower()}"
|
||||
else:
|
||||
file_suffix = ""
|
||||
filename = utils.append_suffix_to_filename(output_filename, file_suffix, ".csv")
|
||||
|
||||
utils.write_to_csv(
|
||||
@@ -332,8 +335,10 @@ def perform_data_extraction(
|
||||
for array in generic_arrays:
|
||||
metadata_suffix = ""
|
||||
if array.metadata:
|
||||
for key, value in array.metadata.items():
|
||||
metadata_suffix += f"_{key}_{value}"
|
||||
for value in array.metadata.values():
|
||||
# In recent Python, dict keep insert order.
|
||||
# This call won't change metadata order in the suffix between runs.
|
||||
metadata_suffix += f"-{value}".lower()
|
||||
|
||||
current_suffix = file_suffix + metadata_suffix
|
||||
|
||||
|
||||
@@ -508,7 +508,10 @@ class GenericFormatter:
|
||||
BenchArray(
|
||||
array,
|
||||
self.layer,
|
||||
metadata={"pfail": key.pfail, "noise": key.noise_distribution},
|
||||
metadata={
|
||||
"noise": key.noise_distribution,
|
||||
"pfail": key.pfail,
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user