Skip to content
Merged
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/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ case "${IMAGE_NAME}" in
LINTRUNNER=""
GCC_VERSION=11
CUDA_WINDOWS_CROSS_COMPILE=yes
CUDA_VERSION=13.0
CUDA_VERSION=13.2
SKIP_PYTORCH=yes
;;
executorch-ubuntu-24.04-gcc14)
Expand Down
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 @@
e91899ca45f99811049ac7d539820f92a9acddde
31a77fc9c0a7c6fff15a1ff58c743f53b1a9d457
1 change: 1 addition & 0 deletions .ci/docker/common/install_cuda_windows_cross_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ declare -A CUDA_DRIVER_MAP=(
["12.8"]="12.8.1:572.61"
["12.9"]="12.9.1:576.57"
["13.0"]="13.0.2:"
["13.2"]="13.2.2:"
)

install_mingw() {
Expand Down
57 changes: 57 additions & 0 deletions .ci/scripts/install-rocm-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

set -euo pipefail

if ! command -v conda >/dev/null; then
echo "The ROCm CI image must provide conda for its C++ runtime libraries"
exit 1
fi
conda install -y --override-channels -c conda-forge \
gxx_linux-64=16.2.0 libstdcxx-ng=16.2.0 libgcc-ng=16.2.0 \
sysroot_linux-64=2.28
ROCM_PYTHON_PREFIX="$(python -c 'import sys; print(sys.prefix)')"
export CC="${ROCM_PYTHON_PREFIX}/bin/x86_64-conda-linux-gnu-cc"
export CXX="${ROCM_PYTHON_PREFIX}/bin/x86_64-conda-linux-gnu-c++"
export LD_LIBRARY_PATH="${ROCM_PYTHON_PREFIX}/lib:${LD_LIBRARY_PATH:-}"

TORCH_VERSION="$(python -c 'from torch_pin import TORCH_VERSION; print(TORCH_VERSION)')"
python -m pip install "torch==${TORCH_VERSION}+rocm${ROCM_VERSION}" \
--index-url "${PYTORCH_ROCM_INDEX}"
ROCM_SDK_VERSION="$(python -c 'import rocm_sdk; print(rocm_sdk.__version__)')"
python -m pip install "rocm[devel]==${ROCM_SDK_VERSION}" \
--index-url "${PYTORCH_ROCM_INDEX}"
ROCM_PATH="$(python -m rocm_sdk path --root)"
export ROCM_PATH
export ROCM_HOME="${ROCM_PATH}"
export HIP_PATH="${ROCM_PATH}"
export PATH="${ROCM_PATH}/bin:${PATH}"
export LD_LIBRARY_PATH="${ROCM_PYTHON_PREFIX}/lib:${ROCM_PATH}/lib:${ROCM_PATH}/lib64:${LD_LIBRARY_PATH:-}"
python -m pip install -r requirements-dev.txt ninja
# ROCm 7.14 TorchAO wheels are Python-only. Build the pinned extension against
# the installed torch and HIP libraries instead of reusing a ROCm 7.2 binary.
USE_CPP=1 USE_CPU_KERNELS=1 MAX_JOBS="${MAX_JOBS:-8}" \
python -m pip install --no-build-isolation --no-deps third-party/ao

python - <<'PY'
from pathlib import Path

import torch
import torchao
from packaging.version import Version

from install_requirements import TORCHAO_MIN_VERSION

assert torch.version.hip is not None, "PyTorch is not a ROCm build"
assert Version(torchao.__version__) >= Version(TORCHAO_MIN_VERSION)
libraries = list(Path(torchao.__file__).parent.glob("_C*.so"))
assert libraries, "TorchAO was built without its compiled extension"
for library in libraries:
# TorchAO's import logs load failures and continues; CI must fail on them.
torch.ops.load_library(str(library))
print("Loaded TorchAO extensions:", libraries)
PY
2 changes: 1 addition & 1 deletion .ci/scripts/test-cuda-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

set -exu

CUDA_VERSION=${1:-"13.0"}
CUDA_VERSION=${1:-"13.2"}

echo "=== Testing ExecuTorch CUDA ${CUDA_VERSION} Build ==="

Expand Down
28 changes: 3 additions & 25 deletions .ci/scripts/test-rocm-aoti.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

set -euo pipefail

ROCM_VERSION="${ROCM_VERSION:-7.2}"
ROCM_VERSION="${ROCM_VERSION:-7.14}"
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}}"
PYTORCH_ROCM_INDEX="${PYTORCH_ROCM_INDEX:-https://download.pytorch.org/whl/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,30 +21,10 @@ 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 < <(
python - <<'PY'
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
from torch_pin import TORCH_VERSION

print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
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}"
source .ci/scripts/install-rocm-dependencies.sh
EXECUTORCH_BUILD_MINIMAL=1 \
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 C++ runtime libraries"
exit 1
fi
conda install -y -c conda-forge 'libstdcxx-ng>=12'

python - <<'PY'
import torch
import torchao
Expand All @@ -54,7 +33,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
35 changes: 7 additions & 28 deletions .ci/scripts/test-rocm-voxtral.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

set -euo pipefail

ROCM_VERSION="${ROCM_VERSION:-7.2}"
ROCM_VERSION="${ROCM_VERSION:-7.14}"
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}}"
PYTORCH_ROCM_INDEX="${PYTORCH_ROCM_INDEX:-https://download.pytorch.org/whl/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,23 +32,8 @@ 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 < <(
python - <<'PY'
from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
from torch_pin import TORCH_VERSION

print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION)
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.
source .ci/scripts/install-rocm-dependencies.sh
# Keep the source-built TorchAO extension while installing the remaining dependencies.
python -m pip install --editable . --no-build-isolation --no-deps
python - <<'PY' >"${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
from importlib.metadata import requires
Expand All @@ -65,16 +49,12 @@ for spec in requires("executorch") or []:
PY
python -m pip install -r "${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"

if ! command -v conda >/dev/null; then
echo "The ROCm CI image must provide conda for its runtime libraries"
exit 1
fi
conda install -y -c conda-forge ffmpeg 'libstdcxx-ng>=12'
conda install -y -c conda-forge ffmpeg

python -m pip install 'fsspec[http]<=2025.3.0'
python -m pip install datasets huggingface_hub librosa mistral-common safetensors soundfile
python -m pip install torchcodec==0.11.0 \
--extra-index-url https://download.pytorch.org/whl/test/cpu
python -m pip install torchcodec==0.17.0 \
--index-url https://download.pytorch.org/whl/cpu

python - <<'PY'
import os
Expand All @@ -85,7 +65,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
2 changes: 1 addition & 1 deletion .ci/scripts/test_model_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ elif [[ "$MODEL_NAME" == *whisper* ]] || [ "$MODEL_NAME" = "voxtral_realtime" ];
fi
fi
pip install datasets soundfile
pip install torchcodec==0.11.0 --extra-index-url https://download.pytorch.org/whl/test/cpu
pip install torchcodec==0.17.0 --index-url https://download.pytorch.org/whl/cpu
python -c "from datasets import load_dataset;import soundfile as sf;sample = load_dataset('distil-whisper/librispeech_long', 'clean', split='validation')[0]['audio'];sf.write('${MODEL_DIR}/$AUDIO_FILE', sample['array'][:sample['sampling_rate']*30], sample['sampling_rate'])"
fi

Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/test_wheel_package_qnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ 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"
# Install torch based on the pinned PyTorch version.
"$PIPBIN" install --no-cache-dir torch=="${TORCH_VERSION}" --index-url "https://download.pytorch.org/whl/cpu"
"$PIPBIN" install wheel

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