Commit Graph

2 Commits

Author SHA1 Message Date
Richard Zou
2788574f29 [functorch] Only generate vmap plumbing for operations in the allowlist (pytorch/functorch#758)
After this change, everytime someone adds a batching rule using
VMAP_SUPPORT, then that person needs to add the batching rule to the
allowlist.

The motivation behind this change is to keep VmapGeneratedPlumbing.h as
short as possible so that functorch can build with more pytorch/pytorch
commits.

We can delete the allowlist after torchgen goes in.
2022-07-21 13:41:32 -07:00
Richard Zou
a4f0fb9044 [functorch] Make functorch codegen more robust (pytorch/functorch#693)
Previously the functorch codegen would only work if you didn't have a
PyTorch develop install in your environment. This PR changes it so that
the functorch codegen works when you have a PyTorch develop install in
the environment.

The reason for this change is that the PyTorch develop install adds a
`tools` module into the environment. It turns out we can just rely on
the tools module and this makes our codegen more robust to changes to
pytorch/pytorch codegen (when compared to what we were doing before,
which was keeping a copy of the PyTorch codegen inside of the functorch
repo).

Test Plan:
- wait for tests
2022-07-21 13:41:29 -07:00