[PATCH] D144108: [mlir][LinAlg][Transform] Add a transform op for conv2d to im2col
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 08:13:39 PST 2023
qcolombet created this revision.
qcolombet added reviewers: ftynse, nicolasvasilache, antiagainst, mravishankar, qedawkins, raikonenfnu, rsuderman.
qcolombet added a project: MLIR.
Herald added subscribers: hanchung, Moerafaat, bzcheeseman, sdasgup3, wenzhicui, wrengr, jsetoain, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, shauheen, rriddle, mehdi_amini, thopre.
Herald added a reviewer: hanchung.
Herald added a project: All.
qcolombet requested review of this revision.
Herald added subscribers: limo1996, stephenneuendorffer.
This patch adds patterns to convert `linalg.conv_2d_xxx` operations
into `linalg.generic` (for img2col packing) and `linalg.matmul`.
The meat of the patch comes straight from IREE
(https://github.com/iree-org/iree).
(To the original authors are you okay with that?)
What this patch adds is proper plumbing of the im2col patterns into the
transform dialect.
The current plumbing is straight forward: we wrap around the greedy
pattern matcher.
Longer term, we may want to be more targeted and take as input a
`linalg.conv_2d` and apply the pattern only to that.
PS: Feel free to add more reviewers. I wanted to cover the original contributors of im2col in IREE but I'm not sure I got all of them.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144108
Files:
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144108.497683.patch
Type: text/x-patch
Size: 28159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230215/0ce787e2/attachment-0001.bin>
More information about the llvm-commits
mailing list