Skip to content

Conversation

qqaatw
Copy link
Collaborator

@qqaatw qqaatw commented Apr 19, 2023

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 19, 2023

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

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

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

@qqaatw qqaatw added ciflow/trunk Trigger trunk jobs on your pull request release notes: torch.func release notes category for torch.vmap or torch.func.* APIs labels Apr 19, 2023
qqaatw added a commit that referenced this pull request Apr 19, 2023
ghstack-source-id: 69be6b1
Pull Request resolved: #99517
qqaatw added a commit that referenced this pull request Apr 19, 2023
ghstack-source-id: 6461bb7
Pull Request resolved: #99517
@@ -30,6 +30,7 @@
"aten::log_softmax.int",
"aten::logdet",
"aten::masked_select_backward",
"aten::max_pool1d",
Copy link
Contributor

Choose a reason for hiding this comment

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

max_pool1d is CompositeImplicitAutograd. This means we should not actually be writing a batching rule for it, and we instead should be writing a batching rule for the things it decomposes into and instead put it into BatchRulesDecomposition

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

Since max_pool1d is CompositeImplicitAutograd (that is, it decomposes into other PyTorch operations), we should add a rule for it to also decompose under vmap by adding a line into batchrulesdecompositions.cpp, instead of writing a brand-new batching rule for it.

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

awesome! glad it worked out

@facebook-github-bot facebook-github-bot deleted the gh/qqaatw/17/head branch June 8, 2023 18: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 open source 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