diff --git a/.gitmodules b/.gitmodules index 870bf10c..b035b996 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/program-data-separation/cpp/executorch b/program-data-separation/cpp/executorch deleted file mode 160000 index 035d25c1..00000000 --- a/program-data-separation/cpp/executorch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 035d25c19bb99fe7b1a1b19babf8117afe1b4d66 diff --git a/program-data-separation/cpp/executorch b/program-data-separation/cpp/executorch new file mode 120000 index 00000000..09b3b7f6 --- /dev/null +++ b/program-data-separation/cpp/executorch @@ -0,0 +1 @@ +../../third-party/executorch \ No newline at end of file diff --git a/program-data-separation/cpp/linear_example/README.md b/program-data-separation/cpp/linear_example/README.md index 1e8a0f95..2ad9b35a 100644 --- a/program-data-separation/cpp/linear_example/README.md +++ b/program-data-separation/cpp/linear_example/README.md @@ -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 @@ -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 ``` diff --git a/program-data-separation/cpp/lora_example/README.md b/program-data-separation/cpp/lora_example/README.md index 877dd803..cafb3755 100644 --- a/program-data-separation/cpp/lora_example/README.md +++ b/program-data-separation/cpp/lora_example/README.md @@ -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 @@ -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 @@ -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 ``` diff --git a/program-data-separation/export_linear.py b/program-data-separation/export_linear.py index a30fe29b..aed3afda 100644 --- a/program-data-separation/export_linear.py +++ b/program-data-separation/export_linear.py @@ -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 @@ -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, )