With this version you’ll be able to build Fausts of BSR matrices using pyfaust. This matrix format accelerates the Faust-matrix product for many Fausts that are structured in nonzero blocks. The figure below is an illustration of this acceleration for a Faust of size 1024×1024, composed of 10 factors of the same size, each of them containing 20 128×128-blocks of nonzeros. The benchmark compares the product times when the Faust is encoded as a BSR Faust, a CSR Faust (hence without explicit blocks) or into a BSR scipy Faust (that is a Python list of scipy.sparse.bsr_matrix). This benchmark shows a significant speedup of the BSR Faust relatively to the CSR Faust. Besides it demonstrates that the FAµST implementation can sometimes do much better than a scipy BSR matrix list used as a Faust.
Another interesting point is that the memory space needed to store a BSR Faust is smaller than the one needed for a CSR Faust. In the case tested here it took only 25 Mb to load the Faust in memory while the CSR Faust needed 37.54 Mb (see the Faust.nbytes function).
The benchmark script is available here and the corresponding plot script here.
Note: this new matrix format is still in beta status.
Update 1 (12/06 2021): matfaust supports BSR matrices since FAµST 3.18.0.
Update 2 (12/08 2021): since FAµST 3.19.0 it’s possible to save/restore a Faust composed of BSR matrices.
Update 3 (01/04 2022): FAµST 3.22.0 provides matfaust.rand_bsr and pyfaust.rand_bsr functions designed to easily generate random BSR Fausts.