-
Notifications
You must be signed in to change notification settings - Fork 57
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
Custom rule not detected if defined after call to autodiff
#696
Comments
We have no invalidation edge from |
Is this something that you think is somewhat easy to fix? Happy to try to make a PR if you think so. The workaround is to redefine the original function each time the custom rule is modified, but it's easy to forget. |
Hm not trivial, we need to add a fictitious edge to a potentially not yet existing method. Somewhere in https://github.com/EnzymeAD/Enzyme.jl/blob/939f9b4086d62b07eca8107db9523a2f8fe043d3/src/compiler/interpreter.jl or Line 7510 in 939f9b4
Maybe @aviatesk has some ideas. I suspect we will need to intercept That we only know around Line 3699 in 939f9b4
We should definitely try to add edges from there... But I am unsure how to add a speculative edge for an undefined method. |
Definitely a bit out of my depth here, but: would backedges be easier if |
I believe I can fix this. How can we access the |
Line 7503 in 939f9b4
|
MWE on main:
The reason for the behaviour might be this line:
Enzyme.jl/src/Enzyme.jl
Line 313 in 939f9b4
The text was updated successfully, but these errors were encountered: