Special-purpose hardware accelerators are increasingly pivotal for sustaining performance improvements in emerging applications, especially as the benefits of technology scaling continue to diminish. However, designers currently lack effective tools and methodologies to construct complex, high-performance accelerator architectures in a productive manner. Existing high-level synthesis (HLS) tools often require intrusive source-level changes to attain satisfactory quality of results. Despite the introduction of several new accelerator design languages (ADLs) aiming to enhance or replace HLS, their advantages are more evident in relatively simple applications with a single kernel. Existing ADLs prove less effective for realistic hierarchical designs with multiple kernels, even if the design hierarchy is flattened. In this paper, we introduce Allo, a composable programming model for efficient spatial accelerator design. Allo decouples hardware customizations, including compute, memory, communication, and data type from algorithm specification, and encapsulates them as a set of customization primitives. Allo preserves the hierarchical structure of an input program by combining customizations from different functions in a bottom-up, type-safe manner. This approach facilitates holistic optimizations that span across function boundaries. We conduct comprehensive experiments on commonly-used HLS benchmarks and several realistic deep learning models. Our evaluation shows that Allo can outperform state-of-the-art HLS tools and ADLs on all test cases in the PolyBench. For the GPT2 model, the inference latency of the Allo generated accelerator is 1.7x faster than the NVIDIA A100 GPU with 5.4x higher energy efficiency, demonstrating the capability of Allo to handle large-scale designs.
翻译:专用硬件加速器在持续提升新兴应用性能方面日益关键,尤其是在技术微缩带来的收益持续递减的背景下。然而,设计人员目前缺乏高效工具与方法论来构建复杂且高性能的加速器架构。现有高层次综合(HLS)工具通常需要侵入式的源代码级修改才能达到满意的设计质量。尽管已有多种新型加速器设计语言(ADL)旨在改进或替代HLS,但其优势在单内核的简单应用中更为显著。对于包含多内核的实际分层设计(即使将设计层级扁平化),现有ADL的效果仍不理想。本文提出Allo,一种用于高效空间加速器设计的可组合编程模型。Allo将硬件定制(包括计算、存储、通信和数据类型)与算法规范解耦,并将其封装为一组定制原语。通过以自底向上、类型安全的方式组合不同函数的定制内容,Allo保留了输入程序的层次化结构。该方法便于实现跨函数边界的整体优化。我们在常用HLS基准测试及多个实际深度学习模型上进行了全面实验。评估表明,Allo在PolyBench的所有测试用例中均优于现有最先进的HLS工具与ADL。针对GPT2模型,Allo生成的加速器推理延迟比NVIDIA A100 GPU快1.7倍,能效提升5.4倍,展现了其处理大规模设计的能力。