mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
fix rocminfo error
This commit is contained in:
parent
a84f7c5d81
commit
9f2076b4b3
1 changed files with 7 additions and 5 deletions
|
@ -675,12 +675,14 @@ def fetch_gpu_properties(testCL,testCU,testVK):
|
||||||
elif line.startswith("Device Type:") and "GPU" not in line: device_name = None
|
elif line.startswith("Device Type:") and "GPU" not in line: device_name = None
|
||||||
if FetchedCUdevices:
|
if FetchedCUdevices:
|
||||||
getamdvram = subprocess.run(['rocm-smi', '--showmeminfo', 'vram', '--csv'], capture_output=True, text=True, check=True, encoding='utf-8').stdout # fetch VRAM of devices
|
getamdvram = subprocess.run(['rocm-smi', '--showmeminfo', 'vram', '--csv'], capture_output=True, text=True, check=True, encoding='utf-8').stdout # fetch VRAM of devices
|
||||||
|
if getamdvram:
|
||||||
FetchedCUdeviceMem = [line.split(",")[1].strip() for line in getamdvram.splitlines()[1:] if line.strip()]
|
FetchedCUdeviceMem = [line.split(",")[1].strip() for line in getamdvram.splitlines()[1:] if line.strip()]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
for idx in range(0,4):
|
for idx in range(0,4):
|
||||||
if(len(FetchedCUdevices)>idx):
|
if(len(FetchedCUdevices)>idx):
|
||||||
CUDevicesNames[idx] = FetchedCUdevices[idx]
|
CUDevicesNames[idx] = FetchedCUdevices[idx]
|
||||||
|
if len(FetchedCUdeviceMem)>idx:
|
||||||
if AMDgpu:
|
if AMDgpu:
|
||||||
MaxMemory[0] = max(int(FetchedCUdeviceMem[idx]),MaxMemory[0])
|
MaxMemory[0] = max(int(FetchedCUdeviceMem[idx]),MaxMemory[0])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue