用途:面向 Apple Silicon 平台的 GPU 计算与数值计算参考,按任务查找对应文档。覆盖 Metal Shading Language(MSL)语言规范、compute dispatch 编码与统一内存优化、MPS/MPSGraph 的矩阵运算与神经网络推理,以及 Apple 研究团队开源的数组框架 MLX。
主要能力与目录:技能目录含 SKILL.md、references、samples、scripts。references 分四类:metal-compute(compute pass 编码、threadgroup sizing、compute pipeline 配置、indirect command buffer、GPU counter、argument buffer、unified memory);msl(数据类型、address space、函数限定符、参数属性、atomic 函数、simdgroup 函数、数学函数、数值合规);mps(MPSKernel、MPSImage、图像滤镜、MPSMatrix、矩阵算术与分解求解、MPSNDArray、MPSNNGraph、CNN kernel、MPSGraph 及其 tensor/executable/operations、ray tracing);mlx(array、惰性求值、统一内存模型、函数变换、编译、nn 模块与层/损失/激活、优化器、索引、保存加载、随机、linalg、设备与流、内存管理、自定义 kernel、分布式、tree utils)。samples 提供 compute kernel dispatch、非均匀 threadgroup dispatch、shared storage mode buffer、resource group argument buffer、CPU 编码 indirect compute、blit 与 compute 单 pass、MPSGraph 矩阵乘法与训练循环、MPS 图像滤镜、MLX 惰性求值/统一内存/MLP 训练循环/函数变换等示例。scripts 含工具链设置、metal 编译、符号、二进制归档、动态库、调试环境变量、性能 HUD、MLX 安装与分布式。
使用方式:先按任务在映射表中定位类别,再读该类别 references/{category}/README.md(samples 与 scripts 读其直下 README.md)确定目标页,最后 Read 对应 .md 获取细节。
适用场景:需要编写或调试 Metal compute kernel、配置 compute pipeline、使用 MPS/MPSGraph 做矩阵与神经网络运算、或用 MLX 做数组计算与训练时。
限制:Metal 渲染管线(MTLRenderCommandEncoder、MTLRenderPipelineState)、Core Animation、Core Graphics、Core Image、SpriteKit、SceneKit 属 apple-graphics;Core ML/Create ML 的 .mlmodel 端侧推理、Vision、Natural Language、Speech 属 apple-ml。MLX 文档来源为 ml-explore.github.io,非 developer.apple.com。具体安装命令与代码内容以资料为准,暂未提供更多细节。