-
-
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
proper diagonal in copytri! (fix #30055) #30066
Conversation
It's 4 weeks now and doesn't get better by waiting.... :-) |
bump: @andreasnoack & @KristofferC |
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.
I don't think copytri!
is the right place to fix this. That function is correct as it is. It just leaves the diagonal which I think is fine. Instead, I'd modify
julia/stdlib/LinearAlgebra/src/triangular.jl
Lines 349 to 356 in dffe119
transpose!(A::LowerTriangular) = UpperTriangular(copytri!(A.data, 'L')) | |
transpose!(A::UnitLowerTriangular) = UnitUpperTriangular(copytri!(A.data, 'L')) | |
transpose!(A::UpperTriangular) = LowerTriangular(copytri!(A.data, 'U')) | |
transpose!(A::UnitUpperTriangular) = UnitLowerTriangular(copytri!(A.data, 'U')) | |
adjoint!(A::LowerTriangular) = UpperTriangular(copytri!(A.data, 'L' , true)) | |
adjoint!(A::UnitLowerTriangular) = UnitUpperTriangular(copytri!(A.data, 'L' , true)) | |
adjoint!(A::UpperTriangular) = LowerTriangular(copytri!(A.data, 'U' , true)) | |
adjoint!(A::UnitUpperTriangular) = UnitLowerTriangular(copytri!(A.data, 'U' , true)) |
transpose
case is wrong for matrix elements.
Alternatively, you could add an argument to |
Codecov Report
@@ Coverage Diff @@
## master JuliaLang/julia#30066 +/- ##
==========================================
+ Coverage 41.31% 57.02% +15.7%
==========================================
Files 349 503 +154
Lines 62360 87313 +24953
==========================================
+ Hits 25767 49794 +24027
- Misses 36593 37519 +926
Continue to review full report at Codecov.
|
Done. |
This should no longer be necessary with constant propagation. Might need to be forcibly inlined, though. |
In |
It can be a bit tricky to get correct output from constant propagation with
The two other are and |
I did Now I tried
That does not show any code from inside |
Just tried it out locally and the propagation works fine if you just add |
Ok. I have now |
Great. Thanks for fixing this. We can merge once tests pass. |
broken windows test run seems unrelated. All LinearAlgebra tests passed. maybe time-out afterwards. |
thanks for the review. |
fix of JuliaLang/LinearAlgebra.jl#586