mcpField
A
apple-silicon

apple-silicon

github.com/fandhe-ai开发4295 次安装今天更新
代码仓库

关于 apple-silicon

apple-silicon 是面向 Apple Silicon GPU 计算与数值计算任务的技术参考技能,供开发者查阅 Metal 计算、MPS 和 MLX。它按任务分类组织文档,并提供示例及工具链设置指引。

主要功能

  1. 01Metal 计算与 MSL 语言参考
  2. 02MPS 与 MPSGraph 运算指南
  3. 03MLX 数组及机器学习参考
  4. 04按任务分类的文档索引
  5. 05示例与工具链设置指引

适用场景

  1. 01查询 compute pass 和线程组配置
  2. 02了解 MSL 类型与函数属性
  3. 03查找 MPS 图构建或矩阵运算资料
  4. 04探索 MLX 学习循环与函数变换

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill apple-silicon

安装后在 Claude Code 中输入/apple-silicon确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/metal-compute/
argument-buffers.md
compute-pass-encoding.md
compute-pipeline-configuration.md
counter-sample-buffers.md
gpu-counters.md
indirect-command-buffers.md
indirect-compute-commands.md
machine-learning-passes.md
README.md
tensors.md
threadgroup-sizing.md
unified-memory.md
references/mlx/
array.md
compilation.md
data-types.md
devices-streams.md
distributed.md
environment-variables.md
export.md
fast-custom-kernels.md
fft.md
function-transforms.md
indexing.md
kv-cache.md
lazy-evaluation.md
linalg.md
memory-management.md
metal-backend.md
nn-layers.md
nn-losses-activations.md

详细介绍

apple-silicon

Apple Silicon 上的 GPU 计算与数值计算技术栈。涵盖 Metal Shading Language (MSL) 语言规范、 compute dispatch 的编码与 unified memory 优化、基于 MPS/MPSGraph 的矩阵运算和神经网络推理, 以及由 Apple 研究团队推出的数组框架 MLX。

目录结构

skills/apple-silicon/
  SKILL.md
  references/
    metal-compute/
      README.md
      compute-pass-encoding.md
      threadgroup-sizing.md
      compute-pipeline-configuration.md
      indirect-command-buffers.md
      indirect-compute-commands.md
      gpu-counters.md
      counter-sample-buffers.md
      argument-buffers.md
      unified-memory.md
      tensors.md
      machine-learning-passes.md
    msl/
      README.md
      data-types.md
      address-spaces.md
      function-qualifiers.md
      argument-attributes.md
      atomic-functions.md
      simdgroup-functions.md
      math-functions.md
      numerical-compliance.md
      tensor-types.md
      tensor-operations.md
    mps/
      README.md
      mpskernel.md
      mpsimage.md
      image-filters.md
      mpsmatrix.md
      matrix-arithmetic.md
      matrix-decomposition-solve.md
      mpsndarray.md
      mpsnngraph.md
      cnn-kernels.md
      mpsgraph.md
      mpsgraph-tensor.md
      mpsgraph-executable.md
      mpsgraph-operations.md
      ray-tracing.md
    mlx/
      README.md
      array.md
      lazy-evaluation.md
      unified-memory-model.md
      function-transforms.md
      compilation.md
      nn-module.md
      optimizers.md
      nn-layers.md
      nn-losses-activations.md
      indexing.md
      saving-loading.md
      random.md
      linalg.md
      devices-streams.md
      memory-management.md
      fast-custom-kernels.md
      distributed.md
      tree-utils.md
      data-types.md
      operations.md
      fft.md
      export.md
      kv-cache.md
      precision.md
      environment-variables.md
      metal-backend.md
  samples/
    README.md
    compute-kernel-dispatch.md
    nonuniform-threadgroup-dispatch.md
    shared-storage-mode-buffer.md
    resource-group-argument-buffer.md
    cpu-encoded-indirect-compute.md
    blit-and-compute-single-pass.md
    mpsgraph-matrix-multiplication.md
    mpsgraph-training-loop.md
    mps-image-filter.md
    mlx-array-lazy-evaluation.md
    mlx-unified-memory.md
    mlx-mlp-training-loop.md
    mlx-function-transforms.md
  scripts/
    README.md
    toolchain-setup.md
    metal-compile.md
    metal-symbols.md
    metal-binary-archives.md
    metal-dynamic-libraries.md
    metal-debug-env.md
    metal-performance-hud.md
    mlx-install.md
    mlx-distributed.md

探索步骤

根据任务查找类别,并在类别的 README.md 中确定目标页面:

  1. 在下方映射表中查找与任务对应的类别
  2. 参阅该类别的 references/{category}/README.md(samples/ 和 scripts/ 请参阅其根目录下的 README.md),确定目标页面
  3. 阅读相应页面的 .md 文件,查看详细信息

Metal 的渲染管线(MTLRenderCommandEncoder / MTLRenderPipelineState)、Core Animation、 Core Graphics、Core Image、SpriteKit、SceneKit 请参阅 apple-graphics。本技能负责 Metal 的计算 (MTLComputeCommandEncoder 及以下内容)、MSL 语言规范、MPS/MPSGraph 和 MLX。 基于 Core ML / Create ML 的 .mlmodel 设备端推理、Vision、Natural Language、Speech 以及 Core AI(iOS 27,NDArray / ComputeUnitKind)请参阅 apple-ml。 Compute Graph (RealityKit) 请参阅 apple-spatial,MetalFX 降噪请参阅 apple-graphics。 请注意,MLX 的资料来源并非 developer.apple.com,而是 Apple 研究团队发布的开源文档 (ml-explore.github.io)。

任务 → 类别映射

任务类别参考 README
想了解 compute pass 编码、threadgroup/grid 大小计算和 compute pipeline 配置metal-computereferences/metal-compute/README.md
想了解 argument buffer、indirect command buffer、GPU counter、unified memory(storage mode)metal-computereferences/metal-compute/README.md
想了解 MSL 数据类型、address space、kernel 函数属性和参数绑定属性mslreferences/msl/README.md
想了解 MSL atomic 函数、SIMD-group/quad-group 函数、数学函数和数值精度 (IEEE 754) 符合性mslreferences/msl/README.md
想了解使用 MPSKernel/MPSImage/MPSMatrix/MPSNDArray 进行图像滤波、矩阵运算和分解mpsreferences/mps/README.md
想了解使用 MPSGraph/MPSNNGraph 构建和执行图、CNN 推理、ray tracingmpsreferences/mps/README.md
想了解 Metal 4 中创建 MTLTensor、编码 ML pass (MTL4MachineLearningCommandEncoder)metal-computereferences/metal-compute/README.md
想了解 MSL 的 tensor / cooperative_tensor / TensorOps (matmul2d, convolution, execution scope)mslreferences/msl/README.md
想了解 MLX 的 array/dtype、lazy evaluation、indexing、保存/加载mlxreferences/mlx/README.md
想了解 MLX 的 dtype 列表、运算列表、FFT (stft)、函数导出 (.mlxfn)mlxreferences/mlx/README.md
想了解 MLX 的环境变量、数值精度 (TF32, Winograd)、KV cache、Metal capturemlxreferences/mlx/README.md
想了解 MLX 的 grad/vmap 等函数变换、mx.compile、unified memory model、distributedmlxreferences/mlx/README.md
想了解 mlx.nn 的层/损失函数、mlx.optimizers、tree utilsmlxreferences/mlx/README.md
想了解典型用法(compute kernel dispatch、argument buffer、MPSGraph 训练循环、MLX 训练循环等)samplessamples/README.md
想了解 Metal Toolchain 设置、.metal 编译/链接、调试环境变量、MLX 安装scriptsscripts/README.md

评论

支持 Markdown