Skip to content

Commit 2601b2a

Browse files
committed
Remove use_pytorch_nightly throughout the code
1 parent 2f5fef2 commit 2601b2a

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

install_executorch.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,9 @@ def main(args):
203203
os.environ["CMAKE_ARGS"] = " ".join(cmake_args)
204204

205205
check_and_update_submodules()
206-
# This option is used in CI to make sure that PyTorch build from the pinned commit
207-
# is used instead of nightly. CI jobs wouldn't be able to catch regression from the
208-
# latest PT commit otherwise
209-
use_pytorch_nightly = not args.use_pt_pinned_commit
210206

211207
# Step 1: Install core dependencies first
212-
install_requirements(use_pytorch_nightly)
208+
install_requirements()
213209

214210
# Step 2: Install core package
215211
cmd = (
@@ -230,7 +226,7 @@ def main(args):
230226

231227
# Step 3: Extra (optional) packages that is only useful for running examples.
232228
if not args.minimal:
233-
install_optional_example_requirements(use_pytorch_nightly)
229+
install_optional_example_requirements()
234230

235231

236232
if __name__ == "__main__":

install_requirements.py

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,11 @@ def python_is_compatible():
6262
TORCH_URL = "https://download.pytorch.org/whl/test/cpu"
6363

6464

65-
def install_requirements(use_pytorch_nightly):
66-
# Skip pip install on Intel macOS if using nightly.
67-
if use_pytorch_nightly and is_intel_mac_os():
68-
print(
69-
"ERROR: Prebuilt PyTorch wheels are no longer available for Intel-based macOS.\n"
70-
"Please build from source by following https://docs.pytorch.org/executorch/main/using-executorch-building-from-source.html",
71-
file=sys.stderr,
72-
)
73-
sys.exit(1)
65+
def install_requirements():
7466

7567
# pip packages needed by exir.
7668
TORCH_PACKAGE = [
77-
# Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
78-
# that we don't need to set any version number there because they have already
79-
# been installed on CI before this step, so pip won't reinstall them
80-
"torch==2.8.0" if use_pytorch_nightly else "torch",
69+
"torch==2.8.0",
8170
]
8271

8372
# Install the requirements for core ExecuTorch package.
@@ -129,7 +118,7 @@ def install_requirements(use_pytorch_nightly):
129118
)
130119

131120

132-
def install_optional_example_requirements(use_pytorch_nightly):
121+
def install_optional_example_requirements():
133122
print("Installing packages in requirements-examples.txt")
134123
subprocess.run(
135124
[
@@ -145,8 +134,8 @@ def install_optional_example_requirements(use_pytorch_nightly):
145134

146135
print("Installing torch domain libraries")
147136
DOMAIN_LIBRARIES = [
148-
("torchvision==0.23.0" if use_pytorch_nightly else "torchvision"),
149-
"torchaudio==2.8.0" if use_pytorch_nightly else "torchaudio",
137+
"torchvision==0.23.0",
138+
"torchaudio==2.8.0",
150139
]
151140
# Then install domain libraries
152141
subprocess.run(
@@ -175,21 +164,15 @@ def is_intel_mac_os():
175164

176165
def main(args):
177166
parser = argparse.ArgumentParser()
178-
parser.add_argument(
179-
"--use-pt-pinned-commit",
180-
action="store_true",
181-
help="build from the pinned PyTorch commit instead of nightly",
182-
)
183167
parser.add_argument(
184168
"--example",
185169
action="store_true",
186170
help="Also installs required packages for running example scripts.",
187171
)
188172
args = parser.parse_args(args)
189-
use_pytorch_nightly = not bool(args.use_pt_pinned_commit)
190-
install_requirements(use_pytorch_nightly)
173+
install_requirements()
191174
if args.example:
192-
install_optional_example_requirements(use_pytorch_nightly)
175+
install_optional_example_requirements()
193176

194177

195178
if __name__ == "__main__":

0 commit comments

Comments
 (0)