Skip to content

Build the ggml CPU engine on Apple Silicon - #25359

Merged
meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
JakeStevens:export-D133538765
Nov 20, 2026
Merged

meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
JakeStevens:export-D133538765

Conversation

@JakeStevens

Copy link
Copy Markdown
Contributor

Summary:
The ggml CPU backend now builds for Apple Silicon (previous diff), so CPU_COMPAT allows arm64 macOS as well as x86_64 Linux. The targets that link the ggml CPU engine without torch, its unit test, ggml_ptn_runner, run_hf_llm_ggml_cpu and run_classification_ggml_cpu, now build on a Mac. The ggml sample tests, test_ggml_ops and test_cross_engine also run torch, through the sample generator or the test itself, so they take the new TORCH_COMPAT and stay x86_64 Linux.

The native runtime's package reader uses nlohmann_json, whose fbcode external dep does not build for macOS. fbcode now resolves nlohmann_json to fbsource//third-party/nlohmann-json, the header-only target xplat already uses, as it does for gtest and flatbuffers.

Authored with Claude Code.

Reviewed By: digantdesai

Differential Revision: D133538765

Summary:
The ggml CPU backend now builds for Apple Silicon (previous diff), so `CPU_COMPAT` allows arm64 macOS as well as x86_64 Linux. The targets that link the ggml CPU engine without torch, its unit test, `ggml_ptn_runner`, `run_hf_llm_ggml_cpu` and `run_classification_ggml_cpu`, now build on a Mac. The ggml sample tests, `test_ggml_ops` and `test_cross_engine` also run torch, through the sample generator or the test itself, so they take the new `TORCH_COMPAT` and stay x86_64 Linux.

The native runtime's package reader uses `nlohmann_json`, whose fbcode external dep does not build for macOS. fbcode now resolves `nlohmann_json` to `fbsource//third-party/nlohmann-json`, the header-only target xplat already uses, as it does for gtest and flatbuffers.

Authored with Claude Code.

Reviewed By: digantdesai

Differential Revision: D133538765
@pytorch-bot

pytorch-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25359

Note: Links to docs will display an error until the docs builds have been completed.

⏳ 1 Pending, 1 Unrelated Failure

As of commit e7eea11 with merge base ba0d826 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 20, 2026
@meta-codesync

meta-codesync Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D133538765.

@digantdesai digantdesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync
meta-codesync Bot merged commit 90bd617 into pytorch:main Nov 20, 2026
323 of 331 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants