Skip to content

Commit c6fb31c

Browse files
author
Katharine Hyatt
committed
Fix trunc arg whoops
1 parent ff710ff commit c6fb31c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/implementations/svd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ function svd_trunc_no_error!(A::AbstractMatrix, USVᴴ, alg::TruncatedAlgorithm{
399399

400400
do_gauge_fix = get(alg.alg.kwargs, :fixgauge, default_fixgauge())::Bool
401401
# the output matrices here are the same size as for svd_full!
402-
do_gauge_fix && gaugefix!(svd_full!, Utr, Vᴴtr)
402+
do_gauge_fix && gaugefix!(svd_trunc!, Utr, Vᴴtr)
403403

404404
return Utr, Str, Vᴴtr
405405
end

test/svd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for T in (BLASFloats..., GenericFloats...), m in (0, 54), n in (0, 37, m, 63)
2727
TestSuite.test_svd_algs(CuMatrix{T}, (m, n), CUDA_SVD_ALGS)
2828
k = 5
2929
p = min(m, n) - k - 2
30-
min(m, n) > k + 2 && TestSuite.test_randomized_svd(CuMatrix{T}, (m, n), (CUSOLVER_Randomized(; k, p, niters = 20),))
30+
min(m, n) > k + 2 && TestSuite.test_randomized_svd(CuMatrix{T}, (m, n), (TruncatedAlgorithm(CUSOLVER_Randomized(; k, p, niters = 20), truncrank(k)),))
3131
if n == m
3232
TestSuite.test_svd(Diagonal{T, CuVector{T}}, m)
3333
TestSuite.test_svd_algs(Diagonal{T, CuVector{T}}, m, (DiagonalAlgorithm(),))

0 commit comments

Comments
 (0)