[mlir][sparse] add more zero-preserving unary ops to sparse compiler
authorAart Bik <ajcbik@google.com>
Thu, 5 May 2022 21:02:03 +0000 (14:02 -0700)
committerAart Bik <ajcbik@google.com>
Thu, 5 May 2022 22:35:19 +0000 (15:35 -0700)
commit952fa3018e7391b5ddc2f54ba5bd048f0d5a47f1
tree08702fd4dc484b10ae0dbfafe7f5d2a636fe6152
parentebe24a2a3116a5668c3fff27524d485e6956072e
[mlir][sparse] add more zero-preserving unary ops to sparse compiler

Although we now have semi-rings to deal with arbitrary ops,
it is still good to convey zero-preserving semantics of
ops to the sparse compiler.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D125043
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
mlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir