这篇论文提出NIFA架构,用ACAM替代ADC省掉70%面积和功耗,让FPGA跑Transformer能效提升近2倍,CNN更是飙升40倍。
NIFA是一种新型FPGA架构,通过集成无ADC的IMC块(用ACAM替代传统ADC)来原生处理非线性运算,从而提升Transformer模型的推理效率。相比传统FPGA,NIFA在CNN基准上实现高达40倍能效提升和4.1倍面积效率提升,在Transformer基准上实现1.9倍能效和2.5倍面积效率提升。该架构针对注意机制中的动态矩阵乘法(DIMM)进行了优化,能有效处理长输入序列。
NIFA: Nonlinear IMC enhanced FPGA for efficient ML inference
Recent FPGAs have improved deep learning (DL) inference efficiency through dedicated tensor blocks and in-BRAM computation. ReRAM-based analog in-memory computing (IMC) pushes efficiency further, offering an order-of-magnitude improvement in compute density and energy efficiency over conventional digital logic by performing vector-matrix multiplication (VMM) directly within the ReRAM crossbar; prior work has integrated such IMC blocks into FPGAs for DL inference. However, conventional IMC designs support only static-weight VMM, leaving nonlinear operations and dynamic matrix-matrix multiplication (DIMM) to the FPGA fabric. As a result, the benefits of IMC are largely confined to static-weight models, whereas Transformer-based models, which rely on frequent nonlinear and DIMM operations, gain only limited improvement. Moreover, the ADCs within each IMC block consume more than 70% of its area and power, further limiting system efficiency and scalability. To address these limitations, we propose a novel FPGA architecture that integrates an ADC-free IMC block, replacing the conventional ADC with analog content-addressable memories (ACAMs) that natively perform nonlinear operations inside the block. To fully exploit this block, we conduct an FPGA-aware design-space exploration that determines optimal crossbar dimensions while balancing FPGA area, flexibility, and DL performance, and we develop an efficient mapping that leverages ACAMs to carry out DIMM operations, extending the applicability of IMC to attention computation. On CNN and Transformer-based benchmarks, the proposed architecture achieves up to 40x and 1.9x higher energy efficiency and 4.1x and 2.5x higher area efficiency, respectively. Overall, it significantly improves FPGA DL inference efficiency and sustains robust gains on Transformer-based workloads across long input sequences, advancing domain-specialized FPGA design.