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
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,46 @@ 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
+
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.
51
+
12
52
13
53
14
54
## Contributing workflow
@@ -221,7 +261,7 @@ CI is run automatically on all pull requests. However, if you want to run tests
221
261
222
262
- The `sh test/build_size_test.sh` script will compile the C++runtime along with portable kernels.
223
263
- The `test/run_oss_cpp_tests.sh` script will build and run C++ tests locally
224
-
- Running `pytest` from the root directory will run Python tests locally.
264
+
- Running `pytest` from the root directory will run Python tests locally. Make sure to run this after finishing [Dev Install](#dev-install).
225
265
226
266
### Writing Tests
227
267
To help keep code quality high, ExecuTorch uses a combination of unit tests and
@@ -279,7 +319,8 @@ for basics.
279
319
- Good title: "Add XYZ method to ABC"
280
320
- Give the PR a clear and thorough description. Don't just describe what the PR
281
321
does: the diff will do that. Explain *why* you are making this change, in a
282
-
way that will make sense to someone years from now.
322
+
way that will make sense to someone years from now. If the PR is a bug fix,
323
+
include the issue number at the beginning of the description: "Fixes #1234"
283
324
- Explain how you have tested your changes by including repeatable instructions for
284
325
testing the PR.
285
326
- If you added tests, this can be as simple as the command you used to run the
Copy file name to clipboardExpand all lines: docs/source/using-executorch-building-from-source.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,17 @@ portability details.
92
92
pip install -e .
93
93
```
94
94
95
+
If C++ files are being modified, you will still have to reinstall ExecuTorch from source.
96
+
97
+
> **_WARNING:_**
98
+
> 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