-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Extend strides
for ReshapedArray
with strided parent.
#44507
Conversation
This was an oversight (regression) in #44027, right, following the discussion after that PR was merged? That commit appears to be in v1.8.0 also, so this may need backporting |
d07b00e
to
7a081cb
Compare
strides
for ReshapedArray
with strided parent.
6f9f6ae
to
9c9d28e
Compare
Is this PR ready to be merged? Or is there something holding it back? |
It's waiting for review. @timholy would you mind taking a quick look at it? |
Use `Base.merge_adjacent_dim` to perform vector layout check before BLAS call. style clean
It turns out `strides(a::StridedReinterpretArray)` won't call `Base.size_to_strides` anymore after JuliaLang#44027. As it is dispatched to `strides(::NonReshapedReinterpretArray)`/`strides(::ReshapedReinterpretArray)`. This commit fix that regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I wasn't paying attention to Julia development for a couple of months due to other duties. This looks great, many thanks @N5N3!
Let's run tests again since it's been a while. |
Never mind @timholy. CI looks busy st present, maybe we need to rerun the test when it's free. |
I haven't been following CI lately, are these failures OK? If so would someone please merge? |
* Extend `strides(::ReshapedArray)` with non-contiguous strided parent * Make sure `strides(::StridedReinterpretArray)` calls `size_to_strides` Co-authored-by: Tim Holy <tim.holy@gmail.com> (cherry picked from commit 0d3aca4)
…44507) * Extend `strides(::ReshapedArray)` with non-contiguous strided parent * Make sure `strides(::StridedReinterpretArray)` calls `size_to_strides` Co-authored-by: Tim Holy <tim.holy@gmail.com>
…44507) * Extend `strides(::ReshapedArray)` with non-contiguous strided parent * Make sure `strides(::StridedReinterpretArray)` calls `size_to_strides` Co-authored-by: Tim Holy <tim.holy@gmail.com>
#44027 defined
strides(::ReshapedArray)
for dense/stridedvector parents, where the dense check failed to cover inputs with size-1 dimension.With this PR,
strides
is extended to allReshapedArray
whose parent hasstrides
defined.And the memory layout check for vector inputs before BLAS call is fixed by code reuse.
Close #44497.