pytorch/tools/codegen
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
..
api move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
dest move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
selective_build [Pytorch Edge] Extend Tracer to Custom Classes (#67004) 2021-10-26 11:38:06 -07:00
__init__.py
code_template.py
context.py avoid error string formatting aten codegen 28s -> 23s (#59848) 2021-06-12 06:58:31 -07:00
gen_backend_stubs.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
gen.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
local.py [PyTorch] Fix const correctness for resize native functions (#55351) 2021-04-21 14:51:41 -07:00
model.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00
utils.py move some codegen utilities into utils.py (#63094) 2021-10-28 10:49:17 -07:00