From 7081f3f7929575e862775d489cf9ddd95653e73d Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 1 Dec 2024 20:56:28 -0500 Subject: [PATCH] fix --- src/sugar.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar.jl b/src/sugar.jl index d108203e12..ff94c7cf94 100644 --- a/src/sugar.jl +++ b/src/sugar.jl @@ -296,7 +296,7 @@ grad = gradient(ReverseWithPrimal, mul, [2.0], Const([3.0])) enz_args = Union{Expr,Symbol}[] resargs = Union{Expr,Symbol[] for (i, (arg, act, state, genty)) in enumerate(zip(rargs, acts, states, gentys)) - shad = Symbol("shad_$idx") + shad = Symbol("shad_$i") if genty <: Enzyme.Const push!(enz_args, arg) push!(resargs, :nothing)