Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Metal : detect Apple SoC at backend init#23566

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
forforever73:metal-device-detection
May 25, 2026
Merged

Metal : detect Apple SoC at backend init#23566
ggerganov merged 1 commit into
ggml-org:masterfrom
forforever73:metal-device-detection

Conversation

@forforever73

Copy link
Copy Markdown
Contributor

Overview

Adds a small Metal device-family detection layer. Parses [mtl_device name] into a ggml_metal_device_id enum (M1..M5 + GENERIC) and stores it in props.device_id. Unknown devices fall back to GENERIC.

No consumers yet — this just lays the groundwork for the hardware-aware Metal work discussed in #23114

Requirements

@forforever73 forforever73 requested a review from a team as a code owner May 23, 2026 09:45
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels May 23, 2026
@ggerganov ggerganov self-assigned this May 23, 2026

@ggerganov ggerganov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great. We will utilize the device_id later to do the mapping of the kernel configs based on the device type. Note that we will likely have configs for different operators: FA, MUL_MAT, MUL_MAT_ID, etc. But at the start, we can focus just on the FA and extend later.

@ggerganov ggerganov added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label May 25, 2026
@ggerganov ggerganov merged commit 35c9b1f into ggml-org:master May 25, 2026
50 of 56 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request May 26, 2026
* origin/master: (59 commits)
ggml-zendnn : fixed naming of matmul function (ggml-org#20964)
ci : do not allocate ccache for 3rd-party hosted runners (ggml-org#23730)
ci : move [no release] check to dedicated check_release job (ggml-org#23734)
ci : add `[no release]` keyword + fix sanitizer builds (ggml-org#23728)
ci : move macos jobs to the apple workflow + fix names (ggml-org#23721)
vulkan: optimize conv2d and implement coopmat1 support (ggml-org#22620)
ci : remove vulkan SDK dep from webgpu job (ggml-org#23718)
hexagon: add support for CONCAT op (ggml-org#23648)
ci : move more CPU jobs to self-hosted runners (ggml-org#23715)
ci : move sanitizer jobs to self-hosted runners (ggml-org#23713)
ci : reduce (disable SYCL and CANN builds/releases) (ggml-org#23705)
convert : support Gemma4ForCausalLM architecture (ggml-org#23682)
models : Attach Mistral3 NVFP4 weight scales (ggml-org#23629)
SYCL: implement ggml_sycl_pool_vmm (ggml-org#22862)
tests: test-backend-ops -j <N> to run tests in parallel (ggml-org#23637)
model : add support for talkie-1930-13b (ggml-org#22596)
ggml-webgpu: Add MMVQ path for Q4/Q8/Q2_K/Q4_K and clean up legacy MUL_MAT pipeline (ggml-org#23594)
[WebGPU] Check batch_compute_passes before sending passes when not doing GPU profiling (ggml-org#23457)
CUDA: missing PDL sync for FWHT, better fallback (ggml-org#23690)
metal : add apple device id (ggml-org#23566)
...
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
turbo-tan pushed a commit to turbo-tan/llama.cpp-tq3 that referenced this pull request Jun 2, 2026
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants