[PR #2214] [MERGED] Detect lack of AVX and fallback to CPU mode #73117

Closed
opened 2026-05-05 04:47:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2214
Author: @dhiltgen
Created: 1/26/2024
Status: Merged
Merged: 1/26/2024
Merged by: @dhiltgen

Base: mainHead: reject_cuda_without_avx


📝 Commits (1)

  • 667a2ba Detect lack of AVX and fallback to CPU mode

📊 Changes

1 file changed (+9 additions, -3 deletions)

View changed files

📝 gpu/gpu.go (+9 -3)

📄 Description

We build the GPU libraries with AVX enabled to ensure that if not all layers fit on the GPU we get better performance in a mixed mode. If the user is using a virtualization/emulation system that lacks AVX this used to result in an illegal instruction error and crash before this fix. Now we will report a warning in the server log, and just use CPU mode to ensure we don't crash.

This should mitigate #2187.


🔄 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/2214 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 1/26/2024 **Status:** ✅ Merged **Merged:** 1/26/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `reject_cuda_without_avx` --- ### 📝 Commits (1) - [`667a2ba`](https://github.com/ollama/ollama/commit/667a2ba18add1031cc4b208eba7cedf8b33548e6) Detect lack of AVX and fallback to CPU mode ### 📊 Changes **1 file changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `gpu/gpu.go` (+9 -3) </details> ### 📄 Description We build the GPU libraries with AVX enabled to ensure that if not all layers fit on the GPU we get better performance in a mixed mode. If the user is using a virtualization/emulation system that lacks AVX this used to result in an illegal instruction error and crash before this fix. Now we will report a warning in the server log, and just use CPU mode to ensure we don't crash. This should mitigate #2187. --- <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-05-05 04:47:19 -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#73117