An open API service indexing awesome lists of open source software.

https://github.com/skailasa/pyrsvd

Accelerated Randomised SVD in Python
https://github.com/skailasa/pyrsvd

cuda numba python3 randomised-algorithms svd

Last synced: 5 months ago
JSON representation

Accelerated Randomised SVD in Python

Awesome Lists containing this project

README

          

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.

```bash
git clone git@github.com:skailasa/pyrsvd.git
cd pyrsvd

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

## Usage

```python
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.