pytorch/tools/codegen/api
Brian Hirsh 665c148e42 move some codegen utilities into utils.py (#63094)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63094

This PR:
- Moves `FileManager` and its dependencies (`assert_never` and other imports) to `utils.py`, and updates all of the call-sites with the fresh imports
- Passes the list of NativeFunction objects into `gen_trace_type` directly, instead of requiring the function to regenerate it (we already have it)

The purpose of the reshuffling is to avoid circular dependencies in the next PR, where I add codegen for the functionalization pass, which gets called from `gen.py` (but depends on some stuff from the autograd codegen - in partulcar, the list of view ops).

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D31942096

Pulled By: bdhirsh

fbshipit-source-id: 36118facae61f25f8922bb43ad2818c80b53504e
2021-10-28 10:49:17 -07:00
..
__init__.py Rewrite of ATen code generator (#42629) 2020-08-31 09:00:22 -07:00
autograd.py Make autograd codegen for differentiable outputs safer to use (#65823) 2021-10-01 07:27:57 -07:00
cpp.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
dispatcher.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
meta.py Un-ignore F403 in .flake8 (#55838) 2021-04-13 09:24:07 -07:00
native.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
python.py Add an optional Device parameter to pin_memory/is_pinned that does nothing (#60201) 2021-06-28 10:38:52 -07:00
structured.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
translate.py clamp: port to structured kernel (#61361) 2021-07-23 02:02:07 -07:00
types.py Rename int to long, add more C++ types. (#66108) 2021-10-08 08:25:06 -07:00