[NPU] Update torch and torch_npu version for NPU (#20013)
This commit is contained in:
@@ -3,6 +3,7 @@ set -euo pipefail
|
||||
|
||||
PIP_INSTALL="python3 -m pip install --no-cache-dir"
|
||||
DEVICE_TYPE=$1
|
||||
OPTIONAL_DEPS="${2:-}"
|
||||
|
||||
|
||||
# Install the required dependencies in CI.
|
||||
@@ -32,11 +33,19 @@ ${PIP_INSTALL} memfabric-hybrid==1.0.5
|
||||
|
||||
|
||||
### Install PyTorch and PTA
|
||||
PYTORCH_VERSION="2.8.0"
|
||||
TORCHVISION_VERSION="0.23.0"
|
||||
${PIP_INSTALL} torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} --index-url ${TORCH_CACHE_URL:="https://download.pytorch.org/whl/cpu"} --extra-index-url ${PYPI_CACHE_URL:="https://pypi.org/simple/"}
|
||||
PTA_URL="https://gitcode.com/Ascend/pytorch/releases/download/v7.3.0-pytorch2.8.0/torch_npu-2.8.0.post2-cp311-cp311-manylinux_2_28_aarch64.whl"
|
||||
${PIP_INSTALL} ${PTA_URL}
|
||||
if [ -n "$OPTIONAL_DEPS" ]; then
|
||||
PYTORCH_VERSION="2.10.0"
|
||||
TORCHVISION_VERSION="0.25.0"
|
||||
${PIP_INSTALL} torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} --index-url ${TORCH_CACHE_URL:="https://download.pytorch.org/whl/cpu"} --extra-index-url ${PYPI_CACHE_URL:="https://pypi.org/simple/"}
|
||||
PTA_URL="https://gitcode.com/Ascend/pytorch/releases/download/7.3.0.alpha002/torch_npu-2.10.0rc2-cp311-cp311-manylinux_2_28_aarch64.whl"
|
||||
${PIP_INSTALL} ${PTA_URL}
|
||||
else
|
||||
PYTORCH_VERSION="2.8.0"
|
||||
TORCHVISION_VERSION="0.23.0"
|
||||
${PIP_INSTALL} torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} --index-url ${TORCH_CACHE_URL:="https://download.pytorch.org/whl/cpu"} --extra-index-url ${PYPI_CACHE_URL:="https://pypi.org/simple/"}
|
||||
PTA_URL="https://gitcode.com/Ascend/pytorch/releases/download/v7.3.0-pytorch2.8.0/torch_npu-2.8.0.post2-cp311-cp311-manylinux_2_28_aarch64.whl"
|
||||
${PIP_INSTALL} ${PTA_URL}
|
||||
fi
|
||||
|
||||
|
||||
### Install Triton-Ascend
|
||||
|
||||
Reference in New Issue
Block a user