[PR #7199] [CLOSED] Support customized CPU flags for runners #38217

Closed
opened 2026-04-22 22:53:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7199
Author: @dhiltgen
Created: 10/14/2024
Status: Closed

Base: mainHead: go_server_avx512


📝 Commits (1)

  • 3ed0453 Support customized CPU flags for runners

📊 Changes

12 files changed (+95 additions, -81 deletions)

View changed files

📝 Dockerfile (+0 -10)
📝 docs/development.md (+30 -10)
📝 llama/Makefile (+11 -1)
📝 llama/llama.go (+8 -10)
📝 llama/make/Makefile.default (+1 -1)
📝 llama/make/Makefile.rocm (+5 -2)
📝 llama/make/common-defs.make (+7 -2)
📝 llama/make/cuda.make (+12 -4)
📝 llama/make/gpu.make (+10 -15)
llama/runner/requirements.go (+0 -19)
📝 llama/runner/runner.go (+0 -6)
📝 runners/common.go (+11 -1)

📄 Description

This implements a simplified custom CPU flags pattern for the runners. When built without overrides, the runner name contains the vector flag we check for (AVX) to ensure we don't try to run on unsupported systems and crash. If the user builds a customized set, we omit the naming scheme and don't check for compatibility. This avoids checking requirements at runtime, so that logic has been removed as well. This can be used to build GPU runners with no vector flags, or CPU/GPU runners with additional flags (e.g. AVX512) enabled.

This also cleans up some variables that were stale from the recent Go server change, as well as a few duplicate definitions from prior branch merges.

Fixes #2187
Fixes #2205
Fixes #2281
Fixes #7457


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/7199 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 10/14/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `go_server_avx512` --- ### 📝 Commits (1) - [`3ed0453`](https://github.com/ollama/ollama/commit/3ed04536ec4d4a4f39d1a6d44848073dc8fc978a) Support customized CPU flags for runners ### 📊 Changes **12 files changed** (+95 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+0 -10) 📝 `docs/development.md` (+30 -10) 📝 `llama/Makefile` (+11 -1) 📝 `llama/llama.go` (+8 -10) 📝 `llama/make/Makefile.default` (+1 -1) 📝 `llama/make/Makefile.rocm` (+5 -2) 📝 `llama/make/common-defs.make` (+7 -2) 📝 `llama/make/cuda.make` (+12 -4) 📝 `llama/make/gpu.make` (+10 -15) ➖ `llama/runner/requirements.go` (+0 -19) 📝 `llama/runner/runner.go` (+0 -6) 📝 `runners/common.go` (+11 -1) </details> ### 📄 Description This implements a simplified custom CPU flags pattern for the runners. When built without overrides, the runner name contains the vector flag we check for (AVX) to ensure we don't try to run on unsupported systems and crash. If the user builds a customized set, we omit the naming scheme and don't check for compatibility. This avoids checking requirements at runtime, so that logic has been removed as well. This can be used to build GPU runners with no vector flags, or CPU/GPU runners with additional flags (e.g. AVX512) enabled. This also cleans up some variables that were stale from the recent Go server change, as well as a few duplicate definitions from prior branch merges. Fixes #2187 Fixes #2205 Fixes #2281 Fixes #7457 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 22:53:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#38217