pytorch/docs/cpp/source
Richard Zou 9da5defff6 Package config/template files with torchgen (#78942)
Package config/template files with torchgen

This PR packages native_functions.yaml, tags.yaml and ATen/templates
with torchgen.

This PR:
- adds a step to setup.py to copy the relevant files over into torchgen
- adds a docstring for torchgen (so `import torchgen; help(torchgen)`
says something)
- adds a helper function in torchgen so you can get the torchgen root
directory (and figure out where the packaged files are)
- changes some scripts to explicitly pass the location of torchgen,
which will be helpful for the first item in the Future section.

Future
======

- torchgen, when invoked from the command line, should use sources
in torchgen/packaged instead of aten/src. I'm unable to do this because
people (aka PyTorch CI) invokes `python -m torchgen.gen` without
installing torchgen.
- the source of truth for all of these files should be in torchgen.
This is a bit annoying to execute on due to potential merge conflicts
and dealing with merge systems
- CI and testing. The way things are set up right now is really fragile,
we should have a CI job for torchgen.

Test Plan
=========
I ran the following locally:

```
python -m torchgen.gen -s torchgen/packaged
```
and verified that it outputted files.

Furthermore, I did a setup.py install and checked that the files are
actually being packaged with torchgen.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78942
Approved by: https://github.com/ezyang
2022-06-07 13:33:55 +00:00
..
_static Fix overlapping keywords (#34142) 2020-03-06 19:16:21 -08:00
notes [ONNX] Update onnx function export with comments and clean up (#66817) (#67803) 2021-11-05 10:35:35 -07:00
check-doxygen.sh Package config/template files with torchgen (#78942) 2022-06-07 13:33:55 +00:00
conf.py Update doc copyrights to 2022 2022-04-13 00:25:23 +00:00
Doxyfile Resolve int[]? arguments to new OptionalIntArrayRef class 2022-03-26 01:45:50 +00:00
frontend.rst Update link to example pytorch/examples (#66095) 2021-10-05 12:48:12 -07:00
index.rst Update link to example pytorch/examples (#66095) 2021-10-05 12:48:12 -07:00
installing.rst add VS extension in doc (#63944) 2021-11-11 18:02:08 -08:00
library.rst Add reference documentation for torch/library.h (#41470) 2020-07-17 10:05:16 -07:00