-
-
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
make (*)(::Adjoint{Vector}, ::Vector) non-recursive #35257
Conversation
Currently, we don't have any tests for arrays of arrays related to the issue here. |
I don’t think the old behavior is really coherent; as I see it, the fact that To me, the general rule should be that e.g. The recursive |
I would propose a small change to @ericphanson's proposal, to change that to |
@simeonschaub I think that the recursive transposition behavior is coded into the |
Oops, yes, of course! Then I definitely agree with the implementation here |
Actually, currently we have (*)(u::TransposeAbsVec, v::AdjointAbsVec{<:Any,<:TransposeAbsVec}) =
sum(uu*vv for (uu, vv) in zip(u, v))
(*)(u::AdjointAbsVec, v::AdjointAbsVec{<:Any,<:TransposeAbsVec}) =
sum(uu*vv for (uu, vv) in zip(u, v))
(*)(u::TransposeAbsVec, v::TransposeAbsVec{<:Any,<:AdjointAbsVec}) =
sum(uu*vv for (uu, vv) in zip(u, v))
(*)(u::AdjointAbsVec, v::TransposeAbsVec{<:Any,<:AdjointAbsVec}) =
sum(uu*vv for (uu, vv) in zip(u, v)) Should we simplify the sum(uu*vv for (uu, vv) in zip(u, v)) without bounds checking and |
The intention of #27401 was to make julia/stdlib/LinearAlgebra/test/matmul.jl Line 553 in cc60547
reflects that since *(::Adjoint, ::Matrix) dispatched to dot , which is not necessarily an optimal choice, as mentioned by @ericphanson above. I didn't change *(::Adjoint, ::Matrix) , only dot in #27401. Hence, I think the rational behind this PR is fine.
|
Codecov Report
@@ Coverage Diff @@
## master #35257 +/- ##
==========================================
- Coverage 86.79% 86.79% -0.01%
==========================================
Files 344 344
Lines 63715 63716 +1
==========================================
- Hits 55303 55301 -2
- Misses 8412 8415 +3
Continue to review full report at Codecov.
|
* make (*)(::Adjoint{Vector}, ::Vector) non-recursive * fix matmul test * code simplification
* make (*)(::Adjoint{Vector}, ::Vector) non-recursive * fix matmul test * code simplification
Hi guys, I ran into a few issues with this PR as I was upgrading my code to 1.5:
My impression is that while the original issue certainly deserves to be solved, maybe this PR needed to be iterated on a little more before merging? Would it be possible to fix it quickly before 1.5, or maybe revert and iterate on it a bit? For me certainly the breaking API change, while I think technically allowed by Julia's semver rules as they pertain to stdlibs, seems worrisome. |
cc @dkarrasch |
Closes #35174.
These changes don't break any tests, so I believe this was more oversight than deep intention. With this PR, I get
which used to throw before.