Skip to content

Commit

Permalink
[fix] Allow disabling the test vector validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeratec committed Nov 4, 2024
1 parent 774c356 commit f5391a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PyITA/ITA.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,10 @@ def calculate_tensor_stats(tensor, name, tol = 1e-1):
print(f"WARNING: {name} is constant!")
print(f"{name} Mean-Squared Difference (row) : {similarity_row:5.1f}")
print(f"{name} Mean-Squared Difference (column): {similarity_column:5.1f}")
raise ValueError(f"Tensor {name} is constant! This is a bad test vector!")
if kwargs['skip_vector_validation'] is False:
raise ValueError(f"Tensor {name} is constant! This is a bad test vector!")
else:
print(f" WARNING: Tensor {name} is constant! This is a bad test vector!")
else:
print(" WARNING: Tensor is constant!")
print(f" Mean-Squared Difference (row) : {similarity_row:5.1f}")
Expand Down
1 change: 1 addition & 0 deletions testGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class ArgumentDefaultMetavarTypeFormatter(argparse.ArgumentDefaultsHelpFormatter
action = 'store_true',
help = 'Disable partial softmax calculation')
self.group1.add_argument('--no-bias', default = False, action = 'store_true', help = 'Disable bias')
self.group1.add_argument('--skip-vector-validation', action = 'store_true', help = 'Skip validation of test vectors')
self.group1.add_argument('--export-snitch-cluster', action = 'store_true', help = 'Export for snitch cluster')
self.group1.add_argument('--export-mempool', action = 'store_true', help = 'Export for mempool')
self.group1.add_argument('--export-rom', action = 'store_true', help = 'Export ROM configuration')
Expand Down

0 comments on commit f5391a8

Please sign in to comment.