[all-commits] [llvm/llvm-project] 8d3508: [mlir][Linalg] Wrong tile size for convolutions fixed

Jakub Lichman via All-commits all-commits at lists.llvm.org
Wed Sep 2 23:02:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d35080ebbea477316159a5af7d925bb51d805d0
      https://github.com/llvm/llvm-project/commit/8d35080ebbea477316159a5af7d925bb51d805d0
  Author: Jakub Lichman <limo at google.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/test/Dialect/Linalg/tile_conv.mlir
    M mlir/test/Dialect/Linalg/tile_simple_conv.mlir

  Log Message:
  -----------
  [mlir][Linalg] Wrong tile size for convolutions fixed

Sizes of tiles (subviews) are bigger by 1 than they should. Let's consider
1D convolution without batches or channels. Furthermore let m iterate over
the output and n over the kernel then input is accessed with m + n. In tiling
subview sizes for convolutions are computed by applying requested tile size
together with kernel size to the above mentioned expression thus let's say
for tile size of 2 the subview size is 2 + size(n), which is bigger by one
than it should since we move kernel only once. The problem behind it is that
range is not turned into closed interval before the composition. This commit
fixes the problem by turning ranges first into closed intervals by substracting
1 and after the composition back to half open by adding 1.

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




More information about the All-commits mailing list