-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
inference: Relax constprop recursion detection #40561
Conversation
@nanosoldier |
Something went wrong when running your job:
Logs and partial data can be found here |
@nanosoldier |
Something went wrong when running your job:
Logs and partial data can be found here |
Co-Authored-By: Keno Fisher <[email protected]>
@nanosoldier runbenchmarks(ALL, vs=":master") |
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @christopher-dG |
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.
Looks like we might need to fix a couple BaseBenchmarks.jl now, but that is a good problem to have 😂. AFAICT, it had no performance impact end-to-end (6h15 total run time sounds about typical currently), though most of that time is GC-scrubbing, so it may not be a useful measure.
Co-Authored-By: Keno Fisher <[email protected]>
Co-Authored-By: Keno Fisher <[email protected]>
Yeah I will inspect into those serious regressions. |
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @christopher-dG |
Can't really reproduce the array regressions locally, so retriggering those again. @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @christopher-dG |
At the moment, we restrict const prop whenever we see a cycle in methods being called. However, I think this condition can be relaxed slightly: In particular, if the type complexity limiting did not decide to limit the growth of the type in question, I think it should be fine to constant prop as long as there is no cycle in *method instances* (rather than just methods). Fixes JuliaLang#39915, replaces JuliaLang#39918 Co-Authored-By: Keno Fisher <[email protected]>
…_call_method_with_const_args` chain This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args` chain, and simplifies the signature of `abstract_call_method_with_const_args`: the newly defined `MethodCallResult` struct wraps a result and context information of `abstract_method_call`, and is passed and consumed by the succeeding `abstract_call_method_with_const_args`. Although our constant-propagation heuristic will be likely to change in the future (as in #40561) and so the signature of `abstract_call_method_with_const_args` is very unstable, hopefully this PR makes it a bit more stable. As an additional benefit, now an external `AbstractInterpreter` can use the context information of `abstract_method_call` (especially `edge::MethodInstance`) within `maybe_get_const_prop_profitable`.
…_call_method_with_const_args` chain (#41020) This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args` chain, and simplifies the signature of `abstract_call_method_with_const_args`: the newly defined `MethodCallResult` struct wraps a result and context information of `abstract_method_call`, and is passed and consumed by the succeeding `abstract_call_method_with_const_args`. Although our constant-propagation heuristic will be likely to change in the future (as in #40561) and so the signature of `abstract_call_method_with_const_args` is very unstable, hopefully this PR makes it a bit more stable. As an additional benefit, now an external `AbstractInterpreter` can use the context information of `abstract_method_call` (especially `edge::MethodInstance`) within `maybe_get_const_prop_profitable`.
At the moment, we restrict const prop whenever we see a cycle in methods being called. However, I think this condition can be relaxed slightly: In particular, if the type complexity limiting did not decide to limit the growth of the type in question, I think it should be fine to constant prop as long as there is no cycle in *method instances* (rather than just methods). Fixes JuliaLang#39915, replaces JuliaLang#39918 Co-authored-by: Keno Fisher <[email protected]>
…_call_method_with_const_args` chain (JuliaLang#41020) This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args` chain, and simplifies the signature of `abstract_call_method_with_const_args`: the newly defined `MethodCallResult` struct wraps a result and context information of `abstract_method_call`, and is passed and consumed by the succeeding `abstract_call_method_with_const_args`. Although our constant-propagation heuristic will be likely to change in the future (as in JuliaLang#40561) and so the signature of `abstract_call_method_with_const_args` is very unstable, hopefully this PR makes it a bit more stable. As an additional benefit, now an external `AbstractInterpreter` can use the context information of `abstract_method_call` (especially `edge::MethodInstance`) within `maybe_get_const_prop_profitable`.
At the moment, we restrict const prop whenever we see a cycle in methods being called. However, I think this condition can be relaxed slightly: In particular, if the type complexity limiting did not decide to limit the growth of the type in question, I think it should be fine to constant prop as long as there is no cycle in *method instances* (rather than just methods). Fixes JuliaLang#39915, replaces JuliaLang#39918 Co-authored-by: Keno Fisher <[email protected]>
…_call_method_with_const_args` chain (JuliaLang#41020) This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args` chain, and simplifies the signature of `abstract_call_method_with_const_args`: the newly defined `MethodCallResult` struct wraps a result and context information of `abstract_method_call`, and is passed and consumed by the succeeding `abstract_call_method_with_const_args`. Although our constant-propagation heuristic will be likely to change in the future (as in JuliaLang#40561) and so the signature of `abstract_call_method_with_const_args` is very unstable, hopefully this PR makes it a bit more stable. As an additional benefit, now an external `AbstractInterpreter` can use the context information of `abstract_method_call` (especially `edge::MethodInstance`) within `maybe_get_const_prop_profitable`.
In a similar spirit to JuliaLang#40561, we can relax the recursion detection to guarantee `:terminates` effect and allow the effects analysis to not taint `:terminates` effect when there are no cycles in `MethodInstance`s in a call graph. fix JuliaLang#45781
In a similar spirit to JuliaLang#40561, we can relax the recursion detection to guarantee `:terminates` effect and allow the effects analysis to not taint `:terminates` effect when there are no cycles in `MethodInstance`s in a call graph. fix JuliaLang#45781
At the moment, we restrict const prop whenever we see a cycle in
methods being called. However, I think this condition can be relaxed
slightly: In particular, if the type complexity limiting did not
decide to limit the growth of the type in question, I think it
should be fine to constant prop as long as there is no cycle in
method instances (rather than just methods).
Fixes #39915, replaces #39918
Co-Authored-By: Keno Fisher [email protected]