-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add miscellaneous dtype functions #2090
Add miscellaneous dtype functions #2090
Conversation
Would you make the CI pass? Maybe re-running it would help. |
ccedcdb
to
72b156d
Compare
This commit moves the `FullyUnrollPrimLoopOp`, `FoldPrimUncheckedCastOp` and `AbstractlyInterpretListOpsWithinABlock` patterns to the `SimplifyAbstractInterpCalculationsUtils.cpp` file so that the dtype simplification pipeline can also use them. In addition, the `Aten__Getitem__TOp` and `PrimTupleUnpackOp` canonicalizers are added to the dtype simplification pipeline to deal with the ops generated by the `aten.cat` dtype function.
This commit adds dtype functions for: - AtenAtan2Op - AtenLinearOp - AtenMaxPool2dWithIndicesOp - AtenCatOp - Aten_ShapeAsTensorOp - AtenScalarImplicitOp - PrimNumToTensorScalarOp
72b156d
to
49cc402
Compare
Done! @li-plus, PTAL |
|
||
using namespace mlir; | ||
using namespace mlir::torch; | ||
using namespace mlir::torch::Torch; | ||
|
||
namespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: all the patterns added here came from SimplifyShapeCalculations.cpp
and have not been modified in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
This PR moves the
FullyUnrollPrimLoopOp
,FoldPrimUncheckedCastOp
andAbstractlyInterpretListOpsWithinABlock
patterns to the
SimplifyAbstractInterpCalculationsUtils.cpp
file sothat the dtype simplification pipeline can also use them.
In addition, the
Aten__Getitem__TOp
andPrimTupleUnpackOp
canonicalizers are added to the dtype simplification pipeline to deal
with the ops generated by the
aten.cat
dtype function.Lastly, the dtype functions for the following ops are added: