Skip to content

Commit

Permalink
force hipblas as first option
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowRoseCx committed Dec 2, 2023
1 parent 5be1aa6 commit 787531d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,11 +1300,15 @@ def auto_gpu_heuristics():

#autopick cublas if suitable, requires at least 3.5GB VRAM to auto pick
global exitcounter
if exitcounter < 100 and MaxMemory[0]>3500000000 and CUDevicesNames[0]!="" and ("Use CuBLAS" in runopts or "Use hipBLAS (ROCM)" in runopts) and runopts_var.get()=="Use OpenBLAS":
if exitcounter < 100 and MaxMemory[0]>3500000000 and ("Use CuBLAS" in runopts or "Use hipBLAS (ROCM)" in runopts) and (any(CUDevicesNames) or any(CLDevicesNames)):
if "Use CuBLAS" in runopts:
runopts_var.set("Use CuBLAS")
elif "Use hipBLAS (ROCM)" in runopts:
runopts_var.set("Use hipBLAS (ROCM)")
try:
runopts_var.set("Use hipBLAS (ROCm)") # hard force
except Exception as e:
pass

changed_gpu_choice_var()
return
Expand Down

0 comments on commit 787531d

Please sign in to comment.