|
| 1 | +# PyTorch JIT |
| 2 | + |
| 3 | +This folder contains (most of) the C++ code for the PyTorch JIT, a language |
| 4 | +and compiler stack for executing PyTorch models portably and efficiently. To |
| 5 | +learn more about the JIT from a user perspective, please consult our |
| 6 | +[reference documentation](https://pytorch.org/docs/stable/jit.html) and |
| 7 | +[tutorials](https://pytorch.org/tutorials/beginner/Intro_to_TorchScript_tutorial.html). |
| 8 | + |
| 9 | +A brief summary of the source tree: |
| 10 | +- `OVERVIEW.md`: High-level technical overview of the JIT. |
| 11 | +- `frontend/`: Taking PyTorch modules in Python and translating them into the |
| 12 | + JIT IR. |
| 13 | +- `ir/`: Core IR abstractions. |
| 14 | +- `runtime/`: Interpreter, graph execution, and JIT operators. |
| 15 | +- `codegen/`: Generating efficient, hardware-specific code for JIT subgraphs. |
| 16 | +- `serialization/`: Saving and loading modules. |
| 17 | +- `api/`: Any user-facing C++ or Python interfaces. |
| 18 | +- `python/`: Binding stuff into Python or accessing information from the Python |
| 19 | + environment. |
| 20 | +- `testing/`: Utilities and helpers for testing. |
| 21 | +- `mobile/`: Mobile-specific implementations of runtime components. |
| 22 | +- `passes/`: IR-to-IR passes, generally for optimization and lowering. |
| 23 | +- `generated/`: This folder is generated by the PyTorch build, and contains |
| 24 | + bindings for native PyTorch operators into the JIT. |
| 25 | + |
| 26 | +**Refer** to each folder for more in-depth documentation. |
| 27 | + |
| 28 | +Other relevant parts of the codebase not contained here: |
| 29 | +- `aten/src/ATen/core`: contains JIT code re-used by other elements of the |
| 30 | + runtime system (eager, mobile, etc.) |
0 commit comments