non-case sensitive matching of pcie_bus

This commit is contained in:
clore 2024-03-30 02:29:05 +00:00
parent be211eefea
commit 95c0690d98
2 changed files with 2 additions and 2 deletions

View File

@ -398,7 +398,7 @@ class CloreClient:
current_specs["update_hw"]=True current_specs["update_hw"]=True
smallest_pcie_width = 999 smallest_pcie_width = 999
for gpu in current_specs["gpus"]["nvidia"]: for gpu in current_specs["gpus"]["nvidia"]:
if gpu["pcie_width"]<smallest_pcie_width: if "pcie_width" in gpu and gpu["pcie_width"]<smallest_pcie_width:
smallest_pcie_width=gpu["pcie_width"] smallest_pcie_width=gpu["pcie_width"]
current_specs["pcie_width"]=gpu["pcie_width"] current_specs["pcie_width"]=gpu["pcie_width"]
current_specs["pcie_rev"]=gpu["pcie_revision"] current_specs["pcie_rev"]=gpu["pcie_revision"]

View File

@ -174,7 +174,7 @@ def get_gpu_info():
try: try:
pci_query = parts[2][parts[2].find(':')+1:] pci_query = parts[2][parts[2].find(':')+1:]
for index, valid_pci_dev in enumerate(valid_pci_dev_list): for index, valid_pci_dev in enumerate(valid_pci_dev_list):
if pci_query in valid_pci_dev: if pci_query.lower() in valid_pci_dev.lower():
bus_spec = get_bus_spec(valid_pci_dev) bus_spec = get_bus_spec(valid_pci_dev)
if bus_spec.width!=None and bus_spec.revision!=None: if bus_spec.width!=None and bus_spec.revision!=None:
xl_gpu_info["pcie_width"]=bus_spec.width xl_gpu_info["pcie_width"]=bus_spec.width