Skip to content

Commit 1aa800b

Browse files
committed
fix
1 parent a9acbde commit 1aa800b

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.ci/scripts/test_wheel_package_qnn.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ PYTHON_VERSION=$1
9898
# Check wheel does NOT contain qualcomm/sdk
9999
# ----------------------------
100100
echo "Checking wheel does not contain qualcomm/sdk..."
101-
SDK_FILES=$(unzip -l "$WHEEL_FILE" | awk '{print $4}' | grep "executorch/backends/qualcomm/sdk" || true)
101+
SDK_FILES=$(unzip -l "$WHEEL_FILE" | awk '{print $4}' | grep -E "executorch/backends/qualcomm/sdk" || true)
102102
if [ -n "$SDK_FILES" ]; then
103103
echo "ERROR: Wheel package contains unexpected qualcomm/sdk files:"
104104
echo "$SDK_FILES"
@@ -111,7 +111,7 @@ fi
111111
# Check .so files in the wheel
112112
# ----------------------------
113113
echo "Checking for .so files inside the wheel..."
114-
WHEEL_SO_FILES=$(unzip -l "$WHEEL_FILE" | awk '{print $4}' | grep "executorch/backends/qualcomm/python" || true)
114+
WHEEL_SO_FILES=$(unzip -l "$WHEEL_FILE" | awk '{print $4}' | grep -E "executorch/backends/qualcomm/python" || true)
115115
if [ -z "$WHEEL_SO_FILES" ]; then
116116
echo "ERROR: No .so files found in wheel under executorch/backends/qualcomm/python"
117117
exit 1
@@ -139,12 +139,29 @@ run_core_tests () {
139139
echo "=== [$LABEL] Installing wheel & deps ==="
140140
"$PIPBIN" install --upgrade pip
141141
"$PIPBIN" install "$WHEEL_FILE"
142+
TORCH_VERSION=$(
143+
"$PYBIN" - <<'PY'
144+
import re, pathlib
145+
txt = pathlib.Path("install_requirements.py").read_text()
146+
print(re.search(r'TORCH_VERSION\s*=\s*["\']([^"\']+)["\']', txt).group(1))
147+
PY
148+
)
149+
150+
NIGHTLY_VERSION=$(
151+
"$PYBIN" - <<'PY'
152+
import re, pathlib
153+
txt = pathlib.Path("install_requirements.py").read_text()
154+
print(re.search(r'NIGHTLY_VERSION\s*=\s*["\']([^"\']+)["\']', txt).group(1))
155+
PY
156+
)
157+
echo "=== [$LABEL] Install torch==${TORCH_VERSION}.${NIGHTLY_VERSION} ==="
142158

143-
NIGHTLY_VERSION=$(python -c 'import re; txt=open("install_requirements.py").read(); print(re.search(r"NIGHTLY_VERSION\s*=\s*[\"\']([^\"\']+)[\"\']", txt).group(1))')
159+
# Install torchao based on the pinned PyTorch version
160+
"$PIPBIN" install torch=="${TORCH_VERSION}.${NIGHTLY_VERSION}" --index-url "https://download.pytorch.org/whl/nightly/cpu"
144161

145-
"$PIPBIN" install torch=="2.10.0.${NIGHTLY_VERSION}" --index-url "https://download.pytorch.org/whl/nightly/cpu"
146-
pushd "$REPO_ROOT" / third-party/ao > /dev/null
147-
USE_CPP=0 python setup.py develop
162+
# Install torchao based on the pinned commit from third-party/ao submodule
163+
pushd "$REPO_ROOT/third-party/ao" > /dev/null
164+
USE_CPP=0 "$PYBIN" setup.py develop
148165
popd > /dev/null
149166

150167
echo "=== [$LABEL] Import smoke tests ==="

install_requirements.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#
3737
# NOTE: If you're changing, make the corresponding supported CUDA versions in
3838
# SUPPORTED_CUDA_VERSIONS above if needed.
39+
TORCH_VERSION = "2.10.0"
3940
NIGHTLY_VERSION = "dev20250915"
4041

4142

@@ -57,7 +58,11 @@ def install_requirements(use_pytorch_nightly):
5758
# Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
5859
# that we don't need to set any version number there because they have already
5960
# been installed on CI before this step, so pip won't reinstall them
60-
f"torch==2.10.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torch",
61+
(
62+
f"torch==${TORCH_VERSION}.{NIGHTLY_VERSION}"
63+
if use_pytorch_nightly
64+
else "torch"
65+
),
6166
]
6267

6368
# Install the requirements for core ExecuTorch package.

0 commit comments

Comments
 (0)