Skip to content

Conversation

bertmaher
Copy link
Contributor

@bertmaher bertmaher commented Aug 15, 2020

Stack from ghstack:

Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as Tensor(Bool) == Int you'd fail typechecking inside the TE
engine.

Differential Revision: D23167926

Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

[ghstack-poisoned]
@bertmaher bertmaher requested a review from apaszke as a code owner August 15, 2020 06:10
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Aug 15, 2020
Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Aug 15, 2020
Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

ghstack-source-id: 57a1778
Pull Request resolved: #43097
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Looks good!

os() << *v->base_handle();
return;
}
if (v->dtype().scalar_type() == ScalarType::Bool) {

Choose a reason for hiding this comment

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

Why do we need to special case Bool here? A comment could be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I'll add it. For posterity, there's no __ldg overload for bool, so we need to use normal array indexing.

Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

[ghstack-poisoned]
Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

[ghstack-poisoned]
bertmaher added a commit that referenced this pull request Aug 17, 2020
Boolean arguments weren't promoted, so if you tried to write a comparison with
types such as `Tensor(Bool) == Int` you'd fail typechecking inside the TE
engine.

ghstack-source-id: c06f88c
Pull Request resolved: #43097
@dr-ci
Copy link

dr-ci bot commented Aug 17, 2020

💊 CI failures summary and remediations

As of commit 013b97e (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

@facebook-github-bot
Copy link
Contributor

@bertmaher merged this pull request in 6c99d56.

@facebook-github-bot facebook-github-bot deleted the gh/bertmaher/8/head branch August 22, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants