[PR #14642] [MERGED] MLX: add header vendoring and remove go build tag #40633

Closed
opened 2026-04-23 01:29:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14642
Author: @dhiltgen
Created: 3/5/2026
Status: Merged
Merged: 3/10/2026
Merged by: @dhiltgen

Base: mainHead: mlx_vendor


📝 Commits (4)

  • 04f6fd6 prefer rocm v6 on windows
  • 4403584 MLX: add header vendoring and remove go build tag
  • 6246157 ci: harden for flaky choco repo servers
  • f12ed61 review comments

📊 Changes

142 files changed (+5350 additions, -1064 deletions)

View changed files

📝 .github/workflows/release.yaml (+46 -6)
📝 .github/workflows/test.yaml (+55 -9)
📝 CMakeLists.txt (+94 -12)
📝 CMakePresets.json (+1 -0)
📝 Dockerfile (+17 -6)
MLX_CORE_VERSION (+1 -0)
📝 docs/development.md (+68 -0)
📝 parser/parser.go (+3 -0)
📝 scripts/build_darwin.sh (+3 -3)
📝 scripts/build_windows.ps1 (+146 -59)
📝 scripts/env.sh (+8 -0)
📝 x/create/client/quantize.go (+3 -4)
x/create/client/quantize_stub.go (+0 -25)
📝 x/imagegen/cache/cache.go (+0 -2)
📝 x/imagegen/cache/step.go (+0 -2)
📝 x/imagegen/cache/teacache.go (+0 -2)
📝 x/imagegen/cmd/engine/README.md (+1 -1)
📝 x/imagegen/cmd/engine/generate.go (+0 -2)
📝 x/imagegen/cmd/engine/image.go (+0 -2)
📝 x/imagegen/cmd/engine/main.go (+0 -2)

...and 80 more files

📄 Description

This switches to using a vendoring approach for the mlx-c headers so that Go can build without requiring a cmake first. This enables building the new MLX based code by default. Every time cmake runs, the headers are refreshed, so we
can easily keep them in sync when we bump mlx versions. Basic Windows and Linux support are verified.


🔄 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/14642 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 3/5/2026 **Status:** ✅ Merged **Merged:** 3/10/2026 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `mlx_vendor` --- ### 📝 Commits (4) - [`04f6fd6`](https://github.com/ollama/ollama/commit/04f6fd61e27c917950485015ac061bc87c082c1f) prefer rocm v6 on windows - [`4403584`](https://github.com/ollama/ollama/commit/440358459ac637d698fa4dd167d0b512d760fb7e) MLX: add header vendoring and remove go build tag - [`6246157`](https://github.com/ollama/ollama/commit/6246157fbc486051250c8148305083e78e640069) ci: harden for flaky choco repo servers - [`f12ed61`](https://github.com/ollama/ollama/commit/f12ed618111734e3037265574bbf9afdf91cb317) review comments ### 📊 Changes **142 files changed** (+5350 additions, -1064 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yaml` (+46 -6) 📝 `.github/workflows/test.yaml` (+55 -9) 📝 `CMakeLists.txt` (+94 -12) 📝 `CMakePresets.json` (+1 -0) 📝 `Dockerfile` (+17 -6) ➕ `MLX_CORE_VERSION` (+1 -0) 📝 `docs/development.md` (+68 -0) 📝 `parser/parser.go` (+3 -0) 📝 `scripts/build_darwin.sh` (+3 -3) 📝 `scripts/build_windows.ps1` (+146 -59) 📝 `scripts/env.sh` (+8 -0) 📝 `x/create/client/quantize.go` (+3 -4) ➖ `x/create/client/quantize_stub.go` (+0 -25) 📝 `x/imagegen/cache/cache.go` (+0 -2) 📝 `x/imagegen/cache/step.go` (+0 -2) 📝 `x/imagegen/cache/teacache.go` (+0 -2) 📝 `x/imagegen/cmd/engine/README.md` (+1 -1) 📝 `x/imagegen/cmd/engine/generate.go` (+0 -2) 📝 `x/imagegen/cmd/engine/image.go` (+0 -2) 📝 `x/imagegen/cmd/engine/main.go` (+0 -2) _...and 80 more files_ </details> ### 📄 Description This switches to using a vendoring approach for the mlx-c headers so that Go can build without requiring a cmake first. This enables building the new MLX based code by default. Every time cmake runs, the headers are refreshed, so we can easily keep them in sync when we bump mlx versions. Basic Windows and Linux support are verified. --- <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-23 01:29:33 -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#40633