question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LocalCUDACluster doesn't use multiple GPUs when cuDF is import

See original GitHub issue

Only the first GPU is used when importing cudf. If I remove that import, all GPUs get assigned work to do.

from dask_cuda import LocalCUDACluster
from dask.distributed import Client
import numpy as np
import cupy
import dask
import dask.array as da
import cudf

if __name__ == '__main__':
    cluster = LocalCUDACluster()
    client = Client(cluster)

    x = cupy.random.random((100000, 1000))
    d = da.from_array(x, chunks=(10000, 1000), asarray=False)
    u, s, v = np.linalg.svd(d)
    s, v = dask.compute(s, v)

Obviously, this example is not really using cudf for anything, just serving for demonstration purposes.

The only workaround I found for this is to start dask-scheduler and dask-cuda-worker outside of my python script. Am I missing something or doing something wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
pentschevcommented, Jun 11, 2019

@VibhuJawa you’re not importing cudf directly, but you are importing it indirectly when you import dask_cudf. I think this is where the context is coming from.

0reactions
pentschevcommented, Jan 9, 2020

Given that there has been extensive usage of LocalCUDACluster with cuDF in multiple GPUs recently, I believe this has been solved, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best Practices — dask-cuda 22.12.00a0+g8c87288 ...
See Accelerated Networking for more discussion. from dask_cuda import LocalCUDACluster cluster = LocalCUDACluster(n_workers=2) # will use GPUs 0,1 cluster ...
Read more >
Multi-GPU Scaling in NVTabular with Dask - GitHub Pages
NVTabular enables the use of Dask for multi-GPU parallelism, ... import cupy as cp import cudf import dask_cudf from dask_cuda import LocalCUDACluster from ......
Read more >
RAPIDS release blog 22.06 - Medium
Whether working on a single or multi GPU environment, this release brings you new ... from dask_cuda import LocalCUDAClustercluster ...
Read more >
Source code for dask_cuda.local_cuda_cluster - Dask-CUDA
For machines with a complex architecture mapping CPUs, GPUs, ... from dask_cuda import LocalCUDACluster >>> from dask.distributed import Client >>> cluster ...
Read more >
High-Performance Python Communication with UCX-Py
UCX-Py does not only enable communication with NVLink and ... RAPIDS allows both multi-node and multi-GPU scalability by utilizing Dask, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found