未验证 提交 2136bd42 编写于 作者: N niuliling123 提交者: GitHub

Fix a bug in IndexKernel out-of-memory (#39867)

上级 d6038c22
......@@ -45,7 +45,7 @@ __global__ void VectorizedIndexKernel(T *out, int numel, int main_offset,
BLOCK_NUM_X * VecSize);
}
int num = numel - data_offset;
if (numel > 0) {
if (num > 0) {
kps::InitWithDataIndex<int, VecSize, 1, 1>(&args[0], data_offset);
kps::ElementwiseUnary<int, T, VecSize, 1, 1, Functor>(&result[0], &args[0],
func);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册