Comments (18)
@mattjj I'm out of grad school now! 😄
What more needs to be done to support CuPy? Could we chat about this sometime?
from autograd.
@matjj I started a branch on my fork! https://github.com/ericmjl/autograd/tree/cupy
Still familiarizing myself with both CuPy and autograd's codebase. However, one small win I have now is that I can import autograd.cupy as cp
and no errors show up. The next thing I need help with is error messages that show up when I try to instantiate an array.
cc: @samuela, @MInner, @iaroslav-ai, @oeway, @kastnerkyle, @outlace, @tscohen I definitely can't do this on my own, and I'd love to get your input on the branch, especially w.r.t. testing and finding problems that show up!
from autograd.
@JarvisDevon, if you're interested in what I've done thus far, you can look at https://github.com/ericmjl/autograd-cupy.
Otherwise, I'd suggest going to jax: it provides autodiff on the NumPy API with JIT compilation to GPU/TPU!
from autograd.
Any updates? I and a few others are very interested, and @tscohen 's comment makes me think it could be pretty straightforward.
from autograd.
Hey Taco! Thanks for the suggestion. We had noticed CuPy, and I think a student is currently looking into the necessary adaptations. This github issue is probably a good place to track any progress on that front. If you have any further thoughts on getting autograd+CuPy working, let us know!
from autograd.
Please support OpenCL if you're planning to add GPU support.
from autograd.
No updates, but pull requests are welcome :)
from autograd.
+1
looking forward to this feature.
from autograd.
+1
from autograd.
Did anybody try using numpy linked with nvblas - a drop-in replacement for BLAS that uses cuBLAS under the hood? If all numpy ops are automatically GPU-accelerated this way, autograd should get accelerated too, right?
from autograd.
It's not too hard to wrap numerical libraries with autograd. The trouble has been that there isn't really a good "GPU-backed numpy" to wrap. That is, the challenge is finding a well-developed GPU-backed numerical library for expressing functions to be differentiated; if we had that, wrapping it in autograd to add autodiff support wouldn't be much work.
As an example, a few weeks ago I made a cupy wrapper in a branch, including a gpu-accelerated MNIST net example. Take a look at the autograd/cupy directory in that branch to see the wrapping code. Basically, it requires three files: cupy_wrapper.py to wrap the cupy functions in primitive
s, cupy_extra.py to set up a cupy array boxed data type, and cupy_grads.py to define the VJPs. However, cupy is a bit rough around the edges, and I haven't pushed on developing that wrapper further.
I haven't looked at nvblas, but because I haven't heard of it being used, I suspect it is under-developed. I'd like to hear more about it, though!
from autograd.
@mattjj I'm also not personally familiar with nvblas but it appears to be an Nvidia project, so it should be actively maintained.
from autograd.
Any updates guys?
from autograd.
Please check my branch: https://github.com/ericmjl/autograd/tree/cupy
from autograd.
Also, some progress has been made.
from autograd.
Thanks, will check it out.
from autograd.
Any progress on this? The branch at https://github.com/ericmjl/autograd/tree/cupy seems to be gone too?
from autograd.
from autograd.
Related Issues (20)
- support for Jax-like custom forward pass definition? HOT 1
- Gradient become Nan for 0 value test HOT 1
- Is it possible to see gradient function? HOT 2
- Four scipy tests are failing HOT 6
- Add np.float128,np.complex256 dtypes to vspaces and boxes registers HOT 2
- unsafe URL HOT 1
- Numpy 1.25 breaks a few linalg functions HOT 1
- `autograd` 1.6 breaks Apple M-series macOS and Windows builds (module `numpy` has no attribute `float128`) HOT 3
- Can I differentiate this function?
- Python 2 and dependency on future HOT 2
- `'ArrayBox' object has no attribute 'dot'` when differentiating function containing `x.dot(y)` HOT 1
- How do I create a scalar value that does not depend on the independent variables ?
- AttributeError: module 'autograd.numpy' has no attribute 'numpy_extra'
- Autograd for quantum circuits
- [BUG] Differentiating `autograd.numpy.linalg.norm` gives incorrect results
- Support for advanced library based on autograd HOT 4
- Release new version 1.6.3 on PyPI HOT 3
- autograd return nan with to norm function
- Saving `ArrayBox` to hdf5 file
- Incompatibility with numpy 2.0.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autograd.