@@ -110,8 +110,8 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx,
110110 const std::vector<std::string>& outputs,
111111 const std::vector<std::string>& attrs) {
112112 VLOG (1 ) << " Custom Operator: Start run KernelFunc." ;
113- std::vector<paddle::Tensor> custom_ins;
114- std::vector<std::vector<paddle::Tensor>> custom_vec_ins;
113+ std::vector<paddle::experimental:: Tensor> custom_ins;
114+ std::vector<std::vector<paddle::experimental:: Tensor>> custom_vec_ins;
115115 for (auto & in_name : inputs) {
116116 VLOG (1 ) << " Custom Operator: input name - " << in_name;
117117 if (detail::IsDuplicableVar (in_name)) {
@@ -120,7 +120,7 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx,
120120 PADDLE_ENFORCE_NE (vec_x.empty (), true ,
121121 platform::errors::NotFound (
122122 " Input vector<tensor> (%s) is empty." , in_name));
123- std::vector<paddle::Tensor> custom_vec_in;
123+ std::vector<paddle::experimental:: Tensor> custom_vec_in;
124124 for (size_t i = 0 ; i < vec_x.size (); ++i) {
125125 auto * x = vec_x[i];
126126 PADDLE_ENFORCE_NOT_NULL (
@@ -132,7 +132,7 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx,
132132 " The %d-th tensor in input vector<tensor> (%s) "
133133 " is not initialized." ,
134134 i, in_name));
135- paddle::Tensor custom_t ;
135+ paddle::experimental:: Tensor custom_t ;
136136 custom_t .set_impl (std::move (experimental::MakePtenDenseTensor (*x)));
137137 custom_vec_in.emplace_back (custom_t );
138138 }
@@ -144,7 +144,7 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx,
144144 PADDLE_ENFORCE_EQ (x->IsInitialized (), true ,
145145 platform::errors::InvalidArgument (
146146 " Input tensor (%s) is not initialized." , in_name));
147- paddle::Tensor custom_in;
147+ paddle::experimental:: Tensor custom_in;
148148 custom_in.set_impl (std::move (experimental::MakePtenDenseTensor (*x)));
149149 custom_ins.emplace_back (custom_in);
150150 }
@@ -207,14 +207,14 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx,
207207 " Tensors." ,
208208 vec_true_outs.size (), outs.size ()));
209209 for (size_t j = 0 ; j < vec_true_outs.size (); ++j) {
210- experimental::MovesStorage (
210+ experimental::MovesSharedStorage (
211211 std::dynamic_pointer_cast<pten::DenseTensor>(outs.at (j).impl ())
212212 .get (),
213213 vec_true_outs.at (j));
214214 }
215215 } else {
216216 auto * true_out = ctx.Output <Tensor>(out_name);
217- experimental::MovesStorage (
217+ experimental::MovesSharedStorage (
218218 std::dynamic_pointer_cast<pten::DenseTensor>(outs.at (i).impl ())
219219 .get (),
220220 true_out);
0 commit comments