Flex-PE: عنصر معالجة متعدد الدقة ومرن لـ AI workloads Flex-PE: Flexible and SIMD Multiprecision Processing Element for AI Workloads

شارك:
المجلة: IEEE Transactions on Very Large Scale Integration (VLSI) Systems، المجلد: 33، العدد: 6
DOI: https://doi.org/10.1109/tvlsi.2025.3553069
تاريخ النشر: 2025-04-07
المؤلف: Mukul Lokhande وآخرون
الموضوع الرئيسي: تطبيقات الشبكات العصبية المتقدمة

نظرة عامة

تقدم البحث Flex-PE، وهو عنصر معالجة جديد مصمم لتعزيز أداء نماذج الذكاء الاصطناعي المدفوعة بالبيانات من خلال وظائف تفعيل قابلة لإعادة التكوين أثناء التشغيل (AFs) وقدرات متعددة الدقة. يدعم Flex-PE مجموعة متنوعة من AFs، بما في ذلك sigmoid و tanh و ReLU و softmax، مع تحقيق تحسينات كبيرة في الإنتاجية تصل إلى 16× لعمليات 4 بت ثابتة النقطة (FxP4)، و 8× لعمليات 8 بت (FxP8)، و 4× لعمليات 16 بت (FxP16) في تكوين خط أنابيب متعدد الزمن بالكامل. هذه البنية مفيدة بشكل خاص لتطبيقات الذكاء الاصطناعي على الحافة، حيث تقدم وضعًا تكراريًا فعالًا من حيث المساحة يقلل من عمليات الوصول المباشر إلى الذاكرة (DMA) لخرائط الميزات المدخلة ومرشحات الوزن في نموذج VGG-16 بعوامل 62× و 371×، على التوالي، مع الحفاظ على كفاءة طاقة تبلغ 8.42 GOPS/W مع أقل من 2% فقدان في الدقة.

تتناول بنية Flex-PE ليس فقط المتطلبات الحسابية لأحمال العمل المتنوعة في الذكاء الاصطناعي، بما في ذلك الشبكات العصبية العميقة (DNNs) والشبكات العصبية التكرارية (RNNs) والمحولات، ولكنها تتكيف أيضًا مع متطلبات الأداء والطاقة المتغيرة في كل من بيئات الحافة والسحابة. من خلال تمكين عمليات حسابية بدقة 4 بت لاستنتاج التعلم العميق ودعم عمليات حسابية تصل إلى 32 بت لمهام الحوسبة عالية الأداء (HPC)، يؤسس Flex-PE أساسًا قويًا لتطوير مسرعات الذكاء الاصطناعي المستقبلية الموفرة للطاقة، مما يساهم في التقدم في أجهزة الذكاء الاصطناعي العامة.

مقدمة

تناقش مقدمة ورقة البحث التقدم السريع في الذكاء الاصطناعي (AI) وزيادة اعتماده على اتخاذ القرارات المدفوعة بالبيانات، مما أدى إلى زيادة كبيرة في الطلب على موارد الحوسبة. يتطلب التطور من الشبكات العصبية العميقة (DNNs) إلى نماذج اللغة الكبيرة (LLMs) تطوير مسرعات الأجهزة التي لا تعزز فقط القدرة الحاسوبية القصوى ولكن أيضًا تعالج استخدام الذاكرة وازدحام الاتصال بين الشرائح. على مدار العقدين الماضيين، بينما ارتفع أداء TOPS بمقدار 60,000 مرة، كانت التحسينات في عرض النطاق الترددي لذاكرة الوصول العشوائي الديناميكية (DRAM) وعرض النطاق الترددي للاتصال متأخرة بمقدار 30 مرة و 100 مرة، على التوالي، مما أدى إلى “مشكلة جدار الذاكرة”. تتميز هذه المشكلة بالقيود في سعة الذاكرة، وعرض النطاق الترددي لنقل البيانات، وزمن الوصول، مما يؤثر سلبًا على أداء النظام الكلي عبر تطبيقات الذكاء الاصطناعي المختلفة، من الاستنتاج على الحافة إلى التدريب في السحابة.

تؤكد الورقة على الحاجة الملحة إلى معالجة متوازية واسعة النطاق بدقة كمية لتحسين الإنتاجية استجابةً للتنوع المتزايد في حالات استخدام الذكاء الاصطناعي. تبرز التعقيد الذي تسببه وظائف التفعيل (AFs) ومتطلبات الدقة المتغيرة في تصميم مسرعات الأجهزة. يبرز تحليل التنفيذ عبر أحمال العمل المختلفة في الذكاء الاصطناعي، بما في ذلك DNNs (مثل LeNet)، و RNNs (مثل LSTM، BI-LSTM، GRU)، والمحولات (مثل BERT)، الحاجة الملحة لتحسين AF. علاوة على ذلك، تميز بين متطلبات أجهزة الذكاء الاصطناعي على الحافة، التي تتطلب استجابة سريعة وكفاءة تشغيلية، وأجهزة الحوسبة عالية الأداء (HPC)، التي تعطي الأولوية للأداء على نطاق واسع ضمن قيود عرض النطاق الترددي المتاح للذاكرة وقدرات الاتصال.

طرق

تستعرض هذه القسم منهجية حساب CORDIC (حاسوب دوران الإحداثيات الرقمية)، التي تمكن من تنفيذ العمليات الدائرية والخطية والهايبر بولية باستخدام خوارزمية موحدة. تعمل خوارزمية CORDIC من خلال وضعين رئيسيين: التوجيه والدوران، حيث تحول الإحداثيات المستوية إلى إحداثيات دورانية لتسهيل وظائف رياضية متنوعة، بما في ذلك الحسابات الحسابية والمثلثية. تستخدم الخوارزمية دورانًا مقاسًا للمتغيرات \(X\)، \(Y\)، و \(Z\)، حيث تمثل \(X\) و \(Y\) إحداثيات الدوران الزائف، و \(Z\) تتبع زاوية الدوران. المعادلات التكرارية التي تحكم عملية CORDIC هي كما يلي:

\[
X_{i+1} = X_i – m \cdot d_i \cdot Y_i \cdot 2^{-i}
\]
\[
Y_{i+1} = Y_i + d_i \cdot X_i \cdot 2^{-i}
\]
\[
Z_{i+1} = Z_i – d_i \cdot E_i
\]

هنا، يتم تعريف \(E_i\) كـ \(2^{-i}\)، \(\tan^{-1}(2^{-i})\)، أو \(\tanh^{-1}(2^{-i})\) اعتمادًا على وضع العملية، و \(m\) تأخذ قيمًا تتوافق مع نوع الإحداثيات المعالجة.

تشمل منهجية التنفيذ كل من تحليل أحمال العمل المعتمد على البرمجيات ومحاكاة البنية المعمارية للأجهزة لتحسين تصميم المسرع. تم إجراء تحليل باريو مفصل لـ Flex-PE لتحديد المراحل المثلى اللازمة للحسابات التي تتضمن وظائف تفعيل متنوعة (AFs) مثل MAC و Sigmoid و Tanh و Softmax. يبرز هذا التحليل التوازن بين عدد المراحل، ومقاييس الخطأ، وتأخيرات الحساب، وكفاءة المساحة، بهدف تعزيز الإنتاجية مع تقليل المساحة واستهلاك الطاقة.

نقاش

في هذا القسم، تناقش الورقة التقدم في أجهزة وظائف التفعيل (AF) لتطبيقات الذكاء الاصطناعي (AI)، مع التركيز بشكل خاص على بنية Flex-PE المقترحة. تم تصميم Flex-PE لدعم وظائف تفعيل متعددة (Tanh و ReLU و Softmax و Sigmoid) وعمليات متعددة الدقة (4/8/16/32 بت) مع تحسين الإنتاجية والكفاءة. تستفيد البنية من قدرات التعليمات الفردية متعددة البيانات (SIMD) ومنهجيات قائمة على CORDIC لتحسين الأداء مع الحفاظ على زمن استجابة منخفض واستهلاك طاقة، خاصة لتطبيقات الذكاء الاصطناعي على الحافة.

يبرز التحليل قيود المنهجيات الحالية الرائدة (SoTA)، التي غالبًا ما تفتقر إلى القابلية للتكوين لوظائف تفعيل متعددة الدقة وتكافح مع متطلبات أحمال العمل الديناميكية. تعالج Flex-PE المقترحة هذه التحديات من خلال تمكين تبديل الدقة أثناء التشغيل وتصميمات فعالة من حيث الموارد تتكيف مع المتطلبات الحسابية المتغيرة. تشير النتائج إلى أن Flex-PE تحقق تحسينات كبيرة في الإنتاجية وكفاءة الطاقة، مما يجعلها مناسبة لمجموعة واسعة من أحمال العمل في الذكاء الاصطناعي، بما في ذلك الشبكات العصبية العميقة (DNNs) والشبكات العصبية التكرارية (RNNs) ونماذج المحولات. تختتم الورقة بأن هذه الابتكارات تساهم في تطوير مسرعات أجهزة الذكاء الاصطناعي الأكثر تنوعًا وكفاءة القادرة على تلبية الطلبات المتزايدة للمهام الحسابية المعقدة.

Journal: IEEE Transactions on Very Large Scale Integration (VLSI) Systems, Volume: 33, Issue: 6
DOI: https://doi.org/10.1109/tvlsi.2025.3553069
Publication Date: 2025-04-07
Author(s): Mukul Lokhande et al.
Primary Topic: Advanced Neural Network Applications

Overview

The research presents the Flex-PE, a novel processing element designed to enhance the performance of data-driven AI models through runtime reconfigurable activation functions (AFs) and multi-precision capabilities. Flex-PE supports various AFs, including sigmoid, tanh, ReLU, and softmax, while achieving significant throughput improvements of up to 16× for 4-bit fixed-point (FxP4), 8× for 8-bit (FxP8), and 4× for 16-bit (FxP16) operations in a fully time-multiplexed pipeline configuration. This architecture is particularly beneficial for edge-AI applications, offering an area-efficient iterative mode that reduces direct memory access (DMA) reads for input feature maps and weight filters in the VGG-16 model by factors of 62× and 371×, respectively, while maintaining an energy efficiency of 8.42 GOPS/W with less than 2% accuracy loss.

The Flex-PE architecture not only addresses the computational demands of diverse AI workloads, including deep neural networks (DNNs), recurrent neural networks (RNNs), and transformers, but also adapts to varying performance and power requirements in both edge and cloud environments. By enabling 4-bit computations for deep learning inference and supporting up to 32-bit computations for high-performance computing (HPC) tasks, Flex-PE lays a robust foundation for the development of future energy-efficient AI accelerators, ultimately contributing to advancements in artificial general intelligence hardware.

Introduction

The introduction of the research paper discusses the rapid advancement of Artificial Intelligence (AI) and its increasing reliance on data-driven decision-making, which has led to a significant demand for computing resources. The evolution from deep neural networks (DNNs) to large-language models (LLMs) necessitates the development of hardware accelerators that not only enhance peak compute power but also address memory usage and communication bottlenecks between chips. Over the past two decades, while TOPS performance has surged by 60,000 times, improvements in DRAM bandwidth and interconnect bandwidth have lagged at only 30 times and 100 times, respectively, resulting in the “memory wall problem.” This issue is characterized by constraints in memory capacity, data transfer bandwidth, and access latency, which adversely impact overall system performance across various AI applications, from edge inference to cloud training.

The paper emphasizes the urgent need for extensive parallel processing with quantized precision to optimize throughput in response to the growing diversity of AI use cases. It highlights the complexity introduced by varying activation functions (AFs) and precision requirements in the design of hardware accelerators. The breakdown of execution across different AI workloads, including DNNs (e.g., LeNet), RNNs (e.g., LSTM, BI-LSTM, GRU), and transformers (e.g., BERT), underscores the critical need for AF optimization. Furthermore, it distinguishes the requirements of edge-AI devices, which demand rapid response and operational efficiency, from high-performance computing (HPC) devices, which prioritize large-scale performance within the constraints of available memory bandwidth and interconnect capabilities.

Methods

The section outlines the CORDIC (Coordinate Rotation Digital Computer) computation methodology, which enables the execution of circular, linear, and hyperbolic operations using a unified algorithm. The CORDIC algorithm operates through two primary modes: Vectoring and Rotational, transforming planar coordinates into rotational coordinates to facilitate various mathematical functions, including arithmetic and trigonometric calculations. The algorithm employs a scaled rotation of variables \(X\), \(Y\), and \(Z\), where \(X\) and \(Y\) represent the coordinates of the pseudo-rotation, and \(Z\) tracks the rotation angle. The iterative equations governing the CORDIC process are given by:

\[
X_{i+1} = X_i – m \cdot d_i \cdot Y_i \cdot 2^{-i}
\]
\[
Y_{i+1} = Y_i + d_i \cdot X_i \cdot 2^{-i}
\]
\[
Z_{i+1} = Z_i – d_i \cdot E_i
\]

Here, \(E_i\) is defined as \(2^{-i}\), \(\tan^{-1}(2^{-i})\), or \(\tanh^{-1}(2^{-i})\) depending on the operation mode, and \(m\) takes values corresponding to the type of coordinates being processed.

The implementation methodology involves both software-based workload analysis and hardware architectural emulations to optimize the accelerator design. A detailed Pareto analysis was conducted for the Flex-PE to identify the optimal stages necessary for computations involving various activation functions (AFs) such as MAC, Sigmoid, Tanh, and Softmax. This analysis highlights trade-offs between the number of stages, error metrics, computation delays, and area efficiency, ultimately aiming to enhance throughput while minimizing area and energy consumption.

Discussion

In this section, the paper discusses the advancements in activation function (AF) hardware for artificial intelligence (AI) applications, particularly focusing on the proposed Flex-PE architecture. The Flex-PE is designed to support multiple activation functions (Tanh, ReLU, Softmax, Sigmoid) and multi-precision operations (4/8/16/32 bits) with enhanced throughput and efficiency. The architecture leverages Single Instruction Multiple Data (SIMD) capabilities and CORDIC-based methodologies to optimize performance while maintaining low latency and power consumption, particularly for edge-AI applications.

The analysis highlights the limitations of existing state-of-the-art (SoTA) methodologies, which often lack configurability for multi-precision AFs and struggle with dynamic workload requirements. The proposed Flex-PE addresses these challenges by enabling runtime precision switching and resource-efficient designs that adapt to varying computational demands. The findings indicate that the Flex-PE achieves significant improvements in throughput and energy efficiency, making it suitable for a wide range of AI workloads, including deep neural networks (DNNs), recurrent neural networks (RNNs), and transformer models. The paper concludes that these innovations contribute to the development of more versatile and efficient AI hardware accelerators capable of meeting the increasing demands of complex computational tasks.