File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22import sys
33import unittest
4+ from packaging .version import Version , parse
45
56import torch
67from torch import distributed as dist
1617 HAS_TORCH_UCC = False
1718
1819# NOTE(mkozuki): Version guard for ucc. ref: https://github.com/openucx/ucc/issues/496
19- _TORCH_UCC_COMPAT_NVIDIA_DRIVER_VERSION = "470.42.01"
20+ _TORCH_UCC_COMPAT_NVIDIA_DRIVER_VERSION = Version ( "470.42.01" )
2021_driver_version = None
2122if torch .cuda .is_available ():
22- _driver_version = collect_env .get_nvidia_driver_version (collect_env .run )
23+ _driver_version = parse ( collect_env .get_nvidia_driver_version (collect_env .run ) )
2324HAS_TORCH_UCC_COMPAT_NVIDIA_DRIVER = _driver_version is not None and _driver_version >= _TORCH_UCC_COMPAT_NVIDIA_DRIVER_VERSION
2425
2526
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ tqdm>=4.28.1
33numpy >= 1.15.3
44PyYAML >= 5.1
55pytest >= 3.5.1
6+ packaging >= 14.0
You can’t perform that action at this time.
0 commit comments