diff --git a/debug/accuracy_tools/msprobe/core/data_dump/data_processor/pytorch_processor.py b/debug/accuracy_tools/msprobe/core/data_dump/data_processor/pytorch_processor.py index 1f4434f4b2ff2b5af632b4a68d59c1140d219353..c3d6ebe5ea3d37c3680dc2c00483dbc91c4a48a6 100644 --- a/debug/accuracy_tools/msprobe/core/data_dump/data_processor/pytorch_processor.py +++ b/debug/accuracy_tools/msprobe/core/data_dump/data_processor/pytorch_processor.py @@ -319,8 +319,8 @@ class PytorchDataProcessor(BaseDataProcessor): def _analyze_and_save_tensor(self, tensor, suffix): dump_data_name, file_path = self.get_save_file_path(suffix) single_arg = PytorchDataProcessor._analyze_tensor(self, tensor, suffix) - if self.tensor_handler.is_empty_data(tensor): - logger.debug("Collecting real data of fake tensor or meta tensor is not supported.") + if self.tensor_handler.is_empty_data(tensor) or tensor.storage().data_ptr() == 0: + logger.debug("Collecting real data of fake tensor or meta tensor is not supported or data_ptr is 0.") return single_arg single_arg.update({"data_name": dump_data_name})