Skip to content

Commit 36f2d0a

Browse files
FFFrogpytorchmergebot
authored andcommitted
Add "xpu" to __all__ for torch/version.py (pytorch#149695)
As the title stated. Pull Request resolved: pytorch#149695 Approved by: https://github.com/desertfire, https://github.com/guangyey
1 parent 1700599 commit 36f2d0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/generate_torch_version.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ def get_torch_version(sha: str | None = None) -> str:
9797

9898
with open(version_path, "w") as f:
9999
f.write("from typing import Optional\n\n")
100-
f.write("__all__ = ['__version__', 'debug', 'cuda', 'git_version', 'hip']\n")
100+
f.write(
101+
"__all__ = ['__version__', 'debug', 'cuda', 'git_version', 'hip', 'xpu']\n"
102+
)
101103
f.write(f"__version__ = '{version}'\n")
102104
# NB: This is not 100% accurate, because you could have built the
103105
# library code with DEBUG, but csrc without DEBUG (in which case

0 commit comments

Comments
 (0)