| 258 | } |
| 259 | |
| 260 | phi::SelectedRows* SetSelectedRowsKernelOutput(Tensor* out) { |
| 261 | if (!out->initialized()) { |
| 262 | auto select_rows = std::make_shared<phi::SelectedRows>(); |
| 263 | out->set_impl(select_rows); |
| 264 | return select_rows.get(); |
| 265 | } |
| 266 | return static_cast<phi::SelectedRows*>(out->impl().get()); |
| 267 | } |
| 268 | |
| 269 | phi::TensorBase* SetSparseKernelOutput(Tensor* out, TensorType type) { |
| 270 | if (!out) { |
no test coverage detected