Repository navigation
Preserve small pivots and allowsingular in distributed LU - #853
Merged
Merged
Conversation
The non-LAPACK pivot search rejected a nonzero maximum at or below machine epsilon. Scaling an invertible matrix down therefore made the fallback report singularity while the native CPU panel path accepted it. Use an exact zero check and preserve the existing first-global-zero index. Integrate the numerical repair from PRs #631 and #634 into current master without restoring their historical per-row LU implementation. Direct fallback controls cover four BLAS types, diagonal and off-diagonal tiny pivots, true zeros, later panels, and an already-recorded singular index. The exact-master control failed 16 tiny-pivot assertions; the candidate passes all 32 tiny-pivot and 20 zero-index assertions on Julia 1.10.11 and 1.13.4. GPU execution itself was not tested. After ten 1000-call warmups and five GC-separated 1000-call samples on Julia 1.13.4, all allocation vectors match exact master for all four BLAS types. Minima are 123808 bytes / 5041 allocations for Float32/ComplexF32 and 155808 bytes / 5041 allocations for Float64/ComplexF64, unchanged. These direct-helper counts do not claim whole-LU performance. Written by an AI agent on jpsamaroo's review feedback.
The older-runtime success-check branch avoided the unavailable stdlib helper but always raised SingularException for a positive pivot index, even when the distributed LU caller requested allowsingular=true. Guard the positive-error check with that flag, retaining metadata and the modern-runtime check. The default still rejects singular matrices. Carry the compatibility repair from PRs #631 and #634 into the current LAPACK-panel implementation. On exact master, native Julia 1.10.11 raised on all four BLAS-type allowsingular cases; the candidate passes all 12 singularity controls, including default rejection and info=2 with check=false or allowsingular=true. Julia 1.13.4 passes the same controls. Both runtimes pass all 188 focused integration assertions, including rectangular factor storage and distributed solve/inverse equivalents. Julia 1.9 was not available; it shares the tested older-runtime branch. Written by an AI agent on jpsamaroo's review feedback.
Review finding: Custom Commands installs Julia 1.9 despite Project.toml requiring Julia 1.10. On ubuntu-latest, Julia 1.9.4 now fails its startup check because libopenlibm requests an executable stack, before Dagger loads. This affects otherwise unrelated pull requests. Select the supported 1.10 release line, already exercised by the main CPU matrix. The workflow's commands and permissions stay unchanged. Validation: git diff --check; compared with Project.toml's Julia bound and the passing Julia 1.10 jobs on master 46f6315. Hosted verification follows on the new PR; no application tests were changed. Written by an AI agent on jpsamaroo's review feedback.
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.
The non-LAPACK LU fallback currently treats nonzero pivots at or below machine epsilon as singular. On Julia 1.9/1.10, the distributed RowMaximum success check also rejects singular factors even when the caller requests
allowsingular=true. This change checks for an exact zero pivot and honors that keyword in the older-runtime branch.These are the remaining numerical and compatibility repairs from #631 and #634. Current master already provides RowMaximum LU, rectangular-block copy-back, distributed solves and inverse, and the ChunkView behavior exercised by those historical proposals. The current LAPACK panel implementation, GPU fallback structure, first-global-zero metadata, and original public feature behavior are retained.
Validation: exact master failed 16 tiny-pivot assertions on Julia 1.13.4 and, on Julia 1.10.11, also raised in four
allowsingular=truepublic calls. The candidate passes all 188 focused assertions on each runtime, covering all four BLAS types, off-diagonal and later-panel pivot searches, true zeros, rectangular factor storage, and distributed solve/inverse controls. The complete committed LU test file also passes 200/200 assertions on each runtime. After ten 1000-call warmups and five GC-separated 1000-call samples, all direct fallback-search allocation vectors match master for the four supported BLAS types; this is not a whole-LU performance claim.Julia 1.9 and GPU/MPI execution were not run. The fallback search was exercised directly with host arrays so that the CPU panel fast path could not hide the numerical defect.
Written by an AI agent on jpsamaroo's review feedback.