[all-commits] [llvm/llvm-project] 19109a: [mlir][tosa] Fix crash when inferring shape of tos...

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Tue May 2 08:18:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19109a274e67f8f6a30a0da22b2135daa327bb79
      https://github.com/llvm/llvm-project/commit/19109a274e67f8f6a30a0da22b2135daa327bb79
  Author: Spenser Bauman <sbauman at mathworks.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir

  Log Message:
  -----------
  [mlir][tosa] Fix crash when inferring shape of tosa.equal

The tosa-infer-shapes pass crashes when trying to infer the output shape
of tosa.equal when the input shape is unranked.
This is due to tosa-infer-shapes requiring at least information on the
base type of the resulting operation from inferReturnTypeComponents.
This change enhances EqualOp::inferReturnTypeComponents to always supply
the inferred elementType.

Reviewed By: eric-k256

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




More information about the All-commits mailing list