-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Labels
Description
Currently, when we set fastmath default flags in __init__.py:
Lines 41 to 48 in 97da018
| if not numba.config.DISABLE_JIT: # pragma: no cover | |
| njit_funcs = cache.get_njit_funcs() | |
| for module_name, func_name in njit_funcs: | |
| module = importlib.import_module(f".{module_name}", package="stumpy") | |
| func = getattr(module, func_name) | |
| key = module_name + "." + func_name # e.g., core._mass | |
| key = "STUMPY_FASTMATH_" + key.upper() # e.g., STUMPY_FASTHMATH_CORE._MASS | |
| config._STUMPY_DEFAULTS[key] = func.targetoptions["fastmath"] |
We are actually importing every single njit function. Instead, we should use AST to read the decorator value and then cross reference the values that they are represented by in config.py.
Reactions are currently unavailable