Efficient task scheduling and load balancing strategy of IPU chip
Through intelligent task allocation and dynamic status adjustment, the IPU chip task scheduling imbalance and temperature and power consumption problems are solved, efficient load balancing and fault tolerance are achieved, and system performance and reliability are improved.
Patent Information
- Application Number
- CN202410812775.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-22
- Publication Date
- 2024-09-13
AI Technical Summary
In the existing technology, the task scheduling of the IPU chip is unbalanced, the processor utilization is too high or too low, and the temperature and power consumption status are not fully considered, resulting in problems such as chip overheating or excessive energy consumption.
An efficient task scheduling and load balancing strategy for IPU chips is proposed. By determining the initial priority and status information of tasks, tasks are intelligently assigned to the pending sets of multiple IPU chips, and the chip status is periodically detected to determine and handle faults. , dynamically adjust processor utilization, temperature and power consumption.
It achieves high efficiency and load balancing of task scheduling, improves the fault tolerance and overall performance of the system, optimizes processor utilization, and enhances the adaptability and reliability of the system.
Smart Images

Figure CN118642850A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer processing technology, and in particular to an efficient task scheduling and load balancing strategy for an IPU chip. Background Art
[0002] The IPU (Intelligence Processing Unit) chip is a hardware accelerator specially designed to handle artificial intelligence (AI) and deep learning tasks. Unlike traditional central processing units (CPUs) or graphics processing units (GPUs), IPU chips focus on providing efficient computing power to accelerate the training and reasoning process of deep learning models.
[0003] However, effective task scheduling and load balancing are one of the key factors to ensure the efficient operation of IPU chips. There are usually some problems in traditional task scheduling and load balancing strategies. For example, the matching degree between tasks and IPU chips cannot be fully considered, resulting in uneven task distribution and low or excessive processor utilization. In addition, the dynamic adjustment of status information such as temperature and power consumption of IPU chips has not been fully considered, resulting in chip overheating or excessive energy consumption. Summary of the invention
[0004] In view of this, the present invention proposes an efficient task scheduling and load balancing strategy for the IPU chip to solve the problems of unbalanced task scheduling, excessive or low processor utilization, and lack of consideration of temperature and power consumption in the prior art.
[0005] The present invention proposes an efficient task scheduling and load balancing strategy for an IPU chip, including:
[0006] Determine the initial priority of tasks to be processed;
[0007] Acquire feature information of tasks to be processed and status information of several IPU chips, and queue the tasks to be processed to to-be-processed sets of several IPU chips according to initial priorities based on the status information and the feature information;
[0008] In the same to-be-processed set, the status information is periodically detected to determine whether the IPU chip fails;
[0009] If there is no fault, the tasks to be processed are sorted according to the state information and the feature information; if a fault occurs, the tasks to be processed are queued to the remaining IPU chips;
[0010] The initial priority includes: a first priority, a second priority, a third priority and a fourth priority, wherein the priority from the first priority to the fourth priority decreases in sequence;
[0011] The characteristic information includes: task timeliness and task scale;
[0012] The status information includes: computing power, processor utilization, chip temperature and chip power consumption.
[0013] Furthermore, the initial priority of the tasks to be processed is determined, including:
[0014] The first task time limit t1, the second task time limit t2 and the third task time limit t3 are preset, and the task time limit T of the task to be processed is obtained; and according to the relationship between the task time limit T and the preset task time limits ti, i=1, 2, 3, the initial priority of the task to be processed is determined:
[0015] When T≤t1, the initial priority of the task to be processed is determined as the first priority;
[0016] When t1<T≤t2, the initial priority of the task to be processed is determined as the second priority;
[0017] When t2<T≤t3, the initial priority of the task to be processed is determined as the third priority;
[0018] When t3<T≤t4, the initial priority of the task to be processed is determined as the fourth priority.
[0019] Furthermore, the tasks to be processed are queued to the processing sets of several IPU chips according to the initial priority, including:
[0020] Obtain the computing power E of each IPU chip, and pre-set a first computing power e1, a second computing power e2, and a third computing power e3, and e1>e2>e3; compare the computing power E of each IPU chip with the size relationship of each level of computing power, and classify the IPU chips into different groups:
[0021] When E≥e1, the IPU chip is classified into the first group, and the pending tasks of the first priority are moved into the pending set of the first group;
[0022] When e1>E≥e2, the IPU chip is classified into the second group, and the tasks to be processed of the second priority are moved into the processing set of the second group;
[0023] When e2>E≥e3, the IPU chip is classified into the third group, and the pending tasks of the third priority are moved into the pending set of the third group;
[0024] When e3>E≥e4, the IPU chip is classified into the fourth group, and the pending tasks of the fourth priority are moved into the pending set of the fourth group.
[0025] Furthermore, after the tasks to be processed of each priority level are moved into each group, the processor utilization M of each IPU chip is obtained, and the utilization threshold m is set to determine the relationship between the processor utilization M and the utilization threshold m:
[0026] When M<m, maintain the current state;
[0027] When M≥m, obtain the group whose processor utilization M exceeds the utilization threshold m, and make the following judgment: when the processor utilization M of the first group exceeds the utilization threshold m, the pending set in the first group refuses to accept the processing tasks, and the rejected pending tasks are moved into the second group, and the rejected pending tasks in the second group are sorted to the first place for priority processing; when the processor utilization M≥m of the second group, the pending set of the second group refuses to accept the processing tasks; when the processor utilization M≥m of the third group, the pending set of the third group refuses to accept the processing tasks; when the processor utilization M≥m of the fourth group, the pending set of the fourth group refuses to accept the processing tasks.
[0028] Further, when the processor utilization M of the second group exceeds the utilization threshold m: determine the relationship between the processor utilization M of the first group and the utilization threshold m, if M < m, move the rejected pending tasks into the first group, and sort the rejected pending tasks into the last position for processing in the first group; if M ≥ m, move the rejected pending tasks into the third group or the fourth group, and sort the rejected pending tasks into the first position for processing in priority;
[0029] When the processor utilization rate M of the third group exceeds the utilization rate threshold m: determine the relationship between the processor utilization rate M of the second group and the utilization rate threshold m, if M < m, move the rejected pending tasks into the second group, and sort the rejected pending tasks into the last position for processing; if M ≥ m, move the rejected pending tasks into the fourth group, and sort the rejected pending tasks into the first position for processing;
[0030] When the processor utilization M of the fourth group exceeds the utilization threshold m: determine the relationship between the processor utilization M of the third group and the utilization threshold m, if M<m, move the rejected pending tasks into the third group, and sort the rejected pending tasks in the third group to the last place for processing; if M≥m, move the rejected pending tasks into the first group or the second group, and sort the rejected pending tasks in the first group or the second group to the last place for processing.
[0031] Furthermore, periodically detecting the status information includes:
[0032] A first chip temperature K1, a second chip temperature K2, a third chip temperature K3 and a fourth chip temperature K4 are preset, wherein K1<K2<K3<K4; a first detection cycle interval L1, a second detection cycle interval L2, a third detection cycle interval L3 and a fourth detection cycle interval L4 are preset, wherein L1<L2<L3<L4;
[0033] The temperature of the IPU chip is detected to obtain the real-time temperature k. By comparing the real-time temperature k with the preset chip temperatures, the next detection cycle interval L is determined:
[0034] When k≤K1, the fourth detection period interval L4 is selected as the duration of the next detection interval;
[0035] When K1<k≤K2, the third detection period interval L3 is selected as the duration of the next detection interval;
[0036] When K2<k≤K3, the second detection period interval L2 is selected as the duration of the next detection interval;
[0037] When K3<k≤K4, the first detection cycle interval L1 is selected as the duration of the next detection interval.
[0038] Furthermore, while detecting the IPU chip temperature, the chip power consumption of the IPU chip is detected, and the duration Lj of the next detection interval is corrected according to the chip power consumption, where j=1, 2, 3, 4, which includes:
[0039] Perform power consumption detection on the IPU chip to obtain the chip power consumption q, preset the first chip power consumption Q1, the second chip power consumption Q2, the third chip power consumption Q3 and the fourth chip power consumption Q4, wherein Q1<Q2<Q3<Q4; preset the first cycle correction coefficient r1, the second cycle correction coefficient r2, the third cycle correction coefficient r3 and the fourth cycle correction coefficient r4, wherein 0<r1<r2<r3<r4<1;
[0040] When q≤Q1, the first cycle correction coefficient r1 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection cycle is Li*r1;
[0041] When Q1<q≤Q2, the second cycle correction coefficient r2 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection cycle is Li*r2;
[0042] When Q2<q≤Q3, the third period correction coefficient r3 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r3;
[0043] When Q3<q≤Q4, the second period correction coefficient r4 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r4.
[0044] Further, determining whether the IPU chip fails includes:
[0045] The chip temperature and the chip power consumption of the IPU chip are obtained, and whether the IPU chip fails is determined by the following judgment: when k>K4 or q>Q4, it is determined that the IPU chip is abnormal and fails.
[0046] Furthermore, the sorting includes:
[0047] Obtain the task scale P of the tasks to be processed, and sort all the tasks to be processed in each set to be processed in order from small to large according to the task scale P.
[0048] Furthermore, if a failure occurs, the pending tasks are queued to the remaining IPU chips, including:
[0049] The processor utilization M of the unprocessed set without failure is obtained and compared to determine the unprocessed set with the lowest processor utilization, and all the unprocessed tasks in the unprocessed set with failure are moved to the unprocessed set with the lowest processor utilization, and then the sorting is performed.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] By determining the initial priority of tasks and intelligently allocating them to the processing sets of multiple IPU chips, the efficiency of task scheduling is achieved, ensuring that each task can be processed at the right time. The periodic detection and fault handling mechanism effectively realizes load balancing, detects IPU chip failures in a timely manner, and ensures the balance of the overall system load by reallocating tasks to other available chips. The fault handling mechanism enhances the fault tolerance of the system, and can flexibly respond when the IPU chip fails, maintain the stability of the overall system, and improve the reliability of the system. According to the status information and feature information, the intelligent sorting of tasks to be processed is realized, making the processor utilization more reasonable, optimizing the overall performance, and improving the efficiency of task processing. The adaptability of the system is enhanced by dynamically adjusting the processor utilization, temperature, and power consumption. The system can be flexibly adjusted according to actual conditions to adapt to different workloads and environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0053] Figure 1 A flow chart of efficient task scheduling and load balancing strategy for the IPU chip provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0055] like Figure 1 As shown, this embodiment provides an efficient task scheduling and load balancing strategy for an IPU chip, including:
[0056] Determine the initial priority of tasks to be processed;
[0057] Acquire feature information of tasks to be processed and status information of several IPU chips, and queue the tasks to be processed to the processing sets of several IPU chips according to the initial priorities based on the status information and feature information;
[0058] In the same processing set, periodically check the status information to determine whether the IPU chip fails;
[0059] If there is no fault, the tasks to be processed are sorted according to the status information and feature information; if a fault occurs, the tasks to be processed are queued to the remaining IPU chips;
[0060] The initial priority includes: a first priority, a second priority, a third priority and a fourth priority, wherein the priority from the first priority to the fourth priority decreases in sequence;
[0061] The characteristic information includes: task timeliness and task scale;
[0062] Status information includes: computing power, processor utilization, chip temperature and chip power consumption.
[0063] It should be noted that by setting different priorities, the system can reasonably allocate processing resources according to the importance and urgency of the task and improve the processing efficiency of the task. By obtaining the characteristic information of the task (task timeliness and task scale) and the status information of the IPU chip (computing power, processor utilization, chip temperature and power consumption), the system can fully understand the status of the task and hardware resources. According to the initial priority, the tasks to be processed are intelligently queued to the processing sets of multiple IPU chips to ensure that the tasks are reasonably allocated and scheduled. The status information of the IPU chip is regularly checked to determine whether a fault has occurred. This helps to detect problems in a timely manner and improve the reliability and stability of the system. In the absence of faults, the tasks to be processed are sorted according to the status information and characteristic information, the processor utilization is optimized, and the overall task processing efficiency is improved. When a fault occurs, the tasks to be processed are re-queued to the remaining IPU chips to ensure the smooth execution of the task and enhance the fault tolerance of the system. Setting multiple levels of priority fully considers the urgency and importance of the task, so that the system can more flexibly respond to the processing needs of different tasks.
[0064] In some embodiments of the present application, determining the initial priority of the task to be processed includes:
[0065] The first task time limit t1, the second task time limit t2 and the third task time limit t3 are preset, and the task time limit T of the task to be processed is obtained; and according to the relationship between the task time limit T and the preset task time limits ti, i=1, 2, 3, the initial priority of the task to be processed is determined:
[0066] When T≤t1, the initial priority of the task to be processed is determined as the first priority;
[0067] When t1<T≤t2, the initial priority of the task to be processed is determined as the second priority;
[0068] When t2<T≤t3, the initial priority of the task to be processed is determined as the third priority;
[0069] When t3<T≤t4, the initial priority of the task to be processed is determined as the fourth priority.
[0070] Understandably,
[0071] In some embodiments of the present application, the tasks to be processed are queued to the processing sets of several IPU chips according to the initial priority, including:
[0072] Obtain the computing power E of each IPU chip, and pre-set the first computing power e1, the second computing power e2, and the third computing power e3, and e1>e2>e3; compare the computing power E of each IPU chip with the size relationship of each level of computing power, and classify the IPU chips into different groups:
[0073] When E≥e1, the IPU chip is classified into the first group, and the first priority pending tasks are moved into the pending set of the first group;
[0074] When e1>E≥e2, the IPU chip is classified into the second group, and the tasks to be processed with the second priority are moved into the processing set of the second group;
[0075] When e2>E≥e3, the IPU chip is classified into the third group, and the pending tasks of the third priority are moved into the pending set of the third group;
[0076] When e3>E≥e4, the IPU chip is classified into the fourth group, and the pending tasks of the fourth priority are moved into the pending set of the fourth group.
[0077] It is understandable that by presetting the timeliness thresholds (t1, t2, t3) of different tasks, the system can fully consider the time sensitivity of the tasks. For urgent tasks (T≤t1), ensure that they get the highest initial priority so that they can be completed as soon as possible. For less urgent tasks (t1<T≤t2, t2<T≤t3, t3<T≤t4), they are given lower priorities respectively. By dividing tasks according to their timeliness and set thresholds, the system can more flexibly adapt to the processing needs of different types of tasks. Urgent tasks get a faster response, while relatively less urgent tasks have a lower initial priority to avoid excessive occupation of processing resources. Determining the initial priority according to the timeliness of tasks helps the system to arrange the execution order of tasks more intelligently. This can minimize the waiting time of urgent tasks and improve the overall task processing efficiency. Dividing the initial priority into multiple levels and carefully dividing the urgency of tasks is conducive to more accurate task scheduling. This design helps to manage more effectively when processing a large number of tasks. By setting different timeliness thresholds, the system has strong customizability and can be adjusted according to specific application scenarios and task characteristics to meet the needs of different users or systems.
[0078] In some embodiments of the present application, after the tasks to be processed of each priority level are moved into each group, the processor utilization M of each IPU chip is obtained, and the utilization threshold m is set to determine the size relationship between the processor utilization M and the utilization threshold m:
[0079] When M<m, maintain the current state;
[0080] When M≥m, obtain the group whose processor utilization M exceeds the utilization threshold m, and make the following judgment: when the processor utilization M of the first group exceeds the utilization threshold m, the pending set in the first group refuses to accept the processing tasks, and the rejected pending tasks are moved to the second group, and the rejected pending tasks in the second group are sorted to the first place for priority processing; when the processor utilization M≥m of the second group, the pending set of the second group refuses to accept the processing tasks; when the processor utilization M≥m of the third group, the pending set of the third group refuses to accept the processing tasks; when the processor utilization M≥m of the fourth group, the pending set of the fourth group refuses to accept the processing tasks.
[0081] It is understandable that by assigning tasks of different priorities to IPU chips with different computing capabilities, the system can make better use of the performance of each IPU chip. Chips with high computing power are responsible for handling high-priority tasks to ensure that urgent tasks are responded to quickly. Assigning tasks to IPU chips with matching computing power helps improve overall system performance. This can prevent chips with stronger computing power from being excessively idle, while preventing chips with relatively weaker computing power from being overburdened. Different computing power thresholds are set in advance and chips are grouped so that the system can adapt to different task scenarios more flexibly. For tasks with different computing requirements, the system can selectively select IPU chips with corresponding stronger computing power for processing. Combining computing power with task priority allows tasks of different priorities to be properly allocated on computing resources. This design helps to maintain the balance of the system and prevent some tasks from being completed in time due to insufficient computing resources. Avoid using IPU chips with high computing power to handle low-priority tasks, thereby avoiding waste of resources. The system can allocate tasks more intelligently and improve the effective utilization of resources.
[0082] In some embodiments of the present application, when the processor utilization M of the second group exceeds the utilization threshold m: determine the relationship between the processor utilization M of the first group and the utilization threshold m, if M < m, move the rejected pending tasks to the first group, and sort the rejected pending tasks in the first group to the last position for processing; if M ≥ m, move the rejected pending tasks to the third group or the fourth group, and sort the rejected pending tasks in the third group or the fourth group to the first position for processing;
[0083] When the processor utilization rate M of the third group exceeds the utilization rate threshold m: determine the relationship between the processor utilization rate M of the second group and the utilization rate threshold m. If M < m, move the rejected pending tasks to the second group, and sort the rejected pending tasks in the second group to the last position for processing; if M ≥ m, move the rejected pending tasks to the fourth group, and sort the rejected pending tasks in the fourth group to the first position for processing;
[0084] When the processor utilization M of the fourth group exceeds the utilization threshold m: determine the relationship between the processor utilization M of the third group and the utilization threshold m; if M<m, move the rejected pending tasks to the third group, and sort the rejected pending tasks in the third group to the last place for processing; if M≥m, move the rejected pending tasks to the first group or the second group, and sort the rejected pending tasks in the first group or the second group to the last place for processing.
[0085] It is understandable that when the processor utilization of a group exceeds the set threshold, the system adjusts according to the processor utilization of other groups to ensure that tasks can be reasonably allocated. This helps the system maintain balance under dynamically changing load conditions and avoids unreasonable resource allocation. According to the processor utilization, the priority of rejected tasks is dynamically adjusted. If the processor utilization of other groups is lower than the threshold, the rejected tasks will be moved to the group with low utilization to maintain an even distribution of tasks; if the processor utilization of other groups is also high, the rejected tasks will be moved to the group with low utilization and sorted to the first priority for processing. When the processor utilization exceeds the threshold, a dynamic strategy is adopted to reallocate tasks to other groups to ensure that tasks can be processed. This helps to avoid resource waste due to excessive processor utilization of a group and improves the effective use of the overall system resources. Moving rejected tasks to other groups, especially those with lower utilization, helps to reduce the waiting time of tasks. By dynamically adjusting the allocation of tasks, the system can respond more quickly to the processing capabilities of different groups. By giving priority to groups with low utilization, it ensures that rejected tasks are first assigned to relatively idle groups, thus improving the system's response speed to tasks.
[0086] In some embodiments of the present application, periodic detection of status information includes:
[0087] A first chip temperature K1, a second chip temperature K2, a third chip temperature K3 and a fourth chip temperature K4 are preset, wherein K1<K2<K3<K4; a first detection cycle interval L1, a second detection cycle interval L2, a third detection cycle interval L3 and a fourth detection cycle interval L4 are preset, wherein L1<L2<L3<L4;
[0088] The temperature of the IPU chip is detected to obtain the real-time temperature k. By comparing the real-time temperature k with the preset chip temperatures, the next detection cycle interval L is determined:
[0089] When k≤K1, the fourth detection period interval L4 is selected as the duration of the next detection interval;
[0090] When K1<k≤K2, the third detection period interval L3 is selected as the duration of the next detection interval;
[0091] When K2<k≤K3, the second detection period interval L2 is selected as the duration of the next detection interval;
[0092] When K3<k≤K4, the first detection cycle interval L1 is selected as the duration of the next detection interval.
[0093] It is understandable that by periodically detecting the real-time temperature of the IPU chip, the system can understand the working status of the chip in real time. According to the comparison between the actual temperature and the preset temperature, different detection cycle intervals are adopted to realize real-time adjustment of the chip temperature. The preset chip temperature thresholds (K1, K2, K3, K4) are used to judge the working status of the chip. When the real-time temperature exceeds a certain threshold, the system can select a shorter detection cycle to monitor the chip temperature more frequently to avoid the risk of chip overheating. When the chip temperature is relatively low, a longer detection cycle is adopted to reduce the occupation of system resources. This helps to reduce the power consumption of the system and improve the overall energy efficiency when the chip is working normally. By adjusting the detection cycle according to the real-time temperature, the system can more flexibly respond to working conditions at different temperatures, thereby improving the stability of the system. This is particularly important for scenarios such as long-term operation and heavy-load task processing. By reasonably adjusting the detection cycle, the system can effectively control the temperature of the chip and reduce the working time of the chip in a high temperature environment, thereby extending the service life of the chip. According to different temperature thresholds and detection cycles, the system can adjust the detection strategy in real time according to the specific working environment to adapt to different usage scenarios and ensure the reliability of the IPU chip in various working conditions.
[0094] In some embodiments of the present application, while detecting the IPU chip temperature, the chip power consumption of the IPU chip is detected, and the duration Lj of the next detection interval is corrected according to the chip power consumption, where j=1, 2, 3, 4, which includes:
[0095] Perform power consumption detection on the IPU chip to obtain the chip power consumption q, preset the first chip power consumption Q1, the second chip power consumption Q2, the third chip power consumption Q3 and the fourth chip power consumption Q4, wherein Q1<Q2<Q3<Q4; preset the first cycle correction coefficient r1, the second cycle correction coefficient r2, the third cycle correction coefficient r3 and the fourth cycle correction coefficient r4, wherein 0<r1<r2<r3<r4<1;
[0096] When q≤Q1, the first cycle correction coefficient r1 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection cycle is Li*r1;
[0097] When Q1<q≤Q2, the second period correction coefficient r2 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r2;
[0098] When Q2<q≤Q3, the third period correction coefficient r3 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r3;
[0099] When Q3<q≤Q4, the second period correction coefficient r4 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r4.
[0100] It is understandable that by detecting the power consumption level of the IPU chip, the system can understand the energy consumption of the chip in real time. By using different correction coefficients, the next detection interval can be adjusted intelligently, thereby achieving effective management of the power consumption level. For different power consumption levels, selecting the corresponding correction coefficient can achieve real-time adjustment of the detection cycle. When the power consumption is low, the detection cycle is extended to reduce system resource occupation; when the power consumption is high, the detection cycle is shortened to achieve more frequent power consumption monitoring and ensure system stability. By adjusting the detection cycle, the system can strike a balance between power consumption and performance. When the power consumption is low, the power consumption can be reduced, and when higher performance is required, the change can be responded to more promptly by increasing the detection frequency. High power consumption may cause the chip to overheat, so by detecting the power consumption and adjusting the detection frequency in time, the system can take preventive measures before the failure occurs to avoid the chip from failing due to overheating. By adjusting the detection cycle in real time, the system can reduce the frequency of detection when the power consumption is low and improve the energy efficiency of the system. This has significant advantages for application scenarios that focus on energy saving and environmental protection. By effectively managing power consumption, the system can slow down the aging of hardware, extend the service life of the IPU chip, and improve hardware reliability.
[0101] In some embodiments of the present application, determining whether the IPU chip fails includes:
[0102] The chip temperature and chip power consumption of the IPU chip are obtained, and whether the IPU chip fails is determined by the following judgment: when k>K4 or q>Q4, it is determined that the IPU chip is abnormal and fails.
[0103] In some embodiments of the present application, sorting includes:
[0104] Get the task scale P of the pending tasks, and sort all the pending tasks in each pending set from small to large according to the task scale P.
[0105] If a failure occurs, the pending tasks are queued to the remaining IPU chips, including:
[0106] The processor utilization M of the processing set without failure is obtained and compared to determine the processing set with the lowest processor utilization. All the processing tasks in the processing set with failure are moved to the processing set with the lowest processor utilization and then sorted.
[0107] It is understandable that by real-time monitoring of the temperature and power consumption of the IPU chip, the system can promptly detect abnormal conditions, such as excessive temperature or power consumption, and thus determine whether a fault has occurred. This helps to take measures in advance to avoid system crashes or hardware damage due to faults. In the sorting process, sorting tasks from small to large according to their size is conducive to optimizing the execution efficiency of tasks. Small-scale tasks may be more suitable for allocation to certain IPU chips, thereby improving overall processing efficiency and reducing task waiting time. In the event of a fault, moving pending tasks to the pending set with the lowest processor utilization can minimize the occupation of system resources and improve the response speed and processing efficiency of the system. This helps to maintain the stability of the overall system. By moving the pending tasks that have failed to be processed to the set with the lowest processor utilization and sorting them, a balanced distribution of tasks is achieved. This helps to avoid overloading a certain IPU chip and improve the load balancing of the overall system. In the event of a fault, through intelligent task redistribution and sorting, the system can better adapt to dynamic environments and improve the robustness of the system. This is particularly important for large-scale, long-running application scenarios. By concentrating faults on IPU chips with relatively low processor utilization, the system uses available resources more efficiently and reduces performance degradation caused by faults. Fault queuing and sorting strategies help the system quickly adjust task allocation when faults occur, reducing the impact on performance and thus optimizing overall system performance.
[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0109] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An efficient task scheduling and load balancing strategy for IPU chips, It is characterized in that include: Determine the initial priority of tasks to be processed; Acquire feature information of tasks to be processed and status information of several IPU chips, and queue the tasks to be processed to to-be-processed sets of several IPU chips according to initial priorities based on the status information and the feature information; In the same to-be-processed set, the status information is periodically detected to determine whether the IPU chip fails; If there is no fault, sorting the tasks to be processed according to the state information and the feature information; If a failure occurs, the pending tasks are queued to the remaining IPU chips; The initial priority includes: a first priority, a second priority, a third priority and a fourth priority, wherein the priority from the first priority to the fourth priority decreases in sequence; The characteristic information includes: task timeliness and task scale; The status information includes: computing power, processor utilization, chip temperature and chip power consumption.
2. According to the efficient task scheduling and load balancing strategy of the IPU chip of claim 1, It is characterized in that Determine the initial priority of tasks to be processed, including: The first task time limit t1, the second task time limit t2 and the third task time limit t3 are preset, and the task time limit T of the task to be processed is obtained; and according to the relationship between the task time limit T and the preset task time limits ti, i=1, 2, 3, the initial priority of the task to be processed is determined: When T≤t1, the initial priority of the task to be processed is determined as the first priority; When t1<T≤t2, the initial priority of the task to be processed is determined as the second priority; When t2<T≤t3, the initial priority of the task to be processed is determined as the third priority; When t3<T≤t4, the initial priority of the task to be processed is determined as the fourth priority.
3. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 2, It is characterized in that The pending tasks are queued to the pending sets of several IPU chips according to their initial priorities, including: Obtain the computing power E of each IPU chip, and pre-set a first computing power e1, a second computing power e2, and a third computing power e3, and e1>e2>e3; compare the computing power E of each IPU chip with the size relationship of each level of computing power, and classify the IPU chips into different groups: When E≥e1, the IPU chip is classified into the first group, and the pending tasks of the first priority are moved into the pending set of the first group; When e1>E≥e2, the IPU chip is classified into the second group, and the tasks to be processed of the second priority are moved into the processing set of the second group; When e2>E≥e3, the IPU chip is classified into the third group, and the pending tasks of the third priority are moved into the pending set of the third group; When e3>E≥e4, the IPU chip is classified into the fourth group, and the pending tasks of the fourth priority are moved into the pending set of the fourth group.
4. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 3, It is characterized in that After the pending tasks of each priority level are moved into each group, the processor utilization M of each IPU chip is obtained, and the utilization threshold m is set to determine the relationship between the processor utilization M and the utilization threshold m: When M<m, maintain the current state; When M≥m, obtain the group whose processor utilization M exceeds the utilization threshold m, and make the following judgment: when the processor utilization M of the first group exceeds the utilization threshold m, the pending set in the first group refuses to accept the processing tasks, and the rejected pending tasks are moved into the second group, and the rejected pending tasks in the second group are sorted to the first place for priority processing; when the processor utilization M≥m of the second group, the pending set of the second group refuses to accept the processing tasks; when the processor utilization M≥m of the third group, the pending set of the third group refuses to accept the processing tasks; when the processor utilization M≥m of the fourth group, the pending set of the fourth group refuses to accept the processing tasks.
5. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 4, It is characterized in that When the processor utilization rate M of the second group exceeds the utilization rate threshold m: determine the relationship between the processor utilization rate M of the first group and the utilization rate threshold m, if M < m, move the rejected pending tasks into the first group, and sort the rejected pending tasks into the last position for processing in the first group; if M ≥ m, move the rejected pending tasks into the third group or the fourth group, and sort the rejected pending tasks into the first position for processing in priority; When the processor utilization rate M of the third group exceeds the utilization rate threshold m: determine the relationship between the processor utilization rate M of the second group and the utilization rate threshold m, if M < m, move the rejected pending tasks into the second group, and sort the rejected pending tasks into the last position for processing; if M ≥ m, move the rejected pending tasks into the fourth group, and sort the rejected pending tasks into the first position for processing; When the processor utilization M of the fourth group exceeds the utilization threshold m: determine the relationship between the processor utilization M of the third group and the utilization threshold m, if M<m, move the rejected pending tasks into the third group, and sort the rejected pending tasks in the third group to the last place for processing; if M≥m, move the rejected pending tasks into the first group or the second group, and sort the rejected pending tasks in the first group or the second group to the last place for processing.
6. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 5, It is characterized in that Periodically detecting the status information includes: A first chip temperature K1, a second chip temperature K2, a third chip temperature K3 and a fourth chip temperature K4 are preset, wherein K1<K2<K3<K4; a first detection cycle interval L1, a second detection cycle interval L2, a third detection cycle interval L3 and a fourth detection cycle interval L4 are preset, wherein L1<L2<L3<L4; The temperature of the IPU chip is detected to obtain the real-time temperature k. By comparing the real-time temperature k with the preset chip temperatures, the next detection cycle interval L is determined: When k≤K1, the fourth detection period interval L4 is selected as the duration of the next detection interval; When K1<k≤K2, the third detection period interval L3 is selected as the duration of the next detection interval; When K2<k≤K3, the second detection period interval L2 is selected as the duration of the next detection interval; When K3<k≤K4, the first detection cycle interval L1 is selected as the duration of the next detection interval.
7. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 6, It is characterized in that While detecting the IPU chip temperature, the chip power consumption of the IPU chip is detected, and the duration Lj of the next detection interval is corrected according to the chip power consumption, where j = 1, 2, 3, 4, which includes: Perform power consumption detection on the IPU chip to obtain the chip power consumption q, preset the first chip power consumption Q1, the second chip power consumption Q2, the third chip power consumption Q3 and the fourth chip power consumption Q4, wherein Q1<Q2<Q3<Q4; preset the first cycle correction coefficient r1, the second cycle correction coefficient r2, the third cycle correction coefficient r3 and the fourth cycle correction coefficient r4, wherein 0<r1<r2<r3<r4<1; When q≤Q1, the first cycle correction coefficient r1 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection cycle is Li*r1; When Q1<q≤Q2, the second period correction coefficient r2 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r2; When Q2<q≤Q3, the third period correction coefficient r3 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r3; When Q3<q≤Q4, the second period correction coefficient r4 is selected as the correction coefficient of the next detection interval. At this time, the corrected detection period is Li*r4.
8. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 7, It is characterized in that Determine whether the IPU chip is faulty, including: The chip temperature and the chip power consumption of the IPU chip are obtained, and whether the IPU chip fails is determined by the following judgment: when k>K4 or q>Q4, it is determined that the IPU chip is abnormal and fails.
9. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 8, It is characterized in that The sorting includes: Obtain the task scale P of the tasks to be processed, and sort all the tasks to be processed in each set to be processed in order from small to large according to the task scale P.
10. The efficient task scheduling and load balancing strategy of the IPU chip according to claim 9, It is characterized in that If a failure occurs, the pending tasks are queued to the remaining IPU chips, including: The processor utilization M of the unprocessed set without failure is obtained and compared to determine the unprocessed set with the lowest processor utilization, and all the unprocessed tasks in the unprocessed set with failure are moved to the unprocessed set with the lowest processor utilization, and then the sorting is performed.
Citation Information
Cited By
AI chip fault software adaptive recovery system and method
CN119557148A
Cluster scheduling method and device for algorithm chips
CN119621262A
A cluster scheduling method and device of an algorithm chip
CN119621262B
