Skip to content
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

RefineTypes aten.sum: check dtype exists before accessing methods #1944

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

ramiro050
Copy link
Collaborator

This commit adds a check that defaultDtype exists in the RefineTypes handling of AtenSumOp before accessing the method isInteger, which crashes the program is defaultDtype is null.

The handling of defaultDtype is the same as the one used for the AtenSumDimIntListOp.

This commit adds a check that `defaultDtype` exists in the RefineTypes
handling of `AtenSumOp` before accessing the method `isInteger`, which
crashes the program is `defaultDtype` is null.

The handling of `defaultDtype` is the same as the one used for the
`AtenSumDimIntListOp`.
@ramiro050 ramiro050 linked an issue Mar 15, 2023 that may be closed by this pull request
Copy link
Collaborator

@vivekkhandelwal1 vivekkhandelwal1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ramiro050 ramiro050 merged commit 1803502 into llvm:main Mar 16, 2023
@ramiro050 ramiro050 deleted the fix-refine-types-sum branch March 16, 2023 15:35
gpetters94 pushed a commit to gpetters94/mlir-npcomp that referenced this pull request May 10, 2023
…vm#1944)

This commit adds a check that `defaultDtype` exists in the RefineTypes
handling of `AtenSumOp` before accessing the method `isInteger`, which
crashes the program is `defaultDtype` is null.

The handling of `defaultDtype` is the same as the one used for the
`AtenSumDimIntListOp`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RefineTypes crashes when aten.sum does not have a dtype
2 participants