andres-fr / skerch

Sketched matrix decompositions for PyTorch
MIT License
64 stars 2 forks source link

out-of-core QR #3

Open andres-fr opened 3 months ago

andres-fr commented 3 months ago

Right now skerch uses either torch.linalg.qr or scipy.linalg.qr to obtain the outer matrices for SVD/SEIGH. These are in-core algorithms, and memory required to store outer matrices is the main bottleneck for said decompositions, and it can become the limiting factor when working on low-RAM systems.

Implementing an out-of-core QR, working on HDF5 arrays, would help with the lib versatility. Furthermore, early termination by inspection of R (instead of throwing it away), would help reducing

Further notes from Halko et al 2011: https://arxiv.org/pdf/0909.4061