File tree 3 files changed +7
-40
lines changed
3 files changed +7
-40
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ class PhiVector : public phi::ExtendedTensor,
130
130
// / \brief Returns the name of the class for type traits.
131
131
// / \return The name of the class.
132
132
static const char * name () {
133
- return (std::string (" PhiVector_" ) + std::string (typeid (T).name ())).c_str ();
133
+ name_ = std::string (" PhiVector_" ) + std::string (typeid (T).name ());
134
+ return name_.c_str ();
134
135
}
135
136
136
137
size_t size () const { return data_.size (); }
@@ -161,8 +162,12 @@ class PhiVector : public phi::ExtendedTensor,
161
162
162
163
private:
163
164
std::vector<T> data_;
165
+ static std::string name_;
164
166
};
165
167
168
+ template <typename T>
169
+ std::string PhiVector<T>::name_ = " " ; // NOLINT
170
+
166
171
using String = std::string;
167
172
using Strings = PhiVector<std::string>;
168
173
Original file line number Diff line number Diff line change @@ -267,44 +267,6 @@ PD_REGISTER_GENERAL_KERNEL(
267
267
ALL_LAYOUT,
268
268
paddle::operators::FeedStringsKernel<phi::XPUContext>,
269
269
ALL_DTYPE) {}
270
- #elif defined(PADDLE_WITH_ASCEND_CL)
271
- PD_REGISTER_GENERAL_KERNEL (
272
- feed_dense_tensor,
273
- npu,
274
- ALL_LAYOUT,
275
- paddle::operators::FeedDenseTensorKernel<phi::CustomContext>,
276
- ALL_DTYPE) {}
277
- PD_REGISTER_GENERAL_KERNEL (
278
- feed_sparse_coo_tensor,
279
- npu,
280
- ALL_LAYOUT,
281
- paddle::operators::FeedSparseCooTensorKernel<phi::CustomContext>,
282
- ALL_DTYPE) {}
283
- PD_REGISTER_GENERAL_KERNEL (
284
- feed_strings,
285
- npu,
286
- ALL_LAYOUT,
287
- paddle::operators::FeedStringsKernel<phi::CustomContext>,
288
- ALL_DTYPE) {}
289
- #elif defined(PADDLE_WITH_MLU)
290
- PD_REGISTER_GENERAL_KERNEL (
291
- feed_dense_tensor,
292
- CustomMLU,
293
- ALL_LAYOUT,
294
- paddle::operators::FeedDenseTensorKernel<phi::CustomContext>,
295
- ALL_DTYPE) {}
296
- PD_REGISTER_GENERAL_KERNEL (
297
- feed_sparse_coo_tensor,
298
- CustomMLU,
299
- ALL_LAYOUT,
300
- paddle::operators::FeedSparseCooTensorKernel<phi::CustomContext>,
301
- ALL_DTYPE) {}
302
- PD_REGISTER_GENERAL_KERNEL (
303
- feed_strings,
304
- CustomMLU,
305
- ALL_LAYOUT,
306
- paddle::operators::FeedStringsKernel<phi::CustomContext>,
307
- ALL_DTYPE) {}
308
270
#endif
309
271
#ifdef PADDLE_WITH_CUSTOM_DEVICE
310
272
namespace paddle {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ math_library(sequence_scale)
27
27
cc_library(
28
28
phi_data_layout_transform
29
29
SRCS data_layout_transform.cc
30
- DEPS tensor)
30
+ DEPS tensor blas )
31
31
32
32
if (WITH_GPU OR WITH_ROCM)
33
33
if (MKL_FOUND AND WITH_ONEMKL)
You can’t perform that action at this time.
0 commit comments