SpRegTiling / sparse-register-tiling

9 stars 2 forks source link

Run SpMM with dense matrix having more than 512 columns? #3

Open reikdas opened 9 months ago

reikdas commented 9 months ago

I can see that the column values are hardcoded here - https://github.com/SpRegTiling/sparse-register-tiling/blob/main/tools/empirical_heuristic_single_threaded.json

When I run python3 run_matrix.py -m some_sparse_matrix.mtx -t 1 -b 1024 -o foo.csv, I get a KeyError.

Am I correct in assuming that bcols is the number of columns in the dense matrix? Is there some easy way I could extend this to operate over a different number of columns of the dense matrix?

cheshmi commented 9 months ago

Yes, bcols is the number of columns in the dense matrix.

I believe you should be able to run bcols of power of two such 1024. However, you need to add the config to the Jason file. @LucasWilkinson might be able to add more details here.

LucasWilkinson commented 8 months ago

Hi @reikdas apologies for the delay and the messy code (something Im hoping to address when I have free time),

the method supports all column sizes but our heuristic for picking Ti used by the run_matrix.py script unfortunately does not, I updated run_matrix.py to just pick the closest b-cols from the heuristic that is less then the target b-cols here:

https://github.com/SpRegTiling/sparse-register-tiling/commit/35967712268f53064f027a565df570707270a599

Please let me know if this does not work for you :+1: