torch-mlir/test
Ramiro Leal-Cavazos 63945a2fd4
Change dtype functions interface to take ints tuple for each tensor (#1865)
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 functions for
the convolution ops, all of which take one optional tensor as an
argument.
2023-02-13 17:56:09 -08:00
..
CAPI Expose metadata of torch-mlir types (plus verify DictType key and value types). (#1785) 2023-01-16 10:25:02 -06:00
Conversion [TOSA] Add LeakyReLU conversion pass (#1790) 2023-01-10 21:42:07 -08:00
Dialect Change dtype functions interface to take ints tuple for each tensor (#1865) 2023-02-13 17:56:09 -08:00
RefBackend [MLIR][TORCH] Add TorchConversionToMLProgram and MLProgramBufferize pass 2022-12-02 13:20:46 +05:30
python Fix Base Lazy Backend Type Conversion (#1412) 2022-10-04 15:53:28 -07:00
CMakeLists.txt Expose metadata of torch-mlir types (plus verify DictType key and value types). (#1785) 2023-01-16 10:25:02 -06:00
lit.cfg.py Expose metadata of torch-mlir types (plus verify DictType key and value types). (#1785) 2023-01-16 10:25:02 -06:00
lit.site.cfg.py.in Expose metadata of torch-mlir types (plus verify DictType key and value types). (#1785) 2023-01-16 10:25:02 -06:00