[all-commits] [llvm/llvm-project] a58e77: [mlir][tosa] Make TOSA MUL's Shift an Input (#121953)

Jack Frankland via All-commits all-commits at lists.llvm.org
Tue Jan 28 08:25:44 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a58e774fba42e13aa00667d644e96b783fc914b4
      https://github.com/llvm/llvm-project/commit/a58e774fba42e13aa00667d644e96b783fc914b4
  Author: Jack Frankland <jack.frankland at arm.com>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    M mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/lib/Dialect/Tosa/Transforms/TosaDecomposeDepthwise.cpp
    M mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
    M mlir/lib/Dialect/Tosa/Transforms/TosaReduceTransposes.cpp
    M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
    M mlir/test/Dialect/Tosa/canonicalize.mlir
    M mlir/test/Dialect/Tosa/constant-op-fold.mlir
    M mlir/test/Dialect/Tosa/invalid.mlir
    M mlir/test/Dialect/Tosa/ops.mlir
    M mlir/test/Dialect/Tosa/tosa-decompose-depthwise.mlir
    M mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir
    M mlir/test/Dialect/Tosa/tosa-reduce-transposes.mlir

  Log Message:
  -----------
  [mlir][tosa] Make TOSA MUL's Shift an Input (#121953)

The TOSA-v1.0 specification makes the shift attribute of the MUL
(Hammard product) operator an input. Move the `shift` parameter of the
MUL operator in the MILR TOSA dialect from an attribute to an input and
update any lit tests appropriately.

Expand the verifier of the `tosa::MulOp` operation to check the various
constraints defined in the TOSA-v1.0 specification. Specifically, ensure
that all input operands (excluding the optional shift) are of the same
rank. This means that broadcasting tests which previously checked rank-0
tensors would be broadcast are no longer valid and are removed.

Signed-off-by: Jack Frankland <jack.frankland at arm.com>
Co-authored-by: TatWai Chong <tatwai.chong at arm.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