The $k^2$-tree is a compact representation of Boolean matrices: it stores no values and no coordinates, and serves rows and columns alike. On a GPU, however, finding the children of a node takes rank queries that depend on one another, so a node-by-node descent spends its time waiting on memory. We present a GPU engine for sparse matrix-vector multiplication (SpMV) on $k^2$-trees. Since the positions of the children are the same for every vector, the engine visits the tree one level at a time and takes them from a prefix sum or from a directory sampled every 256 nodes, and working in tiles fixes the device memory of a product before it starts. One traversal yields products on either side, for one vector or a batch, over the plus-times, Boolean and tropical semirings. On fourteen graphs, the $k^2$-tree takes 2.3 to 27 times less space than the CSR of cuSPARSE and, in geometric mean, beats it on left products on an H100 and an NVIDIA GB10, and on right products on the GB10; the H100 also lets it multiply a crawl of the web with 92 billion links that does not fit in device memory.
翻译:暂无翻译