Skip to content

Commit 450146a

Browse files
ksivamanptrendx
authored andcommitted
[PyTorch] Don't set FP8 data to None when saving base tensors (#1548)
Don't set data to null Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
1 parent ad0ee94 commit 450146a

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

transformer_engine/pytorch/tensor/_internal/float8_tensor_base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ def prepare_for_saving(self) -> Tuple[list[Optional[torch.Tensor]], Float8Tensor
105105
106106
"""
107107
tensors = [self._data, self._transpose]
108-
self._data = None
109-
self._transpose = None
110108
return tensors, self
111109

112110
def restore_from_saved(

transformer_engine/pytorch/tensor/_internal/mxfp8_tensor_base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ def prepare_for_saving(self) -> Tuple[list[Optional[torch.Tensor]], MXFP8TensorB
100100
101101
"""
102102
tensors = [self._rowwise_data, self._columnwise_data]
103-
self._rowwise_data = None
104-
self._columnwise_data = None
105103
return tensors, self
106104

107105
def restore_from_saved(

0 commit comments

Comments
 (0)