未验证 提交 3261b106 编写于 作者: L LiYuRio 提交者: GitHub

remove vlog and modified error (#54648)

上级 c037453d
...@@ -136,7 +136,6 @@ void EmptyTensorInitializer(TensorObject* self, ...@@ -136,7 +136,6 @@ void EmptyTensorInitializer(TensorObject* self,
// TODO(jiabin): Maybe support LOD later // TODO(jiabin): Maybe support LOD later
std::shared_ptr<phi::DenseTensor> dense_tensor = nullptr; std::shared_ptr<phi::DenseTensor> dense_tensor = nullptr;
if (dims.size() == 1 && dims[0] == 0) { if (dims.size() == 1 && dims[0] == 0) {
VLOG(0) << "Create dense tensor with dims[0] equal to 0";
std::shared_ptr<phi::Allocation> allocation_ptr = nullptr; std::shared_ptr<phi::Allocation> allocation_ptr = nullptr;
dense_tensor = std::make_shared<phi::DenseTensor>( dense_tensor = std::make_shared<phi::DenseTensor>(
allocation_ptr, allocation_ptr,
...@@ -192,7 +191,7 @@ void InitDistTensorWithNumpyValue(TensorObject* self, ...@@ -192,7 +191,7 @@ void InitDistTensorWithNumpyValue(TensorObject* self,
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
self->tensor.defined(), self->tensor.defined(),
true, true,
paddle::platform::errors::Fatal( paddle::platform::errors::Unavailable(
"Calling InitDistTensorWithNumpyValue of Eager Tensor without " "Calling InitDistTensorWithNumpyValue of Eager Tensor without "
"EmptyDistTensorInitializer is " "EmptyDistTensorInitializer is "
"forbidden. Please check your code and make sure you new a " "forbidden. Please check your code and make sure you new a "
...@@ -233,7 +232,7 @@ void InitTensorWithNumpyValue(TensorObject* self, ...@@ -233,7 +232,7 @@ void InitTensorWithNumpyValue(TensorObject* self,
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
self->tensor.defined(), self->tensor.defined(),
true, true,
paddle::platform::errors::Fatal( paddle::platform::errors::Unavailable(
"Calling InitTensorWithNumpyValue of Eager Tensor without " "Calling InitTensorWithNumpyValue of Eager Tensor without "
"EmptyTensorInitializer is " "EmptyTensorInitializer is "
"forbidden. Please check your code and make sure you new a " "forbidden. Please check your code and make sure you new a "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册