-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
*
has no method matching *(::Array{Float64,2}, ::Tridiagonal{Float64})
#263
Comments
Also, more missing method for A = Bidiagonal(rand(5), rand(4), false)
B = rand(5, 5)
A * B #MethodError
B * A #MethodError
B * full(A) #works
full(A) * B #works |
There are also performance issues:
e.g. multiplication of two tridiagonal matrices is fastest if we are only given the info that the second one is tridiagonal and worst if we are informed about both matrices... Anyway I am on it. |
All the MethodErrors were resolved (presumably by JuliaLang/julia#15367), but the performance issues were not. Would be a great contribution! |
@jw3126 Great. Don't be shy to ask if you get stuck at something! And remember to work on a commit after the one Tim mentioned :) |
@timholy @pkofod Thanks! I have already a fast kernel for the right multiplication by something tridiagonal.
However multiplication is not yet dispatched in a way that this kernel is called.
I could fix that problem by overloading * for combinations where the right matrix is tridiagonal. However I think this is a more general issue. I think we should try to get rid of 2) completely and substitute it by definitions like
Otherwise I it is easy to introduce performance bugs by overloading * and thereby accidentally preventing calls to some fast A_mul_B! for methods.
I think 2) is code duplication and should be omitted. What do you think? Is this reasonable and possible? A related question: Is there a way to test that a call of some method (like *) results in a call of some other method (like A_mul_B!) ? |
I'm not sure we need to convert anything to JuliaLang/julia#15459 sketches one potential way out of this problem. It is a work-in-progress, and the API will likely change. (Any good ideas are of course welcome!) But the idea might be that we could dispatch to a single method when either |
I think @jw3126 was referring to https://github.com/JuliaLang/julia/blob/master/base/linalg/bidiag.jl#L228 |
a tip @pkofod - when linking to lines of code, hit |
Will do! Neat trick, thanks. |
Before I realized you were working on this, I poked around, that why I figured that was the line. I think you should just remove |
@jw3126, sorry, I was not very clear. I think having
and never have to convert anything to Right now, whether to convert to |
Fixed by JuliaLang/julia#15505 |
To replicate:
Seems to me some fallback is missing. I'm on v0.4-rc2, haven't tried on master.
The text was updated successfully, but these errors were encountered: