@@ -62,22 +62,11 @@ def python_is_compatible():
6262TORCH_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
176165def 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
195178if __name__ == "__main__" :
0 commit comments