Skip to content

Commit 732f12c

Browse files
committed
fix
Signed-off-by: Pawel Gadzinski <[email protected]>
1 parent dce4846 commit 732f12c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

transformer_engine/debug/features/utils/stats_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def feed(self, tensor, iteration):
8888
if (
8989
tensor.numel() == 0
9090
if hasattr(tensor, "numel")
91-
else all(t.numel() == 0 for t in tensor.get_data_tensors())
91+
else all((t is None or t.numel() == 0) for t in tensor.get_data_tensors())
9292
):
9393
return
9494

transformer_engine/debug/features/utils/stats_computation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _get(buffers, stat_name):
127127
lambda buffers: min(_get(buffers, "dynamic_range_bottom")),
128128
),
129129
"underflows_num": (
130-
lambda x: (x._data == 0).sum(),
130+
lambda x: (x.get_data_tensors()[0] == 0).sum(),
131131
lambda buffers: sum(_get(buffers, "underflows_num")),
132132
),
133133
"std": (

0 commit comments

Comments
 (0)