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
Add code structure and a few other links to CONTRIBUTING.md (#9793)
As titled. This PR mainly adds the mapping between our code structure to
the documentations/tutorials. Also a few other touch-ups.
cc @mergennachin@byjlw
---------
Co-authored-by: Mengwei Liu <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+92-2
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,95 @@ Set up your environment by following the instructions at
9
9
https://pytorch.org/executorch/stable/getting-started-setup.html to clone
10
10
the repo and install the necessary requirements.
11
11
12
+
Refer to this [document](https://pytorch.org/executorch/main/using-executorch-building-from-source.html) to build ExecuTorch from source.
13
+
14
+
### Dev Setup for Android
15
+
For Android, please refer to the [Android documentation](docs/source/using-executorch-android.md).
16
+
17
+
### Dev Setup for Apple
18
+
For Apple, please refer to the [iOS documentation](docs/source/using-executorch-ios.md).
19
+
20
+
21
+
## Codebase structure
22
+
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.
├── <ahref="devtools">devtools</a> - Model profiling, debugging, and inspection. Please refer to the <ahref="docs/source/devtools-overview.md">tools documentation</a> for more information.
42
+
│ ├── <ahref="devtools/bundled_program">bundled_program</a> - a tool for validating ExecuTorch model. See <ahref="docs/source/bundled-io.md">doc</a>.
43
+
│ ├── <ahref="devtools/etdump">etdump</a> - ETDump - a format for saving profiling and debugging data from runtime. See <ahref="docs/source/etdump.md">doc</a>.
44
+
│ ├── <ahref="devtools/etrecord">etrecord</a> - ETRecord - AOT debug artifact for ExecuTorch. See <ahref="https://pytorch.org/executorch/main/etrecord.html">doc</a>.
45
+
│ ├── <ahref="devtools/inspector">inspector</a> - Python API to inspect ETDump and ETRecord. See <ahref="https://pytorch.org/executorch/main/model-inspector.html">doc</a>.
46
+
│ └── <ahref="devtools/visualization">visualization</a> - Visualization tools for representing model structure and performance metrics.
47
+
├── <ahref="docs">docs</a> - Static docs tooling and documentation source files.
48
+
├── <ahref="examples">examples</a> - Examples of various user flows, such as model export, delegates, and runtime execution.
49
+
├── <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.
50
+
│ ├── <ahref="exir/_serialize">_serialize</a> - Serialize final export artifact.
51
+
│ ├── <ahref="exir/backend">backend</a> - Backend delegate ahead of time APIs.
52
+
│ ├── <ahref="exir/capture">capture</a> - Program capture.
53
+
│ ├── <ahref="exir/dialects">dialects</a> - Op sets for various dialects in the export process. Please refer to the <ahref="/docs/source/ir-exir.md">EXIR spec</a> and the <ahref="/docs/source/compiler-backend-dialect.md">backend dialect</a> doc for more details.
54
+
│ ├── <ahref="exir/emit">emit</a> - Conversion from ExportedProgram to ExecuTorch execution instructions.
│ ├── <ahref="exir/verification">verification</a> - IR verification.
60
+
├── <ahref="extension">extension</a> - Extensions built on top of the runtime.
61
+
│ ├── <ahref="extension/android">android</a> - ExecuTorch wrappers for Android apps. Please refer to the <ahref="docs/source/using-executorch-android.md">Android documentation</a> and <ahref="https://pytorch.org/executorch/main/javadoc/">Javadoc</a> for more information.
62
+
│ ├── <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.
63
+
│ ├── <ahref="extension/aten_util">aten_util</a> - Converts to and from PyTorch ATen types.
64
+
│ ├── <ahref="extension/data_loader">data_loader</a> - 1st party data loader implementations.
65
+
│ ├── <ahref="extension/evalue_util">evalue_util</a> - Helpers for working with EValue objects.
66
+
│ ├── <ahref="extension/gguf_util">gguf_util</a> - Tools to convert from the GGUF format.
67
+
│ ├── <ahref="extension/kernel_util">kernel_util</a> - Helpers for registering kernels.
68
+
│ ├── <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.
69
+
│ ├── <ahref="extension/memory_allocator">memory_allocator</a> - 1st party memory allocator implementations.
70
+
│ ├── <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.
71
+
│ ├── <ahref="extension/parallel">parallel</a> - C++ threadpool integration.
72
+
│ ├── <ahref="extension/pybindings">pybindings</a> - Python API for executorch runtime. This is powering up the <ahref="https://pytorch.org/executorch/main/runtime-python-api-reference.html">runtime Python API</a> for ExecuTorch.
73
+
│ ├── <ahref="extension/pytree">pytree</a> - C++ and Python flattening and unflattening lib for pytrees.
74
+
│ ├── <ahref="extension/runner_util">runner_util</a> - Helpers for writing C++ PTE-execution tools.
75
+
│ ├── <ahref="extension/tensor">tensor</a> - Tensor maker and <code>TensorPtr</code>, details in <ahref="/docs/source/extension-tensor.md">this documentation</a>. For how to use <code>TensorPtr</code> and <code>Module</code>, please refer to the <ahref="/docs/source/using-executorch-cpp.md">"Using ExecuTorch with C++"</a> doc.
76
+
│ ├── <ahref="extension/testing_util">testing_util</a> - Helpers for writing C++ tests.
├── <ahref="profiler">profiler</a> - Utilities for profiling runtime execution.
86
+
├── <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.
89
+
│ ├── <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="https://pytorch.org/executorch/main/executorch-runtime-api-reference.html">runtime API documentation</a> for more information.
90
+
│ ├── <ahref="runtime/kernel">kernel</a> - Kernel registration and management.
91
+
│ └── <ahref="runtime/platform">platform</a> - Layer between architecture specific code and portable C++.
92
+
├── <ahref="schema">schema</a> - ExecuTorch PTE file format flatbuffer schemas.
93
+
├── <ahref="scripts">scripts</a> - Utility scripts for building libs, size management, dependency management, etc.
94
+
├── <ahref="shim">shim</a> - Compatibility layer between OSS and Internal builds.
├── 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.
Copy file name to clipboardExpand all lines: docs/source/using-executorch-building-from-source.md
+11
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,17 @@ Or alternatively, [install conda on your machine](https://conda.io/projects/cond
88
88
pip install -e .
89
89
```
90
90
91
+
If C++ files are being modified, you will still have to reinstall ExecuTorch from source.
92
+
93
+
> **_WARNING:_**
94
+
> Some modules can't be imported directly in editable mode. This is a known [issue](https://github.com/pytorch/executorch/issues/9558) and we are actively working on a fix for this. To workaround this:
0 commit comments