-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fusing Wrappers #467
Comments
It also seems that taking a view of a reshaped CuArray works (in
|
Since we now just re-use Base's wrappers (SubArray, ReinterpretArray, ReshapeArray), this would better suited as a feature request there. It also applies there, where flattening wrappers would allow for more use of CPU BLAS. Note that view of reshape works in 2.0 because of this type definitions: Lines 149 to 155 in b83fc1b
We could extend these for other nested wrappers, but the added complexity then regresses load time. So it would be better for wrapper constructors to perform fusion/flattening. In anticipation of such a change in Base, I'd be happy to put some specialized constructors in CUDA.jl though, so feel free to propose a PR. |
view/reshape/reinterpret now result in a CuArray again. |
I would like to apply a Flux model on a large batch of a reshaped view of a CuArray. Using the view or reshape operations in isolation works, but it breaks down when chaining them:
Code with output
Code to copy & paste
Actually
CUDA.ones(Float32, 10, 10) * view(CUDA.ones(Float32, 11, 10), 1:10, :)
does not seem to work in1.3.3
but works in2.0.0
so I was wondering if the chaining of these wrappers is also on the roadmap.The text was updated successfully, but these errors were encountered: