-
Notifications
You must be signed in to change notification settings - Fork 225
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
1.10 enablement #1946
1.10 enablement #1946
Conversation
lib/cublas/linalg.jl
Outdated
LinearAlgebra.generic_mattrimul!(C::DenseCuMatrix{T}, uploc, isunitc, tfun::Function, A::DenseCuMatrix{T}, B::DenseCuMatrix{T}) where {T<:CublasFloat} = | ||
trmm!('R', uploc, tfun === identity ? 'N' : tfun === transpose ? 'T' : 'C', isunitc, one(T), B, A, C) | ||
# tri-tri-mul! | ||
function LinearAlgebra.generic_trimatmul!(C::DenseCuMatrix{T}, uplocA, isunitcA, tfunA::Function, A::DenseCuMatrix{T}, B::LinearAlgebra.UpperOrLowerTriangular{T,<:DenseCuMatrix}) where {T<:CublasFloat} |
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.
This function is meant to handle the upper-lower triangular (and vice versa) products. It may be a bit more general in that not both factors need to be non-"unitary", but only one of the factors (the one that is tri[u/l]
ed). We need to think about what should happen if none of the conditions is met, i.e., either throw or fall back to some generic matmatmul or so.
I take it we better wait until JuliaLang/julia#50058 is merged so that we can put an accurate version bound in here? |
Yes. The extended functions currently don't exist. Unfortunately, that PR requires some back-and-forth with SparseArrays.jl, and requires bumping the stdlib. But I marked it as a milestone, so it must be in v1.10 eventually. I'd love to see profiling results compared to some prior reasonable state, like v1.9 and CUDA.jl without my previous PR, or something like that. 😉 |
Let's see if it also works on nightly now that the Base PR is merged. If so, then this should perhaps get another quick look, but otherwise should be ready to go. For reference, the Base commit is already included in the next backport round: JuliaLang/julia#50508. |
Hm, nightly checks have been removed? |
It was hanging. I'll try to add it back in another PR. |
FYI, CUDA.jl tests failed on 1.10 without this PR, so I guess that means the change was slightly breaking? |
That Base PR is not included in v1.10.0-alpha1. It is going to be included in v1.10.0-alpha2. However, this PR here redirects the triangular methods starting from v1.10-, like, a bit "too early". You can wait until alpha2 is released, then run the whole stack, and if it passes, you can merge and release. An indicator for whether it (should) work(s) is current nightly, because that has the commit included. If that one fails, then we know what needs to be fixed in any case. |
I know; I was testing alpha2 against CUDA.jl#master. Some of the overloads here weren't sticking anymore:
Now, that isn't too bad for CUDA.jl, we generally don't promise forwards compatibility (because of our tight integration with the Julia compiler). I just wanted to mention it for your information. |
That means there is something wrong with this PR then. |
Wait, I guess I'm mixing up branches and versions. Let me think about it. |
Sorry, I'm not being clear. I wasn't using this PR. I was using 1.10-alpha2 with CUDA.jl#master. Theoretically, that shouldn't have broken anything, but AFAICT it did seem to break CUDA.jl. This PR will fix that, so users won't notice a thing. |
Got it. Yeah, the "breakage" is because in triangular ^1 For 3-arg |
Ok, this PR is not completely correct. I'll fix it soon. |
Hm, is CI down, or did I crash it? |
Buildkite is down (like, all of Buildkite). |
Thanks for the help, @dkarrasch! |
Use unwrapping mechanism for triangular matrices. Co-authored-by: Tim Besard <tim.besard@gmail.com>
This is to make use of JuliaLang/julia#50058. While that PR has not been merged, I'm putting this up to see whether this is working properly on older julia versions. Once that PR is merged, CI should obviously also pass on nightly. The amount of code that can eventually be deleted is HUGE, with no loss of functionality!