Skip to content

Commit a3d518c

Browse files
committed
Merge codebase structure in CONTRIBUTING.md and Directory structure in README.md
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 2cb852b commit a3d518c

File tree

2 files changed

+61
-84
lines changed

2 files changed

+61
-84
lines changed

CONTRIBUTING.md

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,66 @@ For Apple, please refer to the [iOS documentation](docs/source/using-executorch-
2020

2121
## Codebase structure
2222

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.
39-
* [optimized](kernels/optimized) - Optimized kernel implementations.
40-
* [portable](kernels/portable) - Portable kernel implementations.
41-
* [quantized](kernels/quantized) - Quantized kernel implementations.
42-
* [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.
43-
* [backend](runtime/backend) - Backend delegate registry.
44-
* [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.
46-
* [kernel](runtime/kernel) - Kernel registry.
47-
* [platform](runtime/platform) - Platform abstraction layer.
48-
* [schema](schema) - FlatBuffer schema definitions.
49-
* [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+
├── <a href="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 <a href="docs/source/backend-delegates-integration.md">backend documentation</a> and the <a href="docs/source/using-executorch-export.md">Export and Lowering tutorial</a> for more information.
27+
├── <a href="codegen">codegen</a> - Tooling to autogenerate bindings between kernels and the runtime.
28+
├── <a href="configurations">configurations</a> - Configuration files.
29+
├── <a href="docs">docs</a> - Static docs tooling and documentation source files.
30+
├── <a href="examples">examples</a> - Examples of various user flows, such as model export, delegates, and runtime execution.
31+
├── <a href="exir">exir</a> - Ahead-of-time library: model capture and lowering APIs. EXport Intermediate Representation (EXIR) is a format for representing the result of <a href="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 <a href="/docs/source/ir-exir.md">dialects</a> and eventually suitable to run on target hardware.
32+
│ ├── <a href="exir/_serialize">_serialize</a> - Serialize final export artifact.
33+
│ ├── <a href="exir/backend">backend</a> - Backend delegate ahead of time APIs.
34+
│ ├── <a href="exir/capture">capture</a> - Program capture.
35+
│ ├── <a href="exir/dialects">dialects</a> - Op sets for various dialects in the export process.
36+
│ ├── <a href="exir/emit">emit</a> - Conversion from ExportedProgram to ExecuTorch execution instructions.
37+
│ ├── <a href="exir/operator">operator</a> - Operator node manipulation utilities.
38+
│ ├── <a href="exir/passes">passes</a> - Built-in compiler passes.
39+
│ ├── <a href="exir/program">program</a> - Export artifacts.
40+
│ ├── <a href="exir/serde">serde</a> - Graph module serialization/deserialization.
41+
│ ├── <a href="exir/verification">verification</a> - IR verification.
42+
├── <a href="extension">extension</a> - Extensions built on top of the runtime.
43+
│ ├── <a href="extension/android">android</a> - ExecuTorch wrappers for Android apps. Please refer to the <a href="docs/source/using-executorch-android.md">Android documentation</a> for more information.
44+
│ ├── <a href="extension/apple">apple</a> - ExecuTorch wrappers for iOS apps. Please refer to the <a href="docs/source/using-executorch-ios.md">iOS documentation</a> and <a href="https://pytorch.org/executorch/stable/apple-runtime.html">how to integrate into Apple platform</a> for more information.
45+
│ ├── <a href="extension/aten_util">aten_util</a> - Converts to and from PyTorch ATen types.
46+
│ ├── <a href="extension/data_loader">data_loader</a> - 1st party data loader implementations.
47+
│ ├── <a href="extension/evalue_util">evalue_util</a> - Helpers for working with EValue objects.
48+
│ ├── <a href="extension/gguf_util">gguf_util</a> - Tools to convert from the GGUF format.
49+
│ ├── <a href="extension/kernel_util">kernel_util</a> - Helpers for registering kernels.
50+
│ ├── <a href="extension/llm">llm</a> - Library to run LLM on ExecuTorch including common optimization passes, runtime C++ components. Please refer to the <a href="docs/source/llm/getting-started.md">LLM documentation</a> for more information.
51+
│ ├── <a href="extension/memory_allocator">memory_allocator</a> - 1st party memory allocator implementations.
52+
│ ├── <a href="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 <a href="docs/source/extension-module.md">module documentation</a> for more information.
53+
│ ├── <a href="extension/parallel">parallel</a> - C++ threadpool integration.
54+
│ ├── <a href="extension/pybindings">pybindings</a> - Python API for executorch runtime.
55+
│ ├── <a href="extension/pytree">pytree</a> - C++ and Python flattening and unflattening lib for pytrees.
56+
│ ├── <a href="extension/runner_util">runner_util</a> - Helpers for writing C++ PTE-execution tools.
57+
│ ├── <a href="extension/tensor">tensor</a> - Tensor maker and <code>TensorPtr</code>, details in <a href="/docs/source/extension-tensor.md">this documentation</a>.
58+
│ ├── <a href="extension/testing_util">testing_util</a> - Helpers for writing C++ tests.
59+
│ ├── <a href="extension/threadpool">threadpool</a> - Threadpool.
60+
│ └── <a href="extension/training">training</a> - Experimental libraries for on-device training.
61+
├── <a href="kernels">kernels</a> - 1st party kernel implementations.
62+
│ ├── <a href="kernels/aten">aten</a> - ATen kernel implementations.
63+
│ ├── <a href="kernels/optimized">optimized</a> - Optimized kernel implementations.
64+
│ ├── <a href="kernels/portable">portable</a> - Reference implementations of ATen operators.
65+
│ ├── <a href="kernels/prim_ops">prim_ops</a> - Special ops used in executorch runtime for control flow and symbolic primitives.
66+
│ └── <a href="kernels/quantized">quantized</a> - Quantized kernel implementations.
67+
├── <a href="profiler">profiler</a> - Utilities for profiling runtime execution.
68+
├── <a href="runtime">runtime</a> - Core C++ runtime. These components are used to execute the ExecuTorch program. Please refer to the <a href="docs/source/runtime-overview.md">runtime documentation</a> for more information.
69+
│ ├── <a href="runtime/backend">backend</a> - Backend delegate runtime APIs.
70+
│ ├── <a href="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+
│ ├── <a href="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 <a href="docs/source/executorch-runtime-api-reference.rst">runtime API documentation</a> for more information.
72+
│ ├── <a href="runtime/kernel">kernel</a> - Kernel registration and management.
73+
│ └── <a href="runtime/platform">platform</a> - Layer between architecture specific code and portable C++.
74+
├── <a href="schema">schema</a> - ExecuTorch PTE file format flatbuffer schemas.
75+
├── <a href="scripts">scripts</a> - Utility scripts for building libs, size management, dependency management, etc.
76+
├── <a href="test">test</a> - Broad scoped end-to-end tests.
77+
├── <a href="third-party">third-party</a> - Third-party dependencies.
78+
├── <a href="tools">tools</a> - Development tool management. Please refer to the <a href="docs/source/devtools-overview.md">tools documentation</a> for more information.
79+
├── <a href="devtools">devtools</a> - Model profiling, debugging, and introspection.
80+
├── <a href="shim">shim</a> - Compatibility layer between OSS and Internal builds.
81+
└── <a href="util">util</a> - Various helpers and scripts.
82+
</pre>
5183

5284
&nbsp;
5385

README.md

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -65,62 +65,7 @@ We welcome contributions. To get started review the [guidelines](CONTRIBUTING.md
6565

6666
## Directory Structure
6767

68-
```
69-
executorch
70-
├── backends # Backend delegate implementations.
71-
├── codegen # Tooling to autogenerate bindings between kernels and the runtime.
72-
├── configurations
73-
├── docs # Static docs tooling.
74-
├── examples # Examples of various user flows, such as model export, delegates, and runtime execution.
75-
├── exir # Ahead-of-time library: model capture and lowering APIs.
76-
| ├── _serialize # Serialize final export artifact.
77-
| ├── backend # Backend delegate ahead of time APIs
78-
| ├── capture # Program capture.
79-
| ├── dialects # Op sets for various dialects in the export process.
80-
| ├── emit # Conversion from ExportedProgram to ExecuTorch execution instructions.
81-
| ├── operator # Operator node manipulation utilities.
82-
| ├── passes # Built-in compiler passes.
83-
| ├── program # Export artifacts.
84-
| ├── serde # Graph module serialization/deserialization.
85-
| ├── verification # IR verification.
86-
├── 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.
12469

12570
## License
12671
ExecuTorch is BSD licensed, as found in the LICENSE file.

0 commit comments

Comments
 (0)