-
Notifications
You must be signed in to change notification settings - Fork 87
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
[Nonlinear] detect common subexpressions #2488
Comments
Some possible options:
I don't have a strong opinion yet. But our current approach requires us to smack the modeler on the hand and tell them they're holding it wrong and that they should do (2): jump-dev/JuMP.jl#3729 (comment) |
Another example is #2496 |
I can't comment on the effect on AD.
|
I was imagining that we would ask the user to do this, not JuMP or MathOptIntnerface.
Yes, this is one reason why we don't do this at the JuMP level. We very explicitly choose to do the simplest possible thing, even if it means that it isn't the best thing to do inn a bunch of cases.
Yeah, to be decided. It's really just a syntax decision of how to communicate potential subexpressions to the solver. |
Closing in favor of jump-dev/JuMP.jl#3738. No need to duplicate our discussions. |
There is tooling in
MOI.Nonlinear.ReverseAD
to exploit common subexpressions, but we don't actively exploit this when parsing ScalarNonlinearFunction.I wonder if we could walk the tape somehow to detect and reduce common subexpressions that are at least N nodes long.
It would help: jump-dev/JuMP.jl#3729 (comment)
The text was updated successfully, but these errors were encountered: