Skip to content

Commit e59f880

Browse files
authoredJan 28, 2025
Show GPU brand + cli fix for iGPUs
The GPU brand is shown in the GUI and CLI, and I fixed the CLI for iGPUs which broke in the last commit
1 parent b519798 commit e59f880

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed
 

‎LLMcalc.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def get_memory_bandwidth():
7979
return 64 # Assume decent RAM for 32GB+ systems
8080
return 48 # Conservative estimate for smaller RAM
8181
return 48
82+
83+
else: print("Lmao freeBSD user?\n")
8284

8385
except Exception as e:
8486
print(f"Error retrieving RAM speed: {e}")
@@ -312,7 +314,12 @@ def get_vram_specs():
312314
elif vram >= 5: bandwidth = 240
313315
else: bandwidth = 200
314316

315-
return vram, bandwidth, num_gpus
317+
if not vram:
318+
vram = 0
319+
bandwidth = 0
320+
brand = "iGPU"
321+
322+
return vram, bandwidth, num_gpus, brand
316323

317324
def estimate_tks(ram_bandwidth, required_mem):
318325
"""Estimates tk/s for a full RAM offload."""
@@ -431,7 +438,9 @@ def parse_args():
431438
total_ram = get_ram_specs()
432439
print(f"Total RAM: {total_ram:.2f} GB")
433440

434-
vram, bandwidth, num_gpus = get_vram_specs()
441+
vram, bandwidth, num_gpus, brand = get_vram_specs()
442+
443+
print(f"GPU: {brand}")
435444

436445
if args.num_gpus: num_gpus = args.num_gpus
437446

‎ui.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def __init__(self):
2424
# Hardware override section
2525
hw_layout = QHBoxLayout()
2626

27-
vram, bandwidth, num_gpus = LLMcalc.get_vram_specs()
27+
vram, bandwidth, num_gpus, brand = LLMcalc.get_vram_specs()
2828

29-
if not vram: vram = 0
29+
if not vram: vram = 0 # Just in case
3030
if not bandwidth: bandwidth = 0
3131

3232
vram_label = QLabel("VRAM (GB):")
@@ -65,15 +65,15 @@ def __init__(self):
6565
def update_system_info(self, real_bandwidth=None, real_num_gpus=None):
6666
"""Update system information display"""
6767
total_ram = LLMcalc.get_ram_specs()
68-
vram, bandwidth, num_gpus = LLMcalc.get_vram_specs()
68+
vram, bandwidth, num_gpus, brand = LLMcalc.get_vram_specs()
6969
ram_bandwidth = LLMcalc.get_memory_bandwidth()
7070

7171
if real_num_gpus: num_gpus = real_num_gpus
7272
if real_bandwidth: bandwidth = real_bandwidth
7373
if not vram: vram = 0
7474
if not bandwidth: bandwidth = 0
7575

76-
info = f"System Info: RAM {total_ram:.2f} GB | VRAM {num_gpus}x{vram:.2f} GB | GPU BW ~{bandwidth:.1f} GB/s | RAM BW {ram_bandwidth:.2f} GB/s"
76+
info = f"System Info: RAM {total_ram:.2f} GB | RAM BW {ram_bandwidth:.2f} GB/s | VRAM {num_gpus}x{vram:.2f} GB | GPU BW ~{bandwidth:.1f} GB/s | GPU: {brand} "
7777
self.system_info.setText(info)
7878

7979
def calculate(self):
@@ -93,7 +93,7 @@ def calculate(self):
9393

9494
params_b = LLMcalc.convert_params_to_b(params_text)
9595
total_ram = LLMcalc.get_ram_specs()
96-
vram, bandwidth, num_gpus = LLMcalc.get_vram_specs()
96+
vram, bandwidth, num_gpus, brand = LLMcalc.get_vram_specs()
9797
ram_bandwidth = LLMcalc.get_memory_bandwidth()
9898

9999
# Apply overrides

0 commit comments

Comments
 (0)
Please sign in to comment.