-
Notifications
You must be signed in to change notification settings - Fork 32
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
ENH Cache Numba compilation for the user #106
Comments
If I got your point, you suggest shipping Have you tried to upload code to PyPI with pre-compiled Numba code? If so, does it work as expected? |
For now, I've only tried adding |
Those are very interesting suggestions, and that would be a major plus indeed if possible ! Did you look at Ahead of time compilation too ? https://numba.pydata.org/numba-doc/latest/user/pycc.html |
I did, it's what we need. A few comments on the limitations though:
Another thing to worry about: For the build integration in |
A code snippet to AOT-compile at first import: https://github.com/pymatting/pymatting/blob/838171bdf13ddd474c1e81b7a4f1427bf6da6703/pymatting_aot/cc.py#L1 |
This script gives:
This is due to the compilation cost. We should cache this compilation once and for all, ideally during install (by pre-building/pre-compiling the IR generated by Numba) or when the user first runs a script, using
njit(cache=True)
.The text was updated successfully, but these errors were encountered: