Prepare templates (#30982)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30982
This stack is a first step toward an effort to fix, clean up and simplify code generation logic. �Please see the master [task](https://github.com/pytorch/pytorch/issues/30405) to see related discussions and all the known issues.
Main focus of these changes is TensorOptions in code generation.
Goals:
- Remove TensorOptions from generated code wherever it's possible. Leave it only in python/C++ API layers.
- Refactor TensorOptions logic to a single place.
- Log all discovered issues.
Non goals:
- Fix Everything!
- Remove all the hacks in code generation scripts.
- Clean up and defector all code generation scripts.
-----------
In this PR:
Updating the templates.
-----------
Test Plan: Imported from OSS
Differential Revision: D18912680
Pulled By: izdeby
fbshipit-source-id: 9e3828e42ee5c3aefbf3729f4a8d6db813f2e7c3