-
Notifications
You must be signed in to change notification settings - Fork 36
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
Numba #25
Conversation
I just made a correction in case the user's python version does not support lazy loading. |
Hi Yoel, There are two more places a similar approach could be taken:
For the first, I am hopeful numba 0.53 will allow caching functions that accept functions as arguments. I am incredibly excited for this. It also adds substantial speed benefits to them. However, some functions such as those that call scipy.special methods still can't be cached. There are also some issues with this code, one of which I have reported to numba: numba/numba#6772 I am doing testing with numba 0.53 now, so if it's OK with you I'll leave this as a PR and merge it in with all other needed changes! Sincerely, |
Awesome! I just added an optional "cache" keyword argument to the I didn't know that numba was close to implementing functions as arguments to jit compiled functions. That's a real improvement, thanks for letting me know. Feel free to pull whenever you're ready, |
…he future Made uncacheable function separate for simplicity - may be able to take out depending on numba's 0.53 bugfix cycle Removed mark_numba_incompatible from __all__ as not part of public API Removed mark_numba_incompatible from __init__ because the auto-rename feature of PyCharm couldn't trace the import logic to allow it easy rename
Hi Caleb,
This pull request introduces a
chemicals.numba.mark_jit_unsafe
decorator to mark functions unsafe to JIT compile. This decorator is then used to prevent jit compiling lookup functions and more (e.g. Tc, omega). The introduction of this decorator mainly helps for development purposes (no need to go back to the numba module to check which functions are blacklisted; or having to add blacklisted function names to the numba module).Additionally, if you have Python 3.7 or greater, you can now import directly from numba via lazy loading:
Let me know what you think,
Thanks!