@@ -154,8 +154,8 @@ static PyObject* tensor_method_numpy(TensorObject* self,
154154 EAGER_TRY
155155 auto & api = pybind11::detail::npy_api::get ();
156156 if (!self->tensor .impl ()) {
157- Py_intptr_t py_dims[paddle::framework ::DDim::kMaxRank ]; // NOLINT
158- Py_intptr_t py_strides[paddle::framework ::DDim::kMaxRank ]; // NOLINT
157+ Py_intptr_t py_dims[phi ::DDim::kMaxRank ]; // NOLINT
158+ Py_intptr_t py_strides[phi ::DDim::kMaxRank ]; // NOLINT
159159 py_dims[0 ] = 0 ;
160160 py_strides[0 ] = 0 ;
161161
@@ -174,8 +174,8 @@ static PyObject* tensor_method_numpy(TensorObject* self,
174174 auto tensor_dims = self->tensor .shape ();
175175 auto numpy_dtype = TensorDtype2NumpyDtype (self->tensor .type ());
176176 auto sizeof_dtype = phi::SizeOf (self->tensor .type ());
177- Py_intptr_t py_dims[paddle::framework ::DDim::kMaxRank ]; // NOLINT
178- Py_intptr_t py_strides[paddle::framework ::DDim::kMaxRank ]; // NOLINT
177+ Py_intptr_t py_dims[phi ::DDim::kMaxRank ]; // NOLINT
178+ Py_intptr_t py_strides[phi ::DDim::kMaxRank ]; // NOLINT
179179 size_t py_rank = tensor_dims.size ();
180180 size_t numel = 1 ;
181181 if (self->tensor .is_dense_tensor ()) {
@@ -468,8 +468,8 @@ static PyObject* tensor_method_numpy_for_string_tensor(TensorObject* self,
468468 if (!self->tensor .impl () || !self->tensor .impl ()->initialized ()) {
469469 VLOG (6 ) << " The StringTensor is uninitialized. Return the empty string "
470470 " numpy array." ;
471- Py_intptr_t py_dims[paddle::framework ::DDim::kMaxRank ]; // NOLINT
472- Py_intptr_t py_strides[paddle::framework ::DDim::kMaxRank ]; // NOLINT
471+ Py_intptr_t py_dims[phi ::DDim::kMaxRank ]; // NOLINT
472+ Py_intptr_t py_strides[phi ::DDim::kMaxRank ]; // NOLINT
473473 py_dims[0 ] = 0 ;
474474 py_strides[0 ] = 0 ;
475475
@@ -1614,8 +1614,8 @@ static PyObject* tensor__getitem_from_offset(TensorObject* self,
16141614 if (tensor.dtype () == proto_type) { \
16151615 auto numpy_dtype = TensorDtype2NumpyDtype (proto_type); \
16161616 T b = paddle::pybind::TensorGetElement<T>(tensor, offset); \
1617- Py_intptr_t py_dims[paddle::framework:: DDim::kMaxRank ]; /* NOLINT */ \
1618- Py_intptr_t py_strides[paddle::framework:: DDim::kMaxRank ]; /* NOLINT */ \
1617+ Py_intptr_t py_dims[phi:: DDim::kMaxRank ]; /* NOLINT */ \
1618+ Py_intptr_t py_strides[phi:: DDim::kMaxRank ]; /* NOLINT */ \
16191619 auto & api = pybind11::detail::npy_api::get (); \
16201620 PyObject* array = api.PyArray_NewFromDescr_ ( \
16211621 api.PyArray_Type_ , \
0 commit comments