Computes a truncated SVD via randomized projection entirely on the GPU.
All QR, matmul, and SVD steps stay on device; a single mlx_eval
materializes the results. Falls back to irlba::svdr on CPU if no
GPU backend with rsvd support is active.
Arguments
- x
An
adgeMatrixor plain numeric matrix.- k
Number of singular values/vectors to compute.
- n_oversamples
Extra columns for the random projection (default 10). Increasing this improves accuracy at modest cost.
- n_iter
Number of power-iteration passes (default 2). More passes give better accuracy for matrices with slowly decaying spectra.
- ...
Ignored (for forward compatibility).
References
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.