@@ -35,10 +35,10 @@ export HF_TOKEN
3535
3636read -r TORCH_VERSION TORCHAO_VERSION < <(
3737 python - << 'PY '
38- from install_requirements import TORCHAO_NIGHTLY_VERSION
38+ from install_requirements import ROCM_TORCHAO_NIGHTLY_VERSION
3939from torch_pin import TORCH_VERSION
4040
41- print(TORCH_VERSION, TORCHAO_NIGHTLY_VERSION )
41+ print(TORCH_VERSION, ROCM_TORCHAO_NIGHTLY_VERSION )
4242PY
4343)
4444# TorchAO ROCm wheels are not exposed by the per-version pip index.
@@ -48,7 +48,22 @@ python -m pip install "torch==${TORCH_VERSION}" \
4848 --index-url " ${PYTORCH_ROCM_INDEX} "
4949python -m pip install -r requirements-dev.txt \
5050 " ${TORCHAO_WHEEL} "
51- python -m pip install --editable . --no-build-isolation
51+ # ExecuTorch requires torchao>=TORCHAO_NIGHTLY_VERSION, which has no ROCm build, so
52+ # install its other dependencies separately to keep the ROCm TorchAO wheel in place.
53+ python -m pip install --editable . --no-build-isolation --no-deps
54+ python - << 'PY ' >"${VOXTRAL_CI_TMPDIR}/executorch-deps.txt"
55+ from importlib.metadata import requires
56+
57+ from packaging.requirements import Requirement
58+
59+ for spec in requires("executorch") or []:
60+ req = Requirement(spec)
61+ if req.name == "torchao":
62+ continue
63+ if req.marker is None or req.marker.evaluate({"extra": ""}):
64+ print(spec)
65+ PY
66+ python -m pip install -r " ${VOXTRAL_CI_TMPDIR} /executorch-deps.txt"
5267
5368if ! command -v conda > /dev/null; then
5469 echo " The ROCm CI image must provide conda for its runtime libraries"
0 commit comments