From be41af8954ee237f43b41872e8cbe09187a59fa5 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Fri, 16 May 2025 06:42:52 -0700 Subject: [PATCH] reduce vjp for all and any --- mlx/primitives.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlx/primitives.cpp b/mlx/primitives.cpp index c2bb59c05..5f2bfdda4 100644 --- a/mlx/primitives.cpp +++ b/mlx/primitives.cpp @@ -3548,7 +3548,7 @@ std::vector Reduce::vjp( } else { - throw std::runtime_error("Reduce type VJP not yet implemented."); + return {zeros_like(in, stream())}; } }