- Turns the canonicalization into a fold, so it can cleanup IR within other passes.
- When the output of the reshape is a dynamic shaped tensor,
we cannot apply the fold to the constant, because constants are required to have
static shape.
Paths
| Differential D154615
[MLIR][Tosa] Turn reshape(const()) from canonicalization into fold; fix dynamic shape case ClosedPublic Authored by mgehre-amd on Jul 6 2023, 8:15 AM.
Details Summary
we cannot apply the fold to the constant, because constants are required to have
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Jul 6 2023, 8:29 AM Comment Actions Looks good to me.
Closed by commit rG9739ef67a8f7: [MLIR][Tosa] Turn reshape(const()) from canonicalization into fold; fix dynamic… (authored by liamfitz, committed by mgehre-amd). · Explain WhyJul 6 2023, 11:07 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 537806 mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
mlir/test/Dialect/Tosa/canonicalize.mlir
|
Unless it has single use ?