Skip to content

[JIT] make torch.unique compilable#38156

Closed
eellison wants to merge 5 commits intopytorch:masterfrom
eellison:fix_torch_unique
Closed

[JIT] make torch.unique compilable#38156
eellison wants to merge 5 commits intopytorch:masterfrom
eellison:fix_torch_unique

Conversation

@eellison
Copy link
Copy Markdown
Contributor

@eellison eellison commented May 8, 2020

Fix for #37986

Follows the stack in #33783 stack to make functions in torch/functional.py resolve to their python implementations. Because the return type of torch.unique depends on return_inverse and return_counts I had to refactor the implementation to use our boolean_dispatch mechanism.

@eellison eellison requested review from SplitInfinity, suo and zdevito May 8, 2020 21:53
@eellison eellison requested a review from apaszke as a code owner May 8, 2020 21:53
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 8, 2020
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 8, 2020

💊 CI failures summary and remediations

As of commit c99c22d (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.

See how this bot performed.

This comment has been revised 20 times.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@eellison has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@eellison has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@eellison has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@eellison merged this pull request in eb3e987.

@lgray
Copy link
Copy Markdown

lgray commented May 13, 2020

Thanks!

@zasdfgbnm
Copy link
Copy Markdown
Collaborator

@eellison Thanks a lot for this! I personally have been waiting for this feature for so long for my https://github.com/aiqm/torchani

gchanan pushed a commit to gchanan/pytorch that referenced this pull request Jun 1, 2020
Summary:
Fix for pytorch#37986

Follows the stack in pytorch#33783 stack to make functions in `torch/functional.py` resolve to their python implementations. Because the return type of `torch.unique` depends on `return_inverse` and `return_counts` I had to refactor the implementation to use our boolean_dispatch mechanism.
Pull Request resolved: pytorch#38156

Differential Revision: D21504449

Pulled By: eellison

fbshipit-source-id: 7efb1dff3b5c00655da10168403ac4817286ff59
gchanan pushed a commit that referenced this pull request Jun 2, 2020
Summary:
Fix for #37986

Follows the stack in #33783 stack to make functions in `torch/functional.py` resolve to their python implementations. Because the return type of `torch.unique` depends on `return_inverse` and `return_counts` I had to refactor the implementation to use our boolean_dispatch mechanism.
Pull Request resolved: #38156

Differential Revision: D21504449

Pulled By: eellison

fbshipit-source-id: 7efb1dff3b5c00655da10168403ac4817286ff59
facebook-github-bot pushed a commit that referenced this pull request Jun 2, 2020
Summary:
A `unique_consecutive` version of #38156
Pull Request resolved: #39339

Differential Revision: D21823997

Pulled By: eellison

fbshipit-source-id: d14596a36ba36497e296da5a344e0376cef56f1b
zasdfgbnm added a commit to zasdfgbnm/pytorch that referenced this pull request Jun 2, 2020
Cherry pick of pytorch#39339

Summary:
A `unique_consecutive` version of pytorch#38156
Pull Request resolved: pytorch#39339

Differential Revision: D21823997

Pulled By: eellison

fbshipit-source-id: d14596a36ba36497e296da5a344e0376cef56f1b
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fix for pytorch#37986

Follows the stack in pytorch#33783 stack to make functions in `torch/functional.py` resolve to their python implementations. Because the return type of `torch.unique` depends on `return_inverse` and `return_counts` I had to refactor the implementation to use our boolean_dispatch mechanism.
Pull Request resolved: pytorch#38156

Differential Revision: D21504449

Pulled By: eellison

fbshipit-source-id: 7efb1dff3b5c00655da10168403ac4817286ff59
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
A `unique_consecutive` version of pytorch#38156
Pull Request resolved: pytorch#39339

Differential Revision: D21823997

Pulled By: eellison

fbshipit-source-id: d14596a36ba36497e296da5a344e0376cef56f1b
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.

6 participants