torchgen was changed sometime in the last month. This PR updates our
codegen to work with the new changes.
Coming soon:
- we should be able to autogenerate our codegen and remove the checked
in version.
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.
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