torch-mlir/lib/Dialect/Torch
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
..
IR Folder and Canonicalizer for PrimsConvertElementTypeOp and AtenMaxPool2dWithIndicesOp (#3272) 2024-05-02 00:03:41 -07:00
Transforms [torch] `aten.eye` should use dynamic dims when no static dims are available (#3202) 2024-04-30 17:41:03 +00:00
Utils Fix deprecated uses of cast/dyn_cast/dyn_cast_or_null/isa (#3243) 2024-04-27 14:00:56 -07:00
CMakeLists.txt E2e support for aten.softmax.int and aten.embedding 2021-10-18 17:57:45 -04:00