torch-mlir/lib/Dialect/Torch
Ashay Rane 340d8af28a
torch: handle `torch.prim.dtype` ops during type refinement (#1013)
The canonicalizer converts `torch.prim.dtype` ops into integer constants
for valid types, but the type may not be known until type refinement is
complete.  However, type refinement cannot make progress until
`torch.prim.dtype` ops have been resolved to their corresponding integer
constants, thus creating a circular dependency.

This patch creates a tight coupling between type refinement and the
lowering of `torch.prim.dtype` ops by handling such ops as they are
encountered during type refinement.  The unit test in this patch aims to
check whether the type refinement pass can now handle chains of
operations that alternate between type construction and type refinement.
2022-07-08 16:38:51 -07:00
..
IR torch: use ScalarType enum instead of raw constants (#1020) 2022-07-07 14:21:05 -07:00
Transforms torch: handle `torch.prim.dtype` ops during type refinement (#1013) 2022-07-08 16:38:51 -07:00
Utils Fix type promotion code for scalar only operations 2022-05-07 10:37:21 -04:00
CMakeLists.txt E2e support for aten.softmax.int and aten.embedding 2021-10-18 17:57:45 -04:00