Skip to content

Commit f693ae6

Browse files
authored
Remove unstable test_pynvml.py:test_device_get_total_energy_consumption (see cuda-python-private issue 509) (#2644)
1 parent f79ba70 commit f693ae6

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎cuda_bindings/tests/nvml/test_pynvml.py‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# A set of tests ported from https://github.com/gpuopenanalytics/pynvml/blob/11.5.3/pynvml/tests/test_nvml.py
55

66
import os
7-
import time
87

98
import pytest
109

@@ -150,23 +149,6 @@ def test_device_get_power_usage(ngpus, handles, subtests):
150149
assert power_mwatts >= 0.0
151150

152151

153-
def test_device_get_total_energy_consumption(ngpus, handles, subtests):
154-
for i in range(ngpus):
155-
with subtests.test(device_index=i):
156-
with unsupported_before(handles[i], None):
157-
energy_mjoules1 = nvml.device_get_total_energy_consumption(handles[i])
158-
159-
for _ in range(10): # idle for 150 ms
160-
time.sleep(0.015) # and check for increase every 15 ms
161-
with unsupported_before(handles[i], None):
162-
energy_mjoules2 = nvml.device_get_total_energy_consumption(handles[i])
163-
assert energy_mjoules2 >= energy_mjoules1
164-
if energy_mjoules2 > energy_mjoules1:
165-
break
166-
else:
167-
raise AssertionError("energy did not increase across 150 ms interval")
168-
169-
170152
# [Skipping] pynvml.nvmlDeviceGetGpuOperationMode
171153
# [Skipping] pynvml.nvmlDeviceGetCurrentGpuOperationMode
172154
# [Skipping] pynvml.nvmlDeviceGetPendingGpuOperationMode

0 commit comments

Comments
 (0)