[functorch] vmap codegen, for review (pytorch/functorch#546)
Here's how the output looks:
- https://github.com/pytorch/functorch/blob/main/functorch/csrc/VmapGeneratedPlumbing.h
- (yes, we check in the codegen as a short-term solution because we
didn't have time to add it as a step to setup.py)
short-term / long-term plans
- we've copy-pasted tools/codegen from pytorch/pytorch into functorch
- In the long term, pytorch/pytorch will package its codegen somehow
(https://github.com/pytorch/pytorch/issues/73212)
Questions for reviewer:
- Are we using PyTorch's codegen abstractions the right way?