torch-mlir/test/Dialect/Torch
Ramiro Leal-Cavazos eae3ff7f1c
Change dtype functions interface to take ints tuple for each tensor (#1965)
The original design for the dtype functions outlined in
https://github.com/llvm/torch-mlir/issues/1462 was unable to properly
handle ops that take optional tensors as an input when the optional
tensor has a value of None. By the time the op gets imported into
torch-mlir, if an optional value is None, all information about the
original type is lost from the op type signature, preventing
torch-mlir from knowing if a value of None was from an optional tensor
or not, which was crucial in the original design since each tensor
argument must be turned into two separate arguments for the dtype
function.

This commit changes the interface to dtype functions such that each
tensor turns into a tuple of two ints, the first representing the rank
of the tensor and the second the dtype of the tensor. Since now there
is a one-to-one correspondence between the operands of an op and the
operands of its dtype function, there is no ambiguity about which
operand of the op corresponds with which operand of the dtype
function.

To test the implementation, this commit defines dtype function for
convolution op, which takes one optional tensor as an argument.
2023-03-23 11:05:39 -07: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 Expand definition of tensor subtype to include shape/dtype info (#1929) 2023-03-10 16:43:57 -08:00
decompose-complex-ops-legal.mlir Add a concept of "backend legal ops". 2022-08-18 11:46:50 -07: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 build: update llvm tag to 798fa4b4 (#1684) 2022-12-07 12:20:41 -08:00
ops.mlir [custom op] Generalize shape library logic to work with dtypes (#1594) 2022-12-13 08:25:41 -08: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
refine-types-branch.mlir [custom op] Generalize shape library logic to work with dtypes (#1594) 2022-12-13 08:25:41 -08:00
refine-types-ops.mlir [TORCH] Improve type refinement for aten.cat. (#1908) 2023-03-09 16:17:35 -08:00
refine-types.mlir Handle uninitialized lattice elements in RefineTypes (#1911) 2023-03-03 08:55:58 -08: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 Remove all but one of valsem ops + move fill.Scalar to elementwise (#1531) 2022-10-28 15:06:11 +00: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 update llvm tag to a2620e00. (#1567) 2022-11-10 18:39:28 +08: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