Skip to content

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Dec 12, 2025

Now we have a svd_trunc_with_err that returns epsilon for those who wish, and svd_trunc returns only the truncated USVh

@kshyatt kshyatt requested a review from lkdvos December 12, 2025 17:33
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

Your PR no longer requires formatting changes. Thank you for your contribution!

Now we have a `svd_trunc_with_err` that returns epsilon for those
who wish, and `svd_trunc` returns only the truncated USVh
@kshyatt kshyatt marked this pull request as ready for review December 12, 2025 18:34
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 97.14286% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MatrixAlgebraKitChainRulesCoreExt.jl 85.71% 2 Missing ⚠️
Files with missing lines Coverage Δ
...gebraKitMooncakeExt/MatrixAlgebraKitMooncakeExt.jl 99.06% <100.00%> (+0.09%) ⬆️
src/MatrixAlgebraKit.jl 100.00% <ø> (ø)
src/implementations/svd.jl 92.66% <100.00%> (+0.12%) ⬆️
src/interface/svd.jl 80.00% <100.00%> (ø)
ext/MatrixAlgebraKitChainRulesCoreExt.jl 81.81% <85.71%> (+0.38%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

alg_svd = select_algorithm(svd_compact!, A, alg; kwargs...)
return TruncatedAlgorithm(alg_svd, select_truncation(trunc))
for f in (:svd_trunc!, :svd_trunc_no_error!)
@eval function select_algorithm(::typeof($f), A, alg; trunc = nothing, kwargs...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the Union{typeof(svd_trunc!), typeof(svd_trunc_no_error!)} again, or is there an advantage to this approach?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I did it this way mostly to follow the convention above, not sure it matters much?

@Jutho
Copy link
Member

Jutho commented Dec 15, 2025

Looks good to me!

@Jutho Jutho enabled auto-merge (squash) December 15, 2025 22:43
@Jutho Jutho merged commit c591e2e into main Dec 15, 2025
10 checks passed
@Jutho Jutho deleted the ksh/with_err branch December 15, 2025 22:56
@lkdvos lkdvos mentioned this pull request Dec 28, 2025
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.

3 participants