mirror of https://github.com/llvm/torch-mlir
479b2175ef
Before inlining a global slot, the users of the global slot are checked to see if they are `ReadOnly` or `MemoryEffectFree` to make sure that the global slot is not being mutated. Because the op `copy.to_vtensor` currently does not have the `ReadOnly` trait, if a global slot is passed to `copy.to_vtensor`, the pass `InlineGlobalSlots` will fail. The op `copy.to_vtensor` is `ReadOnly`, since it does not modify the contents of the input tensor; it simply makes a new copy. This commit adds the trait as well as an e2e test that generates the case of a global slot being passed to a `copy.to_vtensor`. |
||
---|---|---|
.. | ||
torch-mlir | ||
torch-mlir-c | ||
CMakeLists.txt |