torch-mlir/test/Dialect/Torch
Sean Silva 140babd952 Add minimal support for Union types.
A recent PyTorch commit made ConstantPad2d call a helper function with a
`Union[int, float]` type annotated. This commit adds minimal support for
representing and dealing with that.
https://github.com/pytorch/pytorch/pull/73287

Changes:
- Adding support for `!torch.union<T1, T2, T3>`/`Torch::UnionType`,
  along with the importer and CAPI code.
- Add support in isValidSubtype for union types.
- Adding a canonicalizer for `torch.derefine` to help simplify some code
  that derefines to a UnionType (this also fixes #664).

There is still more work to do for really supporting UnionType well,
such as canonicalizing UnionType's so that they can be compared with
pointer equality.
2022-03-29 17:45:48 -07:00
..
GlobalizeObjectGraph Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
adjust-calling-conventions.mlir Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
canonicalize.mlir Add minimal support for Union types. 2022-03-29 17:45:48 -07:00
decompose-complex-ops.mlir This commit decomposes aten._reshape_alias op into aten.view op. (#690) 2022-03-28 23:54:28 -05:00
drop-shape-calculations.mlir Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
inline-global-slots.mlir Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00
invalid.mlir Bump LLVM at 8361c5da30588d3d4a48eae648f53be1feb5cfad 2022-03-18 13:16:14 -04:00
maximize-value-semantics.mlir Add maximize-value-semantics support for multiple non-value tensor inputs (#659) 2022-03-15 18:13:45 -07:00
ops.mlir Add minimal support for Union types. 2022-03-29 17:45:48 -07:00
prepare-for-globalize-object-graph.mlir Bump LLVM at 8361c5da30588d3d4a48eae648f53be1feb5cfad 2022-03-18 13:16:14 -04:00
promote-types.mlir Introduce new shape library design. 2022-03-15 12:41:58 -07:00
reduce-op-variants-error.mlir Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
reduce-op-variants.mlir [MLIR][TORCH] Add value tensor variant to aten::copy_ op 2022-03-21 19:12:37 +05:30
refine-public-return.mlir Introduce new shape library design. 2022-03-15 12:41:58 -07:00
refine-types-branch.mlir Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
refine-types-ops.mlir Elide `!torch.` prefix in nested dialect types. 2022-03-15 17:24:08 -07:00
refine-types.mlir Introduce new shape library design. 2022-03-15 12:41:58 -07:00
reify-shape-calculations.mlir Improve "pseudo" op terminology. 2022-03-15 17:57:52 -07:00
simplify-shape-calculations.mlir Improve list index normalization SimplifyShapeCalculations. (#710) 2022-03-29 22:21:47 +02:00