-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: fix exit edge likelihood computation for capped loops #84817
Conversation
The initial version of this only really worked for very simple cases. Generalize to handle loops with multiple exits better. The rough idea is to compute how much additional profile flow needs to come out of the loop to match the capped probability, and then try and find one exit block where we can adjust likelhoods to cause exactly this amount of extra flow to leave the loop. Closes dotnet#84789.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsThe initial version of this only really worked for very simple cases. Generalize to handle loops with multiple exits better. The rough idea is to compute how much additional profile flow needs to come out of the loop to match the capped probability, and then try and find one exit block where we can adjust likelhoods to cause exactly this amount of extra flow to leave the loop. Closes #84789.
|
@EgorBo PTAL File this one under "I really should have known better" -- I recall thinking about this problem long ago and deciding it wasn't simple to fix, so my simplistic initial fix in #84741 should have set off some personal alarm bells. No SPMI diffs. Have verified some of the pgo pipeline cases in #84798 are fixed, will run them here to check the rest. |
/azp run runtime-coreclr pgo, runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 2 pipeline(s). |
Failures are related? e.g.
|
Yes, this is a newly added assert. |
/azp run runtime-coreclr pgo, runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 2 pipeline(s). |
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.
LGTM assuming CI passes
Neither PGO pipeline is clean, but so far the failures are known
|
The initial version of this only really worked for very simple cases. Generalize to handle loops with multiple exits better.
The rough idea is to compute how much additional profile flow needs to come out of the loop to match the capped probability, and then try and find one exit block where we can adjust likelhoods to cause exactly this amount of extra flow to leave the loop.
Closes #84798.