[all-commits] [llvm/llvm-project] eb6a3c: [mlir][Linalg] Add a polymorphic linalg.copy opera...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Tue Mar 8 09:53:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb6a3c0c0c71ab44141e71112ecd0a2ae2848037
      https://github.com/llvm/llvm-project/commit/eb6a3c0c0c71ab44141e71112ecd0a2ae2848037
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2022-03-08 (Tue, 08 Mar 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
    M mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
    M mlir/test/Dialect/Linalg/generalize-named-polymorphic-ops.mlir

  Log Message:
  -----------
  [mlir][Linalg] Add a polymorphic linalg.copy operation

With the recent improvements to OpDSL it is cheap to reintroduce a linalg.copy operation.

This operation is needed in at least 2 cases:
  1. for copies that may want to change the elemental type (e.g. cast, truncate, quantize, etc)
  2. to specify new tensors that should bufferize to a copy operation. The linalg.generic form
     always folds away which is not always the right call.

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




More information about the All-commits mailing list