Skip to content

Commit 7d0a9d2

Browse files
authored
Remove duplicate executorch submodule, use symlink instead (meta-pytorch#215)
1 parent 8c6eac5 commit 7d0a9d2

5 files changed

Lines changed: 14 additions & 21 deletions

File tree

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
url = https://github.com/pytorch/executorch.git
44
branch = release/1.0
55

6-
[submodule "program-data-separation/cpp/executorch"]
7-
path = program-data-separation/cpp/executorch
8-
url = https://github.com/pytorch/executorch.git
9-
branch = main
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../third-party/executorch

program-data-separation/cpp/linear_example/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Note:
3939
See [program-data-separation](../../README.md) for instructions.
4040

4141
## Install runtime dependencies.
42-
The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/program-data-separation/cpp/executorch`. To initialize it:
42+
The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/third-party/executorch`, with `program-data-separation/cpp/executorch` being a symlink to it. To initialize:
4343
```bash
4444
cd ~/executorch-examples/
4545
git submodule sync
@@ -48,7 +48,7 @@ git submodule update --init --recursive
4848
Install dev requirements for ExecuTorch
4949

5050
```bash
51-
cd ~/executorch-examples/program-data-separation/cpp/executorch
51+
cd ~/executorch-examples/third-party/executorch
5252
pip install -r requirements-dev.txt
5353
```
5454

program-data-separation/cpp/lora_example/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ If you want to train your own LoRA adapters, [Unsloth](https://unsloth.ai/) prov
2929

3030
## Install ExecuTorch
3131

32-
[Install from source](https://docs.pytorch.org/executorch/stable/using-executorch-building-from-source.html#install-executorch-pip-package-from-source):
32+
Install executorch>=1.1.0:
33+
```bash
34+
pip install executorch>=1.1.0
35+
```
36+
37+
Alternatively, [install from source](https://docs.pytorch.org/executorch/stable/using-executorch-building-from-source.html#install-executorch-pip-package-from-source):
3338

3439
```bash
3540
# Navigate to the executorch submodule
36-
cd ~/executorch-examples/program-data-separation/cpp/executorch
41+
cd ~/executorch-examples/third-party/executorch
3742

3843
# Update submodules
3944
git submodule sync
@@ -43,13 +48,6 @@ git submodule update --init --recursive
4348
./install_executorch.sh --editable
4449
```
4550

46-
Alternatively, install from a recent nightly build:
47-
```bash
48-
pip install executorch==1.1.0.devYYYYMMDD --extra-index-url https://download.pytorch.org/whl/nightly/cpu
49-
```
50-
51-
Use main or a recent nightly, as some features are not available in executorch==1.0.0.
52-
5351
## Export models
5452

5553
```bash
@@ -87,20 +85,19 @@ models/
8785

8886
## Install runtime dependencies
8987

90-
The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/program-data-separation/cpp/executorch`. To initialize it:
88+
The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/third-party/executorch`, with `program-data-separation/cpp/executorch` being a symlink to it. To initialize:
9189

9290
```bash
9391
cd ~/executorch-examples/
9492

9593
# Update submodules
96-
git submodule update --remote program-data-separation/cpp/executorch
9794
git submodule sync
9895
git submodule update --init --recursive
9996
```
10097

10198
Install dev requirements for ExecuTorch:
10299
```bash
103-
cd ~/executorch-examples/program-data-separation/cpp/executorch
100+
cd ~/executorch-examples/third-party/executorch
104101
pip install -r requirements-dev.txt
105102
```
106103

program-data-separation/export_linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
to_edge_transform_and_lower,
2323
)
2424
from executorch.exir.passes.external_constants_pass import (
25-
delegate_external_constants_pass,
25+
delegate_external_constants_pass_unlifted,
2626
)
2727
from executorch.exir.program import ExecutorchProgramManager
2828
from torch.export import export
@@ -78,7 +78,7 @@ def main() -> None:
7878
)
7979

8080
partial_function = partial(
81-
delegate_external_constants_pass,
81+
delegate_external_constants_pass_unlifted,
8282
ep=exported_program,
8383
gen_tag_fn=lambda x: model_name,
8484
)

0 commit comments

Comments
 (0)