File tree Expand file tree Collapse file tree
src/fast_array_utils/numba Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ def _is_apple_silicon() -> bool:
4848 return sys .platform == "darwin" and platform .machine () == "arm64"
4949
5050
51- def _could_select_omp_from_threading_config_without_probing () -> bool :
51+ def _needs_parallel_runtime_probe () -> bool :
52+ if not _is_apple_silicon () or "torch" not in sys .modules :
53+ return False
54+
5255 match numba .config .THREADING_LAYER :
5356 case "omp" :
5457 return True
@@ -58,14 +61,6 @@ def _could_select_omp_from_threading_config_without_probing() -> bool:
5861 return "omp" in LAYERS [category ]
5962
6063
61- def _needs_parallel_runtime_probe () -> bool :
62- if not _is_apple_silicon () or "torch" not in sys .modules :
63- return False
64- if numba .config .THREADING_LAYER in {"workqueue" , "tbb" }:
65- return False
66- return _could_select_omp_from_threading_config_without_probing ()
67-
68-
6964def _loaded_relevant_parallel_runtime_probe_modules () -> tuple [str , ...]:
7065 return tuple (module for module in _PARALLEL_RUNTIME_PROBE_MODULE_WHITELIST if module in sys .modules )
7166
You can’t perform that action at this time.
0 commit comments