arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.22283cs.ARcs.OScs.PF
收藏

Apple Neural Engine:架构、编程与性能

Apple Neural Engine: Architecture, Programming, and Performance

Georgia Institute of Technology(佐治亚理工学院)

Spencer H. Bryngelson

AI总结:

本文通过逆向工程揭示了Apple Neural Engine(ANE)的架构、编程接口和性能特征,包括数据路径、编译器、固件等,并提供了A11至A18及M1至M5系列芯片的详细测量数据。

摘要:

Apple Neural Engine (ANE) 是自 A11 类 iPhone 和 iPad 芯片以及 M1 类 Mac 芯片以来,在 Apple 片上系统中搭载的固定功能矩阵加速器,仅通过 Core ML 模型框架向应用程序暴露。本指南基于对 Apple 硅片的直接测量以及对私有运行时、编译器、内核驱动和固件的静态分析,报告了该引擎的逆向工程说明。它记录了限制引擎吞吐量和能耗的数据路径和屋顶线、Core ML 以下到达引擎的分发路径、编译器和磁盘上的程序格式、权重压缩方案,以及它们之下的内核驱动、固件和命令协议。该说明涵盖了 A11 至 A18 和 M1 至 M5 系列,并提供了每芯片的目标表和按设备划分的操作矩阵;直接测量在 M1 和 M5 上进行。声明被标记为测量、反编译推导或预测,并记录了方法和未解决问题。直接路径可从普通用户空间调用,但未文档化、不受支持且版本脆弱;它旨在用于测量、研究和设备端工作,而非用于发布软件,其中 Core ML 仍然是受支持的路径。

英文摘要:

The Apple Neural Engine (ANE) is Apple's fixed-function matrix accelerator. It has shipped in every Apple system-on-chip since the A11 in iPhones and iPads and the M1 in Macs. Applications reach it only through Core ML, which documents almost nothing below its own surface. This work reverse-engineers the engine. We reach it directly, below Core ML, from an ordinary user process, and that access opens the rest to measurement. We measure on Apple silicon and decompile the private runtime, compiler, kernel driver, and firmware, checking each against the other. We give the datapath and the roofline that bounds throughput and energy. Below that are the compiler and the program format it emits, the weight-compression scheme, the kernel driver, the firmware, and the command protocol. We decode compiler targets for the A11 through A18 and M1 through M5 families, with per-chip tables and an operation-by-device matrix. We measured silicon on the M1 and M5 only, and we mark every claim measured, decompile-derived, or predicted. We record how we reached the engine and what we could not measure. The route is callable from user space, but Apple does not document or support it, and it breaks across operating-system updates. It serves measurement and on-device research. Core ML remains the path for shipped software.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑