espnet3.parallel.parallel.build_local_gpu_cluster
Less than 1 minute
espnet3.parallel.parallel.build_local_gpu_cluster
espnet3.parallel.parallel.build_local_gpu_cluster(n_workers: int, options: dict) → Client
Create a Dask LocalCUDACluster using available GPUs.
This requires dask_cuda package.
- Parameters:
- n_workers (int) – Number of Dask workers (must not exceed number of GPUs).
- options (dict) – Additional options for the LocalCUDACluster.
- Returns: Dask client connected to the GPU cluster.
- Return type: Client
- Raises:
- RuntimeError – If Dask or
dask_cudais unavailable. - ValueError – If
n_workersexceeds the available GPU count.
- RuntimeError – If Dask or
Example
>>> client = make_local_gpu_cluster(1, options={})