Skip to content

Commit b240305

Browse files
Fix total_memory is NAN for AMD GPUs crashes thread
1 parent 4ca1f5f commit b240305

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ def stats(cls):
476476

477477
# GPU mem. total memory (M)
478478
gpu_mem_total_text_data = theme_gpu_data['MEMORY_TOTAL']['TEXT']
479-
if math.isnan(memory_used_mb):
480-
memory_used_mb = 0
479+
if math.isnan(total_memory_mb):
480+
total_memory_mb = 0
481481
if gpu_mem_total_text_data['SHOW']:
482482
logger.warning("Your GPU total memory capacity (M) is not supported yet")
483483
gpu_mem_total_text_data['SHOW'] = False

0 commit comments

Comments
 (0)