KEMBAR78
Add batch decomposition for torch.unsafe_chunk by guilhermeleobas · Pull Request #110862 · pytorch/pytorch · GitHub
Skip to content

Conversation

@guilhermeleobas
Copy link
Collaborator

@guilhermeleobas guilhermeleobas commented Oct 9, 2023

Stack from ghstack (oldest at bottom):

This updates the docs as well to show torch.unsafe_chunk. Should the unsafe_* functions should not appear in the docs?

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 9, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 3068b1d with merge base f77b9bf (image):
💚 Looks good so far! There are no failures yet. 💚

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

guilhermeleobas added a commit that referenced this pull request Oct 9, 2023
ghstack-source-id: 7085acc
Pull Request resolved: #110862
@guilhermeleobas guilhermeleobas marked this pull request as draft October 9, 2023 13:13
@guilhermeleobas guilhermeleobas marked this pull request as ready for review October 9, 2023 17:02
@guilhermeleobas guilhermeleobas requested review from kshitij12345 and zou3519 and removed request for mruberry and ngimel October 9, 2023 17:21
OpInfo('unsafe_chunk',
dtypes=all_types_and_complex_and(torch.bool, torch.bfloat16, torch.float16, torch.chalf),
sample_inputs_func=sample_inputs_chunk,
check_batched_forward_grad=False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

gradcheck uses legacy vmap implementation for batched forward and unsafe_chunk uses unsafe_split which doesn't have a batching rule for legacy vmap. (unsafe_split OpInfo also sets this to False)

Copy link
Collaborator

@kshitij12345 kshitij12345 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @guilhermeleobas

cc: @zou3519 for binding approval.

@guilhermeleobas guilhermeleobas added the release notes: torch.func release notes category for torch.vmap or torch.func.* APIs label Oct 10, 2023
Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

Please remove the mention from the docs, otherwise, this LGTM

This updates the docs as well to show `torch.unsafe_chunk`. Should the `unsafe_*` functions should not appear in the docs?


[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 1a0a345
Pull Request resolved: #110862
@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 26, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

This updates the docs as well to show `torch.unsafe_chunk`. Should the `unsafe_*` functions should not appear in the docs?


[ghstack-poisoned]
This updates the docs as well to show `torch.unsafe_chunk`. Should the `unsafe_*` functions should not appear in the docs?


[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Oct 30, 2023
ghstack-source-id: b873d23
Pull Request resolved: #110862
@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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/guilhermeleobas/8/head branch November 3, 2023 14:27
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
This updates the docs as well to show `torch.unsafe_chunk`. Should the `unsafe_*` functions should not appear in the docs?

Pull Request resolved: pytorch#110862
Approved by: https://github.com/kshitij12345, https://github.com/zou3519
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
This updates the docs as well to show `torch.unsafe_chunk`. Should the `unsafe_*` functions should not appear in the docs?

Pull Request resolved: pytorch#110862
Approved by: https://github.com/kshitij12345, https://github.com/zou3519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: torch.func release notes category for torch.vmap or torch.func.* APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants