Skip to content

Commit

Permalink
Remove unused runner CpuFeatures (ollama#8032)
Browse files Browse the repository at this point in the history
The final implementation of ollama#7499 removed dynamic vector requirements
in favor of a simpler filename based model, and this was left over logic that
is no longer needed.
  • Loading branch information
dhiltgen authored Dec 10, 2024
1 parent abfdc47 commit b9ccb37
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions llama/llama.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ import (
"unsafe"
)

var CpuFeatures = ""

func BackendInit() {
C.llama_backend_init()
}
Expand Down
2 changes: 1 addition & 1 deletion make/Makefile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion make/Makefile.ollama
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion make/gpu.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b9ccb37

Please sign in to comment.