Repository navigation
Conversation
Unlike gemm, the oneMKL trmm/trsm variants don't document that C is left unread when beta is zero, and trsm does read it: NaN garbage in an uninitialized output leaks into the solution. That broke `ldiv!(C, A, B)` into a fresh array, and the reversed-view tests on the ALCF pipeline, where `similar` happened to hand back memory holding NaNs. Fill C with zeros before calling the variant with beta = 0, for trsm and, since the contract is the same, trmm.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
onemklfailure on the ALCF pipeline seen on #760 (ldiv!into a reversed view,test/onemkl.jl:1154), which is a real bug rather than a flaky tolerance.Unlike gemm, the oneMKL trmm/trsm "variant" routines (
C = alpha * op(A) \ B + beta * C, added in #643) don't document thatCis left unread whenbeta == 0, and trsm does read it: NaN garbage in an uninitialized output leaks into the solution. Reproduced on an Arc A770 with a NaN-filledC:trsm!withbeta = 0returns all NaNs,trmm!happens to be fine. That breaks anyldiv!(C, UpperTriangular(A), B)into a fresh array, and the reversed-view path (blas_outputsolves intosimilar(C)), which is what the ALCF run hit whensimilarhanded back memory holding NaNs.The wrappers now
fill!Cwith zeros before calling the variant withbeta = 0, for trsm and, since the contract is the same, trmm. Regression tests cover the wrappers (NaN-filledC, all element types) and themul!/ldiv!dispatch; without the fix they fail for trsm on the A770, with it theonemkltest suite passes.