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.

Experiment with CuPy GPU arrays

See original GitHub issue

Dask contains parallel algorithms for parallel arrays based on the numpy syntax. While commonly used with numpy arrays they also work with other libraries that mimic subsets of the numpy ndarray API.

The CuPy library implements a NumPy API compatible GPU ndarray. It would be interesting to see how these two libraries interact, where performance bottlenecks are, and under what conditions they may be effectively used together.

To experiment with this one would want to do a few things:

  1. Register cupy operations for concatenate and tensordot. Examples doing this for the sparse library are at the top of dask/array/core.py
  2. Create a GPU array using da.from_array, or da.from_delayed and da.concatenate/stack. See http://dask.pydata.org/en/latest/array-creation.html
  3. If you want to use distributed computing then ensure that cupy ndarrays can be efficiently serialized, probably by implementing __setstate__ and __getstate__ methods for them if they don’t already exist.

This should be sufficient to get something up and running.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jakirkhamcommented, Mar 27, 2018

Has anyone been actively exploring this space? Would be interested to know what sort of things have been tried/learned. 😃

0reactions
mrocklincommented, Oct 24, 2018

I’m going to go ahead and close this. This topic is being handled piece by piece in other issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CuPy and Numba on the GPU – Lesson Title
Objectives. Understand copying to and from the GPU (host/device interaction). Understand the similarities and differences between numpy and cupy arrays.
Read more >
Interoperability — CuPy 11.4.0 documentation
This enables NumPy ufuncs to be directly operated on CuPy arrays. ... mpi4py now provides (experimental) support for passing CuPy arrays to MPI...
Read more >
CuPy – A NumPy-compatible array library accelerated by CUDA
CuPy – A NumPy-compatible array library accelerated by CUDA¶ ; Installation · Requirements · Installing CuPy ; Using CuPy on AMD GPU (experimental)...
Read more >
Basics of CuPy — CuPy 11.4.0 documentation
CuPy is a GPU array backend that implements a subset of NumPy interface. ... Most of the array manipulations are also done in...
Read more >
Memory Management — CuPy 11.4.0 documentation
When you monitor the memory usage (e.g., using nvidia-smi for GPU memory or ps for CPU memory), you may notice that memory not...
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