[JIT] Make torch.unique_consecutive compatible#39339
Closed
[JIT] Make torch.unique_consecutive compatible#39339
Conversation
eellison
approved these changes
Jun 1, 2020
Contributor
eellison
left a comment
There was a problem hiding this comment.
LGTM! Thanks for doing this.
| self.checkScript(torch_unique, (0,)) | ||
|
|
||
| def torch_unique_consecutive(dim: Optional[int]): | ||
| ten = torch.unique(torch.tensor([[1, 3], [2, 3]], dtype=torch.long)) |
Contributor
There was a problem hiding this comment.
maybe add some consecutive values that are the same
Collaborator
Author
There was a problem hiding this comment.
@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.
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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
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
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
unique_consecutiveversion of #38156