基础设施 4.0 · 优秀 2026-11-12 · 论文

Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple Silicon

Metal Sandbox 解决 Apple Silicon 上 GPU kernel 生成 agent 的训练/评测基建问题:agent 会话在模型请求开发命令GPU 执行间交替,GPU 大部分时间闲置方案给每个 agent 独立工作区受限文件访问和原生命令执行,并跨多台 Mac 做命令级调度:并行命令并发跑,串行命令每节点共享一个执行槽,等待中的合格命令可迁移到空闲 Mac 并带回结果接入 Harbor 统一任务执行自动验证与 rollout 收集4 台 Mac mini M4 上集中负载的命令吞吐提升 1.682.05 倍;4 会话/节点的持续吞吐估计 2.14 倍,动态调度让工具等待均值降 18.8%批量耗时降 22.3%

打开原文回到归档

Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple Silicon

  • 分类: infra

中文导读

在 Apple Silicon 上训练/评测生成 Metal kernel 的 agent,长期缺一套现成的隔离执行与调度基建;agent 会话大部分时间 GPU 闲置,命令级调度(并行并发、串行共槽、等待命令跨机迁移)直接把闲置容量用起来,并已开源。本页由 arXiv 元数据与摘要生成。

为什么值得关注

在 Apple Silicon 上训练/评测生成 Metal kernel 的 agent,长期缺一套现成的隔离执行与调度基建;agent 会话大部分时间 GPU 闲置,命令级调度(并行并发、串行共槽、等待命令跨机迁移)直接把闲置容量用起来,并已开源。对做本地 GPU 编码 agent 的人是可直接复用的工程参考。

关键信息

  • 论文标题:Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple Silicon
  • 作者:Haozhe Wang, Lina Chen, Fanqi Wan, Qi Han, Yinmin Zhang, Zheng Ge, Daxin Jiang, Junchi Yan
  • arXiv:https://arxiv.org/abs/2611.17294
  • 发布时间:2026-11-12
  • arXiv 分类:cs.LG, cs.AI, cs.CL, cs.DC
  • 关联标签:arxiv, apple-silicon, metal, sandbox, gpu-kernels, coding-agents, scheduling

English Abstract

On-device inference requires kernels that make effective use of local accelerators. Efficient training and evaluation of models that generate Apple Metal kernels benefit from native macOS tools and concurrent agent sessions. These sessions alternate between model requests, development commands, and GPU execution, leaving GPU capacity idle for much of a rollout. We present Metal Sandbox, infrastructure that combines restricted per-instance file access, native command execution, and command-level scheduling across interconnected Macs. Each agent retains its workspace and private development environment. Parallel commands can run concurrently, while serial commands share one execution slot per node; eligible waiting commands can migrate to available Macs and return results to the original agent. Integration with Harbor supports task execution, automatic verification, and rollout collection through a common workflow. Controlled experiments on four Mac mini M4 nodes achieve $1.68\times$--$2.05\times$ gains in command throughput under concentrated demand. Sixteen static agent traces give an estimated $2.14\times$ sustained-throughput gain for four sessions per node versus one, assuming continuously replenished sessions and unchanged mean durations. Replaying these measured traces under dynamic scheduling reduces mean tool waiting by 18.8% and batch elapsed time by 22.3%, assuming unchanged phase durations. Metal Sandbox and its Harbor integration are open-source on GitHub.

English Summary

Metal Sandbox is infrastructure for training/evaluating agents that generate Apple Metal kernels on-device, where agent sessions alternate between model requests, development commands and GPU execution, leaving GPU capacity idle. It combines restricted per-instance file access, native command execution and command-level scheduling across interconnected Macs: parallel commands run concurrently, serial commands share one execution slot per node, and eligible waiting commands migrate to available Macs and return results. Harbor integration covers task execution, automatic verification and rollout collection. On four Mac mini M4 nodes, command throughput gains 1.68x-2.05x under concentrated demand; sixteen static traces estimate 2.14x sustained throughput for four sessions per node, and dynamic scheduling cuts mean tool waiting by 18.8% and batch elapsed time by 22.3%. Open-source on GitHub.

Obsidian Notes

  • 内容由 opencli arxiv paper 拉取 arXiv 元数据与摘要生成。
  • 中文导读与价值判断均锚定在条目已有摘要、论文摘要、作者、日期与分类信息上;未补充论文摘要之外的实验细节。