10000 [PyTorch][Bugfix] Use uint8 instead of bool in pytorch to be compatible with nightly version by nv-dlasalle · Pull Request #3406 · dmlc/dgl · GitHub
[go: up one dir, main page]

Skip to content
8000

[PyTorch][Bugfix] Use uint8 instead of bool in pytorch to be compatible with nightly version #3406

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

Merged
merged 6 commits into from
Oct 14, 2021

Conversation

nv-dlasalle
Copy link
Collaborator

Description

PyTorch (nightly) now raises an error when converting a bool tensor to DLPack instead of casting it:
pytorch/pytorch#57110

This changes the default type used for bools in DGL when pytorch is the backend to uint8.

There is an open issue in DLPack for bool support in the future: dmlc/dlpack#75

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the best of my knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change

Changes

Change mapping of bool to uint8.

@dgl-bot
Copy link
Collaborator
dgl-bot commented Oct 8, 2021

To trigger regression tests:

  • @dgl-bot run [instance-type] [which tests] [compare-with-branch];
    For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master

Copy link
Collaborator
@VoVAllen VoVAllen left a comment

Choose a reason for hiding this comment

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

Thanks

@VoVAllen VoVAllen merged commit b81efb2 into dmlc:master Oct 14, 2021
BarclayII pushed a commit that referenced this pull request Nov 5, 2021
…le with nightly version (#3406)

* Use uint8 instead of bool in pytorch

* Handle type aliases

* Fix syntax error

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
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.

3 participants
0