未验证 提交 ea1f4702 编写于 作者: S sprouteer 提交者: GitHub

Fix unique_kernel bugs (#45032)

* fix unique_kernel bugs

* fix unique kernel cu bugs
上级 839fac65
......@@ -333,9 +333,11 @@ static void ComputeUniqueDims(const Context& context,
// 3. counts: 'counts'
counts->Resize(phi::make_ddim({num_out}));
auto* count_data = context.template Alloc<IndexT>(counts);
thrust::fill(thrust::device, count_data, count_data + row, 0);
thrust::adjacent_difference(
thrust::device, range_data_ptr + 1, range_data_ptr + row + 1, count_data);
thrust::fill(thrust::device, count_data, count_data + num_out, 0);
thrust::adjacent_difference(thrust::device,
range_data_ptr + 1,
range_data_ptr + num_out + 1,
count_data);
}
// Calculate unique when 'axis' is set
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册