@@ -891,20 +891,56 @@ jobs:
891
891
sysctl machdep.cpu.brand_string
892
892
sysctl machdep.cpu.core_count
893
893
fi
894
- - name : Install requirements
894
+ - name : Install torchchat
895
895
run : |
896
896
echo "Intalling pip3 packages"
897
897
./install_requirements.sh
898
-
899
- export TORCHCHAT_ROOT=${PWD}
900
- bash scripts/build_native.sh et
901
898
pip3 list
902
899
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
903
- python3 -c 'import torchvision;print(f"torchvision: {torchvision.__version__, torchvision.version.git_version}")'
904
- python3 -c 'import torchaudio;print(f"torchaudio: {torchaudio.__version__, torchaudio.version.git_version}")'
905
-
906
- - name : Download checkpoints
900
+ - name : Set ET git sha
901
+ id : setup-hash
902
+ run : |
903
+ export TORCHCHAT_ROOT=${PWD}
904
+ echo "et-git-hash=$(cat ${TORCHCHAT_ROOT}/.pins/et-pin.txt)" >> "$GITHUB_ENV"
905
+ - name : Load or install ET
906
+ id : install-et
907
+ uses : actions/cache@v3
908
+ env :
909
+ cache-key : et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}
910
+ with :
911
+ path : ./et-build
912
+ key : ${{env.cache-key}}
913
+ restore-keys : |
914
+ ${{env.cache-key}}
915
+ - if : ${{ steps.install-et.outputs.cache-hit != 'true' }}
916
+ continue-on-error : true
907
917
run : |
918
+ echo "Intalling ExecuTorch"
919
+ export TORCHCHAT_ROOT=${PWD}
920
+ bash scripts/install_et.sh
921
+ - name : Install ET pip
922
+ run : |
923
+ echo "ET build directory"
924
+ ls et-build | cat
925
+
926
+ pushd et-build/src/executorch
927
+ if [ $(git rev-parse HEAD) != ${{env.et-git-hash}} ]; then
928
+ echo "Mismatched hash. Make sure branch install_et.sh matches branch from Github cache."
929
+ echo "On commit $(git rev-parse HEAD)"
930
+ echo "Expected commit ${{env.et-git-hash}}"
931
+ exit 1
932
+ fi
933
+ pip install .
934
+ popd
935
+ - name : Install runner
936
+ run : |
937
+ # Pull submodules (re2, abseil) for Tiktoken
938
+ git submodule sync
939
+ git submodule update --init
940
+
941
+ export TORCHCHAT_ROOT=${PWD}
942
+ cmake -S . -B ./cmake-out -G Ninja
943
+ cmake --build ./cmake-out --target et_run
908
944
909
945
- name : Run inference
910
946
run : |
0 commit comments