Skip to content

Conversation

@zou3519
Copy link
Contributor

@zou3519 zou3519 commented Dec 13, 2022

Stack from ghstack:

This PR:

  • adds VmapInterpreter.randomness. This returns the randomness option
    the user provided in vmap(..., randomness=...)
  • adds randomness in the info object passed to the vmap staticmethod of
    autograd.Function. This is so that the user can handle random operations
    on their own terms (if randomness="error", and if the autograd.Function
    has random operations, then it is the user's responsiblity to raise an
    error).

Test Plan:

  • updated unittest

…ject

This PR:
- adds VmapInterpreter.randomness. This returns the randomness option
the user provided in vmap(..., randomness=...)
- adds randomness in the info object passed to the vmap staticmethod of
autograd.Function. This is so that the user can handle random operations
on their own terms (if randomness="error", and if the autograd.Function
has random operations, then it is the user's responsiblity to raise an
error).

Test Plan:
- updated unittest

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 13, 2022

🔗 Helpful Links

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

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

❌ 2 Failures

As of commit e29ae66:

NEW FAILURES - The following jobs have failed:

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

zou3519 added a commit that referenced this pull request Dec 13, 2022
…ject

This PR:
- adds VmapInterpreter.randomness. This returns the randomness option
the user provided in vmap(..., randomness=...)
- adds randomness in the info object passed to the vmap staticmethod of
autograd.Function. This is so that the user can handle random operations
on their own terms (if randomness="error", and if the autograd.Function
has random operations, then it is the user's responsiblity to raise an
error).

Test Plan:
- updated unittest

ghstack-source-id: 46713c7
Pull Request resolved: #90789
@zou3519 zou3519 added the release notes: torch.func release notes category for torch.vmap or torch.func.* APIs label Dec 13, 2022
@zou3519 zou3519 requested review from samdow and soulitzer December 14, 2022 16:24
… in info object"

This PR:
- adds VmapInterpreter.randomness. This returns the randomness option
the user provided in vmap(..., randomness=...)
- adds randomness in the info object passed to the vmap staticmethod of
autograd.Function. This is so that the user can handle random operations
on their own terms (if randomness="error", and if the autograd.Function
has random operations, then it is the user's responsiblity to raise an
error).

Test Plan:
- updated unittest

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ffa37c9.

@facebook-github-bot facebook-github-bot deleted the gh/zou3519/580/head branch June 8, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged 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