-
-
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: IPO constant propagation #24362
Conversation
Well, that's a terrifyingly large diff to inference, but it's a very nice optimization to have! |
It would be great to have nandolier on this type of thing |
It's it more like "It would be great to have nandolier" |
Looks pretty good 👍 How long do those cache arrays get? |
During sysimg build, the largest was 4728 items. The average size during a lookup was 470 items. I didn't collect any other stats (like the number of times we entered inference) for comparison though. |
6251b9b
to
20c6a59
Compare
20c6a59
to
f130573
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
It'd be good to have the runtime intrinsics fixes in a separate PR and merge that first. |
Sure. Other than that, this is all ready to go. (passing all tests and nanosoldier is happy – the noise in the sparse test appears to also happens on master locally) |
I guess I'll merge this tomorrow, unless there's any requests to defer it. |
Would have been really nice if nanosoldier nightlies were working first though. |
The compiler performance impact of this is surprisingly small, but there's still about a 30 second regression in sysimg build time for me (5'16", while master is about 4'45" and 0.6 is < 3'). We should find some way to moderate this. |
Yeah, I was mildly surprised too, since I didn't add any particular limits on it (but I had some expectations from past analysis). How much do you want it to back off on attempting to do better optimization? |
039aeb0
to
97cf3ef
Compare
97cf3ef
to
8d5dd0b
Compare
Since I find that timing the sysimg build is often not a representative workload, I've also timed running all of the tests in sequence. Looks like the net impact (on this inference heavy workload) is about 18%, so I think this is good to merge now.
|
The sysimg build time regression described above is about 11%, so that's worse. I'm not convinced the trade-off is worthwhile as-is. There is definitely some code out there that benefits from this, but most of the code we're testing here probably doesn't, yet pays a hefty 18% cost. |
How difficult would it be to place a limit where we only propagate "easy" cases. My guess is that this would yield much of the benefit, but might let us bail out earlier in most cases. Alternatively, could IPO be opt in? |
0134345
to
412c4de
Compare
Is this good to be merged? |
@nanosoldier |
We can’t merge any features while CI is broken, but yes this should be ready to go. Hopefullly folks deal with the CI issues soon and quickly, as that’s likely to delay our desired freeze date. |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
CI is now relatively healthy. Rebase, test, and merge? |
Create a separate type for results that holds just the result of running some configuration of inference, and does local caching of the results.
412c4de
to
62167c8
Compare
rebased and CI looks happy with this |
Let's ask nanosoldier one last time? |
It seems that nanosoldier didn't start @nanosoldier |
The Nanosoldier webhook log on this repo shows a 400 from both of your requests. I have no idea why but maybe third time's a charm? @nanosoldier |
Nanosoldier gave me a 400 as well so I put him in a time out (AKA I restarted the server). @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
woohoo! |
Implements inter-procedural constant propagation.
fixes #5560
fixes #24011
fixes #14324
(based on some commits in #24337)