[all-commits] [llvm/llvm-project] caf4f2: [mlir] Handle unknown ops in dynamic_tensor_from_e...

Sean Silva via All-commits all-commits at lists.llvm.org
Tue Dec 15 12:56:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: caf4f2e372a7a4d5d8b5a8733e44f002c6dee0d5
      https://github.com/llvm/llvm-project/commit/caf4f2e372a7a4d5d8b5a8733e44f002c6dee0d5
  Author: Sean Silva <silvasean at google.com>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Transforms/Bufferize.cpp
    M mlir/test/Dialect/Standard/bufferize.mlir

  Log Message:
  -----------
  [mlir] Handle unknown ops in dynamic_tensor_from_elements bufferization

Due to how the conversion infra works, the "clone" call that this
pattern was using required all the cloned ops to be immediately
legalized as part of this dialect conversion invocation.

That was previously working due to a couple factors:

- In the test case, there was scf.if, which we happen to mark as legal
  as part of marking the entire SCF dialect as legal for the scf.parallel
  we generate here.

- Originally, this test case had std.extract_element in the body, which
  we happened to have a pattern for in this pass. After I migrated that to
  `tensor.extract` (which removed the tensor.extract bufferization from
  here), I hacked this up to use `std.dim` which we still have patterns
  for in this pass.

This patch updates the test case to use a truly opaque op `test.source`
that properly stresses this aspect of the pattern.

(this also removes a stray dependency on the `tensor` dialect that I
must have left behind as part of my hacking this pass up when migrating
to `tensor.extract`)

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




More information about the All-commits mailing list