[all-commits] [llvm/llvm-project] 5861b4: [MLIR][Linalg] Add more arith named ops to linalg ...

Renato Golin via All-commits all-commits at lists.llvm.org
Thu Jul 6 05:59:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5861b4c6de26ccbf628b7c127a199942d7cbc3cb
      https://github.com/llvm/llvm-project/commit/5861b4c6de26ccbf628b7c127a199942d7cbc3cb
  Author: Renato Golin <rengolin at systemcall.eu>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgEnums.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
    M mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
    M mlir/test/Dialect/Linalg/generalize-named-ops.mlir
    M mlir/test/Dialect/Linalg/named-ops-fail.mlir
    M mlir/test/Dialect/Linalg/named-ops.mlir

  Log Message:
  -----------
  [MLIR][Linalg] Add more arith named ops to linalg (take 2)

Re-apply eda47fdd258c after implementing __truediv__ for TensorUse.

[MLIR][Linalg] Add more arith named ops to linalg

Following up the 'add' named op, here are the remaining basic arithmetic
and maths, including a 'div_unsigned' for integer unsigned values. In the
same pattern as 'matmul_unsigned', the simply named 'div' assumes signed
values and the '_unsigned' variation handles the unsigned values.

It's a bit odd, but there doesn't seem to be a easy way to restrict to
specific types to make 'div_unsigned' only work with integers in the
structured ops framework.

Same as 'add', these have strict semantics regarding casts.

Unary math ops will need some massaging, so I split these ones for now
as I continue working on them.

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




More information about the All-commits mailing list