@@ -18,8 +18,8 @@ using Core: Vararg
18
18
end
19
19
20
20
function inner_grad (θ, bθ, f, p)
21
- Enzyme. autodiff_deferred (Enzyme. Reverse,
22
- Const ( firstapply) ,
21
+ Enzyme. autodiff (Enzyme. Reverse,
22
+ firstapply,
23
23
Active,
24
24
Const (f),
25
25
Enzyme. Duplicated (θ, bθ),
@@ -29,9 +29,8 @@ function inner_grad(θ, bθ, f, p)
29
29
end
30
30
31
31
function inner_grad_primal (θ, bθ, f, p)
32
- Enzyme. autodiff_deferred (Enzyme. ReverseWithPrimal,
33
- Const (firstapply),
34
- Active,
32
+ Enzyme. autodiff (Enzyme. ReverseWithPrimal,
33
+ firstapply,
35
34
Const (f),
36
35
Enzyme. Duplicated (θ, bθ),
37
36
Const (p)
40
39
41
40
function hv_f2_alloc (x, f, p)
42
41
dx = Enzyme. make_zero (x)
43
- Enzyme. autodiff_deferred (Enzyme. Reverse,
42
+ Enzyme. autodiff (Enzyme. Reverse,
44
43
firstapply,
45
- Active,
46
44
Const (f),
47
45
Enzyme. Duplicated (x, dx),
48
46
Const (p)
@@ -58,7 +56,7 @@ function inner_cons(x, fcons::Function, p::Union{SciMLBase.NullParameters, Nothi
58
56
end
59
57
60
58
function cons_f2 (x, dx, fcons, p, num_cons, i)
61
- Enzyme. autodiff_deferred (Enzyme. Reverse, inner_cons, Active , Enzyme. Duplicated (x, dx),
59
+ Enzyme. autodiff (Enzyme. Reverse, inner_cons, Enzyme. Duplicated (x, dx),
62
60
Const (fcons), Const (p), Const (num_cons), Const (i))
63
61
return nothing
64
62
end
@@ -70,8 +68,8 @@ function inner_cons_oop(
70
68
end
71
69
72
70
function cons_f2_oop (x, dx, fcons, p, i)
73
- Enzyme. autodiff_deferred (
74
- Enzyme. Reverse, inner_cons_oop, Active, Enzyme. Duplicated (x, dx),
71
+ Enzyme. autodiff (
72
+ Enzyme. Reverse, inner_cons_oop, Enzyme. Duplicated (x, dx),
75
73
Const (fcons), Const (p), Const (i))
76
74
return nothing
77
75
end
@@ -83,7 +81,7 @@ function lagrangian(x, _f::Function, cons::Function, p, λ, σ = one(eltype(x)))
83
81
end
84
82
85
83
function lag_grad (x, dx, lagrangian:: Function , _f:: Function , cons:: Function , p, σ, λ)
86
- Enzyme. autodiff_deferred (Enzyme. Reverse, lagrangian, Active, Enzyme. Duplicated (x, dx),
84
+ Enzyme. autodiff (Enzyme. Reverse, lagrangian, Active, Enzyme. Duplicated (x, dx),
87
85
Const (_f), Const (cons), Const (p), Const (λ), Const (σ))
88
86
return nothing
89
87
end
0 commit comments