Skip to content

Commit

Permalink
Bumping ET Pin to 7-19-2024 pytorch#927 (pytorch#931)
Browse files Browse the repository at this point in the history
* Update et-pin.txt

* Updating MlockConfig to LoadMode

* Bump AO version to pick up AO PR509 fixing infer_schema

* Reverting GH test set up to match user set up

* Fix custom op

* bump pin

---------

Co-authored-by: Mengwei Liu <larryliu@meta.com>
  • Loading branch information
Jack-Khuu and larryliu0820 authored Jul 19, 2024
1 parent b0d0d0d commit 2853f4b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,12 @@ jobs:
fi
- name: Install requirements
run: |
# Have to install ET first because deps of Torchchat might not be the same.
export TORCHCHAT_ROOT=$PWD
./scripts/install_et.sh
echo "Intalling pip3 packages"
./install_requirements.sh
export TORCHCHAT_ROOT=$PWD
./scripts/install_et.sh
pip3 list
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
python3 -c 'import torchvision;print(f"torchvision: {torchvision.__version__, torchvision.version.git_version}")'
Expand Down
2 changes: 1 addition & 1 deletion .pins/et-pin.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
172574a6be5910a4609e4ed1bef2b6b8475ddb3d
c7574994ecd775fdaacc0f2de27089526e05b108
2 changes: 2 additions & 0 deletions build/model_et.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import torch.nn as nn
from executorch.extension.pybindings import portable_lib as exec_lib

# ET changed the way it's loading the custom ops so it's not included in portable_lib but has to be loaded separately.
from executorch.examples.models.llama2.custom_ops import sdpa_with_kv_cache # no-qa

class PTEModel(nn.Module):
def __init__(self, config, path) -> None:
Expand Down
2 changes: 1 addition & 1 deletion install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_NIGHTLY_URL}" \

# For torchao need to install from github since nightly build doesn't have macos build.
# TODO: Remove this and install nightly build, once it supports macos
$PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@ca1b98db60543a1669a32e842762fc008c178376
$PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@d36de1b144b73bf753bd082109c2b5d0141abd5b
if [[ -x "$(command -v nvidia-smi)" ]]; then
$PYTHON_EXECUTABLE scripts/patch_triton.py
fi
2 changes: 1 addition & 1 deletion runner/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void build_transformer(
#else //__ET_MODEL__
t->runner = new Module(
/* path to PTE model */ model_path,
/* PTE mmap settings */ Module::MlockConfig::UseMlockIgnoreErrors);
/* PTE mmap settings */ Module::LoadMode::MmapUseMlockIgnoreErrors);
#endif
}

Expand Down

0 comments on commit 2853f4b

Please sign in to comment.