Skip to content

Commit f13295b

Browse files
committed
CLBLAST_noavx2 should only be built on Windows
1 parent a2b441a commit f13295b

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

Diff for: Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ ifeq ($(OS),Windows_NT)
300300
endif
301301
else
302302
DEFAULT_BUILD = $(CXX) $(CXXFLAGS) $^ -shared -o [email protected] $(LDFLAGS)
303-
FAILSAFE_BUILD = $(CXX) $(CXXFLAGS) $^ -shared -o [email protected] $(LDFLAGS)
304-
NOAVX2_BUILD = $(CXX) $(CXXFLAGS) $^ -shared -o [email protected] $(LDFLAGS)
305303

306304
ifdef LLAMA_OPENBLAS
307305
OPENBLAS_BUILD = $(CXX) $(CXXFLAGS) $^ $(ARCH_ADD) -lopenblas -shared -o [email protected] $(LDFLAGS)
@@ -482,8 +480,8 @@ endif
482480
ifdef CLBLAST_BUILD
483481
koboldcpp_clblast: ggml_clblast.o ggml_v2_clblast.o ggml_v1.o expose.o common.o gpttype_adapter_clblast.o ggml-opencl.o ggml_v2-opencl.o ggml_v2-opencl-legacy.o ggml-quants.o ggml-alloc.o ggml-backend.o grammar-parser.o $(OBJS)
484482
$(CLBLAST_BUILD)
485-
koboldcpp_clblast_noavx2: ggml_clblast_noavx2.o ggml_v2_clblast_noavx2.o ggml_v1_failsafe.o expose.o common.o gpttype_adapter_clblast_noavx2.o ggml-opencl.o ggml_v2-opencl.o ggml_v2-opencl-legacy.o ggml-quants_noavx2.o ggml-alloc.o ggml-backend.o grammar-parser.o $(OBJS)
486-
$(CLBLAST_BUILD)
483+
koboldcpp_clblast_noavx2:
484+
$(DONOTHING)
487485
else
488486
koboldcpp_clblast:
489487
$(DONOTHING)

Diff for: koboldcpp.py

+14-10
Original file line numberDiff line numberDiff line change
@@ -990,14 +990,18 @@ def show_new_gui():
990990
blasbatchsize_text = ["Don't Batch BLAS","32","64","128","256","512","1024","2048"]
991991
contextsize_text = ["256", "512", "1024", "2048", "3072", "4096", "6144", "8192", "12288", "16384", "24576", "32768", "65536"]
992992
runopts = [opt for lib, opt in lib_option_pairs if file_exists(lib)]
993-
antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if not (opt in runopts) and not (opt == "Use CuBLAS" and "Use hipBLAS (ROCm)" in runopts)]
994-
# if os.name != 'nt':
995-
# if "NoAVX2 Mode (Old CPU)" in antirunopts:
996-
# antirunopts.remove("NoAVX2 Mode (Old CPU)")
997-
# if "Failsafe Mode (Old CPU)" in antirunopts:
998-
# antirunopts.remove("Failsafe Mode (Old CPU)")
999-
# if "CLBlast NoAVX2 (Old CPU)" in antirunopts:
1000-
# antirunopts.remove("CLBlast NoAVX2 (Old CPU)")
993+
antirunopts = [opt.replace("Use ", "") for lib, opt in lib_option_pairs if not (opt in runopts)]
994+
if "Use CuBLAS" in runopts:
995+
antirunopts.remove("hipBLAS (ROCm)")
996+
if "Use hipBLAS (ROCm)" in runopts:
997+
antirunopts.remove("CuBLAS")
998+
if os.name != 'nt':
999+
if "NoAVX2 Mode (Old CPU)" in antirunopts:
1000+
antirunopts.remove("NoAVX2 Mode (Old CPU)")
1001+
if "Failsafe Mode (Old CPU)" in antirunopts:
1002+
antirunopts.remove("Failsafe Mode (Old CPU)")
1003+
if "CLBlast NoAVX2 (Old CPU)" in antirunopts:
1004+
antirunopts.remove("CLBlast NoAVX2 (Old CPU)")
10011005
if not any(runopts):
10021006
exitcounter = 999
10031007
show_gui_msgbox("No Backends Available!","KoboldCPP couldn't locate any backends to use (i.e Default, OpenBLAS, CLBlast, CuBLAS).\n\nTo use the program, please run the 'make' command from the directory.")
@@ -1366,12 +1370,12 @@ def hide_tooltip(event):
13661370
tooltip.withdraw()
13671371

13681372
def setup_backend_tooltip(parent):
1369-
num_backends_built = makelabel(parent, str(len(runopts)) + f"/{7 if os.name == 'nt' else 7}", 5, 2)
1373+
num_backends_built = makelabel(parent, str(len(runopts)) + f"/{7 if os.name == 'nt' else 4}", 5, 2)
13701374
num_backends_built.grid(row=1, column=1, padx=195, pady=0)
13711375
num_backends_built.configure(text_color="#00ff00")
13721376
# Bind the backend count label with the tooltip function
13731377
nl = '\n'
1374-
num_backends_built.bind("<Enter>", lambda event: show_tooltip(event, f"Number of backends you have built and available." + (f"\n\nMissing Backends: \n\n{nl.join(antirunopts)}" if len(runopts) != 7 else "")))
1378+
num_backends_built.bind("<Enter>", lambda event: show_tooltip(event, f"Number of backends you have built and available." + (f"\n\nMissing Backends: \n\n{nl.join(antirunopts)}" if len(runopts) != 4 else "")))
13751379
num_backends_built.bind("<Leave>", hide_tooltip)
13761380

13771381
# # Vars - should be in scope to be used by multiple widgets

0 commit comments

Comments
 (0)