[all-commits] [llvm/llvm-project] 34d827: [mlir][tensor] add tensor insert/extract op folder...

asraa via All-commits all-commits at lists.llvm.org
Tue Jun 3 09:16:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34d8275e4fcd619226e2872ea0ee07f8a1634ff7
      https://github.com/llvm/llvm-project/commit/34d8275e4fcd619226e2872ea0ee07f8a1634ff7
  Author: asraa <asraa at google.com>
  Date:   2025-06-03 (Tue, 03 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Tensor/IR/Tensor.h
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Tensor/canonicalize.mlir
    A mlir/test/Dialect/Tensor/extract-from-collapse-shape.mlir
    M mlir/test/lib/Dialect/Tensor/TestTensorTransforms.cpp

  Log Message:
  -----------
  [mlir][tensor] add tensor insert/extract op folders (#142458)

Adds a few canonicalizers, folders, and rewrite patterns to tensor ops:

* tensor.insert folder: insert into a constant is replaced with a new
constant
* tensor.extract folder: extract from a parent tensor that was inserted
at the same indices is folded into the inserted value
* rewrite pattern added that replaces an extract of a collapse shape
with an extract of the source tensor (requires static source dimensions)

Signed-off-by: Asra Ali <asraa at google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list