-
Notifications
You must be signed in to change notification settings - Fork 143
Enable no-cpython-wrapper in numba where possible #765
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
Conversation
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.
Sweet
739f7e3
to
c21e76c
Compare
c21e76c
to
10366ad
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #765 +/- ##
=======================================
Coverage 80.83% 80.83%
=======================================
Files 162 162
Lines 46860 46864 +4
Branches 11465 11465
=======================================
+ Hits 37877 37883 +6
+ Misses 6732 6730 -2
Partials 2251 2251
|
How much speedup did you observe with this? |
Compilation took a bit more than half as long with the change applied
for two models I tried. Would be curious what other models do though.
|
And do you expect further speed up if the numba changes get merged or this achieves mostly the same? |
The model I've been using as a baseline went from 20s to 13s with this PR, and then to 8s with the numba PR. But I don't know if that is representative. (All measured hopefully without any caches). (somehow I managed to edit a comment instead of replying, sorry) |
Disabling the generation of cpython wrappers should speed up compilation quite a bit.
Most of our intermediate functions are never called from python, so we don't need numba to generate wrapper code.
Note, that calling a
njit
function withno_cpython_wrapper
directly from python (so not within a different njit function) will not work, and usually segfault.The compilation time should further improve, if something like numba/numba#9566 lands in numba.