Skip to content

Commit 91ae9e4

Browse files
Depth optional
1 parent 051bded commit 91ae9e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytimeloop/timeloopfe/v4/arch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def declare_attrs(cls, *args, **kwargs):
523523
super().add_attr("block_size", (str, int), None)
524524
super().add_attr("cluster_size", (str, int), 1)
525525
super().add_attr("width", (str, int))
526-
super().add_attr("depth", (str, int))
526+
super().add_attr("depth", (str, int), None)
527527
super().add_attr("entries", (str, int), None)
528528
super().add_attr("sizeKB", (str, int), None)
529529
super().add_attr("reduction_supported", (str, bool), True)
@@ -587,6 +587,8 @@ def __init__(self, *args, **kwargs):
587587
]
588588
self.decompression_supported: Union[str, bool] = self["decompression_supported"]
589589
self.compression_supported: Union[str, bool] = self["compression_supported"]
590+
if self.depth is None:
591+
print(f'WARNING: "depth" is not set for storage element {self.name}')
590592

591593

592594
class Nothing(Component):

0 commit comments

Comments
 (0)