Skip to content

Commit 2853f4b

Browse files
Bumping ET Pin to 7-19-2024 pytorch#927 (pytorch#931)
* 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 <[email protected]>
1 parent b0d0d0d commit 2853f4b

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.github/workflows/pull.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,12 @@ jobs:
449449
fi
450450
- name: Install requirements
451451
run: |
452-
# Have to install ET first because deps of Torchchat might not be the same.
453-
export TORCHCHAT_ROOT=$PWD
454-
./scripts/install_et.sh
455-
456452
echo "Intalling pip3 packages"
457453
./install_requirements.sh
458454
455+
export TORCHCHAT_ROOT=$PWD
456+
./scripts/install_et.sh
457+
459458
pip3 list
460459
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
461460
python3 -c 'import torchvision;print(f"torchvision: {torchvision.__version__, torchvision.version.git_version}")'

.pins/et-pin.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
172574a6be5910a4609e4ed1bef2b6b8475ddb3d
1+
c7574994ecd775fdaacc0f2de27089526e05b108

build/model_et.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import torch.nn as nn
99
from executorch.extension.pybindings import portable_lib as exec_lib
1010

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

1214
class PTEModel(nn.Module):
1315
def __init__(self, config, path) -> None:

install_requirements.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_NIGHTLY_URL}" \
7373

7474
# For torchao need to install from github since nightly build doesn't have macos build.
7575
# TODO: Remove this and install nightly build, once it supports macos
76-
$PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@ca1b98db60543a1669a32e842762fc008c178376
76+
$PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@d36de1b144b73bf753bd082109c2b5d0141abd5b
7777
if [[ -x "$(command -v nvidia-smi)" ]]; then
7878
$PYTHON_EXECUTABLE scripts/patch_triton.py
7979
fi

runner/run.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void build_transformer(
156156
#else //__ET_MODEL__
157157
t->runner = new Module(
158158
/* path to PTE model */ model_path,
159-
/* PTE mmap settings */ Module::MlockConfig::UseMlockIgnoreErrors);
159+
/* PTE mmap settings */ Module::LoadMode::MmapUseMlockIgnoreErrors);
160160
#endif
161161
}
162162

0 commit comments

Comments
 (0)