Enforce the assumption made on tensor buffers explicitly. When in-place,
reuse the buffer, but fill with all zeroes for the non-update case, since
the kernel assumes all elements are written to. When not in-place, zero
out the new buffer when materializing or when no-updates occur. Copy the
original tensor value when updates occur. This prepares migrating to the
new bufferization strategy, where these assumptions must be made explicit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Dialect/SparseTensor/dense.mlir | ||
---|---|---|
44–46 | Looks like many test case are a bit more efficient now: A fill instead of a copy. |
mlir/test/Dialect/SparseTensor/dense.mlir | ||
---|---|---|
44–46 | Yeah, I made two improvements: most tests turned out to be (2) only, and that is a good change. |
Looks like many test case are a bit more efficient now: A fill instead of a copy.