Skip to content

Stable sort for CPU#50052

Closed
nikitaved wants to merge 35 commits intomasterfrom
nikitaved/stable_sort_CPU
Closed

Stable sort for CPU#50052
nikitaved wants to merge 35 commits intomasterfrom
nikitaved/stable_sort_CPU

Conversation

@nikitaved
Copy link
Copy Markdown
Collaborator

@nikitaved nikitaved commented Jan 4, 2021

Fixes #38681 for the CPU.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 4, 2021

💊 CI failures summary and remediations

As of commit 87635b4 (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 to the (internal) Dr. CI Users group.

@nikitaved
Copy link
Copy Markdown
Collaborator Author

argsort does belong to the legacy functionality. Does it actually make sense to extend it as well?

@nikitaved nikitaved force-pushed the nikitaved/stable_sort_CPU branch from ba197ee to 5d2639f Compare January 5, 2021 11:13
@ezyang ezyang requested a review from glaringlee January 5, 2021 15:23
@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Jan 5, 2021

@glaringlee you reviewed the port on this code, can you review this PR too?

@ezyang ezyang added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jan 5, 2021
Comment thread aten/src/ATen/cuda/LegacyTHFunctionsCUDA.cpp Outdated
Comment thread aten/src/ATen/cuda/LegacyTHFunctionsCUDA.cpp Outdated
Comment thread test/test_sort_and_select.py Outdated
Comment thread torch/_torch_docs.py Outdated
@glaringlee
Copy link
Copy Markdown
Contributor

glaringlee commented Jan 6, 2021

@ailzhang This breaks the xla build due to signature change in sorting functions. Can you advise?

@glaringlee glaringlee requested a review from ailzhang January 6, 2021 00:03
@glaringlee
Copy link
Copy Markdown
Contributor

@nikitaved pytorch_linux_backward_compatibility_check_test is broken since the signature of the sort function changed, please add the changed function into the following list to bypass them, expiration date 01/31/2021 should be fine.
https://github.com/pytorch/pytorch/blob/master/test/backward_compatibility/check_backward_compatibility.py#L53

Here is a quick link to the compatibility check error log.
https://app.circleci.com/pipelines/github/pytorch/pytorch/256847/workflows/dfb6662c-2cf4-45f4-85a9-840b3547bb34/jobs/9959226

@JackCaoG
Copy link
Copy Markdown
Collaborator

JackCaoG commented Jan 6, 2021

@glaringlee I will draft a pr to pt/xla to address the upstream signature change

@glaringlee
Copy link
Copy Markdown
Contributor

glaringlee commented Jan 6, 2021

argsort does belong to the legacy functionality. Does it actually make sense to extend it as well?

This is what we current do for argsort.
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/LegacyDefinitions.cpp#L28
It would be good to extend it, can we do it in a separate PR?

@glaringlee
Copy link
Copy Markdown
Contributor

glaringlee commented Jan 11, 2021

@nikitaved
test_torch.py need to apply the same thing, adding onlyCPU for stable sort one.
Here is an example:

[torch.int16, torch.int32, torch.int64], True, [onlyOnCPUAndCUDA]),

@glaringlee
Copy link
Copy Markdown
Contributor

@JackCaoG @ailzhang This is ready to land. Should I land this code first or you guys land xla code first? thx

@glaringlee
Copy link
Copy Markdown
Contributor

@nikitaved Can you please rebase the code to resolve the conflict in check_backwrard_compatibility.py?

@JackCaoG
Copy link
Copy Markdown
Collaborator

@JackCaoG @ailzhang This is ready to land. Should I land this code first or you guys land xla code first? thx

@glaringlee you can land this one first, I will merge the xla one once this is merged

facebook-github-bot pushed a commit that referenced this pull request Feb 19, 2021
Summary:
Fixes #38681.
A duplicate of #50052 created to become importable to the fb internal tests.

Pull Request resolved: #51790

Reviewed By: agolynski

Differential Revision: D26279045

Pulled By: glaringlee

fbshipit-source-id: 348e171dee9c370a76002b65d0c82c329f57a421
iramazanli pushed a commit to iramazanli/pytorch that referenced this pull request Feb 23, 2021
Summary:
Fixes pytorch#38681.
A duplicate of pytorch#50052 created to become importable to the fb internal tests.

Pull Request resolved: pytorch#51790

Reviewed By: agolynski

Differential Revision: D26279045

Pulled By: glaringlee

fbshipit-source-id: 348e171dee9c370a76002b65d0c82c329f57a421
@rgommers
Copy link
Copy Markdown
Collaborator

rgommers commented Mar 9, 2021

Completed in gh-51790, closing.

@rgommers rgommers closed this Mar 9, 2021
aocsa pushed a commit to Quansight/pytorch that referenced this pull request Mar 15, 2021
Summary:
Fixes pytorch#38681.
A duplicate of pytorch#50052 created to become importable to the fb internal tests.

Pull Request resolved: pytorch#51790

Reviewed By: agolynski

Differential Revision: D26279045

Pulled By: glaringlee

fbshipit-source-id: 348e171dee9c370a76002b65d0c82c329f57a421
xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
Summary:
Fixes pytorch#38681.
A duplicate of pytorch#50052 created to become importable to the fb internal tests.

Pull Request resolved: pytorch#51790

Reviewed By: agolynski

Differential Revision: D26279045

Pulled By: glaringlee

fbshipit-source-id: 348e171dee9c370a76002b65d0c82c329f57a421
@github-actions github-actions Bot deleted the nikitaved/stable_sort_CPU branch February 10, 2024 01:57
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fixes [https://github.com/pytorch/pytorch/issues/38681](https://github.com/pytorch/pytorch/issues/38681) for the CPU.

Pull Request resolved: pytorch#50052

Reviewed By: mrshenli

Differential Revision: D25900823

Pulled By: glaringlee

fbshipit-source-id: 1a3fa336037d0aa2344d79f46dcacfd478a353d1
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
This reverts commit 4d82d19.

Pull Request resolved: pytorch#50752

Reviewed By: zou3519

Differential Revision: D25958146

Pulled By: glaringlee

fbshipit-source-id: f4068d038f9bd337bac8b673eaeb46a4646f6c77
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fixes pytorch#38681.
A duplicate of pytorch#50052 created to become importable to the fb internal tests.

Pull Request resolved: pytorch#51790

Reviewed By: agolynski

Differential Revision: D26279045

Pulled By: glaringlee

fbshipit-source-id: 348e171dee9c370a76002b65d0c82c329f57a421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: bc-breaking Related to a BC-breaking change open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stable torch.sort and torch.argsort

9 participants