Skip to content

Conversation

@tarun292
Copy link
Contributor

@tarun292 tarun292 commented Apr 1, 2024

Summary:
This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:

  • It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
  • Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Differential Revision: D55577025

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 1, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2786

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit e52a09f with merge base 554eebe (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 1, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

facebook-github-bot pushed a commit that referenced this pull request Apr 1, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Differential Revision: D55577025
using torch::executor::ArrayRef;
using torch::executor::testing::TensorFactory;

TEST(SortUtilTest, SortTensorTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice test!

facebook-github-bot pushed a commit that referenced this pull request Apr 1, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

tarun292 added a commit that referenced this pull request Apr 1, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
tarun292 added a commit that referenced this pull request Apr 1, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

facebook-github-bot pushed a commit that referenced this pull request Apr 2, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

tarun292 added a commit that referenced this pull request Apr 2, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

facebook-github-bot pushed a commit that referenced this pull request Sep 30, 2024
Summary:

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

tarun292 added a commit that referenced this pull request Oct 8, 2024
Summary:
Pull Request resolved: #2786

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

tarun292 and others added 2 commits October 9, 2024 16:15
Summary:
Pull Request resolved: #2786

This diff adds a simple sort utility that sorts a tensor's values and returns the sorted values and the sorted indices in the out tensors that are provided.
There are currently two limitations to this sort:
- It only supports 1D tensors currently, has to be extended to support 2D and greater tensors.
- Input types are assumed to be float and it currently asserts on that. This has to be templatized to support all dtypes.

Reviewed By: iseeyuan

Differential Revision: D55577025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55577025

@tarun292 tarun292 closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants