Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DTensor][2/N][forward fix] extend util function normalize_to_torch_size to accept single int size #113244

Closed
wants to merge 1 commit into from

Conversation

XilunWu
Copy link
Contributor

@XilunWu XilunWu commented Nov 8, 2023

Stack from ghstack (oldest at bottom):

Summary:
In #113105 I used the util function normalize_to_torch_size to unify the size argument that may be in multiple formats. However the use of that function would only handle input of Sequence[int] therefore I submit this forward fix to have normalize_to_torch_size also able to handle the size argument of type int and torch.Size. A side product of this fix is it also enables 3 dtensor op tests (check test_dtensor_ops.py).

Test:
pytest test/distributed/_tensor/test_dtensor_ops.py

cc @wanchaol

…ize to accept single int size

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Nov 8, 2023

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Unrelated Failure

As of commit 4230f93 with merge base 56e514a (image):

NEW FAILURE - The following job has failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

XilunWu added a commit that referenced this pull request Nov 8, 2023
…ize to accept single int size

ghstack-source-id: 68c8b9a884419cbc948c918b74c25c2c26b8bac2
Pull Request resolved: #113244
@XilunWu XilunWu requested a review from wanchaol November 8, 2023 05:37
@XilunWu XilunWu added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR module: dtensor distributed tensor tag release notes: distributed (dtensor) release notes category better-engineering Relatively self-contained tasks for better engineering contributors labels Nov 8, 2023
Copy link
Contributor

@wanchaol wanchaol left a comment

Choose a reason for hiding this comment

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

cool, looks good!

@XilunWu
Copy link
Contributor Author

XilunWu commented Nov 8, 2023

@pytorchbot merge -f "unrelated periodic CI failure - macos build"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/XilunWu/49/head branch November 12, 2023 15:23
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…ize to accept single int size (pytorch#113244)

**Summary**:
In pytorch#113105 I used the util function `normalize_to_torch_size` to unify the `size` argument that may be in multiple formats. However the use of that function would only handle input of `Sequence[int]` therefore I submit this forward fix to have `normalize_to_torch_size` also able to handle the size argument of type `int` and `torch.Size`. A side product of this fix is it also enables 3 dtensor op tests (check `test_dtensor_ops.py`).

**Test**:
`pytest test/distributed/_tensor/test_dtensor_ops.py`

Pull Request resolved: pytorch#113244
Approved by: https://github.com/wanchaol
ghstack dependencies: pytorch#113105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-engineering Relatively self-contained tasks for better engineering contributors ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged module: dtensor distributed tensor tag release notes: distributed (dtensor) release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants