This is an archive of the discontinued LLVM Phabricator instance.

Move tosa.reshape lowering patterns from TosaToLinalg to TosaToTensor
ClosedPublic

Authored by krzysz00 on Mar 1 2023, 2:09 PM.

Details

Summary

Converting tosa.reshape to tensor.expand_shape and
tensor.collapse_shape logically belongs in the tosa-to-tensor
conversion process. In addition, we (rocMLIR downstream) want to use
the reshape -> expand/collapse_shape logic to simplify parts of our
Tosa integration without using the full tosa-to-linalg flow, further
motivating moving these patterns.

The downside to this change is that it means you need to run
tosa-to-tensor after tosa-to-linalg, which is probably a breaking
change.

Diff Detail