Skip to content

Work around the fact that rocSOLVER gesvdx returns no singular values for min(m, n) == 1 - #284

Draft
kshyatt wants to merge 1 commit into
mainfrom
ksh/gesvdx-rank1-guard
Draft

kshyatt wants to merge 1 commit into
mainfrom
ksh/gesvdx-rank1-guard

Conversation

@kshyatt

@kshyatt kshyatt commented Sep 29, 2026

Copy link
Copy Markdown
Member

Here I'm switching the default ROCm solver algo to Bisection to avoid ROCm/rocm-libraries#12188 while that is being fixed. But this revealed a new bug (😱) -- if you have a matrix that's (m, 1) or (1, n), the Bisection algorithm returns no singular values. This differs from LAPACK which is really great. I added a """workaround""" to use Jacobi in that case, and added a special path and tests for it. This is all downstream of weird and annoying AMD behavior.

@kshyatt
kshyatt requested review from Jutho and lkdvos September 29, 2026 12:38
@kshyatt
kshyatt added this pull request to stack #285 September 29, 2026 12:38
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.43066% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MatrixAlgebraKitAMDGPUExt/yarocsolver.jl 91.51% 32 Missing ⚠️
...ixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl 82.81% 11 Missing ⚠️
src/batches.jl 94.23% 3 Missing ⚠️
...MatrixAlgebraKitCUDAExt/MatrixAlgebraKitCUDAExt.jl 60.00% 2 Missing ⚠️
src/interface/batched_svd.jl 0.00% 2 Missing ⚠️
src/pullbacks/svd.jl 66.66% 2 Missing ⚠️
ext/MatrixAlgebraKitCUDAExt/yacusolver.jl 97.43% 1 Missing ⚠️
src/implementations/batched_svd.jl 99.62% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/MatrixAlgebraKit.jl 100.00% <ø> (ø)
src/common/gauge.jl 100.00% <100.00%> (ø)
src/implementations/svd.jl 95.74% <100.00%> (-0.02%) ⬇️
ext/MatrixAlgebraKitCUDAExt/yacusolver.jl 96.38% <97.43%> (+0.15%) ⬆️
src/implementations/batched_svd.jl 99.62% <99.62%> (ø)
...MatrixAlgebraKitCUDAExt/MatrixAlgebraKitCUDAExt.jl 79.10% <60.00%> (-1.85%) ⬇️
src/interface/batched_svd.jl 0.00% <0.00%> (ø)
src/pullbacks/svd.jl 93.46% <66.66%> (+0.09%) ⬆️
src/batches.jl 94.23% <94.23%> (ø)
...ixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl 73.10% <82.81%> (+7.53%) ⬆️
... and 1 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread ext/MatrixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl Outdated
@kshyatt
kshyatt force-pushed the ksh/gesvdx-rank1-guard branch 3 times, most recently from c14e98a to 5d7bf12 Compare October 1, 2026 16:02
@kshyatt
kshyatt removed this pull request from stack #285 October 1, 2026 21:10
Base automatically changed from ksh/batched_svd to main October 2, 2026 05:36
@kshyatt
kshyatt force-pushed the ksh/gesvdx-rank1-guard branch from 5d7bf12 to c97dfa4 Compare October 2, 2026 05:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants