一句话:提出 CRUSH,用基于信用的解耦机制在动态调度 HLS 的数据流电路中实现无死锁、可扩展的功能单元共享。
动态调度高层次综合(HLS)将 C/C++ 等软件代码自动翻译为数据流电路——由通过握手信号通信的计算单元组成的网络。这些信号在运行时对电路进行调度,使其能高效处理不规则控制流与不可预测的内存访问,因而相较标准 HLS 工具生成的静态调度电路具有性能优势。要让数据流电路的 HLS 实用且有吸引力,需要资源优化策略来补充其性能优势,其中关键的便是资源共享:让稀缺昂贵的资源(如浮点运算单元)在多个操作间共享。然而数据流电路中的共享面临独特挑战:不慎的共享策略会导致性能退化甚至电路死锁。本文提出 CRUSH,一种在动态调度 HLS 中实现高效功能单元共享的策略。CRUSH 通过解耦共享资源中各操作的交互来打破资源依赖,从而系统性地避免共享引入的死锁;它不借助复杂的死锁避免机制去约束电路执行,从而保留动态性,并抓住乱序访问共享单元所带来的共享机会;同时采用可扩展且有效的启发式方法做出共享决策。与先前的策略相比,CRUSH 平均减少 12% 的 DSP、15% 的 FF,并将优化运行时间降低 90%。CRUSH 已集成到 Dynamatic HLS 编译器(https://github.com/EPFL-LAP/dynamatic)中。
Dynamically scheduled high-level synthesis (HLS) automatically translates software code (e.g., C/C++) to dataflow circuits-networks of compute units that communicate via handshake signals. These signals schedule the circuit during runtime, allowing them to handle irregular control flow or unpredictable memory accesses efficiently, thus giving them performance merit over statically scheduled circuits produced by standard HLS tools. To make HLS of dataflow circuits attractive and practical, we need various resource-optimization strategies to complement their performance advantage. A crucial technique is resource sharing: scarce and expensive resources (e.g., floating-point arithmetic units) are shared between multiple operations. However, this approach faces unique challenges in dataflow circuits, as an uncareful sharing strategy leads to performance degradation and circuit deadlock. This work presents CRUSH, a strategy that enables efficient functional unit sharing in dynamically scheduled HLS. CRUSH systematically avoids sharing-introduced deadlocks: it decouples interactions of operations in the shared resource to break resource dependencies. CRUSH maintains the benefit of dynamism: it does not constrain circuit execution with a complex deadlock avoidance mechanism and seizes sharing opportunities enabled by out-of-order access to the shared unit. CRUSH is practical: it employs scalable and effective heuristics for sharing decisions. Compared to a prior strategy, CRUSH achieves an average reduction of 12% DSPs, 15% FFs, and 90% optimization runtime. CRUSH has been integrated into the Dynamatic HLS compiler (https://github.com/EPFL-LAP/dynamatic).