3535# newer version of torch nightly installed later in this script.
3636#
3737
38+ # (
39+ # set -x
40+ # $PIP_EXECUTABLE install -r install/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cu121
41+ # )
42+
3843(
3944 set -x
40- $PIP_EXECUTABLE install -r install/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cu121
45+ $PIP_EXECUTABLE install -r install/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/xpu
4146)
4247
4348# Since torchchat often uses main-branch features of pytorch, only the nightly
4752# NOTE: If a newly-fetched version of the executorch repo changes the value of
4853# PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary
4954# package versions.
50- PYTORCH_NIGHTLY_VERSION=dev20241002
55+ PYTORCH_NIGHTLY_VERSION=dev20241001
5156
5257# Nightly version for torchvision
5358VISION_NIGHTLY_VERSION=dev20241002
@@ -64,21 +69,21 @@ TUNE_NIGHTLY_VERSION=dev20241010
6469# The pip repository that hosts nightly torch packages. cpu by default.
6570# If cuda is available, based on presence of nvidia-smi, install the pytorch nightly
6671# with cuda for faster execution on cuda GPUs.
67- if [[ -x " $( command -v nvidia-smi) " ]];
68- then
69- TORCH_NIGHTLY_URL=" https://download.pytorch.org/whl/nightly/cu121"
70- elif [[ -x " $( command -v rocminfo) " ]];
71- then
72- TORCH_NIGHTLY_URL=" https://download.pytorch.org/whl/nightly/rocm6.2"
73- else
74- TORCH_NIGHTLY_URL=" https://download.pytorch.org/whl/nightly/cpu"
75- fi
76-
72+ # if [[ -x "$(command -v nvidia-smi)" ]];
73+ # then
74+ # TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/cu121"
75+ # elif [[ -x "$(command -v rocminfo)" ]];
76+ # then
77+ # TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/rocm6.2"
78+ # else
79+ # TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/cpu"
80+ # fi
81+ TORCH_NIGHTLY_URL= " https://download.pytorch.org/whl/nightly/xpu "
7782# pip packages needed by exir.
7883REQUIREMENTS_TO_INSTALL=(
7984 torch==" 2.6.0.${PYTORCH_NIGHTLY_VERSION} "
8085 torchvision==" 0.20.0.${VISION_NIGHTLY_VERSION} "
81- torchtune==" 0.4 .0.${TUNE_NIGHTLY_VERSION} "
86+ # torchtune=="0.3 .0.${TUNE_NIGHTLY_VERSION}"
8287)
8388
8489# Install the requirements. --extra-index-url tells pip to look for package
@@ -89,6 +94,12 @@ REQUIREMENTS_TO_INSTALL=(
8994 " ${REQUIREMENTS_TO_INSTALL[@]} "
9095)
9196
97+ (
98+ set -x
99+ $PIP_EXECUTABLE install --extra-index-url " ${TORCH_NIGHTLY_URL} " \
100+ torchtune==" 0.3.1"
101+ )
102+
92103(
93104 set -x
94105 $PIP_EXECUTABLE install torchao==" 0.5.0"
0 commit comments