Skip to content

Amend nondeterminism notes#12217

Closed
t-vi wants to merge 2 commits intopytorch:masterfrom
t-vi:determinism
Closed

Amend nondeterminism notes#12217
t-vi wants to merge 2 commits intopytorch:masterfrom
t-vi:determinism

Conversation

@t-vi
Copy link
Copy Markdown
Collaborator

@t-vi t-vi commented Oct 1, 2018

include atomicAdd commentary as this is less well known

There is some discussion in #12207

Unfortunately, I cannot seem to get the ..include working in _tensor_docs.py and _torch_docs.py. I could use a hint for that.

include indexAdd commentary as this is less well known
Comment thread docs/source/notes/randomness.rst Outdated
include :meth:`torch.Tensor.index_add_`, :meth:`torch.Tensor.scatter_add_`,
:meth:`torch.bincount`.
A number of operations have backwards that use :attr:`atomicAdd`, in particular
:meth:`torch.nn.functional.embedding`, :meth:`torch.nn.functional.embedding_bag`,

This comment was marked as off-topic.

@t-vi
Copy link
Copy Markdown
Collaborator Author

t-vi commented Oct 13, 2018

If the other attributions seem OK, I would propose to add this.


There are some PyTorch functions that use CUDA functions that can be a source
of non-determinism. One class of such CUDA functions are atomic operations,
in particular :attr:`atomicAdd`, where the order of parallel additions to the

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Copy Markdown
Collaborator

@ssnl ssnl left a comment

Choose a reason for hiding this comment

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

LGTM assuming that the doc links work

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

SsnL is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@Naman-ntc
Copy link
Copy Markdown
Contributor

These changes do not show up in the master docs, is it expected? @t-vi

@t-vi
Copy link
Copy Markdown
Collaborator Author

t-vi commented Oct 17, 2018

Insofar as the master docs are at a previous git revision and not instantly updated, yes.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
include atomicAdd commentary as this is less well known

There is some discussion in pytorch#12207

Unfortunately, I cannot seem to get the ..include working in `_tensor_docs.py` and `_torch_docs.py`. I could use a hint for that.
Pull Request resolved: pytorch#12217

Differential Revision: D10419739

Pulled By: SsnL

fbshipit-source-id: eecd04fb7486bd9c6ee64cd34859d61a0a97ec4e
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.

6 participants