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

[FEAT] Add environment variables for njit's cache=True and nogil=True #127

Closed
AzulGarza opened this issue Jun 2, 2022 · 3 comments
Closed

Comments

@AzulGarza
Copy link
Member

Is your feature request related to a problem? Please describe.
To speed up numba functions, cache=True can be used to avoid compilation times each time the function is invoked; and nogil=True can be used to release Python's GIL which can be useful since when doing multiprocessing numba compiles the function for every process.

Describe the solution you'd like
I've been thinking about a solution for a while and I think the best thing to do is to include environment variables for each argument, as suggested here.

Describe alternatives you've considered
Maybe default both arguments to True, but it is too restrictive.

@AzulGarza
Copy link
Member Author

This should also resolve sktime/sktime#2527.

@VivCh14
Copy link

VivCh14 commented Jun 5, 2023

Is there any update on this ? Seems, currently it is neither directly possible in Numba or in the StatsForecast package. But would be really useful feature. I thought of enabling cache by default and let the users use the numba environment [NUMBA_DISABLE_JIT] (https://numba.readthedocs.io/en/stable/reference/envvars.html#envvar-NUMBA_DISABLE_JIT) to toggle using the caching function but using that environment variable results in errors.

@jmoralez
Copy link
Member

This was added in #651

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

3 participants