Skip to content

Commit

Permalink
Update AdaptExt.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 21, 2024
1 parent 6b01be1 commit 884aed7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/EnzymeCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "EnzymeCore"
uuid = "f151be2c-9106-41f4-ab19-57ee4f262869"
authors = ["William Moses <wmoses@mit.edu>", "Valentin Churavy <vchuravy@mit.edu>"]
version = "0.7.5"
version = "0.7.6"

[compat]
Adapt = "3, 4"
Expand Down
6 changes: 6 additions & 0 deletions lib/EnzymeCore/ext/AdaptExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ end
function Adapt.adapt_structure(to, x::BatchDuplicatedNoNeed)
return BatchDuplicatedNoNeed(adapt(to, x.val), adapt(to, x.dval))
end
function Adapt.adapt_structure(to, x::MixedDuplicated)
return MixedDuplicated(adapt(to, x.val), adapt(to, x.dval))
end
function Adapt.adapt_structure(to, x::BatchMixedDuplicated)
return BatchMixedDuplicated(adapt(to, x.val), adapt(to, x.dval))
end

end #module
1 change: 1 addition & 0 deletions lib/EnzymeCore/src/EnzymeCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module EnzymeCore
export Forward, Reverse, ReverseWithPrimal, ReverseSplitNoPrimal, ReverseSplitWithPrimal
export ReverseSplitModified, ReverseSplitWidth, ReverseHolomorphic, ReverseHolomorphicWithPrimal
export Const, Active, Duplicated, DuplicatedNoNeed, BatchDuplicated, BatchDuplicatedNoNeed
export MixedDuplicated, MixedDuplicatedNoNeed
export DefaultABI, FFIABI, InlineABI
export BatchDuplicatedFunc

Expand Down

0 comments on commit 884aed7

Please sign in to comment.