Skip to content
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

Options for separate optimization and inference accuracy level during precompilation #48021

Closed
ChrisRackauckas opened this issue Dec 28, 2022 · 2 comments
Labels
compiler:precompilation Precompilation of modules feature Indicates new feature / enhancement requests

Comments

@ChrisRackauckas
Copy link
Member

Precompilation has evolved a ton in Julia in recent years, but the controls for it have not. It would be nice if there was a way for example to have different optimization levels during precompilation vs standard compilation, in a way that packages can control at the module level, since a lot of the times the -O1 choice is for latency that is not seen if the package is using a precompiled call. Additionally, this would allow for higher optimization levels that really optimize, doing things like more SLP vectorization or something, if one is okay with the precompilation cost.

This could also allow for more inference controls, for example, enabling #36454 during precompilation if one is okay with the higher latency (to decrease invalidations).

@KristofferC
Copy link
Member

As a note, for now, I think the stuff in pkgimages are ignoring module level optimization level and just compiles it with the same optimization level as Julia is started with. @timholy or @vchuravy can probably confirm.

@vchuravy
Copy link
Member

It's a bit tricky. If you start Julia with -O3 it will be propagated to the pkgimage. If you then start Julia with -O0 we will load the pkgimage compiled under O3. If on the otherhand you compile at O0 and then load at O3 we will reject that pkgimage and generate a new one.

@brenhinkeller brenhinkeller added compiler:precompilation Precompilation of modules feature Indicates new feature / enhancement requests labels Dec 29, 2022
@vtjnash vtjnash closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules feature Indicates new feature / enhancement requests
Projects
None yet
Development

No branches or pull requests

5 participants