Skip to content

Conversation

@wanchaol
Copy link
Collaborator

@wanchaol wanchaol commented Jun 25, 2019

Stack from ghstack:

Differential Revision: D15994644

@pytorchbot pytorchbot added the module: internals Related to internal abstractions in c10 and ATen label Jun 25, 2019
@wanchaol wanchaol requested review from jamesr66a and suo June 25, 2019 05:05
[jit] fix optional type subtype relation

gh-metadata: pytorch pytorch 22186 gh/wanchaol/26/head
bool operator==(const Type& rhs) const override {
if (auto opt_rhs = rhs.cast<OptionalType>()) {
return getElementType()->isSubtypeOf(opt_rhs->getElementType());
return getElementType() == opt_rhs->getElementType();
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah I was looking at this and thinking the operator looked wrong. I tried changing it to this locally but it didn't fix my issue -- didn't realize we'd need the new isSubtypeOf as well to get it to work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup I think the isSubtypeOf will fix your problem

wanchaol added 2 commits June 25, 2019 10:49
[jit] fix optional type subtype relation

gh-metadata: pytorch pytorch 22186 gh/wanchaol/26/head
…x optional type subtype relation"

[jit] fix optional type subtype relation

gh-metadata: pytorch pytorch 22186 gh/wanchaol/26/head
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jun 26, 2019
Summary:
Pull Request resolved: pytorch/pytorch#22186
ghimport-source-id: 05ef8c3a176fe2a67d4835888e6db52b57a6d199

Test Plan: Imported from OSS

Differential Revision: D15994644

Pulled By: wanchaol

fbshipit-source-id: 7c5c4eebd421f6c9470661c2c2eb38bafdff8bbd
@facebook-github-bot
Copy link
Contributor

@wanchaol merged this pull request in f7a126f.

@facebook-github-bot facebook-github-bot deleted the gh/wanchaol/26/head branch October 28, 2019 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants