Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/pytorch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2bb2a9c522e7f944bf98c02c9b85fd959fa0bf0b
a95d76a65dd39d7c6fe5c68b06f950b7fdf06a8f
16 changes: 6 additions & 10 deletions .ci/scripts/test-rocm-aoti.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set -euo pipefail
ROCM_VERSION="${ROCM_VERSION:-7.2}"
ROCM_PATH="${ROCM_PATH:-/opt/rocm}"
PYTORCH_ROCM_INDEX="${PYTORCH_ROCM_INDEX:-https://download.pytorch.org/whl/test/rocm${ROCM_VERSION}}"
TORCHAO_ROCM_WHEEL_BASE="${TORCHAO_ROCM_WHEEL_BASE:-https://download.pytorch.org/whl/nightly/rocm${ROCM_VERSION}}"
ROCM_CI_TMP_ROOT="${RUNNER_TEMP:-/tmp}"
mkdir -p "${ROCM_CI_TMP_ROOT}" 2>/dev/null || ROCM_CI_TMP_ROOT=/tmp
ROCM_CI_TMPDIR="$(mktemp -d "${ROCM_CI_TMP_ROOT}/executorch-rocm-ci.XXXXXX")"
Expand All @@ -22,21 +21,19 @@ export CUDA_VISIBLE_DEVICES=0
export TORCHINDUCTOR_CACHE_DIR="${ROCM_CI_TMPDIR}/inductor-cache"
export TORCHINDUCTOR_COMPILE_THREADS=1

read -r TORCH_VERSION TORCHAO_VERSION < <(
read -r TORCH_VERSION TORCHAO_VERSION TORCHAO_INDEX < <(
python - <<'PY'
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
from torch_pin import TORCH_VERSION
from install_requirements import TORCHAO_INDEX_URL, TORCHAO_NIGHTLY_VERSION
from torch_pin import ROCM_PYTORCH_VERSION

print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
print(ROCM_PYTORCH_VERSION, TORCHAO_NIGHTLY_VERSION, f"{TORCHAO_INDEX_URL}/cpu")
PY
)
# TorchAO ROCm wheels are not exposed by the per-version pip index.
TORCHAO_WHEEL="${TORCHAO_ROCM_WHEEL_BASE}/torchao-${TORCHAO_VERSION}"
TORCHAO_WHEEL+="%2Brocm${ROCM_VERSION}-cp310-abi3-manylinux_2_28_x86_64.whl"
python -m pip install "torch==${TORCH_VERSION}" \
--index-url "${PYTORCH_ROCM_INDEX}"
python -m pip install -r requirements-dev.txt \
"${TORCHAO_WHEEL}"
"torchao==${TORCHAO_VERSION}" \
--extra-index-url "${TORCHAO_INDEX}"
EXECUTORCH_BUILD_MINIMAL=1 \
python -m pip install --editable . --no-build-isolation

Expand All @@ -54,7 +51,6 @@ import triton
assert torch.version.hip is not None, "PyTorch is not a ROCm build"
assert torch.version.cuda is None, "PyTorch unexpectedly reports a CUDA runtime"
assert torch.cuda.is_available(), "No AMD GPU is visible through PyTorch"
assert "+rocm" in torchao.__version__, "TorchAO is not a ROCm build"

device = torch.cuda.get_device_properties(0)
arch = device.gcnArchName.split(":", 1)[0]
Expand Down
33 changes: 7 additions & 26 deletions .ci/scripts/test-rocm-voxtral.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ROCM_PATH="${ROCM_PATH:-/opt/rocm}"
EXPECTED_ROCM_ARCH="${EXPECTED_ROCM_ARCH:-gfx950}"
EXPECTED_WARP_SIZE="${EXPECTED_WARP_SIZE:-64}"
PYTORCH_ROCM_INDEX="${PYTORCH_ROCM_INDEX:-https://download.pytorch.org/whl/test/rocm${ROCM_VERSION}}"
TORCHAO_ROCM_WHEEL_BASE="${TORCHAO_ROCM_WHEEL_BASE:-https://download.pytorch.org/whl/nightly/rocm${ROCM_VERSION}}"
VOXTRAL_CI_TMP_ROOT="${RUNNER_TEMP:-/tmp}"
if ! mkdir -p "${VOXTRAL_CI_TMP_ROOT}" 2>/dev/null ||
[[ ! -w "${VOXTRAL_CI_TMP_ROOT}" ]]; then
Expand All @@ -33,37 +32,20 @@ mkdir -p "${HF_HOME}"
HF_TOKEN="$(printf '%s' "${SECRET_EXECUTORCH_HF_TOKEN}" | tr -d '\r\n')"
export HF_TOKEN

read -r TORCH_VERSION TORCHAO_VERSION < <(
read -r TORCH_VERSION TORCHAO_VERSION TORCHAO_INDEX < <(
python - <<'PY'
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
from torch_pin import TORCH_VERSION
from install_requirements import TORCHAO_INDEX_URL, TORCHAO_NIGHTLY_VERSION
from torch_pin import ROCM_PYTORCH_VERSION

print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
print(ROCM_PYTORCH_VERSION, TORCHAO_NIGHTLY_VERSION, f"{TORCHAO_INDEX_URL}/cpu")
PY
)
# TorchAO ROCm wheels are not exposed by the per-version pip index.
TORCHAO_WHEEL="${TORCHAO_ROCM_WHEEL_BASE}/torchao-${TORCHAO_VERSION}"
TORCHAO_WHEEL+="%2Brocm${ROCM_VERSION}-cp310-abi3-manylinux_2_28_x86_64.whl"
python -m pip install "torch==${TORCH_VERSION}" \
--index-url "${PYTORCH_ROCM_INDEX}"
python -m pip install -r requirements-dev.txt \
"${TORCHAO_WHEEL}"
# ExecuTorch requires torchao>=TORCHAO_NIGHTLY_VERSION, which has no ROCm build, so
# install its other dependencies separately to keep the ROCm TorchAO wheel in place.
python -m pip install --editable . --no-build-isolation --no-deps
python - <<'PY' >"${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
from importlib.metadata import requires

from packaging.requirements import Requirement

for spec in requires("executorch") or []:
req = Requirement(spec)
if req.name == "torchao":
continue
if req.marker is None or req.marker.evaluate({"extra": ""}):
print(spec)
PY
python -m pip install -r "${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
"torchao==${TORCHAO_VERSION}" \
--extra-index-url "${TORCHAO_INDEX}"
python -m pip install --editable . --no-build-isolation

if ! command -v conda >/dev/null; then
echo "The ROCm CI image must provide conda for its runtime libraries"
Expand All @@ -85,7 +67,6 @@ import torchao
assert torch.version.hip is not None, "PyTorch is not a ROCm build"
assert torch.version.cuda is None, "PyTorch unexpectedly reports a CUDA runtime"
assert torch.cuda.is_available(), "No AMD GPU is visible through PyTorch"
assert "+rocm" in torchao.__version__, "TorchAO is not a ROCm build"

device = torch.cuda.get_device_properties(0)
arch = device.gcnArchName.split(":", 1)[0]
Expand Down
18 changes: 5 additions & 13 deletions .ci/scripts/test_wheel_package_qnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,25 +149,17 @@ run_core_tests () {

echo "=== [$LABEL] Installing wheel & deps ==="
"$PIPBIN" install --upgrade pip
TORCH_VERSION=$(
read -r PYTORCH_VERSION PYTORCH_INDEX_URL < <(
"$PYBIN" - <<'PY'
import runpy
module_vars = runpy.run_path("torch_pin.py")
print(module_vars["TORCH_VERSION"])
print(module_vars["PYTORCH_VERSION"], module_vars["PYTORCH_INDEX_URL"])
PY
)
echo "=== [$LABEL] Install torch==${PYTORCH_VERSION} ==="

# NIGHTLY_VERSION=$(
# "$PYBIN" - <<'PY'
# import runpy
# module_vars = runpy.run_path("torch_pin.py")
# print(module_vars["NIGHTLY_VERSION"])
# PY
# )
echo "=== [$LABEL] Install torch==${TORCH_VERSION} ==="

# Install torch based on the pinned PyTorch version, preferring the PyTorch test index
"$PIPBIN" install torch=="${TORCH_VERSION}" --extra-index-url "https://download.pytorch.org/whl/test"
"$PIPBIN" install torch=="${PYTORCH_VERSION}" \
--index-url "${PYTORCH_INDEX_URL}/cpu"
"$PIPBIN" install wheel

# Install torchao based on the pinned commit from third-party/ao submodule
Expand Down
Loading
Loading