Community코딩 & 개발github.com

pytorch/metal-kernel

PyTorch 연산자를 위한 Metal/MPS 커널을 작성합니다. 연산자에 MPS 기기 지원을 추가하거나, Metal 셰이더를 구현하거나, CUDA 커널을 Apple Silicon으로 포팅할 때 사용하세요. native_functions.yaml 디스패치, 호스트 측 연산자, Metal 커널 구현을 다룹니다.

metal-kernel란 무엇인가요?

이 스킬은 PyTorch 프레임워크에서 Apple Silicon 기기(MPS)를 지원하는 Metal 커널을 개발하는 데 특화되어 있습니다. PyTorch 연산자에 MPS(Metal Performance Shaders) 백엔드를 추가해야 하거나, 기존 CUDA 커널을 Apple Silicon 환경으로 포팅할 때 유용합니다. `native_functions.yaml`을 통한 디스패치 메커니즘, 호스트 측 C++ 연산자 구현, 그리고 실제 Metal 셰이더(MSL) 코드 작성까지 전체 파이프라인을 다루며, 주로 PyTorch의 C++ 및 Metal 프로그래밍 인터페이스를 통해 동작합니다. 이 스킬을 통해 개발자는 PyTorch의 MPS 지원을 확장하거나 최적화할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/pytorch/pytorch/tree/main/skills/metal-kernel

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

metal-kernel은(는) 무엇을 하나요?

PyTorch 연산자를 위한 Metal/MPS 커널을 작성합니다. 연산자에 MPS 기기 지원을 추가하거나, Metal 셰이더를 구현하거나, CUDA 커널을 Apple Silicon으로 포팅할 때 사용하세요. native_functions.yaml 디스패치, 호스트 측 연산자, Metal 커널 구현을 다룹니다.

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

pytorch/add-uint-support

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

pytorch/aoti-debug

Debug AOTInductor (AOTI) errors and crashes. Use when encountering AOTI segfaults, device mismatch errors, constant loading failures, or runtime errors from aot_compile, aot_load, aoti_compile_and_package, or aoti_load_package.

pytorch/at-dispatch-v2

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

pytorch/docstring

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

pytorch/pr-review

Review PyTorch pull requests for code quality, test coverage, security, and backward compatibility. Use when reviewing PRs, when asked to review code changes, or when the user mentions "review PR", "code review", or "check this PR".

pytorch/pyrefly-type-coverage

Migrate a file to use stricter Pyrefly type checking with annotations required for all functions, classes, and attributes.

pytorch/skill-writer

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

pytorch/triaging-issues

Triages GitHub issues by routing to oncall teams, applying labels, and closing questions. Use when processing new PyTorch issues or when asked to triage an issue.

관련 스킬