From bf01ad93671dc3b9d23a424d83bb3a680e0cfd0e Mon Sep 17 00:00:00 2001 From: Daniel Yeh <46629671+Dan-Yeh@users.noreply.github.com> Date: Tue, 23 Sep 2025 05:12:04 +0200 Subject: [PATCH] fix (#2613) Co-authored-by: Chen-Chen Yeh --- mlx/backend/cuda/device.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mlx/backend/cuda/device.cpp b/mlx/backend/cuda/device.cpp index bf0946a7b..767170848 100644 --- a/mlx/backend/cuda/device.cpp +++ b/mlx/backend/cuda/device.cpp @@ -299,6 +299,7 @@ void CommandEncoder::add_graph_node(cudaGraph_t child) { graph_exec.instantiate(child); device_.make_current(); CHECK_CUDA_ERROR(cudaGraphLaunch(graph_exec, stream())); + return; } cudaGraphNode_t node; CHECK_CUDA_ERROR(cudaGraphAddChildGraphNode(&node, graph_, NULL, 0, child));