|
12 | 12 |
|
13 | 13 | from install_utils import determine_torch_url, is_intel_mac_os, python_is_compatible |
14 | 14 |
|
15 | | -from torch_pin import NIGHTLY_VERSION, TORCH_VERSION |
16 | | - |
17 | 15 | # The pip repository that hosts nightly torch packages. |
18 | 16 | # This will be dynamically set based on CUDA availability and CUDA backend enabled/disabled. |
19 | | -TORCH_NIGHTLY_URL_BASE = "https://download.pytorch.org/whl/nightly" |
| 17 | +TORCH_URL_BASE = "https://download.pytorch.org/whl/test" |
20 | 18 |
|
21 | 19 | # Since ExecuTorch often uses main-branch features of pytorch, only the nightly |
22 | 20 | # pip versions will have the required features. |
@@ -44,18 +42,14 @@ def install_requirements(use_pytorch_nightly): |
44 | 42 | sys.exit(1) |
45 | 43 |
|
46 | 44 | # Determine the appropriate PyTorch URL based on CUDA delegate status |
47 | | - torch_url = determine_torch_url(TORCH_NIGHTLY_URL_BASE) |
| 45 | + torch_url = determine_torch_url(TORCH_URL_BASE) |
48 | 46 |
|
49 | 47 | # pip packages needed by exir. |
50 | 48 | TORCH_PACKAGE = [ |
51 | 49 | # Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note |
52 | 50 | # that we don't need to set any version number there because they have already |
53 | 51 | # been installed on CI before this step, so pip won't reinstall them |
54 | | - ( |
55 | | - f"torch=={TORCH_VERSION}.{NIGHTLY_VERSION}" |
56 | | - if use_pytorch_nightly |
57 | | - else "torch" |
58 | | - ), |
| 52 | + ("torch==2.11.0" if use_pytorch_nightly else "torch"), |
59 | 53 | ] |
60 | 54 |
|
61 | 55 | # Install the requirements for core ExecuTorch package. |
@@ -114,20 +108,12 @@ def install_requirements(use_pytorch_nightly): |
114 | 108 |
|
115 | 109 | def install_optional_example_requirements(use_pytorch_nightly): |
116 | 110 | # Determine the appropriate PyTorch URL based on CUDA delegate status |
117 | | - torch_url = determine_torch_url(TORCH_NIGHTLY_URL_BASE) |
| 111 | + torch_url = determine_torch_url(TORCH_URL_BASE) |
118 | 112 |
|
119 | 113 | print("Installing torch domain libraries") |
120 | 114 | DOMAIN_LIBRARIES = [ |
121 | | - ( |
122 | | - f"torchvision==0.26.0.{NIGHTLY_VERSION}" |
123 | | - if use_pytorch_nightly |
124 | | - else "torchvision" |
125 | | - ), |
126 | | - ( |
127 | | - f"torchaudio==2.11.0.{NIGHTLY_VERSION}" |
128 | | - if use_pytorch_nightly |
129 | | - else "torchaudio" |
130 | | - ), |
| 115 | + ("torchvision==0.26.0" if use_pytorch_nightly else "torchvision"), |
| 116 | + ("torchaudio==2.11.0" if use_pytorch_nightly else "torchaudio"), |
131 | 117 | ] |
132 | 118 | # Then install domain libraries |
133 | 119 | subprocess.run( |
|
0 commit comments