coolroman commited on
Commit
159791f
·
verified ·
1 Parent(s): 141d19d

v2.0: add GPU type logging

Browse files
Files changed (1) hide show
  1. miner.py +10 -0
miner.py CHANGED
@@ -59,6 +59,16 @@ class Miner:
59
 
60
  print("ORT available providers BEFORE session:", ort.get_available_providers())
61
 
 
 
 
 
 
 
 
 
 
 
62
  sess_options = ort.SessionOptions()
63
  sess_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
64
 
 
59
 
60
  print("ORT available providers BEFORE session:", ort.get_available_providers())
61
 
62
+ try:
63
+ import torch
64
+ if torch.cuda.is_available():
65
+ print(f"GPU: {torch.cuda.get_device_name(0)}")
66
+ print(f"GPU memory: {torch.cuda.get_device_properties(0).total_mem / 1e9:.1f} GB")
67
+ else:
68
+ print("GPU: CUDA not available via torch")
69
+ except Exception as e:
70
+ print(f"GPU detection failed: {e}")
71
+
72
  sess_options = ort.SessionOptions()
73
  sess_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
74