Przeglądaj źródła

Remove unused runner CpuFeatures (#8032)

The final implementation of #7499 removed dynamic vector requirements
in favor of a simpler filename based model, and this was left over logic that
is no longer needed.
Daniel Hiltgen 4 miesięcy temu
rodzic
commit
b9ccb3741e
4 zmienionych plików z 3 dodań i 5 usunięć
  1. 0 2
      llama/llama.go
  2. 1 1
      make/Makefile.cpu
  3. 1 1
      make/Makefile.ollama
  4. 1 1
      make/gpu.make

+ 0 - 2
llama/llama.go

@@ -96,8 +96,6 @@ import (
 	"unsafe"
 	"unsafe"
 )
 )
 
 
-var CpuFeatures = ""
-
 func BackendInit() {
 func BackendInit() {
 	C.llama_backend_init()
 	C.llama_backend_init()
 }
 }

+ 1 - 1
make/Makefile.cpu

@@ -2,7 +2,7 @@
 
 
 include make/common-defs.make
 include make/common-defs.make
 
 
-CPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=$(subst $(space),$(comma),$(TARGET_CPU_FLAGS))\" $(TARGET_LDFLAGS)"
+CPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\"  $(TARGET_LDFLAGS)"
 ifeq ($(ARCH),amd64)
 ifeq ($(ARCH),amd64)
 ifeq ($(origin CUSTOM_CPU_FLAGS),undefined)
 ifeq ($(origin CUSTOM_CPU_FLAGS),undefined)
 	RUNNERS = cpu_avx cpu_avx2
 	RUNNERS = cpu_avx cpu_avx2

+ 1 - 1
make/Makefile.ollama

@@ -6,7 +6,7 @@ exe: $(OLLAMA_EXE)
 dist_exe dist_ollama: $(DIST_OLLAMA_EXE)
 dist_exe dist_ollama: $(DIST_OLLAMA_EXE)
 
 
 GO_DEPS=$(foreach dir,$(shell go list -deps -f '{{.Dir}}' . ),$(wildcard $(dir)/*.go))
 GO_DEPS=$(foreach dir,$(shell go list -deps -f '{{.Dir}}' . ),$(wildcard $(dir)/*.go))
-CPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=$(subst $(space),$(comma),$(TARGET_CPU_FLAGS))\" $(EXTRA_GOLDFLAGS) $(TARGET_LDFLAGS)"
+CPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" $(EXTRA_GOLDFLAGS) $(TARGET_LDFLAGS)"
 
 
 $(OLLAMA_EXE) $(DIST_OLLAMA_EXE): TARGET_CPU_FLAGS=$(CUSTOM_CPU_FLAGS)
 $(OLLAMA_EXE) $(DIST_OLLAMA_EXE): TARGET_CPU_FLAGS=$(CUSTOM_CPU_FLAGS)
 $(OLLAMA_EXE) $(DIST_OLLAMA_EXE): $(COMMON_SRCS) $(COMMON_HDRS) $(GO_DEPS)
 $(OLLAMA_EXE) $(DIST_OLLAMA_EXE): $(COMMON_SRCS) $(COMMON_HDRS) $(GO_DEPS)

+ 1 - 1
make/gpu.make

@@ -5,7 +5,7 @@ dummy:
 	$(error This makefile is not meant to build directly, but instead included in other Makefiles that set required variables)
 	$(error This makefile is not meant to build directly, but instead included in other Makefiles that set required variables)
 endif
 endif
 
 
-GPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=$(subst $(space),$(comma),$(GPU_RUNNER_CPU_FLAGS))\" $(EXTRA_GOLDFLAGS) $(TARGET_LDFLAGS)"
+GPU_GOFLAGS="-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$(VERSION)\" $(EXTRA_GOLDFLAGS) $(TARGET_LDFLAGS)"
 
 
 # TODO Unify how we handle dependencies in the dist/packaging and install flow
 # TODO Unify how we handle dependencies in the dist/packaging and install flow
 # today, cuda is bundled, but rocm is split out.  Should split them each out by runner
 # today, cuda is bundled, but rocm is split out.  Should split them each out by runner