Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
url = https://github.com/pytorch/executorch.git
branch = release/1.0

[submodule "program-data-separation/cpp/executorch"]
path = program-data-separation/cpp/executorch
url = https://github.com/pytorch/executorch.git
branch = main
1 change: 0 additions & 1 deletion program-data-separation/cpp/executorch
Submodule executorch deleted from 035d25
1 change: 1 addition & 0 deletions program-data-separation/cpp/executorch
4 changes: 2 additions & 2 deletions program-data-separation/cpp/linear_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Note:
See [program-data-separation](../../README.md) for instructions.

## Install runtime dependencies.
The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/program-data-separation/cpp/executorch`. To initialize it:
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:
```bash
cd ~/executorch-examples/
git submodule sync
Expand All @@ -48,7 +48,7 @@ git submodule update --init --recursive
Install dev requirements for ExecuTorch

```bash
cd ~/executorch-examples/program-data-separation/cpp/executorch
cd ~/executorch-examples/third-party/executorch
pip install -r requirements-dev.txt
```

Expand Down
21 changes: 9 additions & 12 deletions program-data-separation/cpp/lora_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ If you want to train your own LoRA adapters, [Unsloth](https://unsloth.ai/) prov

## Install ExecuTorch

[Install from source](https://docs.pytorch.org/executorch/stable/using-executorch-building-from-source.html#install-executorch-pip-package-from-source):
Install executorch>=1.1.0:
```bash
pip install executorch>=1.1.0
```

Alternatively, [install from source](https://docs.pytorch.org/executorch/stable/using-executorch-building-from-source.html#install-executorch-pip-package-from-source):

```bash
# Navigate to the executorch submodule
cd ~/executorch-examples/program-data-separation/cpp/executorch
cd ~/executorch-examples/third-party/executorch

# Update submodules
git submodule sync
Expand All @@ -43,13 +48,6 @@ git submodule update --init --recursive
./install_executorch.sh --editable
```

Alternatively, install from a recent nightly build:
```bash
pip install executorch==1.1.0.devYYYYMMDD --extra-index-url https://download.pytorch.org/whl/nightly/cpu
```

Use main or a recent nightly, as some features are not available in executorch==1.0.0.

## Export models

```bash
Expand Down Expand Up @@ -87,20 +85,19 @@ models/

## Install runtime dependencies

The ExecuTorch repository is configured as a git submodule at `~/executorch-examples/program-data-separation/cpp/executorch`. To initialize it:
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:

```bash
cd ~/executorch-examples/

# Update submodules
git submodule update --remote program-data-separation/cpp/executorch
git submodule sync
git submodule update --init --recursive
```

Install dev requirements for ExecuTorch:
```bash
cd ~/executorch-examples/program-data-separation/cpp/executorch
cd ~/executorch-examples/third-party/executorch
pip install -r requirements-dev.txt
```

Expand Down
4 changes: 2 additions & 2 deletions program-data-separation/export_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
to_edge_transform_and_lower,
)
from executorch.exir.passes.external_constants_pass import (
delegate_external_constants_pass,
delegate_external_constants_pass_unlifted,
)
from executorch.exir.program import ExecutorchProgramManager
from torch.export import export
Expand Down Expand Up @@ -78,7 +78,7 @@ def main() -> None:
)

partial_function = partial(
delegate_external_constants_pass,
delegate_external_constants_pass_unlifted,
ep=exported_program,
gen_tag_fn=lambda x: model_name,
)
Expand Down