Apple M4 Pro 上的残留 GPU 缓存状态
Residual GPU Cache State on Apple M4 Pro
AI总结:
本文通过测量 Apple M4 Pro 上 GPU 命令完成后的缓存状态,发现大 GPU 足迹会导致后续 CPU 访问变慢,但第二次访问可消除大部分开销,表明存在残留共享缓存置换而非 DRAM 争用。
摘要:
Apple silicon 暴露了统一的 CPU-GPU 内存,但 GPU 命令完成后留下的缓存状态尚未有文档记录。本文在 14 核 Apple M4 Pro 上表征了该阶段边界。我们针对未修改的 STREAM 5.10 和 BabelStream 5.0 验证了测量流水线,然后将 8192 字节系统级缓存占用模式适配到同步 Metal 实验中。GPU 内核访问 0 到 512 MiB,并在 16 MiB CPU 探测开始前完成。第一次 CPU 遍历在大 GPU 足迹后较慢,而第二次遍历消除了大部分开销,表明是残留共享缓存置换而非同时发生的 DRAM 争用。一个独立的匹配块实验测量了高优先级 CPU 流量下的 GPU 减速,发现后台 QoS 接近基线。根 PMU 测量和公共 IOReport 直方图提供了硬件基础:它们将 L1D 重填扇区与软件缓存行大小区分开,暴露了页偏移相关的冲突行为,并分离了性能核心、效率核心和 AGX 需求。结果识别了 M4 Pro 上可重现的 GPU 后缓存置换窗口,并量化了一个简单的单遍软件恢复机制。
英文摘要:
Apple silicon exposes unified CPU-GPU memory, but the cache state left after a completed GPU command is not documented. This paper characterizes that phase boundary on a 14-core Apple M4 Pro. We validate the measurement pipeline against unmodified STREAM 5.10 and BabelStream 5.0, then adapt an 8192-byte system-level-cache occupancy pattern to a synchronized Metal experiment. A GPU kernel touches 0 to 512 MiB and finishes before a 16 MiB CPU probe begins. The first CPU traversal is slower after large GPU footprints, while a second traversal removes most of the cost, showing residual shared-cache displacement rather than simultaneous DRAM contention. A separate matched-block experiment measures GPU slowdown under high-priority CPU traffic and finds background QoS close to baseline. Root PMU measurements and public IOReport histograms provide hardware grounding: they distinguish L1D refill sectors from software cache-line size, expose page-offset-dependent conflict behavior, and separate performance-core, efficiency-core, and AGX demand. The results identify a reproducible post-GPU cache-displacement window on M4 Pro and quantify a simple one-pass software recovery mechanism.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。