torch-mlir/lib/Dialect/Torch/IR
Ze Zhang 11cd7cd9e7
Folder and Canonicalizer for PrimsConvertElementTypeOp and AtenMaxPool2dWithIndicesOp (#3272)
While playing with TorchDynamo on ResNet18. I notice following issues:

- `prims.convert_element_type` can’t be canonicalized even if the input
and the output share the same type

- `aten.max_pool2d_with_indices` is always used instead of
`aten.max_pool2d`, even if the second returned output (indices) has no
user

This PR fixes above issues by adding a folder to the
PrimsConvertElementTypeOp and a canonicalizer to the
AtenMaxPool2dWithIndicesOp


Lit test:

`cmake --build build --target check-torch-mlir-all`

---------

Co-authored-by: Ze Zhang <ze.zhang@getcruise.com>
2024-05-02 00:03:41 -07:00
..
CMakeLists.txt Re-organize project structure to separate PyTorch dependencies from core project. (#2542) 2023-11-02 19:45:55 -07:00
TorchDialect.cpp Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3243) 2024-04-27 14:00:56 -07:00
TorchOps.cpp Folder and Canonicalizer for PrimsConvertElementTypeOp and AtenMaxPool2dWithIndicesOp (#3272) 2024-05-02 00:03:41 -07:00
TorchOpsODSGenerated.cpp Reduce compilation time for TorchOps.cpp.inc 2022-03-21 14:42:26 -07:00
TorchTypes.cpp Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3130) 2024-04-11 06:47:35 -07:00
UtilsForODSGenerated.cpp llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
UtilsForODSGenerated.h Reduce compilation time for TorchOps.cpp.inc 2022-03-21 14:42:26 -07:00