Skip to content

Commit 310dd25

Browse files
authored
Enables using PyTorch nightlies on CPU (#2961)
* Enables use PT nightlies on CPU * Enables using PT nightlies on CPU
1 parent 995fcf8 commit 310dd25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ts_scripts/install_dependencies.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ def install_python_packages(self, cuda_version, requirements_file_path, nightly)
124124

125125
# Install PyTorch packages
126126
if nightly:
127+
pt_nightly = "cpu" if not cuda_version else cuda_version
127128
os.system(
128-
f"pip3 install numpy --pre torch torchvision torchtext torchaudio --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/{cuda_version}"
129+
f"pip3 install numpy --pre torch torchvision torchtext torchaudio --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/{pt_nightly}"
129130
)
130131
else:
131132
self.install_torch_packages(cuda_version)

0 commit comments

Comments
 (0)