This is an archive of the discontinued LLVM Phabricator instance.

[mlir][memref] Lower copy of memrefs with outer size-1 dims to intrinsic memcpy.
ClosedPublic

Authored by olegshyshkov on May 12 2023, 7:21 AM.

Details

Summary

With this change, more memref.copy will be lowered to the efficient memcpy. For example,

memref.copy %subview, %alloc : memref<1x576xf32, strided<[704, 1]>> to memref<1x576xf32>

Diff Detail

Event Timeline

olegshyshkov created this revision.May 12 2023, 7:21 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
olegshyshkov requested review of this revision.May 12 2023, 7:21 AM
bkramer accepted this revision.May 12 2023, 7:26 AM
bkramer added inline comments.
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
1067

dimensions

This revision is now accepted and ready to land.May 12 2023, 7:26 AM
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
1067

While you are at it, please make this a reusable util on the memref type.

1067

s/make this a/extract this as a

olegshyshkov marked 3 inline comments as done.May 12 2023, 8:16 AM
olegshyshkov added inline comments.
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
1067

Yes, I already planned to do that in a follow-up. I didn't want to move code and do functional changes in the same commit.

This revision was landed with ongoing or failed builds.May 12 2023, 8:18 AM
This revision was automatically updated to reflect the committed changes.