Skip to content

Commit 9e4a606

Browse files
committed
Merge branch 'trt' of https://github.com/KumoLiu/MONAI into trt
2 parents 7dfad50 + 83b5a49 commit 9e4a606

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

monai/utils/module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,12 @@ def compute_capabilities_after(major: int, minor: int = 0, current_ver_string: s
642642
Compute whether the current system GPU CUDA compute capability is after or equal to the specified version.
643643
The current system GPU CUDA compute capability is determined by the first GPU in the system.
644644
The compared version is a string in the form of "major.minor".
645-
645+
646646
Args:
647647
major: major version number to be compared with.
648648
minor: minor version number to be compared with. Defaults to 0.
649649
current_ver_string: if None, the current system GPU CUDA compute capability will be used.
650-
650+
651651
Returns:
652652
True if the current system GPU CUDA compute capability is greater than or equal to the specified version.
653653
"""
@@ -657,7 +657,7 @@ def compute_capabilities_after(major: int, minor: int = 0, current_ver_string: s
657657
major_c, minor_c = pynvml.nvmlDeviceGetCudaComputeCapability(handle)
658658
pynvml.nvmlShutdown()
659659
current_ver_string = f"{major_c}.{minor_c}"
660-
660+
661661
ver, has_ver = optional_import("packaging.version", name="parse")
662662
if has_ver:
663663
return ver(".".join((f"{major}", f"{minor}"))) <= ver(f"{current_ver_string}") # type: ignore

0 commit comments

Comments
 (0)