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.

cuda_extension_installed

Return whether the optional Vortex CUDA extension package is importable.

set_worker_threads

Set the number of background worker threads driving Vortex futures.

worker_threads

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-data wheel is CPU-only. Optional CUDA functionality is provided by the separate vortex-data-cuda extension package. This returns True when the vortex_cuda import package can be found in the current environment, which is what vortex-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.