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

HASCO:面向张量计算的敏捷软硬件协同设计

HASCO: Towards Agile HArdware and Software CO-design for Tensor Computation

Peking University(北京大学);University of Southern California(南加州大学)

Qingcheng Xiao, Size Zheng, Bingzhe Wu, Pengcheng Xu, Xuehai Qian, Yun Liang

摘要:

由于计算的大量数据和操作,张量计算压倒了传统的通用计算设备。他们需要一个由硬件加速和软件映射组成的整体解决方案。硬件/软件(HW/SW)协同设计优化硬件和软件,并产生高质量的解决方案。在协同设计流程中有两个主要挑战。首先,存在多种方法来划分张量计算,并且对性能和能量效率具有不同的影响。此外,硬件部分必须由空间加速器的固有功能来实现。程序员很难手动识别和分析分区方法。其次,由HW/SW划分、硬件优化和软件优化组成的整体设计空间是巨大的。设计空间需要有效探索。为此,我们提出了一个敏捷的协同设计方法HASCO,提供了一个有效的硬件/软件解决方案,密集张量计算。我们使用张量语法树作为统一的IR,在此基础上,我们开发了一个两步的方法来确定分区方法。对于每种方法,HASCO探索了硬件和软件设计空间。我们提出了不同的算法的探索,因为他们有不同的目标和评估成本。具体而言,我们开发了一个多目标贝叶斯优化算法来探索硬件优化。对于软件优化,我们使用启发式和Q-学习算法。实验结果表明,与软硬件分开开发相比,HASCO通过软硬件协同设计,实现了1.25倍到1.44倍的延迟降低。

英文摘要:

Tensor computations overwhelm traditional general-purpose computing devices due to the large amounts of data and operations of the computations. They call for a holistic solution composed of both hardware acceleration and software mapping. Hardware/software (HW/SW) co-design optimizes the hardware and software in concert and produces high-quality solutions. There are two main challenges in the co-design flow. First, multiple methods exist to partition tensor computation and have different impacts on performance and energy efficiency. Besides, the hardware part must be implemented by the intrinsic functions of spatial accelerators. It is hard for programmers to identify and analyze the partitioning methods manually. Second, the overall design space composed of HW/SW partitioning, hardware optimization, and software optimization is huge. The design space needs to be efficiently explored. To this end, we propose an agile co-design approach HASCO that provides an efficient HW/SW solution to dense tensor computation. We use tensor syntax trees as the unified IR, based on which we develop a two-step approach to identify partitioning methods. For each method, HASCO explores the hardware and software design spaces. We propose different algorithms for the explorations, as they have distinct objectives and evaluation costs. Concretely, we develop a multi-objective Bayesian optimization algorithm to explore hardware optimization. For software optimization, we use heuristic and Q-learning algorithms. Experiments demonstrate that HASCO achieves a 1.25X to 1.44X latency reduction through HW/SW co-design compared with developing the hardware and software separately.

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

↑