torch-mlir/test/Dialect/Torch
Ramiro Leal-Cavazos dff3405d5a
Add alias analysis for cast-like ops to maximize-value-semantics (#2160)
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.
2023-05-25 17:05:41 +00:00
..
GlobalizeObjectGraph Rework how global slot initializers work. 2022-08-08 18:12:06 -07:00
adjust-calling-conventions.mlir Move single-tensor-tuple-return test to mlir unit test. 2022-11-10 09:23:53 -05:00
canonicalize.mlir [Torch Dialect] Add to.dtype_layout canonicalize patterns (#2062) 2023-05-02 20:06:02 -07:00
decompose-complex-ops-legal.mlir handles 2,3,4 from https://github.com/llvm/torch-mlir/issues/1963 (#1964) 2023-03-24 21:50:01 -05:00
decompose-complex-ops.mlir Allow running DecomposeComplexOps more than once (#1671) 2022-12-08 09:26:38 -08:00
drop-abstract-interp-calculations.mlir [custom op] Generalize shape library logic to work with dtypes (#1594) 2022-12-13 08:25:41 -08:00
erase-module-initializer.mlir Iteratively run the main simplification pipeline. 2022-08-17 14:54:33 -07:00
inline-global-slots-analysis.mlir Rework how global slot initializers work. 2022-08-08 18:12:06 -07:00
inline-global-slots-transform.mlir Rework how global slot initializers work. 2022-08-08 18:12:06 -07:00
invalid.mlir Expand definition of tensor subtype to include shape/dtype info (#1929) 2023-03-10 16:43:57 -08:00
lower-to-backend-contract-error.mlir Allow running DecomposeComplexOps more than once (#1671) 2022-12-08 09:26:38 -08:00
maximize-value-semantics.mlir Add alias analysis for cast-like ops to maximize-value-semantics (#2160) 2023-05-25 17:05:41 +00:00
ops.mlir [Torch Dialect] fix isValidSubtype with dynamic dim (#2018) 2023-04-11 01:02:18 -07:00
prepare-for-globalize-object-graph.mlir mlir: bump llvm tag to 5380e3 (#856) 2022-05-16 12:54:35 -07:00
reduce-op-variants-error.mlir mlir: bump llvm tag to 5380e3 (#856) 2022-05-16 12:54:35 -07:00
reduce-op-variants.mlir Remove all but one of valsem ops + move fill.Scalar to elementwise (#1531) 2022-10-28 15:06:11 +00:00
refine-public-return.mlir Add support for returning more than one copy of the same tensor (#1228) 2022-08-18 22:41:45 +00:00
reify-dtype-calculations.mlir Change dtype functions interface to take ints tuple for each tensor (#1965) 2023-03-23 11:05:39 -07:00
reify-shape-calculations.mlir Cast `number` to `float` when shape function takes Scalar arg (#1978) 2023-03-28 09:30:31 -07:00
simplify-dtype-calculations.mlir [TORCH] Add Complex Number support (#1673) 2022-12-15 21:40:01 +00:00
simplify-shape-calculations.mlir canonicalizer: [nfc] update LIT variable names for consistency (#1051) 2022-07-13 12:28:25 -07:00
torch-function-to-torch-backend-pipeline.mlir handles 2,3,4 from https://github.com/llvm/torch-mlir/issues/1963 (#1964) 2023-03-24 21:50:01 -05:00
verify-backend-contract-error.mlir Enable VerifyBackendContract in LTC backend (#1798) 2023-01-24 22:14:17 -05:00
verify-backend-contract-unimplemented-op.mlir LowerToBackendContract: Explicitly error out on unimplemented operator (#1947) 2023-03-20 16:27:08 +01:00