Aggregation computing task scheduling method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611194694.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-11-03
AI Technical Summary
Existing methods for aggregating data on the network have problems such as low resource utilization and uneven load on network chips. In particular, in large-scale aggregation computing tasks, the computing resources of network chips are limited and it is difficult to effectively support computing demands.
The total computing resources of the network chip are divided into multiple independent arithmetic logic units. The arithmetic logic units are split by receiving the message length of the aggregate computing task. The computing tasks are numbered and allocated according to the load weight and offset address of the arithmetic logic unit. After completion, the results are sorted and integrated in order of number to achieve load balancing and resource optimization.
This improves the resource utilization of the network chip, avoids overload or idleness of individual arithmetic logic units, balances the load of the network chip, and improves computing efficiency.
Smart Images

Figure CN123030295A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to an online aggregation computing task scheduling method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the continuous development of AI technology, the demand for computing power is increasing daily. To accelerate processing speed, multiple devices (such as central processing units and graphics processing units) can be combined into computing clusters. Aggregated communication is the mainstream communication method for these computing clusters. By replacing a large number of point-to-point operations with aggregated operations in aggregated communication, the operating performance of the cluster can be greatly improved. To avoid consuming too much computing resources of devices within the cluster during aggregated operations, the industry has proposed an on-network computing solution. This solution utilizes the forwarding and computing capabilities of network hardware such as network interface cards (NICs) or switches to offload aggregated operations, reducing the load on computing devices within the cluster. On-network data aggregation is one of the most widely used computing methods in on-network computing.
[0003] Existing methods for aggregating network data typically include tree-based and pseudo-tree-based methods. However, network chips have limited computing resources, making it difficult to support large-scale aggregation tasks using these methods. Therefore, there is an urgent need for an aggregation computing scheduling method tailored to network chips to improve resource utilization and balance the load across different units within the chip. Summary of the Invention
[0004] The objectives of this invention include, for example, providing an online aggregated computing task scheduling method, apparatus, electronic device, and storage medium that can at least partially solve the aforementioned technical problems.
[0005] The embodiments of the present invention can be implemented as follows: In a first aspect, embodiments of the present invention provide an on-network aggregated computing task scheduling method, applied to a network chip, wherein the total computing resources of the network chip are divided into multiple arithmetic logic units, and each arithmetic logic unit is decoupled from the others; the method includes: Receive the aggregation computing task and determine the message length of the aggregation computing task; According to the computing resources of each arithmetic logic unit, the message length of the aggregate computing task is split to obtain multiple aggregate computing subtasks. Based on the offset address of each of the aggregate computing subtasks in the aggregate computing task, each of the aggregate computing subtasks is numbered sequentially. Based on the load weight of each arithmetic logic unit, the numbered aggregation calculation subtasks are assigned to each arithmetic logic unit for aggregation calculation, resulting in multiple calculation results. The calculation results corresponding to each of the aggregate calculation subtasks are sorted and integrated according to their numbering order to obtain the total calculation result of the aggregate calculation task.
[0006] Optionally, the method further includes the step of dividing the arithmetic logic unit, comprising: Receive multiple agreed message lengths and calculate the greatest common divisor of the agreed message lengths; Calculate the quotient of the total computing resources and the greatest common divisor; The total computing resources are divided according to the quotient to obtain each arithmetic logic unit.
[0007] Optionally, the method further includes: Before receiving the aggregation calculation task, each of the arithmetic logic units is given the same initial load weight; Whenever an arithmetic logic unit is assigned an aggregation calculation subtask, a weight deduction value is determined based on the number of members corresponding to the aggregation calculation subtask; The load weight of the arithmetic logic unit is reduced by the weight deduction value, and the member is the cluster computing node participating in the aggregation computing task.
[0008] Optionally, the step of acquiring and allocating the numbered aggregation calculation subtasks to the respective arithmetic logic units for aggregation calculation based on the load weights of each arithmetic logic unit, to obtain multiple calculation results, including: Poll all arithmetic logic units to obtain the load weight of each arithmetic logic unit; Determine whether there is a high-load arithmetic logic unit among the arithmetic logic units. The high-load arithmetic logic unit is a load arithmetic logic unit whose load weight is less than or equal to a preset load weight. If so, the high-load arithmetic logic unit is skipped, and the aggregation calculation subtask is assigned to each arithmetic logic unit in the polling order to perform aggregation calculation and obtain multiple calculation results.
[0009] Optionally, the method further includes: Whenever an arithmetic logic unit completes a calculation cycle, the load weight of the arithmetic logic unit is increased by a preset step value. Wherein, the preset step size value is less than the weight deduction value, and the load weight of the arithmetic logic unit is allowed to be negative after the weight deduction operation, and after multiple accumulations of the preset step size value, it can be restored to the initial load weight at most.
[0010] Optionally, each of the arithmetic logic units is composed of multiple basic operation units, and the method further includes: Whenever an arithmetic logic unit is assigned to an aggregate computation subtask, the aggregate computation subtask is equally divided among the basic arithmetic units for computation. After the calculation is completed, the sub-calculation results obtained by each basic operation unit are concatenated according to the position of each basic operation unit in the arithmetic logic unit to obtain the calculation result corresponding to the aggregate calculation subtask.
[0011] Optionally, the network chip supports data types including bytes, 16-bit integers, 32-bit integers, 64-bit integers, 8-bit floating-point numbers, 16-bit floating-point numbers, 32-bit floating-point numbers, 64-bit floating-point numbers, and Boolean types.
[0012] Secondly, embodiments of the present invention provide an on-network aggregated computing task scheduling device applied to a network chip, wherein the total computing resources of the network chip are divided into multiple arithmetic logic units, and each arithmetic logic unit is decoupled from the others; the on-network aggregated computing task scheduling device includes: An aggregation computing task receiving unit is used to receive aggregation computing tasks and determine the message length of the aggregation computing task. The aggregation computing task splitting unit is used to split the aggregation computing task according to the computing resources of each arithmetic logic unit to obtain multiple aggregation computing subtasks. The aggregation computing subtask numbering unit is used to sequentially number each aggregation computing subtask based on its offset address in the aggregation computing task. The aggregation calculation subtask allocation unit is used to obtain and allocate the numbered aggregation calculation subtasks to the arithmetic logic units for aggregation calculation according to the load weight of each arithmetic logic unit, so as to obtain multiple calculation results. The overall calculation result integration unit is used to sort and integrate the calculation results corresponding to each of the aggregate calculation subtasks according to the number order to obtain the overall calculation result of the aggregate calculation task.
[0013] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a computer program, wherein the computer program, when executed, controls a server where the computer-readable storage medium is located to implement the steps of any of the methods described above.
[0015] The beneficial effects of the embodiments of the present invention include, for example: After receiving the aggregation computation task, it is broken down into multiple aggregation computation subtasks based on the allocated computing resources of the arithmetic logic units (ALUs). Each subtask is assigned a number, and the subtasks are allocated according to the load weight of each ALU. After computation, the results are sorted and integrated based on their assigned numbers to obtain the final aggregate computation result. By splitting the aggregation computation task and allocating subtasks according to the load weight of each ALU, the system avoids situations where some ALUs are heavily loaded while others have no computation at all, thus improving the resource utilization of on-network computing and balancing the load on the network chips. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a tree-structured aggregation calculation method provided in an embodiment of the present invention; Figure 2 A schematic diagram of a tree-structured reuse aggregation calculation method provided in an embodiment of the present invention; Figure 3 A schematic diagram of a pseudo-tree-shaped aggregation calculation method provided in an embodiment of the present invention; Figure 4 A block diagram illustrating an electronic device according to an embodiment of the present invention; Figure 5 A flowchart illustrating the steps of an online aggregated computing task scheduling method provided in an embodiment of the present invention; Figure 6 This is an architecture diagram of an on-network aggregated computing task scheduling device provided in an embodiment of the present invention.
[0018] Icons: 100 - Electronic device; 110 - Memory; 120 - Processor; 130 - Communication module; 300 - On-network aggregate computing task scheduling device; 301 - Aggregate computing task receiving unit; 302 - Aggregate computing task splitting unit; 303 - Aggregate computing subtask numbering unit; 304 - Aggregate computing subtask allocation unit; 305 - Overall calculation result integration unit. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0021] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0022] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0023] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0024] Currently, typical aggregation computing methods are designed based on chip architectures with abundant computing resources, such as GPUs (Graphics Processing Units) and NPUs (Neural-network Processing Units), including tree-based aggregation computing methods, tree-based reuse aggregation computing methods, and pseudo-tree-based aggregation computing methods.
[0025] Assume that there are N members participating in the aggregation calculation, the packet length of one calculation task is M, and the processing cycle of one calculation by the chip is C.
[0026] Tree-structured aggregation computing methods retrieve data from storage devices one at a time and place it into tree-structured computing units for computation. This requires N-1 computing units and can complete an aggregation computation task with a computational load of N*M per computation cycle, corresponding to a computational capacity of N*M / C. In this approach, all computing units participate in computation every cycle, resulting in the highest utilization of computing resources. However, when the number of computing members dynamically changes to less than N or is not a multiple of 2, some computing units become idle, leading to a decrease in computational resource utilization. This method has high computational resource requirements and is only suitable for chips with abundant computing resources, such as GPUs and NPUs, but not for network chips. Figure 1 As shown.
[0027] Please see Figure 2 The tree-structured multiplexing aggregation method is similar to the tree-structured aggregation method, but it uses the same computing units in each computation cycle, requiring N / 2 computing units. It can complete an aggregation computation task with a computational load of N*M every log2(N) computation cycles, corresponding to a computational capacity of N*M / (C*log2(N)). However, only in the first cycle do all computing units participate in the computation; in the second cycle, only half of the computing units participate, and so on, with only one computing unit participating in the computation in the last cycle. This results in low computational resource utilization, with nearly half of the computing units remaining idle throughout the entire computation task. Furthermore, when the number of computational members is not a power of 2, computing units remain idle, further reducing computational resource utilization. This method involves coupling between different computing units and has certain computational resource requirements, making it only suitable for chips with abundant computational resources such as GPUs and NPUs that execute instructions, and not for network chips.
[0028] like Figure 3 As shown, the pseudo-tree-structured aggregation computation method groups the data involved in the aggregation computation, and each group of data is calculated serially only on a fixed computation unit. The calculation results of each group are then aggregated in a tree structure. Assuming the data to be aggregated is grouped into groups of four, the required number of computation units is 2*(N / 4)-1. An aggregation computation task with a computational load of N*M can be completed every three computation cycles, with a computational capacity of N*M / 3C. However, when the number of computational members is not a multiple of four, some computational units are idle. Furthermore, apart from the first-level N / 4 computational units which operate in every computation cycle, the subsequent N / 4-1 computational units only operate once every three computation cycles, leaving the remaining computation cycles idle, resulting in low computational resource utilization. This method is suitable for switch chips that support a small number of members participating in the aggregation computation; when the number of members participating in the aggregation computation is large, it is difficult to have sufficient computational resources to support it.
[0029] In related technologies, the computing unit logic of the ALU (Arithmetic Logic Unit) in the chip is increased in frequency to perform aggregation calculations more quickly. For example, assuming the network chip processes packets at a main frequency of 1 GHz, increasing the computing unit logic frequency to 2 GHz would allow for aggregation calculations of packets at twice the rate.
[0030] However, as the logic frequency of the computing unit increases by a factor of several, in order to achieve timing convergence, a larger physical unit is required to implement the corresponding logic, and the power consumption will also increase exponentially. At the same time, the frequency increase is closely related to the process technology, and there is an upper limit to the process technology implementation, which cannot match the computing power requirements of the computing cluster that increase exponentially.
[0031] In addition, some methods group the data involved in the aggregation calculation into multiple levels. Each sub-computation task of each group at each level is calculated according to the pseudo-tree aggregation calculation method. The results are cached, and the sub-computation results of all groups at that level are obtained and then read out. The sub-computation results are then aggregated to obtain the calculation result of that level. The same sub-computation task is performed at the next level, and so on, until the final aggregation calculation result is obtained.
[0032] However, this method requires additional cache space to store each calculation result, and the need to store and retrieve sub-results multiple times will increase computation latency.
[0033] Based on the above, embodiments of the present invention provide an online aggregation computing task scheduling method, apparatus, electronic device, and storage medium, which can effectively alleviate the above-mentioned technical problems.
[0034] Please refer to Figure 4 This is a block diagram of an electronic device 100 provided in this application. The electronic device 100 can be a data processing device, and this embodiment does not limit this. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0035] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0036] The processor 120 is used to read / write data or programs stored in memory and to perform corresponding functions.
[0037] The communication module 130 is used to establish a communication connection between the server and other communication terminals through the network, and to send and receive data through the network.
[0038] It should be understood that, Figure 4 The structure shown is only a schematic diagram of the electronic device 100. The electronic device 100 may also include components that are larger than... Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof. This electronic device 100 can be integrated into other devices or configured as a standalone device.
[0039] This invention provides a method for scheduling network-aggregated computing tasks, applied to a network chip. The total computing resources of the network chip are divided into multiple arithmetic logic units (ALUs), and each ALU is decoupled from the others. The method includes, for example,... Figure 5 The following steps are shown: Step S110: Receive the aggregation computing task and determine the message length of the aggregation computing task.
[0040] Step S120: According to the computing resources of each arithmetic logic unit, the message length of the aggregate computing task is split to obtain multiple aggregate computing subtasks.
[0041] Step S130: Based on the offset address of each of the aggregate computing subtasks in the aggregate computing task, number each of the aggregate computing subtasks sequentially.
[0042] Step S140: Obtain and assign each numbered aggregation calculation subtask to each arithmetic logic unit for aggregation calculation according to the load weight of each arithmetic logic unit, and obtain multiple calculation results.
[0043] Step S150: Sort and integrate the calculation results corresponding to each of the aggregation calculation subtasks according to the number order to obtain the total calculation result of the aggregation calculation task.
[0044] In step S110, the aggregation computing task is received, and the message length of the aggregation computing task is determined.
[0045] The on-network aggregation computing task scheduling method provided in this embodiment of the invention can be applied in a network chip environment. The total computing resources of the network chip are pre-divided into multiple arithmetic logic units (ALUs), and each ALU is decoupled from the others. That is, each ALU independently executes its assigned computing task, and its computing process does not require data interaction or result merging with other ALUs.
[0046] The system receives aggregated computing tasks from the computing cluster (i.e., multiple servers, computers, computing nodes, etc., participating in the computation; these computing devices can also be called members) and determines the message length of the aggregated computing task. The message length of the aggregated computing task directly reflects the total amount of data to be processed in this aggregated computing task and is an important basis for subsequent task splitting and resource allocation.
[0047] Optionally, the network chip supports data types including bytes, 16-bit integers, 32-bit integers, 64-bit integers, 8-bit floating-point numbers, 16-bit floating-point numbers, 32-bit floating-point numbers, 64-bit floating-point numbers, and Boolean types.
[0048] The network chip supports the following data types: byte, 16-bit short, 32-bit int, 64-bit long, 8-bit floating-point (FP8), 16-bit floating-point (FP16 / BF16), 32-bit floating-point (FP32), 64-bit floating-point (double), and boolean. These data types cover common data formats in network aggregation computing scenarios. When processing aggregation computing tasks, the network chip uses these data types for aggregation operations, ensuring compatibility with the diverse data formats used by different computing clusters and meeting the computing needs of various application scenarios in high-performance computing and artificial intelligence.
[0049] Optionally, the method further includes the step of dividing the arithmetic logic unit, comprising: Receive multiple agreed message lengths and calculate the greatest common divisor of each agreed message length.
[0050] Calculate the quotient of the total computing resources and the greatest common divisor. Divide the total computing resources according to the quotient to obtain the arithmetic logic units.
[0051] In one alternative implementation, the method may further include specific steps for dividing arithmetic logic units. The network chip receives multiple agreed-upon message lengths, which are data message lengths jointly agreed upon by the computing cluster and the network chip. In actual communication, there may be various different length values, such as 128 bytes, 256 bytes, 512 bytes, etc.
[0052] After receiving the aforementioned agreed-upon message lengths, the greatest common divisor (GCD) of these message lengths is calculated. This GCD serves as the granularity benchmark for arithmetic logic unit (ALU) partitioning. The quotient between the total computing resources of the network chip and this GCD is calculated; the quotient represents the number of ALUs that the network chip can be partitioned into. Based on this quotient, the total computing resources of the network chip are partitioned such that the allocated computing resources of each ALU are equal to the aforementioned GCD.
[0053] For example, suppose the agreed-upon data packet lengths are 128 bytes, 256 bytes, 512 bytes, 1024 bytes, 2048 bytes, and 4096 bytes. The greatest common divisor (GCD) of these lengths is 128 bytes. If the total computing resources of the network chip are 2048 bytes, then the quotient of the total computing resources and the GCD is 16. Therefore, the total computing resources can be divided into 16 arithmetic logic units (ALUs), each with 128 bytes of computing resources. This division method ensures that the resulting ALUs can support packets of all agreed-upon lengths, thereby improving the network chip's compatibility with aggregation computing tasks of different lengths.
[0054] In step S120, the message length of the aggregate computing task is split according to the computing resources of each arithmetic logic unit to obtain multiple aggregate computing subtasks.
[0055] After obtaining the message length, the message length of the aggregation calculation task can be split according to the distributed computing resources of each arithmetic logic unit, thus obtaining multiple aggregation calculation subtasks. Specifically, the distributed computing resources of each arithmetic logic unit correspond to the data bit width or data length that the arithmetic logic unit can process in a single operation. By splitting the complete message length according to this granularity, it can be ensured that the data volume of each aggregation calculation subtask obtained after splitting is adapted to the single processing capacity of an arithmetic logic unit, thereby avoiding the waste of computing resources or scheduling difficulties caused by uneven sizes of aggregation calculation subtasks.
[0056] Optionally, the method further includes: Before receiving the aggregate computation task, each of the arithmetic logic units is given the same initial load weight.
[0057] Whenever an arithmetic logic unit is assigned an aggregation calculation subtask, a weight deduction value is determined based on the number of members corresponding to the aggregation calculation subtask.
[0058] The load weight of the arithmetic logic unit is reduced by the weight deduction value, and the member is the cluster computing node participating in the aggregation computing task.
[0059] Before receiving an aggregation computation task, each arithmetic logic unit (ALU) can be assigned the same initial load weight. This initial load weight characterizes the remaining computational capacity of each ALU in its initial state. Whenever an ALU is assigned an aggregation computation subtask, a weight deduction value is determined based on the number of members corresponding to that aggregation computation subtask. The number of members refers to the number of cluster computing nodes participating in the current aggregation computation task. The larger the number of members, the more data sources the subtask needs to aggregate, and the greater its computational load.
[0060] After determining the weight deduction value, the current load weight of the arithmetic logic unit is subtracted from the weight deduction value, thereby updating the load weight. The updated load weight is lower to reflect the decrease in the remaining load capacity of the arithmetic logic unit due to taking on new tasks. Through this mechanism, the load weight of each arithmetic logic unit can dynamically track its actual load changes during the continuous aggregation calculation task, providing an accurate data basis for the scheduling and allocation of subsequent subtasks.
[0061] For example, if the initial load weight of an arithmetic logic unit is 10, and the number of members corresponding to the aggregation calculation subtask assigned to the arithmetic logic unit is 8, then the weight deduction value is determined to be 8. After the arithmetic logic unit receives this aggregation calculation subtask, its load weight is updated to 2.
[0062] In step S130, each of the aggregation calculation subtasks is numbered sequentially based on its offset address within the aggregation calculation task.
[0063] Based on the decomposition of the aggregation calculation task, each aggregation calculation subtask can be numbered sequentially according to its offset address within the overall aggregation calculation task. It should be understood that the offset address indicates the starting position and sequential order of the data fragments corresponding to each aggregation calculation subtask within the original complete message. Numbering based on this offset address provides a clear order for the subsequent sorting of results after calculation, ensuring data integrity and accuracy.
[0064] In step S140, the numbered aggregation calculation subtasks are obtained and assigned to the arithmetic logic units for aggregation calculation based on the load weight of each arithmetic logic unit, resulting in multiple calculation results.
[0065] After assigning numbers to each aggregation calculation subtask, the current load weight of each arithmetic logic unit (ALU) can be obtained. Based on the load weight of each ALU, the numbered aggregation calculation subtasks are assigned to the respective ALUs for aggregation calculation. The load weight quantifies the remaining load capacity of each ALU. During the assignment process, ALUs with higher load weights can take on new subtasks or more subtasks, while ALUs with lower load weights can be assigned fewer subtasks or skipped. After receiving the assigned subtasks, each ALU independently performs the aggregation calculation and outputs the corresponding calculation results.
[0066] Optionally, the step of acquiring and allocating the numbered aggregation calculation subtasks to the respective arithmetic logic units for aggregation calculation based on the load weights of each arithmetic logic unit, to obtain multiple calculation results, including: Poll all arithmetic logic units to obtain the load weight of each arithmetic logic unit.
[0067] Determine whether there is a high-load arithmetic logic unit among the arithmetic logic units. The high-load arithmetic logic unit is a load arithmetic logic unit whose load weight is less than or equal to a preset load weight.
[0068] If so, the high-load arithmetic logic unit is skipped, and the aggregation calculation subtask is assigned to each arithmetic logic unit in the polling order to perform aggregation calculation and obtain multiple calculation results.
[0069] As an optional implementation, in the specific implementation of acquiring and allocating the numbered aggregation calculation subtasks to each arithmetic logic unit according to the load weight of each arithmetic logic unit, an allocation method combining polling and load status judgment can be adopted. All arithmetic logic units are accessed sequentially according to the polling order to obtain the current load weight of each arithmetic logic unit. After obtaining each load weight, it is determined whether there is a high-load arithmetic logic unit among the arithmetic logic units. A high-load arithmetic logic unit refers to an arithmetic logic unit whose load weight is less than or equal to a preset load weight (e.g., an arithmetic logic unit with a load weight below 0), meaning that the remaining load capacity of this arithmetic logic unit is insufficient to safely handle new calculation tasks. If the determination result is that a high-load arithmetic logic unit exists, then in the subsequent allocation process, this high-load arithmetic logic unit is skipped, and no new aggregation calculation subtask is assigned to it. Simultaneously, aggregation calculation subtasks are continued to be assigned to the remaining arithmetic logic units sequentially according to the polling order. After receiving the assigned aggregation calculation subtask, each arithmetic logic unit performs aggregation calculations and outputs the corresponding calculation results.
[0070] By combining the polling and skipping mechanisms described above, we can effectively prevent high-load units from being overloaded by being assigned tasks, while ensuring that other arithmetic logic units can take on new computational tasks in a timely manner, thereby achieving load balancing.
[0071] Optionally, the method further includes: Whenever an arithmetic logic unit completes a calculation cycle, the load weight of the arithmetic logic unit is increased by a preset step value.
[0072] Wherein, the preset step size value is less than the weight deduction value, and the load weight of the arithmetic logic unit is allowed to be negative after the weight deduction operation, and after multiple accumulations of the preset step size value, it can be restored to the initial load weight at most.
[0073] Building upon the aforementioned dynamic load weight management mechanism, a load weight recovery mechanism can be added. Whenever an arithmetic logic unit (ALU) completes a computation cycle, its load weight is increased by a preset step size. This preset step size reflects the load capacity released by the ALU during a computation cycle due to completing a portion of the computational tasks. It should be noted that this preset step size is smaller than the aforementioned weight deduction value. This means that the recovery speed of the load weight within a single computation cycle is slower than the deduction speed during a single allocation due to task acceptance, thus avoiding the problem of load assessment distortion caused by excessively rapid recovery.
[0074] Meanwhile, the load weight of the arithmetic logic unit is allowed to be negative after the weight deduction operation, meaning the load weight can be lower than the initial value and exhibit a negative state. This negative state represents the excessive load currently borne by the arithmetic logic unit. In subsequent calculation cycles, through multiple accumulations of preset step values, the load weight gradually recovers, and at most returns to the initial load weight without exceeding that initial value.
[0075] Optionally, each of the arithmetic logic units is composed of multiple basic operation units, and the method further includes: Whenever an arithmetic logic unit is assigned to an aggregate computation subtask, the aggregate computation subtask is evenly distributed among the basic arithmetic units for computation.
[0076] After the calculation is completed, the sub-calculation results obtained by each basic operation unit are concatenated according to the position of each basic operation unit in the arithmetic logic unit to obtain the calculation result corresponding to the aggregate calculation subtask.
[0077] Each arithmetic logic unit (ALU) can be internally composed of multiple basic operational units (BAUs), each corresponding to the minimum computational logic for a data type supported by the network chip. Whenever an ALU is assigned an aggregate computation subtask, it can divide the received subtask into multiple smaller computation tasks and assign these smaller tasks to the respective BAUs within that ALU for parallel computation. Each BAU independently executes its assigned task and outputs its corresponding sub-computation result upon completion. Subsequently, the ALU concatenates the sub-computation results from each BAU according to their physical location within the ALU to obtain the final computation result for the aggregate computation subtask.
[0078] In step S150, the calculation results corresponding to each of the aggregate calculation subtasks are sorted and integrated according to the number order to obtain the total calculation result of the aggregate calculation task.
[0079] After obtaining the calculation results corresponding to each aggregation calculation subtask, the calculation results of each aggregation calculation subtask are sorted and integrated according to their numbering order. Since the numbering is determined based on the offset address, sorting and integrating according to the numbering order is essentially reorganizing each calculation result according to its original position in the original message, thereby accurately restoring the total calculation result of the aggregation calculation task.
[0080] By splitting the aggregation computing task into sub-computational resources of arithmetic logic units and dynamically allocating sub-tasks based on the load weight of each arithmetic logic unit, the above method can effectively avoid the situation where some arithmetic logic units become performance bottlenecks due to overload, while other arithmetic logic units waste computing resources due to idleness. This improves the overall resource utilization of network chips in network computing scenarios and balances the load of each arithmetic logic unit.
[0081] Based on the same inventive concept, such as Figure 6 As shown in the figure, an embodiment of the present invention provides an in-network aggregation computing task scheduling device 300, applied to a network chip. The total computing resources of the network chip are divided into multiple arithmetic logic units, and each arithmetic logic unit is decoupled from the others. The in-network aggregation computing task scheduling device 300 includes: The aggregation computing task receiving unit 301 is used to receive aggregation computing tasks and determine the message length of the aggregation computing task.
[0082] The aggregation computing task splitting unit 302 is used to split the aggregation computing task according to the computing resources of each arithmetic logic unit to obtain multiple aggregation computing subtasks.
[0083] The aggregation calculation subtask numbering unit 303 is used to sequentially number each aggregation calculation subtask based on its offset address in the aggregation calculation task.
[0084] The aggregation calculation subtask allocation unit 304 is used to obtain and allocate each numbered aggregation calculation subtask to each arithmetic logic unit for aggregation calculation according to the load weight of each arithmetic logic unit, so as to obtain multiple calculation results.
[0085] The total calculation result integration unit 305 is used to sort and integrate the calculation results corresponding to each of the aggregate calculation sub-tasks according to the number order to obtain the total calculation result of the aggregate calculation task.
[0086] Regarding the aforementioned online aggregated computing task scheduling device 300, the specific functions of each unit have been described in detail in the embodiments of the online aggregated computing task scheduling method provided in this specification, and will not be elaborated here.
[0087] Based on the same inventive concept, embodiments of this specification provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods in the aforementioned online aggregated computing task scheduling method.
[0088] The present invention has at least the following beneficial effects: After receiving the aggregation computation task, it is broken down into multiple aggregation computation subtasks based on the allocated computing resources of the arithmetic logic units (ALUs). Each subtask is assigned a number, and the subtasks are allocated according to the load weight of each ALU. After computation, the results are sorted and integrated based on their assigned numbers to obtain the final aggregate computation result. By splitting the aggregation computation task and allocating subtasks according to the load weight of each ALU, the system avoids situations where some ALUs are heavily loaded while others have no computation at all, thus improving the resource utilization of on-network computing and balancing the load on the network chips.
[0089] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0090] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0091] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for scheduling on-network aggregated computing tasks, characterized in that, Applied to network chips, the total computing resources of the network chip are divided into multiple arithmetic logic units, each of which is decoupled from the others; the method includes: Receive the aggregation computing task and determine the message length of the aggregation computing task; According to the computing resources of each arithmetic logic unit, the message length of the aggregate computing task is split to obtain multiple aggregate computing subtasks. Based on the offset address of each of the aggregate computing subtasks in the aggregate computing task, each of the aggregate computing subtasks is numbered sequentially. Based on the load weight of each arithmetic logic unit, the numbered aggregation calculation subtasks are assigned to each arithmetic logic unit for aggregation calculation, resulting in multiple calculation results. The calculation results corresponding to each of the aggregate calculation subtasks are sorted and integrated according to their numbering order to obtain the total calculation result of the aggregate calculation task.
2. The on-network aggregated computing task scheduling method as described in claim 1, characterized in that, The method further includes the step of dividing the arithmetic logic unit, including: Receive multiple agreed message lengths and calculate the greatest common divisor of the agreed message lengths; Calculate the quotient of the total computing resources and the greatest common divisor; The total computing resources are divided according to the quotient to obtain each arithmetic logic unit.
3. The on-network aggregated computing task scheduling method as described in claim 1, characterized in that, The method further includes: Before receiving the aggregation calculation task, each of the arithmetic logic units is given the same initial load weight; Whenever an arithmetic logic unit is assigned an aggregation calculation subtask, a weight deduction value is determined based on the number of members corresponding to the aggregation calculation subtask; The load weight of the arithmetic logic unit is reduced by the weight deduction value, and the member is the cluster computing node participating in the aggregation computing task.
4. The on-network aggregated computing task scheduling method as described in claim 3, characterized in that, The process involves acquiring and allocating the numbered aggregation calculation subtasks to the respective arithmetic logic units based on their load weights, resulting in multiple calculation results, including: Poll all arithmetic logic units to obtain the load weight of each arithmetic logic unit; Determine whether there is a high-load arithmetic logic unit among the arithmetic logic units. The high-load arithmetic logic unit is a load arithmetic logic unit whose load weight is less than or equal to a preset load weight. If so, the high-load arithmetic logic unit is skipped, and the aggregation calculation subtask is assigned to each arithmetic logic unit in the polling order to perform aggregation calculation and obtain multiple calculation results.
5. The on-network aggregated computing task scheduling method as described in claim 4, characterized in that, The method further includes: Whenever an arithmetic logic unit completes a calculation cycle, the load weight of the arithmetic logic unit is increased by a preset step value. Wherein, the preset step size value is less than the weight deduction value, and the load weight of the arithmetic logic unit is allowed to be negative after the weight deduction operation, and after multiple accumulations of the preset step size value, it can be restored to the initial load weight at most.
6. The on-network aggregated computing task scheduling method as described in claim 1, characterized in that, Each of the aforementioned arithmetic logic units is composed of multiple basic operational units, and the method further includes: Whenever an arithmetic logic unit is assigned to an aggregate computation subtask, the aggregate computation subtask is equally divided among the basic arithmetic units for computation. After the calculation is completed, the sub-calculation results obtained by each basic operation unit are concatenated according to the position of each basic operation unit in the arithmetic logic unit to obtain the calculation result corresponding to the aggregate calculation subtask.
7. The on-network aggregated computing task scheduling method as described in claim 1, characterized in that, The network chip supports data types including bytes, 16-bit integers, 32-bit integers, 64-bit integers, 8-bit floating-point numbers, 16-bit floating-point numbers, 32-bit floating-point numbers, 64-bit floating-point numbers, and Boolean types.
8. An on-network aggregated computing task scheduling device, characterized in that, Applied to network chips, the total computing resources of the network chip are divided into multiple arithmetic logic units, and each arithmetic logic unit is decoupled from the others; The on-network aggregate computing task scheduling device includes: An aggregation computing task receiving unit is used to receive aggregation computing tasks and determine the message length of the aggregation computing task. The aggregation computing task splitting unit is used to split the aggregation computing task according to the computing resources of each arithmetic logic unit to obtain multiple aggregation computing subtasks. The aggregation computing subtask numbering unit is used to sequentially number each aggregation computing subtask based on its offset address in the aggregation computing task. The aggregation calculation subtask allocation unit is used to obtain and allocate the numbered aggregation calculation subtasks to the arithmetic logic units for aggregation calculation according to the load weight of each arithmetic logic unit, so as to obtain multiple calculation results. The overall calculation result integration unit is used to sort and integrate the calculation results corresponding to each of the aggregate calculation subtasks according to the number order to obtain the overall calculation result of the aggregate calculation task.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program, which, when executed, controls the server where the computer-readable storage medium is located to implement the steps of the method according to any one of claims 1 to 7.
