[PR #8976] [MERGED] ml/backend/ggml: fix crash on dlopen on machines without AVX #12832

Closed
opened 2026-04-13 00:10:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8976
Author: @jmorganca
Created: 2/10/2025
Status: Merged
Merged: 2/10/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/fix-avx-crash


📝 Commits (1)

  • 3500786 ml/backend/ggml: fix avx crash on dlopen

📊 Changes

2 files changed (+64 additions, -8 deletions)

View changed files

llama/patches/0016-remove-sgemm-global-variables.patch (+55 -0)
📝 ml/backend/ggml/ggml/src/ggml-cpu/llamafile/sgemm.cpp (+9 -8)

📄 Description

Removes the iq4nlt global variable in sgemm.cpp that causes a runtime crash when calling dlopen on ggml-cpu libraries as its initialization depends on AVX instructions the host machine may not have.

Thanks @rick-github @tris203 @creasyWinds for the help debugging this.

Fixes https://github.com/ollama/ollama/issues/8972
Fixes https://github.com/ollama/ollama/issues/8926


🔄 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/8976 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 2/10/2025 **Status:** ✅ Merged **Merged:** 2/10/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/fix-avx-crash` --- ### 📝 Commits (1) - [`3500786`](https://github.com/ollama/ollama/commit/350078681cbde0137988173292d7567395a75342) ml/backend/ggml: fix avx crash on dlopen ### 📊 Changes **2 files changed** (+64 additions, -8 deletions) <details> <summary>View changed files</summary> ➕ `llama/patches/0016-remove-sgemm-global-variables.patch` (+55 -0) 📝 `ml/backend/ggml/ggml/src/ggml-cpu/llamafile/sgemm.cpp` (+9 -8) </details> ### 📄 Description Removes the `iq4nlt` global variable in sgemm.cpp that causes a runtime crash when calling dlopen on ggml-cpu libraries as its initialization depends on AVX instructions the host machine may not have. Thanks @rick-github @tris203 @creasyWinds for the help debugging this. Fixes https://github.com/ollama/ollama/issues/8972 Fixes https://github.com/ollama/ollama/issues/8926 --- <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-13 00:10:48 -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#12832