Revert "dist: coalesce grads into buckets for all-reduce (KI-5)"

This reverts commit b8b58212dc.
This commit is contained in:
2026-06-16 09:39:38 +08:00
parent b8b58212dc
commit 88c2c15768
3 changed files with 23 additions and 99 deletions

View File

@@ -14,15 +14,3 @@ pub fn set_device(device: u32) -> Result<()> {
pub fn synchronize() -> Result<()> {
error::check(unsafe { ffi::cudaDeviceSynchronize() })
}
/// Device-to-device copy of `count` bytes (`dst <- src`) on the same GPU. Issued
/// on the null stream (like every other xtrain kernel), so it orders with the
/// surrounding work. Used by the DDP bucketed all-reduce to pack/unpack grads
/// into a flat scratch buffer.
///
/// # Safety
/// `dst`/`src` must point to at least `count` valid bytes of device memory on the
/// current device, with no overlap.
pub unsafe fn copy_d2d(dst: *mut u8, src: *const u8, count: usize) -> Result<()> {
error::check(unsafe { ffi::cudaMemcpy(dst, src, count, ffi::CUDA_MEMCPY_D2D) })
}