-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Broadcast in Julia 1.11 requires getindex
/setindex!
to work on multiple integer indexing
#56295
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
Comments
I'll try to make a reproducer at some point |
Interesting — these look like they're all non-AbstractArrays who have axes and previously supported get/setindex with |
Yeah, that's accurate. I put a fair bit of work into removing multiple integer indexing. We'd like to reserve linear indexing (i.e., multiple integer indexing) so that we can special-case fixes for #28126 (including the GPU-variant related issue resolution efforts: JuliaGPU/GPUArrays.jl#454, JuliaGPU/GPUArrays.jl#464). |
Is there anything more that I can do to help this get fixed? (or is there any way we can work around this?) |
I mean, it’s not abundantly obvious to me that broadcast should exclusively use one or the other — or which one in the first place. I certainly couldn’t have told you that broadcast always generated At a caller level, I have always implicitly assumed that the two should be perfectly equivalent. At the implementation level, |
Ok, yes, I agree with you regarding design choices. We’re pretty heavily using broadcast in the CliMA org, and the 2x slowdown from Cartesian indexing is important enough that we need an alternative—whether that is some way to specialize on linear indexing, or roll our own custom version of broadcast. I’ll look into the former, first, since that may be significantly less work. |
It turns out that I was actually able to fix this with dispatch at a higher level. |
This didn't used to be the case in Julia 1.10, and this new requirement means that we cannot reserve this indexing for special behavior.
For example, the fix needed: CliMA/ClimaCore.jl#2018
The text was updated successfully, but these errors were encountered: