From ef123f46e904982cf54c3f0249c72908448e0ce5 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Fri, 22 Aug 2025 14:11:52 -0700 Subject: [PATCH] Fix allocation bug in NCCL --- mlx/backend/cuda/distributed.cu | 1 + 1 file changed, 1 insertion(+) diff --git a/mlx/backend/cuda/distributed.cu b/mlx/backend/cuda/distributed.cu index 90eeacd7c..4d2658534 100644 --- a/mlx/backend/cuda/distributed.cu +++ b/mlx/backend/cuda/distributed.cu @@ -24,6 +24,7 @@ void AllReduce::eval_gpu( out.copy_shared_buffer(in); return {in, out}; } else { + out.set_data(allocator::malloc(out.nbytes())); return {in, out}; } };