mirror of https://github.com/llvm/torch-mlir
730f5915bb
This commit fixes an issue with the way that the `maximize-value-semantics` pass was handling the `torch.overwrite.tensor` op. Before, the overwrite op would simply get deleted and uses of the overwritten tensor would simply get replaced with the overwriter tensor. This becomes a problem when one tensor has a dynamic shape and the other has a static shape because ops that were previously using the overwritten tensor will now get a tensor of a different type. To fix this, this commit adds a static cast to the overwriter tensor so that it has the type of the overwritten tensor, and this casted tensor is then used to replace the uses of the overwritten tensor. |
||
---|---|---|
.. | ||
CAPI | ||
Conversion | ||
Dialect | ||
RefBackend | ||
CMakeLists.txt | ||
InitAll.cpp |