Skip to content
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
7 changes: 7 additions & 0 deletions csrc/include/custom_all_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,11 @@ __global__ void __launch_bounds__(1024, 1)
*reinterpret_cast<OP*>(output + out_idx) = zero_pack;
}
}
// Pair start_sync with a final barrier before any rank can reuse the
// registered input buffer or this block's signal slot for the next fused
// collective. Without it, a faster rank may advance while a peer is still
// reading the previous invocation, causing silent cross-request corruption.
end_sync<ngpus, true>(sg, self_sg, rank);
}

// Per-group quant variant of the 1-stage fused allreduce+rmsnorm kernel.
Expand Down Expand Up @@ -2127,6 +2132,7 @@ __global__ void __launch_bounds__(1024, 1)
acc, weight_p, hidden_dim, eps, idx, tidx, padded_block_size,
group_size, output, scale_out, active, bf16_output, token_num);
}
end_sync<ngpus, true>(sg, self_sg, rank);
}

template <typename T, typename OutT, int NGPUS>
Expand Down Expand Up @@ -2236,6 +2242,7 @@ __global__ void __launch_bounds__(1024, 1)
acc, weight_p, hidden_dim, eps, idx, tidx, padded_block_size,
output, scale_out, active, bf16_output);
}
end_sync<ngpus, true>(sg, self_sg, rank);
}

template <typename T, int NGPUS>
Expand Down
Loading