Skip to content

skailasa/pyrsvd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyRSVD - Accelerated Randomised SVD in Python

Perform fast rSVD accelerated using the CUDA, all in Python.

Install

Install from source into a Conda/Miniconda environment.

git clone [email protected]:skailasa/pyrsvd.git
cd pyrsvd

conda build conda.recipe
conda install --use-local pyrsvd

Usage

import numpy as np

import pyrsvd

# Instantiate a 'tall' and 'thin' matrix to compress
M = 123
N = 45
A = np.random.rand(M, N)

# Choose a target rank
K = 5

u, s, vt = pyrsvd.svd(A, K)

Benchmark

Benchmarked for 'thin' and 'tall' matrices, versus NumPy implementation on a 8th generation Intel i7 CPU and an NVidia Quadro RTX 3000 Mobile GPU, including data transfer times, with a target compression rank of K=1.

1) Dense Matrix

Dense Benchmark

References

[1] Halko, N., Martinsson, P. G., & Tropp, J. A. (2011). Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2), 217-288.

Releases

No releases published

Packages

No packages published

Languages