[mlir][sparse] fixed bug with unary op, dense output
authorAart Bik <ajcbik@google.com>
Fri, 2 Jun 2023 23:41:49 +0000 (16:41 -0700)
committerAart Bik <ajcbik@google.com>
Sat, 3 Jun 2023 01:15:33 +0000 (18:15 -0700)
commit6a38c772d4f6d59b61f775bc1d8ffbd055d7c6d3
treeb92dc990976bbe9207edef6d4dce807ff80a8398
parent0a168131b4f420d9f561926c643c143c84c97535
[mlir][sparse] fixed bug with unary op, dense output

Note that by sparse compiler convention, dense output
is zerod out when not set, so complement results in
zeros where elements were present.

Reviewed By: wrengr

Differential Revision: https://reviews.llvm.org/D152046
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir