diff --git a/cpp/tensorrt_llm/kernels/topkLastDim.cu b/cpp/tensorrt_llm/kernels/topkLastDim.cu index 3371ab4a0f2a..74e2838822c6 100644 --- a/cpp/tensorrt_llm/kernels/topkLastDim.cu +++ b/cpp/tensorrt_llm/kernels/topkLastDim.cu @@ -1275,8 +1275,8 @@ void standalone_stable_radix_topk_(void* buf, size_t& buf_size, T const* in, Idx sort_in = static_cast(aligned_pointers[9]); sort_in_idx = static_cast(aligned_pointers[10]); } - cudaMemsetAsync( - buf, 0, static_cast(aligned_pointers[2]) - static_cast(aligned_pointers[0]), stream); + cudaMemsetAsync(aligned_pointers[0], 0, + static_cast(aligned_pointers[2]) - static_cast(aligned_pointers[0]), stream); } T const* in_buf = nullptr;