pytorch/tools/codegen
Peter Bell 9a7732e852 CMake: Support dynamic codegen outputs (#68246)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68246

Currently the codegen produces a list of output files at CMake
configuration time and the build system has no way of knowing if the
outputs change. So if that happens, you basically need to delete the
build folder and re-run from scratch.

Instead, this generates the output list every time the code generation
is run and changes the output to be a `.cmake` file that gets included
in the main cmake configuration step. That means the build system
knows to re-run cmake automatically if a new output is added. So, for
example you could change the number of shards that `Operators.cpp` is
split into and it all just works transparently to the user.

Test Plan: Imported from OSS

Reviewed By: zou3519

Differential Revision: D32596268

Pulled By: albanD

fbshipit-source-id: 15e0896aeaead90aed64b9c8fda70cf28fef13a2
2021-12-07 15:58:06 -08:00
..
api Add Lazy Tensor codegen infra (#69020) 2021-12-02 07:51:52 -08:00
dest Clean up dead code (#69296) 2021-12-03 15:11:38 -08:00
selective_build [Pytorch Edge] Generic Build Features for Selective Build (#67817) 2021-11-09 15:37:21 -08: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.py CMake: Support dynamic codegen outputs (#68246) 2021-12-07 15:58:06 -08:00
gen_backend_stubs.py Add Lazy Tensor codegen infra (#69020) 2021-12-02 07:51:52 -08:00
gen_functionalization_type.py [bugfix] functionalization pass for view ops without a 'self' first argumennt (#68339) 2021-11-15 11:58:21 -08:00
gen_lazy_tensor.py Add Lazy Tensor codegen infra (#69020) 2021-12-02 07:51:52 -08:00
local.py [PyTorch] Fix const correctness for resize native functions (#55351) 2021-04-21 14:51:41 -07:00
model.py Back out "Add efficient zero tensors" (#69327) 2021-12-02 19:11:41 -08:00
utils.py CMake: Support dynamic codegen outputs (#68246) 2021-12-07 15:58:06 -08:00