This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse][taco] Handle tensor copy and trivial reduction expression.
ClosedPublic

Authored by bixia on Feb 15 2022, 10:28 AM.

Details

Summary

Handle tensor copy, such as A[i, j] = B[i, j]. Also, handle trivial
reduction expression, such as A[i] = B[i, j].

Add unit tests.

Diff Detail

Event Timeline

bixia created this revision.Feb 15 2022, 10:28 AM
bixia requested review of this revision.Feb 15 2022, 10:28 AM
aartbik added inline comments.Feb 15 2022, 11:56 AM
mlir/test/Integration/Dialect/SparseTensor/taco/unit_test_tensor_core.py
54

Here and below. It seems a bit odd to test indices with an "all close" since surely they are not subject to rounding errors. Can we make the test on indices just exact?

bixia updated this revision to Diff 409041.Feb 15 2022, 1:35 PM

Replace np.allClose with np.array_equal to compare indices.

bixia marked an inline comment as done.Feb 15 2022, 1:36 PM
aartbik accepted this revision.Feb 15 2022, 2:14 PM
This revision is now accepted and ready to land.Feb 15 2022, 2:14 PM