This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Padding transformation: Write back result to original destination
ClosedPublic

Authored by springerm on Jun 22 2023, 7:50 AM.

Details

Summary

Copy back the padded result to the original destination of the computation. This is important for bufferization, to ensure that the result of the computation does not suddenly materialize in a different buffer due to padding.

A bufferization.copy_tensor is inserted for every (unpadded) result. Such ops bufferize to memcpys, but they fold away, should the padding fold away.

Depends On: D153552

Diff Detail

Event Timeline

springerm created this revision.Jun 22 2023, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 7:50 AM
springerm requested review of this revision.Jun 22 2023, 7:50 AM
springerm retitled this revision from [mlir][linalg] Padding transformation: Write back result to original destination to [mlir][linalg][WIP] Padding transformation: Write back result to original destination.Jun 22 2023, 7:52 AM
springerm retitled this revision from [mlir][linalg][WIP] Padding transformation: Write back result to original destination to [mlir][linalg] Padding transformation: Write back result to original destination.Jun 27 2023, 5:16 AM
nicolasvasilache accepted this revision.Jun 27 2023, 5:43 AM
This revision is now accepted and ready to land.Jun 27 2023, 5:43 AM