Metal
by Apple Inc. · Framework · also known as Apple Metal, Metal Performance Shaders
Apple's low-level GPU programming framework for graphics and parallel compute on iOS, macOS and visionOS, the layer beneath MLX, Core ML and most Apple Silicon ML runtimes
Overview
Metal is Apple's low-overhead API for programming the GPU on its devices, introduced in 2014 and now the only supported graphics and compute interface on Apple platforms. Developers write shaders and compute kernels in the Metal Shading Language, a C++-derived dialect, and submit command buffers that the framework schedules on the GPU. Companion libraries include Metal Performance Shaders (optimized kernels for image processing, linear algebra and neural-network layers), MetalFX upscaling and MetalKit for display plumbing.
For machine learning on Apple Silicon, Metal is the foundation rather than the tool most people touch directly: MLX, PyTorch's MPS backend, llama.cpp, Core ML and the Foundation Models framework all dispatch their GPU work through it, and the unified memory architecture of M-series chips lets those frameworks share buffers between CPU and GPU without copies. Developers reach for Metal itself when they need custom kernels, graphics rendering or profiling with Xcode's GPU tools.
It is proprietary and Apple-only; there is no Linux, Windows or Android target, so portable GPU code usually goes through Vulkan, WebGPU or a framework that abstracts the backend.
Capabilities
- Low-level GPU command submission for graphics and compute
- Metal Shading Language for shaders and compute kernels
- Metal Performance Shaders for image, linear-algebra and neural-network kernels
- GPU debugging and profiling in Xcode
- Unified-memory buffer sharing on Apple Silicon
Typical workflows
- Write a custom compute kernel for a scientific application
- Profile the GPU work of an MLX or PyTorch program
- Render 3D content in a native macOS app
Strengths
- Direct access to Apple GPUs with minimal driver overhead
- Underpins every ML framework on Apple Silicon
- First-class tooling in Xcode
Limitations
- Apple platforms only
- Steep learning curve compared with high-level frameworks
- No portability to Linux or Windows GPUs
Prerequisites
- Xcode on macOS
- Swift, Objective-C or C++
Who it is for
- Graphics and game developers
- ML framework and kernel authors on Apple Silicon
Alternatives & comparison
- JAX
Python library for NumPy-style array computing with composable transformations (jit, grad, vmap, shard_map) compiled through XLA to CPU, GPU and TPU
Open sourceOpen source - MLX
Apple's open-source array framework for machine learning on Apple Silicon, with NumPy-like Python, C++ and Swift APIs and unified CPU/GPU memory
Open sourceOpen source - PyTorch
Open-source deep-learning framework with eager tensors, autograd, torch.compile and distributed training, governed by the PyTorch Foundation and the base of most LLM tooling
Open sourceOpen source
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Official documentationMetal | Apple Developer Documentationchecked Nov 1, 2026
https://developer.apple.com/documentation/metal
Supports: capabilities, operating_systems, description
- Official documentationMLX — unified memory, lazy evaluation, distributedchecked Nov 1, 2026
https://ml-explore.github.io/mlx/build/html/index.html
Supports: integrations
- Official sitechecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Apple Silicon ML & MLX
llama.cpp
ggml-org (Georgi Gerganov and contributors) · Local LLM inference & serving
C/C++ inference engine for LLMs and vision-language models with GGUF quantized weights, Metal, CUDA, Vulkan and other backends, a CLI and an OpenAI-compatible server
LM Studio
Element Labs, Inc. · Local LLM inference & serving
Proprietary desktop app for discovering, downloading and running local LLMs with llama.cpp and MLX engines, a chat UI, an OpenAI-compatible server, CLI, SDKs and a headless daemon
MLX LM
Apple Inc. · Apple Silicon ML & MLX
Python package and CLI for running, serving, quantizing and fine-tuning large language models on Apple Silicon with MLX
Ollama
Ollama · Local LLM inference & serving
Open-source runtime and model manager for running open-weight LLMs locally on macOS, Windows and Linux, with a REST API, OpenAI- and Anthropic-compatible endpoints and optional cloud models
Core ML
Apple Inc. · Apple Silicon ML & MLX
Apple's on-device machine-learning runtime for iOS and macOS apps, with the open-source coremltools package for converting PyTorch and other models to its format
Create ML
Apple Inc. · Apple Silicon ML & MLX
Apple's app and Swift framework for training image, text, sound, tabular and activity models on a Mac without writing training code, exporting directly to Core ML