Skip to content

Conversation

@janeyx99
Copy link
Contributor

Old behavior would have adadelta foreach sending tensors to the slow path if they were not all the same dtype nor on the same device.

This PR adds grouping for adadelta optimizer so that it would run foreach in batches, allowing more users to benefit from foreach perf.

Of course, we should ensure that the new implementation works, so there are new tests to ensure this behavior is not broken.

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 11, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 853066c:
💚 Looks good so far! There are no failures yet. 💚

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

@janeyx99 janeyx99 added ciflow/trunk Trigger trunk jobs on your pull request release notes: nn release notes category topic: performance topic category and removed ciflow/trunk Trigger trunk jobs on your pull request labels Jan 11, 2023
@janeyx99 janeyx99 force-pushed the group-adadelta-foreach branch from 949af47 to 86b9b51 Compare January 12, 2023 00:01
@janeyx99 janeyx99 added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 12, 2023
@janeyx99 janeyx99 added the ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR label Jan 12, 2023
time python test/run_test.py --verbose -i distributed/_shard/test_replicated_tensor
# Other tests
time python test/run_test.py --verbose -i test_cuda_primary_ctx
time python test/run_test.py --verbose -i test_optim -- -k optimizers_with_varying_tensors
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pytorch/pytorch-dev-infra to make sure this is okay. The total time it would add to multigpu is about 13 seconds.

@janeyx99 janeyx99 marked this pull request as ready for review January 12, 2023 16:32
@janeyx99 janeyx99 requested a review from albanD as a code owner January 12, 2023 16:32
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Looks good, just the seed needs to be change, the rest are nits

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

SGTM

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 13, 2023

This PR has been accepted with the accept2ship label. Attempting to merge now.

@pytorchbot merge

@pytorch-bot pytorch-bot bot removed the accept2ship label Jan 13, 2023
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: nn release notes category topic: performance topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants