Skip to content

Commit 0c6f216

Browse files
Merge pull request #301 from avik-pal/patch-1
test: new enzyme version
2 parents 47bb1e2 + 155d05e commit 0c6f216

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = [
44
"Pankaj Mishra <pankajmishra1511@gmail.com>",
55
"Chris Rackauckas <contact@chrisrackauckas.com>",
66
]
7-
version = "2.20.0"
7+
version = "2.21.0"
88

99
[deps]
1010
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -48,7 +48,7 @@ Adapt = "3, 4"
4848
ArrayInterface = "7.4.2"
4949
Compat = "4"
5050
DataStructures = "0.18"
51-
Enzyme = "0.11,0.12"
51+
Enzyme = "0.13"
5252
FiniteDiff = "2.8.1"
5353
ForwardDiff = "0.10"
5454
Graphs = "1"

ext/SparseDiffToolsEnzymeExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function __gradient!(::Union{AutoSparse{<:AutoEnzyme}, AutoEnzyme}, f!, fx, x, c
2727
end
2828

2929
function __jacobian!(J::AbstractMatrix, ::Union{AutoSparse{<:AutoEnzyme}, AutoEnzyme}, f, x)
30-
J .= jacobian(Reverse, f, x, Val(size(J, 1)))
30+
J .= only(jacobian(
31+
Reverse, a -> vec(f(reshape(a, size(x)))), vec(x); n_outs = Val(size(J, 1))))
3132
return J
3233
end
3334

0 commit comments

Comments
 (0)