From 56ab330358fdee283735358265a4d80415717660 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Sun, 21 Sep 2025 17:31:01 +0200 Subject: [PATCH 1/2] fix CUSOLVER_Randomized docstring --- src/interface/decompositions.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/interface/decompositions.jl b/src/interface/decompositions.jl index 62a064017..8a6583eba 100644 --- a/src/interface/decompositions.jl +++ b/src/interface/decompositions.jl @@ -163,15 +163,17 @@ a general matrix using the Jacobi algorithm. @algdef CUSOLVER_Jacobi """ - CUSOLVER_Randomized(; p, niters) + CUSOLVER_Randomized(; k, p, niters) Algorithm type to denote the CUSOLVER driver for computing the singular value decomposition of -a general matrix using the randomized SVD algorithm. - -!!! note - Randomized SVD cannot compute all singular values of the input matrix `A`, only the first `k` where - `k < min(m, n)`. The remainder are used for oversampling. See the [CUSOLVER documentation](https://docs.nvidia.com/cuda/cusolver/index.html#cusolverdnxgesvdr) - for more information. +a general matrix using the randomized SVD algorithm. Here, `k` denotes the number of singular +values that should be computed, therefore requiring `k <= min(size(A))`. This method is accurate +for small values of `k` compared to the size of the input matrix, where the accuracy can be +improved by increasing `p`, the number of additional values used for oversampling, +and `niters`, the number of iterations the solver uses, at the cost of increasing the runtime. + +See also the [CUSOLVER documentation](https://docs.nvidia.com/cuda/cusolver/index.html#cusolverdnxgesvdr) +for more information. """ @algdef CUSOLVER_Randomized From 4fe0a8a9100e536c50c4417f634c538f7ade2826 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Sun, 21 Sep 2025 17:32:57 +0200 Subject: [PATCH 2/2] recycle memory --- test/gen_eig.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/gen_eig.jl b/test/gen_eig.jl index c46dfcf2a..dac7469e5 100644 --- a/test/gen_eig.jl +++ b/test/gen_eig.jl @@ -29,8 +29,6 @@ using LinearAlgebra: Diagonal @test V2 === V @test A * V ≈ B * V * Diagonal(W) - Ac = similar(A) - Bc = similar(B) W2, V2 = @constinferred gen_eig_full!(copy!(Ac, A), copy!(Bc, B), (W, V)) @test W2 === W @test V2 === V