Skip to content

[JIT] Make torch.unique_consecutive compatible#39339

Closed
zasdfgbnm wants to merge 4 commits intomasterfrom
jit-unique-consecutive
Closed

[JIT] Make torch.unique_consecutive compatible#39339
zasdfgbnm wants to merge 4 commits intomasterfrom
jit-unique-consecutive

Conversation

@zasdfgbnm
Copy link
Copy Markdown
Collaborator

@zasdfgbnm zasdfgbnm commented Jun 1, 2020

A unique_consecutive version of #38156

@zasdfgbnm zasdfgbnm requested a review from apaszke as a code owner June 1, 2020 18:08
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 1, 2020
@zasdfgbnm zasdfgbnm requested review from eellison and suo June 1, 2020 18:08
Copy link
Copy Markdown
Contributor

@eellison eellison left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for doing this.

Comment thread test/test_jit.py Outdated
self.checkScript(torch_unique, (0,))

def torch_unique_consecutive(dim: Optional[int]):
ten = torch.unique(torch.tensor([[1, 3], [2, 3]], dtype=torch.long))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe add some consecutive values that are the same

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@eellison That is a good idea! I have added consecutive values for the test.

Could you land this for me? I don't work for FB, so I can not land it by myself.

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.

zasdfgbnm added a commit to aiqm/torchani that referenced this pull request Jun 1, 2020
On par with pytorch/pytorch#39339

This breaks the compatibility with PyTorch 1.5.0, but hopefully will be compatible with 1.5.1.
@zasdfgbnm zasdfgbnm deleted the jit-unique-consecutive branch June 2, 2020 21:57
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
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@eellison merged this pull request in ebd4125.

zasdfgbnm added a commit to aiqm/torchani that referenced this pull request Jun 11, 2020
* Remove workaround for TorchScript bug on torch.unique_consecutive

On par with pytorch/pytorch#39339

This breaks the compatibility with PyTorch 1.5.0, but hopefully will be compatible with 1.5.1.

* trigger ci

* trigger

* trigger

Co-authored-by: Farhad Ramezanghorbani <farhadrgh@users.noreply.github.com>
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 open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants