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

Custom sysimage building to remove compile times #56

Closed
ChrisRackauckas opened this issue Oct 25, 2019 · 2 comments
Closed

Custom sysimage building to remove compile times #56

ChrisRackauckas opened this issue Oct 25, 2019 · 2 comments

Comments

@ChrisRackauckas
Copy link
Member

If everything is always acting on float arrays, we could probably remove almost all of the compile times just be precompiling the standard solve calls with Float64s. pyjulia seems to allow for this:

https://github.com/JuliaPy/pyjulia/blob/master/src/julia/sysimage.py

so we could add a precompile function. But @tkf do I need to take care to not overwrite other sysimages? Could this be done better by having a separate Julia installed with pyjulia?

@tkf
Copy link
Contributor

tkf commented Oct 25, 2019

At the moment there is no direct method to add custom modules to the system image generated by PyJulia (beyond just PyCall). But it should be possible... in principle.

ref: JuliaPy/pyjulia#311

If everything is always acting on float arrays, we could probably remove almost all of the compile times just be precompiling the standard solve calls with Float64s.

I think one challenge might be to generate enough precompile statements. Last time I tried PackageCompiler.jl, it was not super robust.

do I need to take care to not overwrite other sysimages?

PyJulia does not replace the default system image. It just creates a new one, since the generated system image is only usable inside Python. So, you don't need to worry about disturbing normal julia usage.

OTOH, you need to manage generated system image and load it manually ATM. This can be automated but this is a non-trivial project by itself. (I'm thinking some thing like I do with jlm https://discourse.julialang.org/t/22849; or jlm can be integrated with PyJulia.)

@ChrisRackauckas
Copy link
Member Author

Removed via v1.9 and v1.10 improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants