mirror of https://github.com/llvm/torch-mlir
dff3405d5a
When `use_tracing=True` is used to import a model into Torch-MLIR, several casts get inserted in the IR to bridge the untyped inputs and outputs with the typed body of the computation. These casts create extra aliases of tensors that cause the current analysis in `maximize-value-semantics` to fail. In particular, the `maximize-value-semantics` analysis assumes that the only valid alias right after an overwrite is the overwritten alias. So, if there is a use of a casted version of the overwritten alias after the overwrite, the analysis fails. This commit improves the analysis by identifying all cast-like aliases of the overwritten alias and allowing such aliases to be used after an overwrite. Because this issue only arises when using tracing, it cannot be currently tested e2e, so only lit test is added. |
||
---|---|---|
.. | ||
CAPI | ||
Conversion | ||
Dialect | ||
RefBackend | ||
python | ||
CMakeLists.txt | ||
lit.cfg.py | ||
lit.site.cfg.py.in |