Open mcabbott opened 3 years ago
Hi, @mcabbott thanks for looking into that. I think using naivesub!
is reasonable.
@andreasnoack, what do you think?
It's unfortunate that we don't have proper dispatch for this. We probably need a fallback call to naivesub!
to handle this generally but the vector case can actually be handled by BLAS so if split https://github.com/JuliaLang/julia/blob/728aa90906a8712668120bb6f0912f963678ec63/stdlib/LinearAlgebra/src/triangular.jl#L739-L740 into a method for StridedVector
and one for StridedMatrix
then the vector version can call BLAS.trsv!
since it allows for non-unit stride. That wouldn't solve the problem for something like view(randn(4,4), 1:2:3, 1:2:3)
so we probably need to introduce some ugly branching here.
This also reveals that a stride check is missing from https://github.com/JuliaLang/julia/blob/728aa90906a8712668120bb6f0912f963678ec63/stdlib/LinearAlgebra/src/lapack.jl#L3412-L3433
Has anyone looked into correcting #39301, so that its test do not block otherwise correct behaviour?
Still broken on 1.9, thus still blocks https://github.com/JuliaLang/julia/pull/43719
Maybe https://github.com/JuliaLang/julia/pull/39301 should work around this in a less fragile way?
The following bug turned up in #40504:
It appears that #39301 worked around this, by introducing enough adjoints to hit the fallback method. Which #39467 then broke by simplifying some views of adjoint matrices. The minimal work-around would be for #39301 to directly call
naivesub!
, pending a solution to StridedArray dispatch?cc. @schneiderfelipe