未验证 提交 04709310 编写于 作者: W wanghuancoder 提交者: GitHub

refine save hook (#48124)

上级 d595928e
......@@ -74,7 +74,7 @@ class TensorWrapper {
} else {
#ifndef PADDLE_NO_PYTHON
if (SavedTensorsHooks::GetInstance().IsEnable() &&
tensor.is_dense_tensor()) {
tensor.is_dense_tensor() && tensor.initialized()) {
phi::DenseTensor* dense_tensor =
static_cast<phi::DenseTensor*>(tensor.impl().get());
intermidiate_tensor_.set_impl(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册