Runtime#
Vortex drives async work on a shared background thread pool. The pool is sized on first use
to VORTEX_MAX_THREADS if that environment variable is set to a non-negative integer,
otherwise to the number of available CPU cores minus one. Use
vortex.set_worker_threads() to adjust the pool at runtime.
Return whether the optional Vortex CUDA extension package is importable. |
|
Set the number of background worker threads driving Vortex futures. |
|
Return the current number of background worker threads. |
- vortex.cuda_extension_installed() bool#
Return whether the optional Vortex CUDA extension package is importable.
The base
vortex-datawheel is CPU-only. Optional CUDA functionality is provided by the separatevortex-data-cudaextension package. This returnsTruewhen thevortex_cudaimport package can be found in the current environment, which is whatvortex-data[cuda]installs.This does not probe the CUDA driver or attached devices, and it does not imply that any particular GPU interop API is available. After installing the extension package, use
vortex_cuda.cuda_available()to check whether CUDA is usable at runtime.
- vortex.set_worker_threads(n=None)#
Set the number of background worker threads driving Vortex futures.
If n is None, resets the pool to available_parallelism() - 1.
- vortex.worker_threads()#
Return the current number of background worker threads.