Registry / data / dask-cuda

dask-cuda

JSON →
library26.6.0pypypiunverified

Dask-CUDA is a Python library providing utilities to facilitate interactions between Dask and NVIDIA CUDA-enabled GPUs. It extends `dask.distributed`'s `LocalCluster` and `Worker` to manage and deploy Dask workers efficiently on GPU systems. Key features include automatic instantiation of per-GPU workers, setting CPU affinity for optimal performance, and robust GPU memory management, including spilling to host memory. It is a core component of the RAPIDS suite for GPU-accelerated data science. The library maintains an active development status with regular releases, currently at version 26.4.0.

pip install dask-cuda
INSTALL
IMPORT
SIG · DASK-CUDA
D
dask-cuda
datapythonv26.6.0
Install
13.6s avg
Import
4525ms
Disk
286MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
7/8 runs
py 3.11
✕ build_error
✓ 11.7s
py 3.12
✕ build_error
✓ 11.35s
py 3.13
✕ build_error
✓ 11.83s
py 3.9
✕ build_error
✓ 19.6s
286MB installed
● package 286MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LocalCUDACluster
from dask_cuda import LocalCUDACluster
from dask_cuda import LocalCUDACluster

This quickstart demonstrates how to set up a `LocalCUDACluster` and connect a `dask.distributed.Client`. It highlights common configurations like specifying visible GPUs, configuring RAPIDS Memory Manager (RMM) for memory pooling, and enabling cuDF spilling to prevent out-of-memory errors on large datasets. The use of an `if __name__ == "__main__":` block is crucial for standalone scripts.

import os from dask_cuda import LocalCUDACluster from dask.distributed import Client if __name__ == "__main__": # Recommended to run inside an if __name__ == "__main__": block # Configure for 2 GPUs, 90% RMM pool size, and enable cuDF spilling cluster = LocalCUDACluster( CUDA_VISIBLE_DEVICES="0,1", # Example: use devices 0 and 1 rmm_pool_size=0.9, # Use 90% of GPU memory as a pool enable_cudf_spill=True, # Enable spilling to host memory if needed local_directory=os.environ.get('DASK_LOCAL_DIRECTORY', '/tmp/dask-cuda') ) client = Client(cluster) print(f"Dask-CUDA cluster dashboard link: {client.dashboard_link}") # Your Dask-accelerated GPU computations go here # For example, with dask-cudf: # import dask.dataframe as dd # import cudf # dask.config.set({"dataframe.backend": "cudf"}) # ddf = dd.read_csv("my_gpu_data.csv") # result = ddf.groupby("col").sum().compute() client.close() cluster.close()
Debug
Known issues
breakingThe `numba` package is no longer a direct dependency as of v26.04.00. While `numba-cuda` remains relevant for CUDA JIT compilation, direct usage or reliance on the base `numba` package within `dask-cuda` might lead to issues.
fix
Remove `numba` from your environment if it was installed as a direct `dask-cuda` dependency. Ensure `numba-cuda` is installed if you rely on CUDA JIT features.
affects: >=26.04.00
breakingSupport for the `UCX-Py` library has been removed in favor of `distributed-ucxx` starting from v25.10.00. Direct use of `protocol='ucx'` may fail without the new `distributed-ucxx` package.
fix
Install `distributed-ucxx` (e.g., `pip install distributed-ucxx` or `conda install distributed-ucxx -c conda-forge`) and update Dask configuration keys from `distributed.comm.ucx.*` to `distributed-ucxx.*` if previously configured manually.
affects: >=25.10.00
breakingCUDA 11 support was removed from dependencies starting with v25.08.00. Users on CUDA 11 might experience compatibility issues or build failures.
fix
Upgrade your NVIDIA CUDA Toolkit to a supported version (e.g., CUDA 12.x or 13.x) or use an older `dask-cuda` version that supports CUDA 11.
affects: >=25.08.00
breakingLegacy `Dask-cuDF` handling was removed in v25.02.00a. Older patterns for integrating `dask-cudf` might no longer work as expected.
fix
Adopt the recommended Dask DataFrame API for GPU acceleration by setting `dask.config.set({"dataframe.backend": "cudf"})` after importing `dask` and ensuring `cudf` is installed.
affects: >=25.02.00
gotchaWhen using `LocalCUDACluster` in a standalone Python script, it is crucial to enclose the cluster and client initialization within an `if __name__ == "__main__":` block. Failure to do so can lead to unexpected behavior, deadlocks, or errors related to subprocess spawning.
fix
Always wrap your `LocalCUDACluster` and `Client` creation in an `if __name__ == "__main__":` block when running as a script.
affects: All versions
Upgrade
Version history
26.6.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
daskrequiredCore distributed computing library that dask-cuda extends.
distributedrequiredDask's cluster management library, essential for dask-cuda's functionality.
cudfoptionalGPU DataFrame library, frequently used with dask-cuda for data processing (optional, for dask-cudf workflows).
cupyoptionalGPU array library, often used with dask-cuda for array computations (optional, for dask-array GPU workflows).
numba-cudaoptionalRuntime dependency for CUDA JIT compilation utilities. The base 'numba' package was removed as a direct dependency in v26.04.00, but numba-cuda remains.
rmmoptionalRAPIDS Memory Manager, highly recommended for efficient GPU memory pooling and spilling.
distributed-ucxxoptionalProvides UCX communication support, replacing legacy UCX-Py integration (required for UCX-accelerated communication).
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources