MCPcopy Create free account
hub / github.com/NVIDIA/DALI / get_arch

Function get_arch

dali/test/python/test_utils.py:36–47  ·  view source on GitHub ↗
(device_id=0)

Source from the content-addressed store, hash-verified

34
35
36def get_arch(device_id=0):
37 compute_cap = 0
38 try:
39 import pynvml
40
41 pynvml.nvmlInit()
42 handle = pynvml.nvmlDeviceGetHandleByIndex(device_id)
43 compute_cap = pynvml.nvmlDeviceGetCudaComputeCapability(handle)
44 compute_cap = compute_cap[0] + compute_cap[1] / 10.0
45 except ModuleNotFoundError:
46 print("NVML not found")
47 return compute_cap
48
49
50def is_mulit_gpu():

Callers 4

check_optflowFunction · 0.90
restrict_platformFunction · 0.85
is_of_supportedFunction · 0.85

Calls 1

printFunction · 0.85

Tested by

no test coverage detected