Live data from Hacker News

CuPy – NumPy-compatible matrix library accelerated by CUDA

cupy.chainer.org

11–20 of 36 posts

Re: CuPy – NumPy-compatible matrix library accelerated by CUDA

#11

Earlier quoted context omitted.

Did you see the « NumPy compatible » part of the title?

It is "highly compatible", similar statement can be made about other libs say torch tensors.

You can in nearly all cases, literally do: import cupy as np and have that just work, so it’s pretty compatible.

Re: CuPy – NumPy-compatible matrix library accelerated by CUDA

#14
The problem I see with trying to emulate NumPy with a GPU accelerated version is that the communication overhead to the GPU is so high that you are losing a lot of performance as opposed to something like TensorFlow.

It takes a couple of microseconds just to start a kernel much less the time it takes to transfer data back and forth.

Re: CuPy – NumPy-compatible matrix library accelerated by CUDA

#16
post #15

I’m working with Numba’s CUDA API and it works well as a drop in replacement for embarrassingly parallel functions.

I've done a fair bit of C++11 for CUDA and I was so happy to throw everything out and switch to Numba. It has some rough edges (like incomprehensible error messages when the type inference goes wrong) but it's been a pleasure overall to work with.

Re: CuPy – NumPy-compatible matrix library accelerated by CUDA

#18
post #5

Not sure what is the motivation behind this library. There are already several array GPU accelerated array libraries -- PyTorch, TensorFlow, ArrayFire, it even looks like pycuda has a small array class.

Chainer and potentially CuPy (which was extracted from Chainer to be independent) were around before PyTorch as it served as inspiration for PyTorch. I feel like that's a good motivation for diversity in packages and ecosystems regardless of your feelings otherwise. Along with a colleague I used CuPy in first Chainer and then PyTorch for implementing the Quasi-Recurrent Neural Network (QRNN) which at the time was far…

PyTorch is almost (or even literally?) a fork of chainer, which can be seen when comparing example code. The latter was much more stable than the former for quite some time after PyTorch gained big popularity through Facebook. We have been using chainer for a lot of published NN research projects and only recently moved to PyTorch because students complained that they feel they can't put the more popular framework on their CVs..

I continue to have more sympathies for chainer.

Re: CuPy – NumPy-compatible matrix library accelerated by CUDA

#19

The problem I see with trying to emulate NumPy with a GPU accelerated version is that the communication overhead to the GPU is so high that you are losing a lot of performance as opposed to something like TensorFlow. It takes a couple of microseconds just to start a kernel much less the time it takes to transfer data back and forth.

You don't transfer back and forth if you use managed memory.
Post reply on HN