[all-commits] [llvm/llvm-project] 92e751: [mlir][linalg] Add NHWC + FHWC Img2Col (#68708)

Jack Frankland via All-commits all-commits at lists.llvm.org
Fri Oct 13 02:20:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92e751d426dbc17607bc8f552325fc659f4d0f66
      https://github.com/llvm/llvm-project/commit/92e751d426dbc17607bc8f552325fc659f4d0f66
  Author: Jack Frankland <jack.frankland at arm.com>
  Date:   2023-10-13 (Fri, 13 Oct 2023)

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

  Log Message:
  -----------
  [mlir][linalg] Add NHWC + FHWC Img2Col (#68708)

Adds the Img2Col transformation for the fhwc channel ordering in a
Conv2D. Because of how the channel ordering affects the matrix
dimensions in the flattened filter this results in a slightly different
implementation of the actual "matrix multiplication". Instead of doing a
regular row-column dot-product this arrangement requires a row-row dot
product, otherwise the filter matrix would first need to be transposed.

Adds a lit test to the transform dialect to check the semantics of the
optimization are correct.

Signed-off-by: Jack Frankland <jack.frankland at arm.com>




More information about the All-commits mailing list