-
Notifications
You must be signed in to change notification settings - Fork 222
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
Nested SubArray Scalar Indexing #490
Comments
Nested wrappers is JuliaGPU/Adapt.jl#21, so not supported. We do support limited view nesting, but we rely on Base for that with a GPU version of |
Is there a workaround I could use to flatten this sort of thing? The following works, so it seems like there might be a way to reform the view from the parent on the second call?
|
Not that I know, we're just reusing Base's view machinery here, and it doesn't look like it understands what you're doing enough to flatten the indices automatically. |
Works again after #498, now that we eagerly flatten some wrappers. But ultimately this remains Base not supporting these kinds of nested wrappers, and it just happens to work because of an optimization here, not because we fundamentally support this pattern. |
v2.0.0 fixed a number of issues with subarrays, but nested calls still seem to have issues. I'm wondering if there is a way to "flatten" the different calls to view/reshape. See the small example below. In my application the different calls to view are on opposite sides of a function boundary so they can't be combined.
The text was updated successfully, but these errors were encountered: