[all-commits] [llvm/llvm-project] c82803: [mlir][linalg] Refactor convolution to img2col con...

Quinn Dawkins via All-commits all-commits at lists.llvm.org
Thu Mar 23 16:40:52 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c82803097f6a89edc49577e5bb4f7309e053efcc
  Author: Quinn Dawkins <quinn at nod-labs.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
    M mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir

  Log Message:
  [mlir][linalg] Refactor convolution to img2col conversion to use gather semantics

Following up on the comments in https://reviews.llvm.org/D144108 this
patch refactors the im2col conversion patterns for `linalg.conv_2d_nhwc_hwcf`
and `linalg.conv_2d_nchw_fchw` convolutions to use gather semantics for the im2col
packing `linalg.generic`.

Follow up work can include a similar pattern for depthwise convolutions
and a generalization of the patterns here to work with any `LinalgOp` as

Differential Revision: https://reviews.llvm.org/D144678

More information about the All-commits mailing list