[mlir][sparse] support for negation and subtractions
authorAart Bik <ajcbik@google.com>
Fri, 2 Jul 2021 19:26:18 +0000 (12:26 -0700)
committerAart Bik <ajcbik@google.com>
Fri, 2 Jul 2021 22:55:05 +0000 (15:55 -0700)
commitb8a021dbe322c4fae196318df7c0ebb2dd0f4a31
tree1d7af2aa724530e8991dcdf5fe7673f240c64f00
parent24f4c3ebef63c7d2553132d7d9d75ea19338bcb7
[mlir][sparse] support for negation and subtractions

This revision extends the sparse compiler support from fp/int addition and multiplication to fp/int negation and subtraction, thereby increasing the scope of sparse kernels that can be compiled.

Reviewed By: gussmith23

Differential Revision: https://reviews.llvm.org/D105306
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir [new file with mode: 0644]
mlir/test/Dialect/SparseTensor/sparse_int_ops.mlir [new file with mode: 0644]