[PR #4009] [MERGED] Fix concurrency for CPU mode #11353

Closed
opened 2026-04-12 23:28:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4009
Author: @dhiltgen
Created: 4/28/2024
Status: Merged
Merged: 4/28/2024
Merged by: @dhiltgen

Base: mainHead: cpu_concurrency


📝 Commits (1)

  • d6e3b64 Fix concurrency for CPU mode

📊 Changes

2 files changed (+87 additions, -12 deletions)

View changed files

📝 server/sched.go (+8 -0)
📝 server/sched_test.go (+79 -12)

📄 Description

Prior refactoring passes on #3418 accidentally removed the logic to bypass VRAM checks for CPU loads. This adds that back, along with test coverage.

This also fixes loaded map access in the unit test to be behind the mutex which was likely the cause of various flakes in the tests.


🔄 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/4009 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/28/2024 **Status:** ✅ Merged **Merged:** 4/28/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `cpu_concurrency` --- ### 📝 Commits (1) - [`d6e3b64`](https://github.com/ollama/ollama/commit/d6e3b64582d93dfa0c836965b70d66c8487c2f8b) Fix concurrency for CPU mode ### 📊 Changes **2 files changed** (+87 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `server/sched.go` (+8 -0) 📝 `server/sched_test.go` (+79 -12) </details> ### 📄 Description Prior refactoring passes on #3418 accidentally removed the logic to bypass VRAM checks for CPU loads. This adds that back, along with test coverage. This also fixes loaded map access in the unit test to be behind the mutex which was likely the cause of various flakes in the tests. --- <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-12 23:28:31 -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#11353