MCPcopy Create free account
hub / github.com/mlco2/codecarbon / _get_gpu_utilization

Method _get_gpu_utilization

codecarbon/core/gpu_amd.py:239–244  ·  view source on GitHub ↗

Returns the % of utilization of the kernels during the last sample

(self)

Source from the content-addressed store, hash-verified

237 return None
238
239 def _get_gpu_utilization(self):
240 """Returns the % of utilization of the kernels during the last sample"""
241 activity = self._call_amdsmi_with_reinit(
242 amdsmi.amdsmi_get_gpu_activity, self.handle
243 )
244 return activity["gfx_activity"]
245
246 def _get_compute_mode(self):
247 """Returns the compute mode of the GPU"""

Calls 1