metal-kernel
A maintainer skill in the PyTorch repository for writing native Metal kernels that run PyTorch operators on Apple Silicon GPUs, preferred over MPSGraph for control and speed.
What the skill teaches
A maintainer skill in the PyTorch repository for writing native Metal kernels that run PyTorch operators on Apple Silicon GPUs, preferred over MPSGraph for control and speed. The agent adds the MPS entry to the operator's dispatch definitions, writes the kernel as a templated functor registered with the project's unary or binary macros, adds a host-side stub that runs it and removes any old MPSGraph implementation, then builds with ninja. It covers complex and boolean arguments, very large tensors and error reporting from inside kernels, how to take the operator off the MPS skip and expected-failure lists so its tests run, and testing single shaders with the compile_shader helper.
Capabilities
- Add MPS dispatch for a PyTorch operator
- Write and register a native Metal kernel
- Migrate an operator off MPSGraph
- Enable and run the operator's MPS tests
About
- Publisher
- PyTorch
Install
The project doesn't document install steps that we could confirm. See the project's own instructions
MCP servers and skills can run code on your computer and act on your data. Review the source before installing.
Details
| Fact | Value | Source |
|---|---|---|
| Type | Skill | |
| Tool | Not stated in its documentation | |
| Publisher | PyTorch | source |
| Official status | Not stated in its documentation | |
| Needs an API key or sign-in | Not stated in its documentation | |
| Includes scripts | No | source |
| Platforms | macOS | source |
| AI clients | Not stated in its documentation | |
| Licence | NOASSERTION | source |
| Pricing | Not stated in its documentation | |
| Activity | Last commit Nov 11, 2026105,390 GitHub starsDownload data not available (not on npm or PyPI) | source |
| Links | Repository Website |
Sources
- Skill file (SKILL.md)github.com/pytorch/pytorch · Backs: Includes scripts, LicenceNov 10, 2026
- GitHub repositorygithub.com/pytorch/pytorch · Backs: Publisher, ActivityNov 11, 2026
- Folder in the repository (metal-kernel)github.com/pytorch/pytorch · Backs: Includes scriptsNov 10, 2026