@@ -1415,9 +1415,9 @@ static PyObject* tensor_method_set_underline_tensor(TensorObject* self,
14151415 auto * dst_tensor =
14161416 static_cast <phi::DenseTensor*>(self->tensor .impl ().get ());
14171417 if (self->tensor .has_allocation () && self->tensor .initialized () &&
1418- !dst_tensor->meta ().is_contiguous () ||
1419- !src_tensor->meta ().is_contiguous ()) {
1420- VLOG (8 ) << " set_tensor() method , src or dst tensor is not contiguous" ;
1418+ ( !dst_tensor->meta ().is_contiguous () ||
1419+ !src_tensor->meta ().is_contiguous () )) {
1420+ VLOG (8 ) << " set_tensor() method , src or dst tensor is not contiguous " ;
14211421 if (!FLAGS_use_stride_kernel) {
14221422 PADDLE_THROW (common::errors::Fatal (
14231423 " FLAGS_use_stride_kernel is closed. Strided kernel "
@@ -1450,7 +1450,6 @@ static PyObject* tensor_method_set_underline_tensor(TensorObject* self,
14501450 " The `set_tensor()` method of non DenseTensor get a DenseTensor src "
14511451 " value" ));
14521452 }
1453-
14541453 } else if (value.is_dist_tensor ()) {
14551454#ifdef PADDLE_WITH_DISTRIBUTE
14561455 auto * src_tensor =
@@ -1484,7 +1483,6 @@ static PyObject* tensor_method_set_underline_tensor(TensorObject* self,
14841483 " current PaddlePaddle, please recompile and installPaddlePaddle "
14851484 " with the option of `WITH_DISTRIBUTE=ON`." ));
14861485#endif
1487-
14881486 } else {
14891487 PADDLE_THROW (common::errors::Unavailable (
14901488 " The `set_tensor()` method of (Dist)Tensor get a non "
0 commit comments