torch-mlir/lib/Dialect/Torch/Transforms
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
..
AdjustCallingConventions.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
CMakeLists.txt Introduce new shape library design. 2022-03-15 12:41:58 -07:00
DecomposeComplexOps.cpp Fix compilation warning Wsign-compare (#1003) 2022-07-06 09:06:10 -07:00
DropShapeCalculations.cpp torch: allow torch dialect ops after running drop-shape pass (#979) 2022-06-25 07:27:47 -07:00
GlobalizeObjectGraph.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
InlineGlobalSlots.cpp Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
MaximizeValueSemantics.cpp [MLIR][TORCH] Add decomposition of aten.numpy_T op 2022-06-16 00:01:22 +05:30
PassDetail.h llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
Passes.cpp [MLIR][TORCH] Add decomposition of aten.repeat (#932) 2022-07-01 13:02:31 +08:00
PrepareForGlobalizeObjectGraph.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
ReduceOpVariants.cpp Add basic support for list of optional tensors in reduce-op-variants (#971) 2022-07-08 11:12:15 -07:00
RefinePublicReturn.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
RefineTypes.cpp torch: handle `torch.prim.dtype` ops during type refinement (#1013) 2022-07-08 16:38:51 -07:00
ReifyShapeCalculations.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
ShapeLibrary.cpp [MLIR][TORCH] Add decomposition of aten.repeat (#932) 2022-07-01 13:02:31 +08:00
SimplifyShapeCalculations.cpp Add basic support for list of optional tensors in reduce-op-variants (#971) 2022-07-08 11:12:15 -07:00