Avoid unnecessary output buffer allocation and initialization.
authorBixia Zheng <bixia@google.com>
Tue, 7 Dec 2021 23:15:42 +0000 (15:15 -0800)
committerBixia Zheng <bixia@google.com>
Thu, 9 Dec 2021 16:29:02 +0000 (08:29 -0800)
commit64e171c2d0c34536502b7707184600ff68eff3d4
treea8d0f894bf6e70758a4706c5a27f835e3c3b379a
parentd4865393b5daf42294f14980955640b794d91696
Avoid unnecessary output buffer allocation and initialization.

The sparse tensor code generator allocates memory for the output tensor. As
such, we only need to allocate a MemRefDescriptor to receive the output tensor
and do not need to allocate and initialize the storage for the tensor.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D115292
mlir/test/Integration/Dialect/SparseTensor/python/test_SpMM.py