-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add within autodiff cmd #1851
Add within autodiff cmd #1851
Conversation
@aviatesk what's the right way to do this properly? I think it's blocking for @avik-pal / @ChrisRackauckas |
If the overlay method table was available, that would be ideal. If that's still difficult, we might have to stick with the current implementation approach. |
So as is this fails atm (presumably because Const prop happens before we can fix this?) |
test/abi.jl
Outdated
@@ -460,6 +460,11 @@ abssum(x) = sum(abs2, x); | |||
|
|||
mulsin(x) = sin(x[1] * x[2]) | |||
|
|||
@testset "within_autodiff" begin | |||
@test Enzyme.within_autodiff() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test Enzyme.within_autodiff() | |
@test !Enzyme.within_autodiff() |
test/abi.jl
Outdated
@@ -460,6 +460,11 @@ abssum(x) = sum(abs2, x); | |||
|
|||
mulsin(x) = sin(x[1] * x[2]) | |||
|
|||
@testset "within_autodiff" begin | |||
@test Enzyme.within_autodiff() | |||
@test Enzyme.autodiff(ForwardWithPrimal, Enzyme.within_autodiff)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need: Enzyme.autodiff(ForwardWithPrimal, ()->Enzyme.within_autodiff())[1]
Entry-points can often be weird.
No description provided.