SciML / ADTypes.jl

Repository for automatic differentiation backend types
https://sciml.github.io/ADTypes.jl/
MIT License
38 stars 11 forks source link

Promote ReverseDiff compile field to type #63

Closed avik-pal closed 3 months ago

avik-pal commented 3 months ago

Needed for things like https://github.com/LuxDL/Lux.jl/issues/642 where the return type needs to rely on whether the compiled tape needs to be returned.

ChrisRackauckas commented 3 months ago

One change, getproperty overload to add a depwarn on accessing the boolean. We'll want people to move to the type stable form, though there's no reason to force the change immediately (and that depwarn should probably be given at least a year or two given that the feature has been around since 2020)

gdalle commented 3 months ago

Yes it is breaking, see https://github.com/SciML/ADTypes.jl/pull/63#discussion_r1649897718

avik-pal commented 3 months ago

Yes it is breaking, see https://github.com/SciML/ADTypes.jl/pull/63#discussion_r1649897718

How though? ad.compile is a Bool as it always was.

gdalle commented 3 months ago

Oh sorry I missed that part, thought you stored the Val directly. Then it's fine