-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some slice fixes #37
Some slice fixes #37
Commits on May 25, 2023
-
Fix result type of index_put in slice+copy_ recomposition
The `copy_` op being replaced by `RecomposeSliceCopy_` operates on a subset of the tensor being mutated, while the `index_put` op being used to replace the `copy_` op operates on the entire tensor being mutated. This means that the result type of the `index_put` should be the type of the input to `index_put` and we need to make sure that `copy_` does not have users before replacing to avoid type conflicts. Note: this commit fixes a type conflict that only seems to arise when `use_tracing=True`, since normally the recomposition happens before type propagation takes place. Since the e2e testing framework does not do tracing, here we use a lit test to check correctness.
Configuration menu - View commit details
-
Copy full SHA for 2f9c663 - Browse repository at this point
Copy the full SHA 2f9c663View commit details -
Add alias analysis for cast-like ops to maximize-value-semantics
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.
Configuration menu - View commit details
-
Copy full SHA for 02c733e - Browse repository at this point
Copy the full SHA 02c733eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca171df - Browse repository at this point
Copy the full SHA ca171dfView commit details -
lib/Conversion/TorchToTosa/TorchToTosa.cpp: Don't create tosa.slice o…
…ps where end > dim size
Configuration menu - View commit details
-
Copy full SHA for f758e68 - Browse repository at this point
Copy the full SHA f758e68View commit details -
lib/Dialect/Torch/IR/TorchOps.cpp: Fold slice ops even when they are …
…on non-value tensors
Configuration menu - View commit details
-
Copy full SHA for 7a4807b - Browse repository at this point
Copy the full SHA 7a4807bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ef2fea - Browse repository at this point
Copy the full SHA 4ef2feaView commit details -
lib/Dialect/Torch/IR/TorchOps.cpp: AtenSliceTensorOp::fold: Fold slic…
…es that go from 0:int_max
Configuration menu - View commit details
-
Copy full SHA for b411842 - Browse repository at this point
Copy the full SHA b411842View commit details