Skip to content

Commit 7f2a593

Browse files
authored
use the same pytorch/torchao version same as ET repro in the wheel package test (#14560)
As title, it was hardcoded to use nightly before, causing gaps as the main executorch flow
1 parent b13a77a commit 7f2a593

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

.ci/scripts/test_wheel_package_qnn.sh

Lines changed: 26 additions & 4 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,8 +139,30 @@ run_core_tests () {
139139
echo "=== [$LABEL] Installing wheel & deps ==="
140140
"$PIPBIN" install --upgrade pip
141141
"$PIPBIN" install "$WHEEL_FILE"
142-
"$PIPBIN" install torch=="2.9.0.dev20250906" --index-url "https://download.pytorch.org/whl/nightly/cpu"
143-
"$PIPBIN" install --pre torchao --index-url "https://download.pytorch.org/whl/nightly/cpu"
142+
TORCH_VERSION=$(
143+
"$PYBIN" - <<'PY'
144+
import runpy
145+
module_vars = runpy.run_path("torch_pin.py")
146+
print(module_vars["TORCH_VERSION"])
147+
PY
148+
)
149+
150+
NIGHTLY_VERSION=$(
151+
"$PYBIN" - <<'PY'
152+
import runpy
153+
module_vars = runpy.run_path("torch_pin.py")
154+
print(module_vars["NIGHTLY_VERSION"])
155+
PY
156+
)
157+
echo "=== [$LABEL] Install torch==${TORCH_VERSION}.${NIGHTLY_VERSION} ==="
158+
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"
161+
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
165+
popd > /dev/null
144166

145167
echo "=== [$LABEL] Import smoke tests ==="
146168
"$PYBIN" -c "import executorch; print('executorch imported successfully')"

0 commit comments

Comments
 (0)