Skip to content

Commit 76ba052

Browse files
committed
replace mutable_data
1 parent 8d34517 commit 76ba052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/phi/kernels/funcs/index_impl.cu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ __global__ void VectorizedIndexKernel(T *out,
5454
template <typename T, typename Functor>
5555
void IndexKernel(const KPDevice &dev_ctx, DenseTensor *out, Functor func) {
5656
int numel = out->numel();
57-
T *out_data = out->mutable_data<T>(dev_ctx.GetPlace());
57+
T *out_data = dev_ctx.template Alloc<T>(out);
5858
if (numel <= 0) return;
5959
int vec_size = phi::GetVectorizedSize(out_data);
6060
#ifdef PADDLE_WITH_XPU_KP

0 commit comments

Comments
 (0)