Skip to content
Unverified Commit e9cb5828 authored by maxbartel's avatar maxbartel Committed by GitHub
Browse files

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

https://github.com/llvm/llvm-project/commit/057fc8e7d8a3593f98930b8b91f80b9dd9b5fd4a
Introduces a bug in the `TosaInferShapesPass` when an operand type was
already inferred.
https://github.com/llvm/llvm-project/blob/f7bfa583b7a5ff0e9954d2810006b7a71123be88/mlir/include/mlir/Interfaces/InferTypeOpInterface.td#L248
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.
parent 2d27bf23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment