Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote ReverseDiff compile field to type #63

Merged
merged 2 commits into from
Jun 23, 2024
Merged

Conversation

avik-pal
Copy link
Member

Needed for things like LuxDL/Lux.jl#642 where the return type needs to rely on whether the compiled tape needs to be returned.

src/dense.jl Show resolved Hide resolved
Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is s a nice non-breaking way to handle it. And the bool route with constant prop still achieves the same effect.

@ChrisRackauckas
Copy link
Member

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
Copy link
Collaborator

gdalle commented Jun 23, 2024

Yes it is breaking, see #63 (comment)

@avik-pal
Copy link
Member Author

Yes it is breaking, see #63 (comment)

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

@gdalle
Copy link
Collaborator

gdalle commented Jun 23, 2024

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

@ChrisRackauckas ChrisRackauckas merged commit eab4336 into main Jun 23, 2024
4 checks passed
@ChrisRackauckas ChrisRackauckas deleted the ap/reversediff branch June 23, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants