Skip to content

Commit cdd768d

Browse files
authored
Remove +cpu part of version (#403)
1 parent d464d40 commit cdd768d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,13 @@ def _write_version_files():
178178
# the content of `version.txt` plus some suffix like "+cpu" or "+cu112".
179179
# See
180180
# https://github.com/pytorch/test-infra/blob/61e6da7a6557152eb9879e461a26ad667c15f0fd/tools/pkg-helpers/pytorch_pkg_helpers/version.py#L113
181+
version = version.replace("+cpu", "")
181182
with open(_ROOT_DIR / "version.txt", "w") as f:
182183
f.write(f"{version}")
183184
else:
184185
with open(_ROOT_DIR / "version.txt") as f:
185186
version = f.readline().strip()
187+
version = version.replace("+cpu", "")
186188
try:
187189
sha = (
188190
subprocess.check_output(

0 commit comments

Comments
 (0)