You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+60-28Lines changed: 60 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,34 +20,66 @@ For Apple, please refer to the [iOS documentation](docs/source/using-executorch-
20
20
21
21
## Codebase structure
22
22
23
-
For brevity only including a portion of the subtree:
24
-
25
-
*[backends](backends) - Backend implementations for various hardware targets. Each backend uses partitioner to split the graph into subgraphs that can be executed on specific hardware, quantizer to optimize model precision, and runtime components to execute the graph on target hardware. For details refer to the [backend
26
-
documentation](docs/source/backend-delegates-integration.md) and the [Export and Lowering tutorial](docs/source/using-executorch-export.md) for more information.
27
-
*[exir](exir) - EXport Intermediate Representation (EXIR) is a format for representing the result of [`torch.export`](https://pytorch.org/docs/main/export.ir_spec.html). This directory contains utilities and passes for lowering the EXIR graphs into different [dialects](/docs/source/ir-exir.md) and eventually suitable to run on target hardware.
28
-
*[examples](examples) - Example applications and demos using ExecuTorch.
29
-
*[extension](extension) - Extensions to the core ExecuTorch runtime.
30
-
*[android](extension/android) - JNI layer and Android native APIs for ExecuTorch. Please refer to the [Android documentation](docs/source/using-executorch-android.md) for more information.
31
-
*[apple](extension/apple) - Apple native APIs for ExecuTorch. Please refer to the [iOS documentation](docs/source/using-executorch-ios.md) and [how to integrate into Apple platform](https://pytorch.org/executorch/stable/apple-runtime.html) for more information.
32
-
*[data_loader](extension/data_loader) - Data loader extension.
33
-
*[module](extension/module) - An abstraction that deserializes and executes an ExecuTorch artifact (.pte file). Refer to the [module documentation](docs/source/extension-module.md) for more information.
34
-
*[training](extension/training) - Training extension.
35
-
*[llm](extension/llm) - Library to run LLM on ExecuTorch including common optimization passes, runtime C++ components. Please refer to the [LLM documentation](docs/source/llm/getting-started.md) for more information.
36
-
*[tensor](extension/tensor) - Tensor maker and `TensorPtr`, details in [this documentation](/docs/source/extension-tensor.md).
37
-
*[threadpool](extension/threadpool) - Threadpool.
38
-
*[kernels](kernels) - Kernel implementations for various operators.
*[runtime](runtime) - Core runtime components in C++, with corresponding Python APIs. These components are used to execute the ExecuTorch program. Please refer to the [runtime documentation](docs/source/runtime-overview.md) for more information.
*[core](runtime/core) - Basic components such as `Tensor`, `EValue`, `Error` and `Result` etc.
45
-
*[executor](runtime/executor) - Runtime components that execute the ExecuTorch program, such as `Program`, `Method`. Refer to the [runtime API documentation](docs/source/executorch-runtime-api-reference.rst) for more information.
*[tools](tools) - Tools for development and debugging. Please refer to the [tools documentation](docs/source/devtools-overview.md) for more information.
50
-
*[docs](docs) - Documentation source files.
23
+
<pre>
24
+
25
+
executorch
26
+
├── <ahref="backends">backends</a> - Backend delegate implementations for various hardware targets. Each backend uses partitioner to split the graph into subgraphs that can be executed on specific hardware, quantizer to optimize model precision, and runtime components to execute the graph on target hardware. For details refer to the <ahref="docs/source/backend-delegates-integration.md">backend documentation</a> and the <ahref="docs/source/using-executorch-export.md">Export and Lowering tutorial</a> for more information.
27
+
├── <ahref="codegen">codegen</a> - Tooling to autogenerate bindings between kernels and the runtime.
├── <ahref="docs">docs</a> - Static docs tooling and documentation source files.
30
+
├── <ahref="examples">examples</a> - Examples of various user flows, such as model export, delegates, and runtime execution.
31
+
├── <ahref="exir">exir</a> - Ahead-of-time library: model capture and lowering APIs. EXport Intermediate Representation (EXIR) is a format for representing the result of <ahref="https://pytorch.org/docs/main/export.ir_spec.html">torch.export</a>. This directory contains utilities and passes for lowering the EXIR graphs into different <ahref="/docs/source/ir-exir.md">dialects</a> and eventually suitable to run on target hardware.
32
+
│ ├── <ahref="exir/_serialize">_serialize</a> - Serialize final export artifact.
33
+
│ ├── <ahref="exir/backend">backend</a> - Backend delegate ahead of time APIs.
34
+
│ ├── <ahref="exir/capture">capture</a> - Program capture.
35
+
│ ├── <ahref="exir/dialects">dialects</a> - Op sets for various dialects in the export process.
36
+
│ ├── <ahref="exir/emit">emit</a> - Conversion from ExportedProgram to ExecuTorch execution instructions.
│ ├── <ahref="exir/verification">verification</a> - IR verification.
42
+
├── <ahref="extension">extension</a> - Extensions built on top of the runtime.
43
+
│ ├── <ahref="extension/android">android</a> - ExecuTorch wrappers for Android apps. Please refer to the <ahref="docs/source/using-executorch-android.md">Android documentation</a> for more information.
44
+
│ ├── <ahref="extension/apple">apple</a> - ExecuTorch wrappers for iOS apps. Please refer to the <ahref="docs/source/using-executorch-ios.md">iOS documentation</a> and <ahref="https://pytorch.org/executorch/stable/apple-runtime.html">how to integrate into Apple platform</a> for more information.
45
+
│ ├── <ahref="extension/aten_util">aten_util</a> - Converts to and from PyTorch ATen types.
46
+
│ ├── <ahref="extension/data_loader">data_loader</a> - 1st party data loader implementations.
47
+
│ ├── <ahref="extension/evalue_util">evalue_util</a> - Helpers for working with EValue objects.
48
+
│ ├── <ahref="extension/gguf_util">gguf_util</a> - Tools to convert from the GGUF format.
49
+
│ ├── <ahref="extension/kernel_util">kernel_util</a> - Helpers for registering kernels.
50
+
│ ├── <ahref="extension/llm">llm</a> - Library to run LLM on ExecuTorch including common optimization passes, runtime C++ components. Please refer to the <ahref="docs/source/llm/getting-started.md">LLM documentation</a> for more information.
51
+
│ ├── <ahref="extension/memory_allocator">memory_allocator</a> - 1st party memory allocator implementations.
52
+
│ ├── <ahref="extension/module">module</a> - A simplified C++ wrapper for the runtime. An abstraction that deserializes and executes an ExecuTorch artifact (.pte file). Refer to the <ahref="docs/source/extension-module.md">module documentation</a> for more information.
53
+
│ ├── <ahref="extension/parallel">parallel</a> - C++ threadpool integration.
54
+
│ ├── <ahref="extension/pybindings">pybindings</a> - Python API for executorch runtime.
55
+
│ ├── <ahref="extension/pytree">pytree</a> - C++ and Python flattening and unflattening lib for pytrees.
56
+
│ ├── <ahref="extension/runner_util">runner_util</a> - Helpers for writing C++ PTE-execution tools.
57
+
│ ├── <ahref="extension/tensor">tensor</a> - Tensor maker and <code>TensorPtr</code>, details in <ahref="/docs/source/extension-tensor.md">this documentation</a>.
58
+
│ ├── <ahref="extension/testing_util">testing_util</a> - Helpers for writing C++ tests.
├── <ahref="profiler">profiler</a> - Utilities for profiling runtime execution.
68
+
├── <ahref="runtime">runtime</a> - Core C++ runtime. These components are used to execute the ExecuTorch program. Please refer to the <ahref="docs/source/runtime-overview.md">runtime documentation</a> for more information.
│ ├── <ahref="runtime/core">core</a> - Core structures used across all levels of the runtime. Basic components such as <code>Tensor</code>, <code>EValue</code>, <code>Error</code> and <code>Result</code> etc.
71
+
│ ├── <ahref="runtime/executor">executor</a> - Model loading, initialization, and execution. Runtime components that execute the ExecuTorch program, such as <code>Program</code>, <code>Method</code>. Refer to the <ahref="docs/source/executorch-runtime-api-reference.rst">runtime API documentation</a> for more information.
72
+
│ ├── <ahref="runtime/kernel">kernel</a> - Kernel registration and management.
73
+
│ └── <ahref="runtime/platform">platform</a> - Layer between architecture specific code and portable C++.
74
+
├── <ahref="schema">schema</a> - ExecuTorch PTE file format flatbuffer schemas.
75
+
├── <ahref="scripts">scripts</a> - Utility scripts for building libs, size management, dependency management, etc.
├── <ahref="tools">tools</a> - Development tool management. Please refer to the <ahref="docs/source/devtools-overview.md">tools documentation</a> for more information.
79
+
├── <ahref="devtools">devtools</a> - Model profiling, debugging, and introspection.
80
+
├── <ahref="shim">shim</a> - Compatibility layer between OSS and Internal builds.
81
+
└── <ahref="util">util</a> - Various helpers and scripts.
├── extension # Extensions built on top of the runtime.
87
-
| ├── android # ExecuTorch wrappers for Android apps.
88
-
| ├── apple # ExecuTorch wrappers for iOS apps.
89
-
| ├── aten_util # Converts to and from PyTorch ATen types.
90
-
| ├── data_loader # 1st party data loader implementations.
91
-
| ├── evalue_util # Helpers for working with EValue objects.
92
-
| ├── gguf_util # Tools to convert from the GGUF format.
93
-
| ├── kernel_util # Helpers for registering kernels.
94
-
| ├── memory_allocator # 1st party memory allocator implementations.
95
-
| ├── module # A simplified C++ wrapper for the runtime.
96
-
| ├── parallel # C++ threadpool integration.
97
-
| ├── pybindings # Python API for executorch runtime.
98
-
| ├── pytree # C++ and Python flattening and unflattening lib for pytrees.
99
-
| ├── runner_util # Helpers for writing C++ PTE-execution tools.
100
-
| ├── testing_util # Helpers for writing C++ tests.
101
-
| ├── training # Experimental libraries for on-device training
102
-
├── kernels # 1st party kernel implementations.
103
-
| ├── aten
104
-
| ├── optimized
105
-
| ├── portable # Reference implementations of ATen operators.
106
-
| ├── prim_ops # Special ops used in executorch runtime for control flow and symbolic primitives.
107
-
| ├── quantized
108
-
├── profiler # Utilities for profiling runtime execution.
109
-
├── runtime # Core C++ runtime.
110
-
| ├── backend # Backend delegate runtime APIs.
111
-
| ├── core # Core structures used across all levels of the runtime.
112
-
| ├── executor # Model loading, initialization, and execution.
113
-
| ├── kernel # Kernel registration and management.
114
-
| ├── platform # Layer between architecture specific code and portable C++.
115
-
├── schema # ExecuTorch PTE file format flatbuffer schemas.
116
-
├── scripts # Utility scripts for building libs, size management, dependency management, etc.
117
-
├── tools # Development tool management.
118
-
├── devtools # Model profiling, debugging, and introspection.
119
-
├── shim # Compatibility layer between OSS and Internal builds
120
-
├── test # Broad scoped end-to-end tests.
121
-
├── third-party # Third-party dependencies.
122
-
├── util # Various helpers and scripts.
123
-
```
68
+
Please refer to the [Codebase structure](CONTRIBUTING.md#codebase-structure) section of the [Contributing Guidelines](CONTRIBUTING.md) for more details.
124
69
125
70
## License
126
71
ExecuTorch is BSD licensed, as found in the LICENSE file.
0 commit comments