MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / get_torch_version_tuple

Function get_torch_version_tuple

monai/utils/module.py:504–509  ·  view source on GitHub ↗

Returns: tuple of ints represents the pytorch major/minor version.

()

Source from the content-addressed store, hash-verified

502
503@functools.lru_cache(None)
504def get_torch_version_tuple():
505 """
506 Returns:
507 tuple of ints represents the pytorch major/minor version.
508 """
509 return tuple(int(x) for x in torch.__version__.split(".")[:2])
510
511
512def parse_version_strs(lhs: str, rhs: str) -> tuple[Iterable[int | str], Iterable[int | str]]:

Callers 2

load_moduleFunction · 0.90
pytorch_afterFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…