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

Function _get_max_cc

tests/transforms/test_spatial_gpu_support.py:24–32  ·  view source on GitHub ↗

Return the max compute capability (major*100+minor) the _C extension was compiled for, or 0 if the extension is not available (no build info).

()

Source from the content-addressed store, hash-verified

22
23
24def _get_max_cc() -> int:
25 """Return the max compute capability (major*100+minor) the _C extension was compiled for,
26 or 0 if the extension is not available (no build info)."""
27 try:
28 from monai._C import max_compute_capability
29
30 return int(max_compute_capability())
31 except (ImportError, AttributeError):
32 return 0
33
34
35def _has_sm120_support() -> bool:

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…