Skip to content

Commit

Permalink
Fix gpulayers autodetection for cublas & clblast backends
Browse files Browse the repository at this point in the history
This fixes `--gpulayers -1` paired with either `--usecublas` or
`--useclblast` with no additional arguments.
  • Loading branch information
matoro committed Oct 9, 2024
1 parent 1672627 commit 7c0062e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4491,7 +4491,7 @@ def main(launch_args,start_server=True):
fetch_gpu_properties(False,True,True)
pass
if args.gpulayers==-1:
if MaxMemory[0] > 0 and (not args.usecpu) and (args.usecublas or (args.usevulkan is not None) or args.useclblast or sys.platform=="darwin"):
if MaxMemory[0] > 0 and (not args.usecpu) and ((args.usecublas is not None) or (args.usevulkan is not None) or (args.useclblast is not None) or sys.platform=="darwin"):
extract_modelfile_params(args.model_param,args.sdmodel,args.whispermodel,args.mmproj)
layeramt = autoset_gpu_layers(args.contextsize,args.sdquant,args.blasbatchsize)
print(f"Auto Recommended GPU Layers: {layeramt}")
Expand Down

0 comments on commit 7c0062e

Please sign in to comment.