[mlir][sparse][gpu] refine SDDMM pattern for cuSPARSE
authorAart Bik <ajcbik@google.com>
Thu, 22 Jun 2023 01:04:05 +0000 (18:04 -0700)
committerAart Bik <ajcbik@google.com>
Thu, 22 Jun 2023 01:31:55 +0000 (18:31 -0700)
commitf14c8eb595d0ba84dde09a0d5860f117c11e9ca1
tree9f7e7474a45396528ebe9a462eeff6fd583e27c2
parent92ee60b66f581fdd919315da5c6ae631e581b021
[mlir][sparse][gpu] refine SDDMM pattern for cuSPARSE

Old pattern was missing some cases (e.g. swapping the arguments)
but it also allowed too many cases (e.g. non-empty "absent" or
different arguments for add/mul). This fixes the issues.

Reviewed By: K-Wu

Differential Revision: https://reviews.llvm.org/D153487
mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
mlir/test/Dialect/SparseTensor/GPU/gpu_sampled_matmul_lib.mlir