未验证 提交 20bf9592 编写于 作者: L Leo Chen 提交者: GitHub

Fix incorrect size of grid dimension in index_select (#54660)

上级 cc4f5d05
......@@ -87,7 +87,7 @@ void IndexSelectGradKernel(const Context& ctx,
auto stream = ctx.stream();
unsigned int block_dim = PADDLE_CUDA_NUM_THREADS;
dim3 grid_dim = dim3((numel + block_dim - 1) / block_dim);
dim3 grid_dim = dim3((out_nums + block_dim - 1) / block_dim);
phi::backends::gpu::LimitGridDim(ctx, &grid_dim);
phi::funcs::SetConstant<phi::GPUContext, T> index_select_grad_init;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册