From b9ccb3741ed448fbfd91c14dfec8307b87cda6ee Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Tue, 10 Dec 2024 12:59:39 -0800 Subject: [PATCH] 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. --- llama/llama.go | 2 -- make/Makefile.cpu | 2 +- make/Makefile.ollama | 2 +- make/gpu.make | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/llama/llama.go b/llama/llama.go index 8154b1efd..5b8d8a48d 100644 --- a/llama/llama.go +++ b/llama/llama.go @@ -96,8 +96,6 @@ import ( "unsafe" ) -var CpuFeatures = "" - func BackendInit() { C.llama_backend_init() } diff --git a/make/Makefile.cpu b/make/Makefile.cpu index 254039eb4..968ae9347 100644 --- a/make/Makefile.cpu +++ b/make/Makefile.cpu @@ -2,7 +2,7 @@ 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 ($(origin CUSTOM_CPU_FLAGS),undefined) RUNNERS = cpu_avx cpu_avx2 diff --git a/make/Makefile.ollama b/make/Makefile.ollama index 678ea0d55..a7349a252 100644 --- a/make/Makefile.ollama +++ b/make/Makefile.ollama @@ -6,7 +6,7 @@ exe: $(OLLAMA_EXE) dist_exe dist_ollama: $(DIST_OLLAMA_EXE) 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): $(COMMON_SRCS) $(COMMON_HDRS) $(GO_DEPS) diff --git a/make/gpu.make b/make/gpu.make index ef1c1345f..7b31fd4fc 100644 --- a/make/gpu.make +++ b/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) 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 # today, cuda is bundled, but rocm is split out. Should split them each out by runner