Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong buffer for oneShotAllReduceKernel under PUSH_MODE #2099

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/tensorrt_llm/kernels/customAllReduceKernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ static __global__ void oneShotAllReduceKernel(AllReduceParams params)

// Start and end offsets of the thread
size_t const chunk_start = bidx * params.elts_per_block + tidx * PACKED_ELTS;
size_t const chunk_end = std::min((bidx + 1) * params.elts_per_block, params.elts_total);
size_t const chunk_end = min((bidx + 1) * params.elts_per_block, params.elts_total);

T* buffers[RANKS_PER_NODE];
#pragma unroll
Expand Down Expand Up @@ -666,7 +666,7 @@ static __global__ void oneShotAllReduceKernel(AllReduceParams params)
if constexpr (PUSH_MODE)
{
vals[ii].packed
= *reinterpret_cast<int4 const*>(&buffers[params.local_rank][ii * params.elts_total + iter_offset]);
= *reinterpret_cast<int4 const*>(&local_shared_buffer[ii * params.elts_total + iter_offset]);
}
else
{
Expand Down