[all-commits] [llvm/llvm-project] e9cb58: [mlir][TOSA] Fix shape inference when operand was ...

maxbartel via All-commits all-commits at lists.llvm.org
Fri Sep 22 14:10:04 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9cb5828dceed982ea5f87b4d9b63ab0728a66f3
  Author: maxbartel <maximilian.bartel at amd.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

  Changed paths:
    M mlir/include/mlir/Interfaces/InferTypeOpInterface.td
    M mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
    M mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir

  Log Message:
  [mlir][TOSA] Fix shape inference when operand was inferred (#66906)

Introduces a bug in the `TosaInferShapesPass` when an operand type was
already inferred.
interprets the `ValueShapeRange` as a normal `ValueRange` and looses the
information of the inference.

This PR changes the logic of the shape inference a bit. Instead of
saving the type information in a `DenseMap` and updating the types after
the whole analysis for a region, it now updates the types directly in
each iteration. That way the operands always have the inferred type.

More information about the All-commits mailing list