MEMORY ALLOCATION METHOD FOR SPARSE MATRIX MULTIPLICATION APPLICATIONS
摘要:
This application describes accelerator, computer system, and method for memory allocation in sparse matrix-matrix multiplications (spGEMM). An example method may include: computing a number of floating point multiplication operations (FLOP) to be performed to generate each row in the output matrix; determining an estimated compression ratio based on a plurality of first rows sampled from the first sparse matrix and a plurality of corresponding second rows from the second sparse matrix; determining an estimated number of non-zero data (NNZ) in each row of the to-be-generated output matrix; constructing a plurality of hash tables for the rows in the to-be-generated output matrix based on the estimated NNZ corresponding to each row; performing symbolic computations between the first and second sparse matrices by using the hash tables to determine actual NNZs in the to-be-generated output matrix; and allocating a memory space for the output matrix based on the actual NNZs.
信息查询
0/0