-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixhigh prioritytriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
Is it good to add a sorted_input to torch.unique?
Current cuda implementation always sort the input tensor first. But sometimes the input tensor is guaranteed to be already sorted. Sorting is O(n*logn), which is likely to be the most time consuming part of the whole computation, and it would be nice if we allow user to skip this part.
torch.unique with sorted_input=True would resemble thrust::unique and only remove the consecutive duplicate elements.
It might be better to name it consecutive instead of sorted_input.
Metadata
Metadata
Assignees
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixhigh prioritytriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module