From c03c835d75c06420d86096609b3d90bd7d20c035 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Sat, 11 Jun 2022 16:53:34 -0700 Subject: [PATCH] oops --- tinygrad/ops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinygrad/ops.py b/tinygrad/ops.py index 20173bbc68..227d4aee33 100644 --- a/tinygrad/ops.py +++ b/tinygrad/ops.py @@ -55,8 +55,9 @@ class Ops: def reduce_op(ctx, op:BinaryOps, x, new_shape): ret = ctx.buffer(new_shape) + ctx.op.reduce_op(op, x, ret) log_op(op, ret, [x]) - return ctx.op.reduce_op(op, x, ret) + return ret def binary_op(ctx, op:ReduceOps, x, y): ret = ctx.buffer(binary_broadcast(x.shape, y.shape))