This is an archive of the discontinued LLVM Phabricator instance.

Add sparse matrix multiplication integration test
ClosedPublic

Authored by gussmith23 on Jun 15 2021, 4:25 PM.

Details

Summary

Adds an integration test for the SPMM (sparse matrix multiplication) kernel, which multiplies a sparse matrix by a dense matrix, resulting in a dense matrix. This is just a simple modification on the existing matrix-vector multiplication kernel.

Diff Detail

Event Timeline

gussmith23 created this revision.Jun 15 2021, 4:25 PM
gussmith23 requested review of this revision.Jun 15 2021, 4:25 PM

typo in title: multilication

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_spmm.mlir
18–19

Note that my sparse_matvec example as very specifically picked to work on i32 data with i8 pointers and indices. This is not typical, however. Perhaps you want to simply make this f32 or f64 data and i32 or index pointers and indices?

29

x_ij += a_ik * b_kj is a bit more common

it does not matter of course, just curious if you picked this on purpose so that the reduction is in the middle?

42

see above, f32 or f64 is a bit more common for our numerical data

gussmith23 marked 3 inline comments as done.

Address Aart's comments: change pointer widths, datatype, index names

gussmith23 retitled this revision from Add sparse matrix multilication integration test to Add sparse matrix multiplication integration test.Jun 16 2021, 11:31 AM
gussmith23 added inline comments.
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_spmm.mlir
29

I didn't, I just wasn't aware of the convention! I changed it.

aartbik accepted this revision.Jun 16 2021, 12:25 PM

Ship it, Gus!

Do you have submit permissions already, if not let me know, and I will take care of this one.

This revision is now accepted and ready to land.Jun 16 2021, 12:25 PM
This revision was landed with ongoing or failed builds.Jun 16 2021, 1:20 PM
This revision was automatically updated to reflect the committed changes.