MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / num_devices

Method num_devices

tensorpack/utils/nvml.py:171–176  ·  view source on GitHub ↗

Get number of devices

(self)

Source from the content-addressed store, hash-verified

169 _check_return(_NVML.get_function("nvmlShutdown")())
170
171 def num_devices(self):
172 """Get number of devices """
173 c_count = c_uint()
174 _check_return(_NVML.get_function(
175 "nvmlDeviceGetCount_v2")(byref(c_count)))
176 return c_count.value
177
178 def devices(self):
179 """

Callers 3

devicesMethod · 0.95
deviceMethod · 0.95
get_num_gpuFunction · 0.80

Calls 2

_check_returnFunction · 0.85
get_functionMethod · 0.80

Tested by

no test coverage detected