Page MenuHomePhabricator

[mlir][Linalg] Fix subview size used within Linalg Tiling pass.
AbandonedPublic

Authored by mravishankar on Aug 11 2020, 2:03 PM.

Details

Summary

The subview size for a tiled dimension is currently minimum of :

  • tile size
  • size of the base operand along that dimension - offset along that dimension. A third value is also to be considered :
  • size of the base operand along that dimension

    The actual subview size should be a minum of all the three. Without this when size of the base operand along that dimension is smaller than the tile size used the subview size is unnecessarily large. This causes issues when using the size of the subview to allocate buffer used during promotion of subviews.

Diff Detail

Unit TestsFailed

TimeTest
280 mslinux > MLIR.Dialect/Linalg::transform-patterns-matmul-to-vector.mlir
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/mlir-opt /mnt/disks/ssd0/agent/llvm-project/mlir/test/Dialect/Linalg/transform-patterns-matmul-to-vector.mlir -test-linalg-transform-patterns=test-matmul-to-vector-patterns-tile-1d | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/mlir/test/Dialect/Linalg/transform-patterns-matmul-to-vector.mlir
220 mswindows > MLIR.Dialect/Linalg::transform-patterns-matmul-to-vector.mlir
Script: -- : 'RUN: at line 1'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\mlir-opt.exe C:\ws\w16c2-1\llvm-project\premerge-checks\mlir\test\Dialect\Linalg\transform-patterns-matmul-to-vector.mlir -test-linalg-transform-patterns=test-matmul-to-vector-patterns-tile-1d | c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16c2-1\llvm-project\premerge-checks\mlir\test\Dialect\Linalg\transform-patterns-matmul-to-vector.mlir

Event Timeline

mravishankar created this revision.Aug 11 2020, 2:03 PM
mravishankar requested review of this revision.Aug 11 2020, 2:03 PM
mravishankar added a reviewer: bondhugula.

Updating the patch with some changes to make sure that the allocation size bound computation works with addition of the affine.min operation

bondhugula added inline comments.Aug 18 2020, 5:39 AM
mlir/lib/Dialect/Affine/Utils/Utils.cpp
181

Missing doc comment.

182–186

You can just do if (... = value.getDefiningOp<AffineMinOp>()).

bondhugula resigned from this revision.Aug 19 2020, 3:45 PM
mravishankar abandoned this revision.Oct 12 2020, 10:11 PM