Skip to content

Commit

Permalink
doc updates (pytorch#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
metascroy authored and malfet committed Jul 17, 2024
1 parent ac46947 commit 62d4041
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
5 changes: 2 additions & 3 deletions docs/executorch_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Before running any commands in torchchat that require ExecuTorch, you must first
To install ExecuTorch, run the following commands *from the torchchat root directory*.

```
export TORCHCHAT_ROOT=${PWD}
export ENABLE_ET_PYBIND=true
./scripts/install_et.sh $ENABLE_ET_PYBIND
export TORCHCHAT_ROOT=$PWD
./scripts/install_et.sh
```

This will download the ExecuTorch repo to ./et-build/src and install various ExecuTorch libraries to ./et-build/install.
13 changes: 7 additions & 6 deletions docs/runner_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ Options:
To build runner-aoti, run the following commands *from the torchchat root directory*

```
# Pull submodules (re2, abseil) for Tiktoken
git submodule sync
git submodule update --init
cmake -S . -B ./cmake-out -G Ninja -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'`
cmake --build ./cmake-out --target aoti_run
./scripts/build_native.sh aoti
```

After running these, the runner-aoti binary is located at ./cmake-out/aoti_run.
Expand Down Expand Up @@ -80,6 +75,12 @@ Before building runner-et, you must first setup ExecuTorch by following [setup E

To build runner-et, run the following commands *from the torchchat root directory*

```
./scripts/build_native.sh et
```

Note: the above script will wipe ./et-build if present and re-install ExecuTorch to ./et-build, which can take a while. If you already installed ExecuTorch, running the commands below will build the runner, without re-installing ExecuTorch from source:

```
# Pull submodules (re2, abseil) for Tiktoken
git submodule sync
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ fi
cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -G Ninja
cmake --build ./cmake-out --target "${TARGET}"_run

printf "Build finished. Please run: \n./cmake-out/${TARGET}_run model.<pte|so> -z tokenizer.model -l <llama version (2 or 3)> -i <prompt>"
printf "Build finished. Please run: \n./cmake-out/${TARGET}_run model.<pte|so> -z tokenizer.model -l <llama version (2 or 3)> -i <prompt>\n"

0 comments on commit 62d4041

Please sign in to comment.