Skip to content

add doc regarding that grads are pointing to bucket views in DDP#43282

Closed
zhaojuanmao wants to merge 1 commit intogh/zhaojuanmao/50/basefrom
gh/zhaojuanmao/50/head
Closed

add doc regarding that grads are pointing to bucket views in DDP#43282
zhaojuanmao wants to merge 1 commit intogh/zhaojuanmao/50/basefrom
gh/zhaojuanmao/50/head

Conversation

@zhaojuanmao
Copy link
Copy Markdown
Contributor

@zhaojuanmao zhaojuanmao commented Aug 19, 2020

Stack from ghstack:

add doc regarding that grads are pointing to bucket views in DDP

Differential Revision: D23220110

@zhaojuanmao zhaojuanmao requested a review from apaszke as a code owner August 19, 2020 19:17
zhaojuanmao added a commit that referenced this pull request Aug 19, 2020
add doc regarding that grads are pointing to bucket views in DDP

Differential Revision: [D23220110](https://our.internmc.facebook.com/intern/diff/D23220110/)

ghstack-source-id: 110266907
Pull Request resolved: #43282
@zhaojuanmao zhaojuanmao requested a review from mrshenli August 19, 2020 19:19
@dr-ci
Copy link
Copy Markdown

dr-ci bot commented Aug 19, 2020

💊 CI failures summary and remediations

As of commit 5c3e819 (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

Since your merge base is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 2 times.

reduction functions might not get called.

.. warning::
Please noted that gradients are views of buffer tensors maintained by
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

buffer -> bucket?


.. warning::
Please noted that gradients are views of buffer tensors maintained by
DistributedDataParallel reducer since PyTorch 1.7. This can help save
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

double quote all code text, i.e., DistributedDataParallel . Also applies to detach_(), Optimizer.zero_grad(), and torch/optim/optimizer.py.

Comment on lines +225 to +226
please refer to the Optimizer.zero_grad() function in
torch/optim/optimizer.py as the solution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we convert this to a link? e.g.

please refer to the ``zero_grad()`` function in :class:`torch.optim.Optimizer` as a solution. 

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not 100% sure the above would work. Please confirm that by building the docs.

@zhaojuanmao
Copy link
Copy Markdown
Contributor Author

it is not needed any more

@facebook-github-bot facebook-github-bot deleted the gh/zhaojuanmao/50/head branch February 22, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants