torch-mlir/test/Dialect/Torch
Sean Silva 79aade33da Make MaximizeValueSemantics a bit smarter.
This adds a pattern to MaximizeValueSemantics which does a simple
abstract interpretation within a block, which handles simple cases of
`torch.overwrite_tensor`, enough to remove all the unnecessary uses of
non-value tensors in ResNet right now.

Before/after IR:
[gist](https://gist.github.com/silvasean/a3e1ef625b19dfc63579f73cd3b543b6)

Also,
- Split `torch.copy.tensor` into `torch.copy.to_tensor` and
  `torch.copy.to_vtensor` which convert between value and non-value
  semantic tensors. This is a much cleaner factorization as they have
  very separate use cases and properties (e.g. different side effects)
- Remove the various canonicalization patterns they had, which were
  confusing because they resulted in limited forms of maximizing value
  semantics throughout the pipeline. We should structure our compilation
  pipeline such that only MaximizeValueSemantics should be maximizing
  value semantics.
- Adjust pass pipeline to only run MaximizeValueSemantics once.
- Make OverwriteTensorOp `$value` always be a value tensor and
  `$overwritten` be a non-value tensor.
2021-06-22 16:48:57 -07:00
..
GlobalizeObjectGraph Add `torch.vtensor.literal` op. 2021-06-17 14:37:04 -07:00
adjust-calling-conventions.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00
canonicalize.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00
finalizing-backend-type-conversion.mlir Add a !torch.float type. 2021-06-17 09:24:18 -07:00
func-backend-type-conversion.mlir Add a !torch.float type. 2021-06-17 09:24:18 -07:00
inline-global-slots.mlir Add `torch.vtensor.literal` op. 2021-06-17 14:37:04 -07:00
invalid.mlir Add `torch.vtensor.literal` op. 2021-06-17 14:37:04 -07:00
maximize-value-semantics.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00
ops.mlir Add `torch.vtensor.literal` op. 2021-06-17 14:37:04 -07:00
prepare-for-globalize-object-graph.mlir Add a !torch.float type. 2021-06-17 09:24:18 -07:00
reduce-op-variants.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00
refine-public-return.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00
refine-types.mlir Make MaximizeValueSemantics a bit smarter. 2021-06-22 16:48:57 -07:00