mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
https://github.com/pytorch/pytorch/pull/132990 introduced dependency on `torch.version`, which might not be imported yet, and can result in `AttributeError: partially initialized module 'torch' has no attribute 'version' (most likely due to a circular import)` if user starts its code with `import torch.cuda` Fix it by importing `torch.version` explicitly Test Plan: CI Differential Revision: D61549284 Pull Request resolved: https://github.com/pytorch/pytorch/pull/134019 Approved by: https://github.com/seemethere