[all-commits] [llvm/llvm-project] 75f6ca: [mlir][tensor] `tensor.generate`: do not verify dy...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Dec 6 15:36:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75f6cad8e981f017c7332bea26af6b093b4b65a9
      https://github.com/llvm/llvm-project/commit/75f6cad8e981f017c7332bea26af6b093b4b65a9
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-12-07 (Thu, 07 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Tensor/canonicalize.mlir
    R mlir/test/Dialect/Tensor/invalid-canonicalize.mlir
    M mlir/test/Dialect/Tensor/invalid.mlir

  Log Message:
  -----------
  [mlir][tensor] `tensor.generate`: do not verify dynamic sizes (#74568)

Op verifiers should verify only local properties of an op. The dynamic
sizes of a `tensor.generate` op should not be verified. Dynamic sizes
that have a negative constant value should not prevent the
`tensor.generate` op from verifying.

Also share some code between the `tensor.empty` and `tensor.generate`
"dynamic dim -> static dim" canonicalization patterns.

Remove the `invalid-canonicalize.mlir` file and move the test case to
`canonicalize.mlir`. Canonicalization no longer produces IR that does
not verify (and leaves the op as is).




More information about the All-commits mailing list