Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vmap support for slogdet; fix regression from functorch 0.2.1 #86815

Closed
wants to merge 2 commits into from

Conversation

zou3519
Copy link
Contributor

@zou3519 zou3519 commented Oct 12, 2022

Stack from ghstack:

This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:

  • new one-off test.

This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 12, 2022

🔗 Helpful Links

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

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

❌ 1 Failures

As of commit 3610061:

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 Oct 12, 2022
This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.

ghstack-source-id: a41d5926a7febc50b462842fd54317aba75d2fc3
Pull Request resolved: #86815
@zou3519 zou3519 added this to the 1.13.0 milestone Oct 12, 2022
@zou3519 zou3519 added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 12, 2022
# There's no OpInfo for this
B = 2
x = torch.randn(2, 5, 5, device=device)
self.vmap_outplace_test(torch.slogdet, (x,), {}, (0,))
Copy link
Contributor

@samdow samdow Oct 12, 2022

Choose a reason for hiding this comment

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

Do we also want to call check_vmap_fallback since IIUC it was working before but raising the warning

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I forgot that vmap_outplace_test doesn't do the check_vmap_fallback

…h 0.2.1"

This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.

[ghstack-poisoned]
zou3519 added a commit that referenced this pull request Oct 12, 2022
This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.

ghstack-source-id: d7d300bd6c3ea70df4ad1c3431d2d4baf20cf2fe
Pull Request resolved: #86815
@zou3519
Copy link
Contributor Author

zou3519 commented Oct 13, 2022

@pytorchbot merge -f "unrelated failure"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

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

@github-actions
Copy link

Hey @zou3519.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

zou3519 added a commit that referenced this pull request Oct 13, 2022
…6815)

This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.
Pull Request resolved: #86815
Approved by: https://github.com/samdow
malfet pushed a commit that referenced this pull request Oct 13, 2022
…6815) (#86902)

This PR adds vmap support for slogdet -- slogdet just decomposes into
linalg.slogdet.

This fixes a regression from functorch 0.2.1 (slogdet had a batching
rule then, and doesn't anymore). We didn't catch the regression because
it seems like slogdet doesn't have an OpInfo (I'm not sure if it had one
before).

Test Plan:
- new one-off test.
Pull Request resolved: #86815
Approved by: https://github.com/samdow
@facebook-github-bot facebook-github-bot deleted the gh/zou3519/552/head branch June 8, 2023 19:31
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants