[all-commits] [llvm/llvm-project] ec13f6: [mlir][Linalg] Add verification checks to disallow...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Fri Jan 8 11:00:26 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ec13f6c3e56952c94909a36a590c679a6a57a046
      https://github.com/llvm/llvm-project/commit/ec13f6c3e56952c94909a36a590c679a6a57a046
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/test/Dialect/Linalg/canonicalize.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir

  Log Message:
  -----------
  [mlir][Linalg] Add verification checks to disallow illegal reshape ops.

The existing verification of reshape ops in linalg (linalg.reshape and
linalg.tensor_reshape) allows specification of illegal ops, where
- A dynamic dimension is expanded into multiple dynamic
  dimensions. This is ill-specified.
- A static dimension is expanded into dynamic dimension or viceversa,
- The product of extents of the static dimensions in the expanded type
  doesnt match the static dimension of the collapsed type.
Making all of these illegal. This also implies that some pessimization
in canonicalization due to incomplete semantics of the operation can
be dropped.

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




More information about the All-commits mailing list