You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Register cupy operations for concatenate and tensordot. Examples doing this for the sparse library are at the top of dask/array/core.py
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.
Should have mentioned Bohrium before. There are some similarities between it and Dask in that it lazy evaluates things and provides a NumPy-like interface.
That said, Bohrium is focused on computations on a single CPU or GPU and makes use of OpenCL to do so. Also it compiles things as it is run much like Theano.
I think there is a really interesting possibility of using Dask Distributed to construct graphs that contain functions with Bohrium. Then fuse many of these operations down to tasks. Finally submitting them to workers where they are built and run. Thus allowing one to create high performance operations distributed on nodes with ease on larger than memory data.
I don't think it would ;). I guess the only thing to worry about it resource contention for the GPU(s), though, I guess that is always something to worry about.
As a new user of dask, I have a naive question on how to manage GPU's on a multi-node multi-GPU cluster (accessed using dask-jobqueue and appropriate scheduler) from inside a python script (not from command prompt like in https://youtu.be/jLQ2wAwapRg?t=894) with or without using cupy/numba. A simple application could be a matrix-matrix multiplication. A solution is to use mpi4py with cupy GPU arrays to allocate chunks of the matrices to a particular GPU; is there a simpler or similar solution while using dask arrays?
Activity
jakirkham commentedon Dec 17, 2017
May be worth looking at
libgpuarray/pygpuas well.mrocklin commentedon Dec 17, 2017
Sure, assuming that it matches a decent subset of the the np.ndarray API. I suspect that there are other options out there as well.
sjperkins commentedon Dec 18, 2017
This would be a great addition!
I would guess that scheduling of asynchronous:
in the presence of limited GPU memory is going to the challenge.
rzu512 commentedon Dec 20, 2017
How about theano?
jakirkham commentedon Jan 9, 2018
theanoat least in the latest version useslibgpuarray/pygpu.jakirkham commentedon Jan 21, 2018
Should have mentioned Bohrium before. There are some similarities between it and Dask in that it lazy evaluates things and provides a NumPy-like interface.
That said, Bohrium is focused on computations on a single CPU or GPU and makes use of OpenCL to do so. Also it compiles things as it is run much like Theano.
I think there is a really interesting possibility of using Dask Distributed to construct graphs that contain functions with Bohrium. Then fuse many of these operations down to tasks. Finally submitting them to workers where they are built and run. Thus allowing one to create high performance operations distributed on nodes with ease on larger than memory data.
jakirkham commentedon Mar 27, 2018
Probably should add
numbahere too.Edit: Though this is a different sort of strategy than wrapping a NumPy API-compatible GPU Array class.
jakirkham commentedon Mar 27, 2018
Has anyone been actively exploring this space? Would be interested to know what sort of things have been tried/learned. :)
hmaarrfk commentedon Jul 4, 2018
How badly does cupy perform if you use the delayed interface?
mrocklin commentedon Jul 4, 2018
hmaarrfk commentedon Jul 4, 2018
I don't think it would ;). I guess the only thing to worry about it resource contention for the GPU(s), though, I guess that is always something to worry about.
mrocklin commentedon Jul 4, 2018
pmoulik commentedon Jul 20, 2018
As a new user of dask, I have a naive question on how to manage GPU's on a multi-node multi-GPU cluster (accessed using dask-jobqueue and appropriate scheduler) from inside a python script (not from command prompt like in https://youtu.be/jLQ2wAwapRg?t=894) with or without using cupy/numba. A simple application could be a matrix-matrix multiplication. A solution is to use mpi4py with cupy GPU arrays to allocate chunks of the matrices to a particular GPU; is there a simpler or similar solution while using dask arrays?
mrocklin commentedon Oct 24, 2018
I'm going to go ahead and close this. This topic is being handled piece by piece in other issues.