git_version_info.py 771 B

12345678910111213141516171819202122
  1. # Copyright (c) Microsoft Corporation.
  2. # SPDX-License-Identifier: Apache-2.0
  3. # DeepSpeed Team
  4. try:
  5. # This is populated by setup.py
  6. from .git_version_info_installed import * # noqa: F401 # type: ignore
  7. except ModuleNotFoundError:
  8. import os
  9. if os.path.isfile('version.txt'):
  10. # Will be missing from checkouts that haven't been installed (e.g., readthedocs)
  11. version = open('version.txt', 'r').read().strip()
  12. else:
  13. version = "0.0.0"
  14. git_hash = '[none]'
  15. git_branch = '[none]'
  16. from .ops.op_builder.all_ops import ALL_OPS
  17. installed_ops = dict.fromkeys(ALL_OPS.keys(), False)
  18. compatible_ops = dict.fromkeys(ALL_OPS.keys(), False)
  19. torch_info = {'version': "0.0", "cuda_version": "0.0", "hip_version": "0.0"}