Sim-FA:异步流水线的模拟前端
Sim-FA: A GPGPU Simulator Framework for Fine-Grained Asynchronous Pipeline Analysis
AI总结:
本文提出Sim-FA模拟器,用于高效支持大语言模型,通过模拟流水线实现高精度性能评估,并分析FlashAttention-3的流量估计问题。
摘要:
为高效支持大语言模型(LLMs),现代GPGPU架构引入了新的功能和编程范式,如warp specialization。这些功能使生产者与消费者之间以及矩阵乘法与激活函数操作之间存在时间重叠,显著提升性能。为有效进行AI基础设施和计算机架构研究,必须有支持这些新功能的精确模拟器和能准确捕捉工作负载特性的分析模型。然而,现有学术工具对这些新兴需求支持有限。现有精确模拟器未及时整合新的NVIDIA GPU功能,如张量内存加速器(TMA)。此外,现有分析模型在某些配置下可能错误估计DRAM流量。本文构建了一个从FlashAttention-3内核仪器化到精确模拟的模拟流水线。模拟器在H800上的平均绝对百分比误差(MAPE)为5.7%,最大绝对百分比误差为12.7%。我们还对FlashAttention-3进行了理论分析,并解释了现有分析模型为何会产生不准确的流量估计。
英文摘要:
To efficiently support Large Language Models (LLMs), modern GPGPU architectures have introduced new features and programming paradigms, such as warp specialization. These features enable temporal overlap between the producer and consumer, as well as between matrix multiplication and activation function operations, substantially improving performance. To conduct effective AI infrastructure and computer architecture research, cycle-accurate simulators that support these new features, together with analytical models that faithfully capture workload characteristics, are essential. However, existing academic tools provide limited support for these emerging requirements. Existing cycle-accurate simulators do not incorporate new NVIDIA GPU features, such as the Tensor Memory Accelerator (TMA), in a timely manner. Moreover, existing analytical models can misestimate DRAM traffic under certain configurations. In this paper, we build Sim-FA, a cycle-accurate simulation framework for Hopper TMA/WGMMA pipelines. We first develop an operator-agnostic trace frontend that instruments kernels at the Triton TTGIR level and validates it on 23 GEMM shapes, achieving 5.49\% MAPE against H800, confirming that the simulator core is not tied to any single operator. Because FlashAttention-3 introduces additional complexity beyond standard TMA/WGMMA kernels (asymmetric producer-consumer pipelines, softmax, ping-pong synchronization), we further build an FA3-specialized frontend that achieves 5.7\% MAPE with a maximum error of 12.7\%. Within the same framework, SimFA-python serves as an analytical fast path for large-scale design-space exploration where cycle-accurate simulation is prohibitively slow; validated against cuTile kernels on Blackwell (GB10), it explains why existing analytical models can produce inaccurate traffic estimates.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。