Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Aug 9, 2024
1 parent d98886d commit 4b73eaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project since the release of v1 will be documented i
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.3] - 2024-08-08

### Fixed

- Fixed non-public API usage of `AutoEnzyme`. [\[#28\]](https://github.com/LuxDL/LuxTestUtils.jl/pull/26)

## [1.1.2] - 2024-07-28

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LuxTestUtils"
uuid = "ac9de150-d08f-4546-94fb-7472b5760531"
authors = ["Avik Pal <[email protected]>"]
version = "1.1.2"
version = "1.1.3"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
4 changes: 2 additions & 2 deletions src/autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ end

# Enzyme.jl
function gradient(f::F, ::AutoEnzyme{Nothing}, args...) where {F}
return gradient(f, AutoEnzyme(Enzyme.Reverse), args...)
return gradient(f, AutoEnzyme(; mode=Enzyme.Reverse), args...)
end

function gradient(f::F, ad::AutoEnzyme{<:Enzyme.ReverseMode}, args...) where {F}
Expand All @@ -22,7 +22,7 @@ function gradient(f::F, ad::AutoEnzyme{<:Enzyme.ReverseMode}, args...) where {F}
needs_gradient(x) && return Enzyme.Duplicated(x, Enzyme.make_zero(x))
return Enzyme.Const(x)
end
Enzyme.autodiff(ad.mode, f, Enzyme.Active, args_activity...)
Enzyme.autodiff(ad.mode, Enzyme.Const(f), Enzyme.Active, args_activity...)
return Tuple(map(enumerate(args)) do (i, x)
needs_gradient(x) && return args_activity[i].dval
return CRC.NoTangent()
Expand Down

0 comments on commit 4b73eaa

Please sign in to comment.