Repository navigation
Defer HessenbergQ multiplication to LinearAlgebra where available - #185
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #185 +/- ##
==========================================
+ Coverage 95.73% 95.79% +0.06%
==========================================
Files 11 11
Lines 1524 1546 +22
==========================================
+ Hits 1459 1481 +22
Misses 65 65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LinearAlgebra now ships generic `lmul!`/`rmul!` methods for `HessenbergQ` with the same signatures as the ones defined here. Redefining them overwrites the upstream methods, which is an error during precompilation, so only define the local fallbacks when LinearAlgebra lacks them. The `HessenbergQ`s built in `BidiagonalFactorization.getproperty` store their reflectors below the subdiagonal, which is the `'L'` layout that `hessenberg` produces; mark them as such instead of `'U'`. Also pass the matching `τ` type parameter for `leftQ`. Extend the HessenbergQ test to both factors, both bidiagonal orientations, real and complex BigFloat, all four multiplication directions, and the reconstruction of the original matrix. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vv9VYe4nM23v8ruYwk9AQx
3cea48f to
1644a7c
Compare
|
Claude: Since 2026-10-12, GenericLinearAlgebra fails to precompile on Julia nightly (1.15-DEV): its Written with Claude Code (Opus 5.5). |
|
Ideally, we would need an approving review by someone with write access. I have now included a version bump, and once tests pass I'll merge, bypassing the rules, given @araujoms approving review. |
|
Thanks, @andreasnoack! |
Closes #184, closes #183.
LinearAlgebra.jl now provides generic
lmul!/rmul!forHessenbergQ(JuliaLang/LinearAlgebra.jl#1704), with the same signatures as the methods defined insrc/svd.jl. Redefining them overwrites the upstream methods, which is an error during precompilation, so GenericLinearAlgebra no longer precompiles against LinearAlgebra master (see JuliaLang/LinearAlgebra.jl#1782).HessenbergQkernels only when LinearAlgebra lacks them, gated onhasmethod(lmul!, Tuple{LinearAlgebra.HessenbergQ,AbstractVecOrMat}). The upstream kernels handle the same element types, honouruplo, and are 13-29% faster onBigFloatin my measurements.HessenbergQs built inBidiagonalFactorization.getpropertystore their reflectors below the subdiagonal, which is the'L'layout thathessenbergproduces; mark them as such instead of'U'. Also pass the matchingτtype parameter forleftQ.BigFloat, all four multiplication directions, and the reconstruction of the original matrix.Tested locally against LinearAlgebra master (upstream methods used) and on Julia 1.9.4 (local fallbacks used); the new testset passes in both configurations.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vv9VYe4nM23v8ruYwk9AQx
Generated by Claude Code