Voltage frequency control method and device for AI acceleration card and AI hardware acceleration platform

By dynamically matching and switching frequency voltage mapping tables, the voltage frequency is adjusted in real time based on the resource group information and actual load characteristic information of the task execution subsystem, which solves the problem of inflexible voltage frequency control of AI hardware acceleration platforms in the existing technology, and improves the Energy consumption efficiency and performance of AI accelerator cards.

CN115097923BActive Publication Date: 2024-11-29SHANGHAI SUIYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210706525.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2024-11-29
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

The existing AI hardware acceleration platform cannot sense the task load during voltage frequency control, and the resource group does not support multiple sets of voltage frequency mapping tables, resulting in unoptimized energy consumption ratio and reduced hardware performance.

Method used

By obtaining resource group information of the task execution subsystem, dynamically match and switch frequency voltage mapping tables, the power management MCU chip is used to adjust the voltage and frequency in real time, and adjust the voltage and frequency combination according to the actual load characteristic information.

Benefits of technology

The energy consumption ratio of AI accelerator cards has been optimized, hardware performance and effective computing power have been improved, and more efficient power management has been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115097923B_ABST
    Figure CN115097923B_ABST
Patent Text Reader

Abstract

The present invention discloses a voltage and frequency control method and device for an AI accelerator card, and an AI hardware acceleration platform. The voltage and frequency control method comprises: determining resource group information corresponding to a task execution subsystem according to a task sent by a task end; matching and acquiring an initial operation frequency and voltage mapping table from a frequency and voltage mapping table storage unit according to the resource group information of the task execution subsystem; wherein a plurality of frequency and voltage mapping tables are stored in the frequency and voltage mapping table storage unit; issuing the initial operation frequency and voltage mapping table to a power management MCU chip to control the task execution subsystem to operate according to the initial operation frequency and voltage mapping table; periodically acquiring actual load characteristic information during the operation of the task execution subsystem, and switching and matching the frequency and voltage mapping table to the task execution subsystem according to the actual load characteristic information, thereby optimizing the energy consumption ratio of the AI ​​accelerator card, improving the performance of the AI ​​accelerator card, and improving the effective computing power of the hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a voltage and frequency control method and device for an AI acceleration card and an AI hardware acceleration platform. Background Art

[0002] With the rapid development of the artificial intelligence industry, more and more application scenarios use AI accelerator cards to accelerate algorithms. In order to respond to the construction goals of new data centers under the digital economy, reduce the power usage efficiency (PUE, Power Usage Effectiveness) value, and save energy consumption, the performance and energy consumption parameters of AI accelerator cards are particularly important.

[0003] The hardware acceleration platform with an AI accelerator card controls the voltage and frequency of the AI ​​accelerator card based on a calibrated voltage-frequency curve. However, the current AI hardware acceleration platform has the following deficiencies in voltage and frequency control: 1. The upper-level software of some AI hardware acceleration platforms cannot perceive the load of the tasks issued. 2. The resource group does not support multiple sets of voltage-frequency mapping tables to adapt to different loads and resource usage, so that the optimal energy consumption ratio cannot be achieved. 3. Due to the use of a conservative voltage-frequency mapping table, most of the current inference models touch the thermal design power consumption (TDP, Thermal Design Power), resulting in hardware frequency reduction and performance loss. Therefore, how to optimize the energy consumption ratio, improve the performance of AI accelerator cards, and increase the effective computing power of hardware is a problem that technical personnel in this field currently need to solve. Summary of the invention

[0004] The embodiments of the present invention provide a voltage and frequency control method and device for an AI accelerator card and an AI hardware acceleration platform to optimize the energy consumption ratio of the AI ​​accelerator card, improve the performance of the AI ​​accelerator card, and increase the effective computing power of the hardware.

[0005] According to one aspect of the present invention, a voltage and frequency control method for an AI accelerator card is provided, comprising:

[0006] After obtaining the task issued by the task end, determine the resource group information corresponding to the task execution subsystem according to the task issued by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the static temperature before running and the application data type;

[0007] According to the resource group information of the task execution subsystem, matching and acquiring the initial operation frequency-voltage mapping table from the frequency-voltage mapping table storage unit; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables;

[0008] The initial operating frequency-voltage mapping table is sent to the power management MCU chip, so that the corresponding task execution subsystem is controlled by the power management MCU chip to run according to the matched initial operating frequency-voltage mapping table;

[0009] During the operation of the task execution subsystem, actual load characteristic information at different times is periodically obtained in real time. After the actual load characteristic information is obtained in real time, the frequency-voltage mapping table matched to the task execution subsystem is switched according to the actual load characteristic information to dynamically control the voltage and / or frequency of the task execution subsystem; wherein different task execution subsystems can run simultaneously.

[0010] Optionally, the actual load characteristic information includes at least one of power consumption, power consumption change slope, operating temperature and internal IP operating status of the subsystem;

[0011] Switching and matching the frequency-voltage mapping table of the task execution subsystem according to the actual load characteristic information to dynamically adjust the voltage and / or frequency of the task execution subsystem, including:

[0012] According to at least one of the power consumption, power consumption change slope, operating temperature and internal IP operating status of the task execution subsystem, and in combination with the resource group information, re-match and obtain the frequency-voltage mapping table from the frequency-voltage mapping table storage unit;

[0013] The re-matched frequency-voltage mapping table is sent to the power management MCU chip, so that the task execution subsystem is controlled by the power management MCU chip to run according to the re-matched frequency-voltage mapping table.

[0014] Optionally, the voltage and frequency control method of the AI ​​accelerator card further includes:

[0015] During the operation of the task execution subsystem, the operation of the task execution subsystem is monitored by an exception handling unit to determine whether it is abnormal, and after receiving the operation abnormality information sent by the exception handling unit, the task execution subsystem is reset and adjusted, and the frequency-voltage mapping table is re-matched for the reset and adjusted task execution subsystem.

[0016] Optionally, determining the resource group information corresponding to the task execution subsystem according to the task issued by the task end includes:

[0017] Determine the hardware resources required to complete the task based on the task issued by the task end;

[0018] Determine the number of hardware resources, application model type and application data type used by the task execution subsystem according to the number and type of hardware resources required to complete the task;

[0019] Obtain the application environment temperature and use the application environment temperature as the static temperature before the task execution subsystem runs;

[0020] The resource group information is determined according to the hardware resource quantity, application model type, application environment temperature and application data type.

[0021] Optionally, before acquiring a matching initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem, the method further includes:

[0022] Determine a variety of proposed subsystems based on different application scenarios of the AI ​​hardware acceleration platform;

[0023] According to the hardware resource quantity, data type and load characteristics of different proposed subsystems, multiple frequency-voltage correspondence combinations with energy efficiency ratios higher than preset values ​​are debugged;

[0024] The determined multiple sets of frequency-voltage correspondence combinations are stored in the frequency-voltage mapping table storage unit; wherein each set of frequency-voltage correspondence combination serves as a frequency-voltage mapping table.

[0025] Optionally, each time the matched frequency-voltage mapping table is sent to the power management MCU chip, so that the power management MCU chip controls the corresponding task execution subsystem to run according to the matched frequency-voltage mapping table, the method further includes:

[0026] Receive adjustment completion information fed back by the power management MCU chip to determine that the adjustment of the frequency-voltage mapping table is completed.

[0027] According to another aspect of the present invention, a voltage and frequency control device for an AI accelerator card is provided, which is used to execute the voltage and frequency control method for an AI accelerator card described in any embodiment of the present invention, including:

[0028] A resource group information determination module is used to determine the resource group information corresponding to the task execution subsystem according to the task issued by the task end each time after obtaining the task issued by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the application environment temperature and the application data type; different task execution subsystems can run simultaneously;

[0029] A frequency-voltage mapping table matching module, used to match and obtain an initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem, and to send the matched initial operation frequency-voltage mapping table to a power management MCU chip; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables, and the power management MCU chip is used to control the corresponding task execution subsystem to operate according to the matched initial operation frequency-voltage mapping table;

[0030] A load characteristic information determination module, used for periodically acquiring actual load characteristic information at different times in real time during the operation of the task execution subsystem, and sending the actual load characteristic information acquired each time to the frequency-voltage mapping table matching module;

[0031] The frequency-voltage mapping table matching module is further used to switch and match the frequency-voltage mapping table of the task execution subsystem according to the actual load characteristic information, so as to dynamically control the voltage and / or frequency of the task execution subsystem.

[0032] Optionally, the frequency-voltage mapping table matching module includes:

[0033] A frequency-voltage mapping table acquisition submodule, configured to rematch and acquire a frequency-voltage mapping table from the frequency-voltage mapping table storage unit according to at least one of the power consumption, power consumption change slope, operating temperature, and internal IP operating status of the task execution subsystem and in combination with the resource group information;

[0034] The frequency-voltage mapping table sending submodule is used to send the matched frequency-voltage mapping table to the power management MCU chip, so as to control the task execution subsystem to run according to the re-matched frequency-voltage mapping table through the power management MCU chip.

[0035] Optionally, the frequency-voltage mapping table matching module is also used to monitor whether the operation of the task execution subsystem is abnormal through an exception handling unit during the operation of the task execution subsystem, and to reset and adjust the task execution subsystem after receiving the operation abnormality information sent by the exception handling unit, and to re-match the frequency-voltage mapping table for the reset and adjusted task execution subsystem.

[0036] According to another aspect of the present invention, there is provided an AI hardware acceleration platform, comprising: an AI acceleration card having a frequency-voltage mapping table storage unit, a power management MCU chip, an exception handling unit and an upper-level driving unit; wherein the upper-level driving unit comprises the voltage-frequency control device of the AI ​​acceleration card according to any one of claims 7 to 9, and the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables.

[0037] The technical solution provided by the present invention divides the hardware resources in the AI ​​accelerator card into multiple hardware resource groups according to different application scenarios of the AI ​​hardware acceleration platform, and each hardware resource group serves as a task execution subsystem; during the operation of each task execution subsystem, the actual load characteristic information at different times is periodically obtained in real time, and after the actual load characteristic information is obtained in real time, the frequency-voltage mapping table matched to the task execution subsystem is switched according to the actual load characteristic information, the original AI accelerator card hardware is disassembled to use a set of voltage-frequency curves for dynamic voltage-frequency adjustment, and the voltage-frequency combination is dynamically allocated with one subsystem as the minimum granularity, so as to achieve the effect of optimizing the energy consumption ratio, improve performance and energy efficiency, and thus improve the effective computing power of the hardware in the AI ​​accelerator card.

[0038] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of a voltage and frequency control method for an AI accelerator card provided by an embodiment of the present invention;

[0040] Figure 2 A coordinate diagram containing multiple frequency-voltage fitting curves provided by an embodiment of the present invention;

[0041] Figure 3 is a flow chart of another voltage and frequency control method of an AI accelerator card provided by an embodiment of the present invention;

[0042] Figure 4 is a flow chart of another voltage and frequency control method of an AI accelerator card provided by an embodiment of the present invention;

[0043] Figure 5 It is a structural block diagram of a voltage and frequency control device for an AI acceleration card provided by an embodiment of the present invention;

[0044] Figure 6 It is a structural block diagram of an AI hardware acceleration platform provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] The embodiment of the present invention provides a voltage and frequency control method for an AI accelerator card. Figure 1 This is a flow chart of a voltage and frequency control method for an AI accelerator card provided by an embodiment of the present invention. Figure 1 , the voltage and frequency control methods of AI accelerator cards include:

[0048] S110. After obtaining the task sent by the task end, determine the resource group information corresponding to the task execution subsystem according to the task sent by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the static temperature before running and the application data type.

[0049] Specifically, after the cloud or client user issues a task, the upper-level driver of the AI ​​hardware acceleration platform disassembles the task and determines the hardware resources required to complete the task. The combination of hardware resources required to complete the task is the task execution subsystem. The relevant information such as the number of hardware resources required to complete the task, the application model type, and the application data type is the resource group information corresponding to the task execution subsystem. For example, there are 10 computing units in the AI ​​accelerator card. According to the task issued by the task end, it is determined that 3 computing units are required to complete the task. The selected 3 computing units constitute the task execution subsystem to complete the task.

[0050] S120. Match and obtain an initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables.

[0051] Specifically, after extracting the resource group information corresponding to the task execution subsystem, the matching initial operation frequency-voltage mapping table is obtained from the frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem. The frequency-voltage mapping table storage unit stores a plurality of predetermined frequency-voltage mapping tables. The voltage-frequency relationship in each frequency-voltage mapping table can be mapped into a voltage-frequency curve.

[0052] In the early product definition stage, multiple proposed subsystems are determined according to different application scenarios of the AI ​​hardware acceleration platform; multiple sets of frequency-voltage correspondence combinations with energy efficiency ratios higher than the preset value are debugged according to the number of hardware resources, application model type, application data type and load characteristics of different proposed subsystems; the determined multiple sets of frequency-voltage correspondence combinations are stored in the frequency-voltage mapping table storage unit. It can be understood that in the early product definition stage, the voltage-frequency mapping tables corresponding to different subsystems and the same subsystem under different load characteristics are optimized to form a complete prerequisite for mass production introduction technology accumulation. In the actual operation process, according to the resource group information of the task execution subsystem, the matching frequency-voltage mapping table is obtained from the frequency-voltage mapping table storage unit, so that the energy efficiency ratio of the subsystem can be higher than the preset value.

[0053] S130, sending the initial operating frequency-voltage mapping table to the power management MCU chip, so as to control the corresponding task execution subsystem to operate according to the matched initial operating frequency-voltage mapping table through the power management MCU chip.

[0054] Specifically, when the subsystem is first run, it is not possible to obtain load information such as subsystem power consumption, power consumption change slope, operating temperature, and internal IP operating status; then a relatively conservative voltage-frequency mapping table can be matched as the initial voltage-frequency mapping table for model load learning based on resource group information such as hardware resource quantity, application model type, application data type, and application environment temperature. A relatively conservative voltage-frequency mapping table can be understood as a given operating voltage at each operating frequency that is large enough to meet the needs of the subsystem to run normally first.

[0055] S140. During the operation of the task execution subsystem, actual load characteristic information at different times is periodically obtained in real time. After the actual load characteristic information is obtained in real time, the frequency-voltage mapping table matched to the task execution subsystem is switched according to the actual load characteristic information to dynamically control the voltage and / or frequency of the task execution subsystem; wherein different task execution subsystems can run simultaneously.

[0056] Specifically, in some application scenarios of the AI ​​hardware acceleration platform, different tasks can be run simultaneously in different subsystems, enabling different subsystems to run multiple sets of frequency-voltage mapping tables simultaneously. During the operation of each task execution subsystem, the actual load characteristic information at different times is periodically acquired in real time to perform real-time application characteristic behavior analysis on the different running task execution subsystems. The actual load characteristic information is combined with the resource group information and matched with multiple voltage-frequency mapping tables defined earlier to obtain an adaptive voltage-frequency relationship. Each task execution subsystem can continuously and adaptively adjust the voltage-frequency table to obtain the optimal configuration, so that each task execution subsystem can achieve an optimized energy consumption ratio working state during operation. Exemplary, Figure 2 is a coordinate diagram containing multiple frequency-voltage fitting curves provided by an embodiment of the present invention, with reference to Figure 2 , six frequency-voltage fitting curves A to F are drawn as examples, where each frequency-voltage fitting curve corresponds to a frequency-voltage mapping table. If after the last adjustment of the frequency-voltage mapping table, a task execution subsystem runs according to the frequency-voltage correspondence in the frequency-voltage fitting curve A; after obtaining the actual load characteristic information of the current task execution subsystem, it is adjusted to run according to the frequency-voltage correspondence in the frequency-voltage fitting curve C after matching the actual load characteristic information. The working frequency of the task execution subsystem is P1. According to the frequency-voltage correspondence in the frequency-voltage fitting curve A, the voltage corresponding to P1 is V2; according to the frequency-voltage correspondence in the frequency-voltage fitting curve C, the voltage corresponding to P1 is V1, and V2 is greater than V1, that is, (V2-V1) voltage can be saved, and the performance can be improved by the saved power consumption.

[0057] In the prior art, there is only one voltage-frequency mapping table, and the voltage corresponding to each frequency is a fixed value, that is, all task execution subsystems run according to the same voltage-frequency preset table. In order to ensure that the given voltage can run through all models, the voltage corresponding to each frequency is set relatively large. However, when the task execution subsystem is running at a certain frequency, the actual required voltage may be lower than the voltage set in the voltage-frequency preset table. Therefore, most of the current application models have touched the TDP, resulting in hardware frequency reduction and performance loss.

[0058] The voltage and frequency control method of the AI ​​accelerator card provided by the present invention determines the resource group information corresponding to the task execution subsystem according to the task issued by the task end after acquiring the task issued by the task end; matches and acquires the initial operation frequency voltage mapping table from the frequency voltage mapping table storage unit according to the resource group information of the task execution subsystem, wherein the frequency voltage mapping table storage unit stores a plurality of frequency voltage mapping tables; issues the initial operation frequency voltage mapping table to the power management MCU chip, and controls the corresponding task execution subsystem to operate according to the matched initial operation frequency voltage mapping table through the power management MCU chip; and periodically acquires the actual load characteristic information at different times in real time during the operation of each task execution subsystem, and after acquiring the actual load characteristic information in real time, switches the frequency voltage mapping table matched to the task execution subsystem according to the actual load characteristic information. The hardware resources in the AI ​​accelerator card are divided into multiple hardware resource groups, each of which serves as a task execution subsystem. The original AI accelerator card hardware is disassembled and a set of voltage-frequency curves are used for dynamic voltage-frequency adjustment. The voltage-frequency combination is dynamically allocated with a subsystem as the minimum granularity, thereby achieving the effect of optimizing the energy consumption ratio, improving performance and energy efficiency, and thus improving the effective computing power of the hardware in the AI ​​accelerator card.

[0059] Figure 3 This is a flowchart of another voltage and frequency control method for an AI accelerator card provided by an embodiment of the present invention. Figure 3 , the voltage and frequency control methods of AI accelerator cards include:

[0060] S210. After obtaining the task sent by the task end, determine the resource group information corresponding to the task execution subsystem according to the task sent by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the static temperature before running and the application data type.

[0061] Optionally, the resource group information corresponding to the task execution subsystem is determined according to the task issued by the task end, including:

[0062] Determine the hardware resources required to complete the task based on the task issued by the task end;

[0063] Determine the number of hardware resources, application model type, and application data type used by the task execution subsystem based on the number and type of hardware resources required to complete the task;

[0064] The application environment temperature is obtained, and the application environment temperature is used as the static temperature before running. The resource group information is determined according to the number of hardware resources, the application model type, the application environment temperature, and the application data type.

[0065] It can be understood that the application environment temperature is used as the static temperature before the task execution subsystem is not running. In step S220, when the initial operating frequency-voltage mapping table is matched according to the number of hardware resources, application model type and application data type and combined with the application environment temperature, the adaptability of the obtained initial operating frequency-voltage table can be improved.

[0066] S220. Match and obtain an initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables.

[0067] S230: Send the initial operating frequency-voltage mapping table to the power management MCU chip, so that the power management MCU chip controls the corresponding task execution subsystem to operate according to the matched initial operating frequency-voltage mapping table.

[0068] S240. During the operation of the task execution subsystem, actual load characteristic information at different times is periodically obtained in real time. According to at least one of the power consumption, power consumption change slope, operating temperature and internal IP operating status of the task execution subsystem, and in combination with resource group information, the frequency-voltage mapping table is re-matched and obtained from the frequency-voltage mapping table storage unit.

[0069] S250, sending each re-matched frequency-voltage mapping table to the power management MCU chip, and controlling the task execution subsystem through the power management MCU chip to run according to the re-matched frequency-voltage mapping table.

[0070] S260: After each re-matched frequency-voltage mapping table is sent to the power management MCU chip, adjustment completion information fed back by the power management MCU chip is received to determine that the adjustment of the frequency-voltage mapping table is completed.

[0071] Specifically, each time the matched frequency-voltage mapping table is sent to the power management MCU chip, so that the corresponding task execution subsystem is controlled by the power management MCU chip to run according to the matched frequency-voltage mapping table, it also includes receiving the adjustment completion information fed back by the power management MCU chip, and it can be determined that the adjustment of the frequency-voltage mapping table is completed. If the operation of the subsequent task execution subsystem is abnormal, it can be determined whether the abnormal operation of the system is caused by the adjusted frequency-voltage mapping table.

[0072] The voltage and frequency control method of the AI ​​acceleration card provided by the embodiment of the present invention, in the process of determining the resource group information corresponding to the task execution subsystem according to the task sent by the task end, uses the application environment temperature as the static temperature before the task execution subsystem is not running, and matches the initial operation frequency voltage mapping table according to the number of hardware resources, application model type, application data type and in combination with the application environment temperature, can further narrow the selection range of the initial operation frequency voltage mapping table, and can improve the adaptability of the obtained initial operation frequency voltage table. In addition, each time the matched frequency voltage mapping table is sent to the power management MCU chip, it also includes receiving the adjustment completion information fed back by the power management MCU chip, and it can be determined that the frequency voltage mapping table adjustment is completed. If the subsequent system operation is abnormal, it can be determined whether the adjusted frequency voltage mapping table causes the system operation to be abnormal.

[0073] Figure 4 This is a flowchart of another voltage and frequency control method for an AI accelerator card provided by an embodiment of the present invention. Figure 4 , the voltage and frequency control methods of AI accelerator cards include:

[0074] S310. After obtaining the task sent by the task end, determine the resource group information corresponding to the task execution subsystem according to the task sent by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the static temperature before running and the application data type.

[0075] S320, matching and acquiring an initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables.

[0076] S330: Send the initial operating frequency-voltage mapping table to the power management MCU chip, so that the power management MCU chip controls the corresponding task execution subsystem to operate according to the matched initial operating frequency-voltage mapping table.

[0077] S340, obtaining at least one of the power consumption, power consumption change slope, operating temperature, and internal IP operating status of the task execution subsystem to determine actual load characteristic information of the task execution subsystem.

[0078] S350: Re-match and obtain the frequency-voltage mapping table from the frequency-voltage mapping table storage unit according to the actual load characteristic information of the execution subsystem and in combination with the resource group information.

[0079] S360: Send the re-matched frequency-voltage mapping table to the power management MCU chip, and control the corresponding task execution subsystem to run according to the re-matched frequency-voltage mapping table through the power management MCU chip.

[0080] S370: Determine that the adjustment of the frequency-voltage mapping table is completed according to the adjustment completion information fed back by the power management MCU chip.

[0081] S380. Monitor whether the operation of the task execution subsystem is abnormal through the exception handling unit. If the operation of the execution subsystem is abnormal, execute step S390; if the operation of the execution subsystem is normal, execute step S3100.

[0082] S390, reset and adjust the task execution subsystem, and return to step S320.

[0083] Specifically, for example, during the operation of some hardware resources, the voltage provided may be too low, and the actual load is greater than the preset value, resulting in the model being unable to run normally. At this time, the exception handling unit monitors the operation of the task execution subsystem and reports the information to the upper-level driver. After judgment, the upper-level driver sends information to the hardware for module-level reset. Module-level reset can be understood as resetting a resource group as a unit, and the reset process does not affect the use of other resource groups.

[0084] The frequency-voltage mapping table that is re-matched for the reset and adjusted task execution subsystem can be a relatively conservative frequency-voltage mapping table so that the task execution subsystem can operate normally. Therefore, when the operation of the task execution subsystem is monitored by the exception handling unit and an abnormality is found, the task execution subsystem is reset and adjusted and then returns to step S320. The working voltage of the task execution subsystem can be given to be large enough at each working frequency to ensure that the task execution subsystem can operate normally first. Again, during the operation of the task execution subsystem, the application characteristic behavior is analyzed in real time, and the voltage-frequency mapping table is adjusted to obtain the optimal configuration. In this way, the frequency-voltage mapping table can be continuously adjusted to achieve a functional closed loop.

[0085] S3100, determine whether the execution subsystem has completed the task, if so, execute step S3110; if not, return to execute step S340.

[0086] S3110, control the execution subsystem to stop running.

[0087] The voltage and frequency control method of the AI ​​accelerator card provided in the embodiment of the present invention also monitors whether the operation of the task execution subsystem is abnormal through the exception handling unit during the operation of the task execution subsystem, and resets and adjusts the task execution subsystem after receiving the operation exception information sent by the exception handling unit, and re-matches the frequency and voltage mapping table for the reset and adjusted task execution subsystem. While completing power consumption optimization, exception handling can be performed to ensure the safety of the system.

[0088] An embodiment of the present invention provides a voltage and frequency control device for an AI accelerator card, which is used to execute the voltage and frequency control method for an AI accelerator card described in any of the above embodiments. Figure 5 This is a structural block diagram of a voltage and frequency control device for an AI accelerator card provided by an embodiment of the present invention, refer to Figure 5 , the voltage and frequency control device of the AI ​​accelerator card includes:

[0089] The resource group information determination module 10 is used to determine the resource group information corresponding to the task execution subsystem according to the task issued by the task end each time after obtaining the task issued by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the application environment temperature and the application data type; different task execution subsystems can run simultaneously;

[0090] The frequency-voltage mapping table matching module 20 is used to match and obtain the initial operation frequency-voltage mapping table from the frequency-voltage mapping table storage unit 301 according to the resource group information of the task execution subsystem, and to send the matched initial operation frequency-voltage mapping table to the power management MCU chip 200; wherein the frequency-voltage mapping table storage unit 301 stores a plurality of frequency-voltage mapping tables, and the power management MCU chip 200 is used to control the corresponding task execution subsystem to operate according to the matched initial operation frequency-voltage mapping table;

[0091] The load characteristic information determination module 30 is used to periodically and in real time acquire the actual load characteristic information at different times during the operation of the task execution subsystem, and send the actual load characteristic information acquired each time to the frequency-voltage mapping table matching module 20;

[0092] The frequency-voltage mapping table matching module 20 is further used to switch and match the frequency-voltage mapping table of the task execution subsystem according to the actual load characteristic information, so as to dynamically control the voltage and / or frequency of the task execution subsystem.

[0093] The voltage and frequency control device of the AI ​​acceleration card provided in the embodiment of the present invention includes a resource group information determination module, a frequency-voltage mapping table matching module, and a load characteristic information determination module. After the resource group information determination module obtains the task issued by the task end, it determines the resource group information corresponding to the task execution subsystem according to the task issued by the task end. After the frequency-voltage mapping table matching module obtains the resource group information, it can obtain the matching initial operation frequency-voltage mapping table from the frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem, and send the initial operation frequency-voltage mapping table to the power management MCU chip; wherein the frequency-voltage mapping table storage unit stores multiple frequency-voltage mapping tables. The hardware resources in the AI ​​accelerator card are divided into multiple hardware resource groups, each of which serves as a task execution subsystem. The original AI accelerator card hardware is disassembled to use a set of voltage-frequency curves for dynamic voltage-frequency adjustment, and the voltage-frequency combination is dynamically allocated with a subsystem as the minimum granularity. At the same time, during the operation of each task execution subsystem, the load characteristic information determination module can periodically obtain the actual load characteristic information at different times in real time, and send the actual load characteristic information to the frequency-voltage mapping table matching module. The load characteristic information determination module switches the frequency-voltage mapping table matched to the task execution subsystem according to the actual load characteristic information, and can dynamically adjust the frequency-voltage combination according to the actual load characteristics of the currently working hardware resource group, thereby achieving the effect of optimizing the energy consumption ratio, improving performance and energy efficiency, and thus improving the effective computing power of the hardware in the AI ​​accelerator card.

[0094] Optionally, the frequency-voltage mapping table matching module includes:

[0095] A frequency-voltage mapping table acquisition submodule, used to rematch and acquire the frequency-voltage mapping table from the frequency-voltage mapping table storage unit according to at least one of the power consumption, power consumption change slope, operating temperature and internal IP operating status of the task execution subsystem and in combination with resource group information;

[0096] The frequency-voltage mapping table sending submodule is used to send the matched frequency-voltage mapping table to the power management MCU chip, so as to control the task execution subsystem to run according to the re-matched frequency-voltage mapping table through the power management MCU chip.

[0097] Optionally, the frequency-voltage mapping table matching module is also used to monitor whether the operation of the task execution subsystem is abnormal through the exception handling unit during the operation of the task execution subsystem, and to reset and adjust the task execution subsystem after receiving the operation abnormality information sent by the exception handling unit, and to re-match the frequency-voltage mapping table for the reset and adjusted task execution subsystem.

[0098] The embodiment of the present invention further provides an AI hardware acceleration platform 1, Figure 6This is a structural block diagram of an AI hardware acceleration platform provided by an embodiment of the present invention, refer to Figure 6 The AI ​​hardware acceleration platform 1 includes: an AI acceleration card 300 having a frequency-voltage mapping table storage unit 301, a power management MCU chip 200, an exception handling unit 400, and an upper-layer driving unit 100. The AI ​​hardware acceleration platform 1 can be a single-card platform, a single server, or a server cluster.

[0099] Among them, the upper-layer driving unit 100 includes the voltage and frequency control device of the AI ​​accelerator card described in any of the above embodiments, and the frequency-voltage mapping table storage unit 300 stores multiple frequency-voltage mapping tables. That is, the voltage and frequency control method of the AI ​​accelerator card described in any of the above embodiments is completed through the upper-layer driving unit 100 to uniformly monitor, manage, and schedule hardware to coordinate, which can improve operating efficiency and achieve integration and productization.

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A voltage and frequency control method for an AI accelerator card, characterized in that: include: After obtaining the task issued by the task end, determine the resource group information corresponding to the task execution subsystem according to the task issued by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the static temperature before running and the application data type; According to the resource group information of the task execution subsystem, an initial operation frequency-voltage mapping table is matched and obtained from a frequency-voltage mapping table storage unit; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables; the voltage-frequency relationship in each frequency-voltage mapping table is mapped into a voltage-frequency curve; in the initial operation frequency-voltage mapping table, the operating voltage corresponding to each operating frequency meets the needs of the subsystem for normal operation; The initial operating frequency-voltage mapping table is sent to the power management MCU chip, so that the corresponding task execution subsystem is controlled by the power management MCU chip to run according to the matched initial operating frequency-voltage mapping table; During the operation of the task execution subsystem, actual load characteristic information at different times is periodically obtained in real time. After the actual load characteristic information is obtained in real time, the frequency-voltage mapping table matched to the task execution subsystem is switched according to the actual load characteristic information to dynamically control the voltage and / or frequency of the task execution subsystem; wherein different task execution subsystems can run simultaneously.

2. The voltage and frequency control method of the AI ​​accelerator card according to claim 1, characterized in that: The actual load characteristic information includes at least one of the power consumption, power consumption change slope, operating temperature and internal IP operating status of the subsystem; Switching and matching the frequency-voltage mapping table of the task execution subsystem according to the actual load characteristic information to dynamically adjust the voltage and / or frequency of the task execution subsystem, including: According to at least one of the power consumption, power consumption change slope, operating temperature and internal IP operating status of the task execution subsystem, and in combination with the resource group information, re-match and obtain the frequency-voltage mapping table from the frequency-voltage mapping table storage unit; The re-matched frequency-voltage mapping table is sent to the power management MCU chip, so that the task execution subsystem is controlled by the power management MCU chip to run according to the re-matched frequency-voltage mapping table.

3. The voltage and frequency control method of the AI ​​accelerator card according to claim 1, characterized in that: Also includes: During the operation of the task execution subsystem, the operation of the task execution subsystem is monitored by an exception handling unit to determine whether it is abnormal, and after receiving the operation abnormality information sent by the exception handling unit, the task execution subsystem is reset and adjusted, and the frequency-voltage mapping table is re-matched for the reset and adjusted task execution subsystem.

4. The voltage and frequency control method of the AI ​​accelerator card according to claim 1, characterized in that: Determining the resource group information corresponding to the task execution subsystem according to the task issued by the task end includes: Determine the hardware resources required to complete the task based on the task issued by the task end; Determine the number of hardware resources, application model type and application data type used by the task execution subsystem according to the number and type of hardware resources required to complete the task; The application environment temperature is obtained, and the application environment temperature is used as the static temperature before the task execution subsystem runs, and the resource group information is determined according to the number of hardware resources, the application model type, the application environment temperature and the application data type.

5. The voltage and frequency control method of the AI ​​accelerator card according to claim 1, characterized in that: Before acquiring a matching initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem, the method further includes: Determine a variety of proposed subsystems based on different application scenarios of the AI ​​hardware acceleration platform; According to the hardware resource quantity, data type and load characteristics of different proposed subsystems, multiple frequency-voltage correspondence combinations with energy efficiency ratios higher than preset values ​​are debugged; The determined multiple sets of frequency-voltage correspondence combinations are stored in the frequency-voltage mapping table storage unit; wherein each set of frequency-voltage correspondence combination serves as a frequency-voltage mapping table.

6. The voltage and frequency control method of the AI ​​accelerator card according to claim 1, characterized in that: Each time the matched frequency-voltage mapping table is sent to the power management MCU chip, so that the power management MCU chip controls the corresponding task execution subsystem to run according to the matched frequency-voltage mapping table, it also includes: Receive adjustment completion information fed back by the power management MCU chip to determine that the adjustment of the frequency-voltage mapping table is completed.

7. A voltage and frequency control device for an AI accelerator card, characterized in that: The voltage and frequency control method for executing the AI ​​accelerator card according to any one of claims 1 to 6 comprises: A resource group information determination module is used to determine the resource group information corresponding to the task execution subsystem according to the task issued by the task end each time after obtaining the task issued by the task end; wherein the resource group information at least includes the number of hardware resources used, the application model type, the application environment temperature and the application data type; different task execution subsystems can run simultaneously; A frequency-voltage mapping table matching module, used to match and obtain an initial operation frequency-voltage mapping table from a frequency-voltage mapping table storage unit according to the resource group information of the task execution subsystem, and to send the matched initial operation frequency-voltage mapping table to a power management MCU chip; wherein the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables, and the power management MCU chip is used to control the corresponding task execution subsystem to operate according to the matched initial operation frequency-voltage mapping table; A load characteristic information determination module, used for periodically acquiring actual load characteristic information at different times in real time during the operation of the task execution subsystem, and sending the actual load characteristic information acquired each time to the frequency-voltage mapping table matching module; The frequency-voltage mapping table matching module is further used to switch and match the frequency-voltage mapping table of the task execution subsystem according to the actual load characteristic information, so as to dynamically control the voltage and / or frequency of the task execution subsystem.

8. The voltage and frequency control device of the AI ​​acceleration card according to claim 7, characterized in that: The frequency-voltage mapping table matching module includes: A frequency-voltage mapping table acquisition submodule, configured to rematch and acquire a frequency-voltage mapping table from the frequency-voltage mapping table storage unit according to at least one of the power consumption, power consumption change slope, operating temperature, and internal IP operating status of the task execution subsystem and in combination with the resource group information; The frequency-voltage mapping table sending submodule is used to send the matched frequency-voltage mapping table to the power management MCU chip, so as to control the task execution subsystem to run according to the re-matched frequency-voltage mapping table through the power management MCU chip.

9. The voltage and frequency control device of the AI ​​acceleration card according to claim 7, characterized in that: The frequency-voltage mapping table matching module is also used to monitor whether the operation of the task execution subsystem is abnormal through an exception handling unit during the operation of the task execution subsystem, and to reset and adjust the task execution subsystem after receiving the operation abnormality information sent by the exception handling unit, and to re-match the frequency-voltage mapping table for the reset and adjusted task execution subsystem.

10. An AI hardware acceleration platform, characterized in that: include: An AI accelerator card having a frequency-voltage mapping table storage unit, a power management MCU chip, an exception handling unit and an upper-level driving unit; wherein the upper-level driving unit includes the voltage-frequency control device of the AI ​​accelerator card according to any one of claims 7 to 9, and the frequency-voltage mapping table storage unit stores a plurality of frequency-voltage mapping tables.

Citation Information

Patent Citations

  • Switching power supply working frequency adjusting method and device

    CN112467978A

  • Heterogeneous computing hardware energy consumption and performance optimization method and system and storage medium

    CN113672073A