Communication resource allocation method, apparatus, device, medium, and product

By dynamically determining the optimal number of communication computing cores in a multi-GPU cluster, and utilizing the collaborative work of the communication engine and communication computing cores, the problem of low efficiency in parallel computing tasks caused by static resource allocation strategies is solved, achieving more efficient resource utilization and task execution.

CN121301028BActive Publication Date: 2026-02-24SHANGHAI BIREN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511757535.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing technologies employ static resource allocation strategies in high-performance computing scenarios such as large model training and inference in graphics processing unit (GPU) clusters, resulting in low execution efficiency of parallel computing tasks and an inability to adapt to different task loads.

Method used

By acquiring the computational and communication data volumes of the parallel computing tasks and combining this with the set number of communication computing cores, the optimal number of communication computing cores in a multi-GPU cluster is dynamically determined. This allows for simultaneous communication between the communication engine and the communication computing cores, thus optimizing resource allocation.

Benefits of technology

It improves the execution efficiency of parallel computing tasks, solves the problem that static resource allocation strategies cannot adapt to different task loads, and enhances the overall task execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301028B_ABST
    Figure CN121301028B_ABST
Patent Text Reader

Abstract

The application provides a communication resource allocation method and device, equipment, medium and product, relates to the technical field of communication, and the method is applied to a multi-card cluster. The multi-card cluster includes a communication engine and a computing core. Part of the computing core is used as a communication computing core to communicate with the communication engine for the communication and calculation parallel task. The method includes: obtaining the calculation data volume and the communication data volume of the to-be-processed communication and calculation parallel task; determining the total time consumption of the multi-card cluster for executing the communication and calculation parallel task when including each or part of the set number of communication computing cores based on the calculation data volume, the communication data volume and the set number of each communication computing core; allocating the communication computing core for the communication and calculation parallel task based on the set number with the minimum total time consumption; and determining the set number based on the communication bandwidth of the multi-card cluster. The application can adaptively allocate the corresponding communication computing core for the communication and calculation parallel task to minimize the total time consumption, thereby improving the task execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a communication resource allocation method, apparatus, device, medium, and product. Background Technology

[0002] In high-performance computing scenarios such as large model training and inference, GPU cluster applications overlap data communication time with computation time, i.e., parallel computing, which is a key technology to improve the overall task execution efficiency. Related technologies usually use static resource allocation strategies to execute parallel computing tasks, resulting in low task execution efficiency.

[0003] Therefore, how to adaptively allocate hardware resources to improve the execution efficiency of parallel computing tasks has become a technical problem that the industry urgently needs to solve. Summary of the Invention

[0004] This application provides a communication resource allocation method, apparatus, device, medium, and product to solve the technical problem in the related art of how to adaptively allocate hardware resources to improve the execution efficiency of parallel computing tasks.

[0005] In a first aspect, this application provides a communication resource allocation method applied to a multi-GPU cluster, wherein the multi-GPU cluster includes a communication engine and computing cores, and some of the computing cores serve as communication computing cores, working together with the communication engine for communication in parallel computing tasks. The method includes:

[0006] Obtain the amount of computational data and communication data for the parallel computing task to be processed;

[0007] Based on the amount of computational data, the amount of communication data, and the set number of each of the communication computing cores, determine the total time consumed by the multi-card cluster to execute the parallel computing task when including each or part of the set number of the communication computing cores;

[0008] The communication computing cores are allocated to the parallel computing task based on the minimum set number of total time consumption.

[0009] The set quantity is determined based on the communication bandwidth of the multi-card cluster.

[0010] In some embodiments, the set number includes a number that increases sequentially from an initial number to a maximum number. Before determining the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the set number of communication computing cores, the method further includes:

[0011] The maximum number is determined based on the communication bandwidth of the multi-card cluster, the communication engine, and the communication computing core.

[0012] In some embodiments, determining the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes:

[0013] The initial quantity is used as the current set quantity, and the quantity is increased sequentially to the maximum quantity. The increased quantity is then used as the new current set quantity.

[0014] For each of the currently set quantities, perform the following steps:

[0015] Based on the amount of computational data, the amount of communication data, and the currently set number of communication computing cores, the total time consumed by the multi-card cluster to execute the parallel computing task is determined, including the currently set number of communication computing cores.

[0016] In some embodiments, determining the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes:

[0017] The initial quantity is used as the current set quantity, and the quantity is increased sequentially. The increased quantity is used as the new current set quantity, until the current set quantity is less than the maximum quantity among the set quantities and the communication time of the parallel computing task is less than or equal to the computing time, or the total time corresponding to the current set quantity is greater than or equal to the total time corresponding to the previous set quantity.

[0018] For each of the currently set quantities, perform the following steps:

[0019] Based on the amount of computational data, the amount of communication data, and the current set number of communication computing cores, the communication time and the computation time of the multi-card cluster executing the parallel computing task are determined when the current set number of communication computing cores are included.

[0020] The total time is determined based on the communication time and the computation time.

[0021] In some embodiments, determining the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes:

[0022] When the multi-card cluster includes any set number of the communication computing cores, the number of computing cores other than the communication computing cores in the multi-card cluster is determined based on the set number.

[0023] Based on the amount of computational data, the number of computational cores, and the computing power of the computational cores, the computation time for the multi-card cluster to execute the parallel computing task is determined.

[0024] Based on the amount of communication data, the communication bandwidth of the communication engine, and the communication bandwidth of any set number of communication computing cores, the communication time for the multi-card cluster to execute the parallel computing task is determined.

[0025] The total time required for the multi-card cluster to execute the parallel computing task is determined based on the computation time and the communication time.

[0026] In some embodiments, after allocating the communication computing cores to the parallel computing task based on the minimum set number of total time consumption, the method further includes:

[0027] The communication subtasks of the parallel computing task are jointly executed by the communication engine and the set number of communication computing cores with the minimum total time, and the computing subtasks of the parallel computing task are executed by the computing cores other than the communication computing cores in the multi-card cluster.

[0028] Secondly, this application provides a communication resource allocation device applied to a multi-card cluster, wherein the multi-card cluster includes a communication engine and computing cores, and some of the computing cores serve as communication computing cores, working together with the communication engine for communication in parallel computing tasks. The device includes:

[0029] The acquisition module is used to acquire the amount of computational data and communication data of the parallel computing task to be processed;

[0030] A determining module is used to determine the total time consumed by the multi-card cluster to execute the parallel computing task when including each or part of the predetermined number of the communication computing cores, based on the amount of computing data, the amount of communication data, and each predetermined number of the communication computing cores;

[0031] The allocation module is used to allocate the communication computing cores to the parallel computing task based on the set number that minimizes the total time consumption.

[0032] The set quantity is determined based on the communication bandwidth of the multi-card cluster.

[0033] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement the above-described method when executing the program through the computer program.

[0034] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0036] The communication resource allocation method, apparatus, device, medium, and product provided in this application determine the total time spent by a multi-card cluster executing a parallel computing task when including each or a portion of the set number of communication computing cores by considering the amount of computational data and communication data of the parallel computing task. It can dynamically determine the optimal number of computing cores used for communication, thereby allocating corresponding communication computing cores to the parallel computing task. By using the communication engine and communication computing cores for communication simultaneously, the total time spent by the parallel computing task is minimized. This solves the defect that static resource allocation strategies cannot adapt to different task loads and improves the execution efficiency of the parallel computing task. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is one of the flowcharts illustrating the communication resource allocation method provided in the embodiments of this application.

[0039] Figure 2 This is one of the scenario diagrams illustrating the communication scenarios provided in the embodiments of this application.

[0040] Figure 3 This is a second schematic diagram of a communication scenario provided in an embodiment of this application.

[0041] Figure 4 The third scenario diagram illustrates the communication scenario provided in the embodiments of this application.

[0042] Figure 5 This is a second flowchart illustrating the communication resource allocation method provided in an embodiment of this application.

[0043] Figure 6 This is a schematic diagram of the communication resource allocation device provided in an embodiment of this application.

[0044] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0045] Explanation of reference numerals in the attached figures:

[0046] Acquisition module: 610; Determination module: 620; Allocation module: 630; Processor: 710; Communication interface: 720; Memory: 730; Communication bus: 740. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0049] The communication resource allocation method provided in this application is applicable to terminals in multi-card clusters. The terminal can be various electronic devices with a display screen and support web browsing, including servers, smartphones, tablets, laptops, and desktop computers.

[0050] Figure 1 This is one of the flowcharts illustrating the communication resource allocation method provided in the embodiments of this application, such as... Figure 1 As shown, the method includes steps 110, 120, and 130. These method steps are merely one possible implementation of this application.

[0051] Step 110: Obtain the amount of computational data and communication data for the parallel computing task to be processed.

[0052] Specifically, the execution subject of the communication resource allocation method provided in this application embodiment is a communication resource allocation device. This device can be a hardware device independently set in the terminal of a multi-card cluster, or it can be a software program running in the terminal.

[0053] The multi-card cluster in this application embodiment is a cluster including hardware units for data transmission and processing units for computing, such as a GPU cluster. A multi-card cluster may also include a computing cluster with multiple AI computing cards, where the computing core is the core unit of the computing card. In this application embodiment, the data transmission is equivalent to communication.

[0054] A multi-GPU cluster includes a communication engine and computing cores. The computing cores can function as communication computing cores, working together with the communication engine for communication in parallel computing tasks. The communication engine is a hardware unit in the multi-GPU cluster used for data transmission, such as a Direct Memory Access (DMA) engine; the computing core is a processing unit in the multi-GPU cluster used for computation. In this embodiment, the computing core can be flexibly configured as a communication computing core, and the communication computing core can work simultaneously with the communication engine for data transmission in parallel computing tasks.

[0055] Parallel computing tasks refer to tasks that can overlap the time of computation and communication processes and be executed in parallel. They are commonly found in high-performance computing scenarios such as large model training and inference.

[0056] Computational data volume refers to the total amount of computational work that needs to be processed in a parallel computing task; communication data volume refers to the total amount of data that needs to be transferred between different computing nodes, such as different GPU cards, during the execution of a parallel computing task.

[0057] After obtaining the parallel computing task to be processed, the amount of computational data and communication data is first determined.

[0058] Step 120: Based on the amount of computational data, the amount of communication data, and the set number of each communication computing core, determine the total time taken for the multi-card cluster to perform parallel computing tasks when including each or a portion of the set number of communication computing cores; the set number is determined based on the communication bandwidth of the multi-card cluster.

[0059] Specifically, the set quantity refers to the specific number of communication computing cores assumed to be allocated for communication in a single evaluation. Total time refers to the time spent completing the entire parallel computing task. The parallel computing task includes parallel execution of communication subtasks and computation subtasks; the total time is determined by the longer of the communication time of the communication subtasks and the computation time of the computation subtasks. Communication bandwidth refers to the data transmission rate.

[0060] Figure 2 This is one of the scenario diagrams illustrating the communication scenarios provided in the embodiments of this application. Figure 3 This is a second schematic diagram of a communication scenario provided in an embodiment of this application. Figure 4 This is the third scenario diagram illustrating the communication scenario provided in the embodiments of this application. For example... Figures 2 to 4 As shown, if only the communication engine is used for communication, when the amount of communication data is small, the communication time may be less than or equal to the computation time. In this case, the communication time is completely masked by the computation time, achieving an ideal parallel computing effect and high task execution efficiency. However, if the amount of communication data is large, using only the communication engine may result in the communication time exceeding the computation time, becoming a bottleneck for the entire task. In this case, this embodiment of the application allocates a portion of the computing cores originally used for computation, such as one or more computing cores, as communication computing cores, which work together with the communication engine to process the communication subtasks. Although this slightly increases the computation time due to the reduction in computing resources, the significant improvement in communication efficiency significantly reduces the communication time, thereby reducing the total time and achieving a better parallel computing effect.

[0061] Therefore, this step, for the parallel computing task, will iteratively increase the number of communication computing cores, starting from an initial set number (e.g., 0), based on the set number of communication computing cores. In each loop, using the currently set number of communication computing cores, the computation time and communication time under this configuration are calculated, and the total time under the current set number is determined based on the maximum value of the computation time and communication time. This iterative process can calculate the total time corresponding to each set number, or it can calculate the total time corresponding to a partial set number.

[0062] Step 130: Allocate communication computing cores to the parallel computing task based on the minimum total time set.

[0063] Specifically, after completing the iterative evaluation in step 120, the correspondence between the set quantity and the total time will be obtained. The minimum total time and the set quantity corresponding to the minimum total time will be found. The set quantity will be used as the optimal number of communication computing cores for the current parallel computing task. The corresponding number of communication computing cores will be allocated to the parallel computing task according to the optimal number of communication computing cores.

[0064] The communication resource allocation method provided in this application determines the total execution time of a multi-card cluster when including a set number of communication computing cores by considering the amount of computational data and communication data of the parallel computing task and the set number of each communication computing core. It can dynamically determine the optimal number of computing cores used for communication, thereby allocating corresponding communication computing cores to the parallel computing task. By using the communication engine and communication computing cores for communication simultaneously, the total execution time of the parallel computing task is minimized. This solves the defect that static resource allocation strategies cannot adapt to different task loads and improves the execution efficiency of the parallel computing task.

[0065] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.

[0066] In some embodiments, setting the quantity includes increasing sequentially from an initial quantity to a maximum quantity. Before step 120, the method further includes:

[0067] The maximum number of communication bandwidth is determined based on multi-card clusters, communication engines, and communication computing cores.

[0068] Step 120 includes:

[0069] The initial quantity is used as the current set quantity, and the quantity is increased sequentially to the maximum quantity. The increased quantity is then used as the new current set quantity.

[0070] For each currently set quantity, perform the following steps:

[0071] Based on the amount of computational data, the amount of communication data, and the current set number of communication computing cores, determine the total time taken for a multi-card cluster to execute parallel computing tasks, including the currently set number of communication computing cores.

[0072] Specifically, the communication bandwidth of the multi-card cluster, the communication bandwidth of the communication engine, and the communication bandwidth of the communication computing core are obtained. The maximum number of communication computing cores that can be configured is calculated by the ratio of the difference between the communication bandwidth of the multi-card cluster and the communication bandwidth of the communication engine to the communication bandwidth of the communication computing core.

[0073] For example, the total hardware communication link bandwidth of a multi-GPU cluster is 300 gigabytes per second (GB / s). The communication engine provides 100 GB / s of bandwidth, and each computing core, acting as a communication computing core, provides 25 GB / s. To reach the hardware link limit, the additional bandwidth required through the communication computing cores is 300 GB / s - 100 GB / s = 200 GB / s. Therefore, the maximum number is 200 GB / s / 25 GB / s = 8.

[0074] Adding more communication computing cores is meaningless when the current set number is greater than or equal to the maximum number. Therefore, this embodiment sets the loop termination condition to the current set number being greater than or equal to the maximum set number. After obtaining the computational and communication data volume of the parallel computing task, the number of communication computing cores used is looped from the initial set number to the maximum number. For different current set numbers of communication computing cores, the computation time and communication time are calculated to obtain the total time. The set number of communication computing cores corresponding to the minimum total time is saved. The initial number can be set to 0 or adjusted according to the actual situation.

[0075] The communication resource allocation method provided in this application ensures that the globally optimal communication computing core allocation scheme can be found within a reasonable range by traversing all the set quantities, thereby maximizing the parallel computing efficiency.

[0076] In some embodiments, step 120 includes:

[0077] In the case that the multi-card cluster includes any set number of communication computing cores, the number of computing cores other than communication computing cores in the multi-card cluster is determined based on any set number;

[0078] Based on the amount of data to be computed, the number of computing cores, and the computing power of the computing cores, the computation time for a multi-GPU cluster to execute parallel computing tasks is determined.

[0079] Based on the amount of communication data, the communication bandwidth of the communication engine, and the communication bandwidth of any set number of communication computing cores, determine the communication time for a multi-card cluster to execute parallel computing tasks.

[0080] The total time required for a multi-card cluster to execute parallel computing tasks is determined based on computation time and communication time.

[0081] Specifically, computation time is the time required to complete the computation subtask, and communication time is the time required to complete the communication subtask.

[0082] Computation time = Computation data volume / ((Total number of computing cores in a multi-GPU cluster - N) × Computing power of a single computing core).

[0083] Communication time = Communication data volume / (Communication engine bandwidth + N × Communication bandwidth provided by a single communication computing core).

[0084] Total time = Max(communication time, computation time).

[0085] Where Max is the maximum, N is any set number, and the total number of computing cores in the multi-card cluster - N is the number of computing cores in the multi-card cluster excluding communication computing cores.

[0086] The communication resource allocation method provided in this application can obtain an accurate total time by calculating the communication time and the calculation time, thereby improving the accuracy of resource allocation.

[0087] In some embodiments, step 120 includes:

[0088] The initial quantity is used as the current set quantity. The quantity is increased sequentially, and the increased quantity is used as the new current set quantity, until the current set quantity is less than the maximum set quantity and the communication time of the parallel computing task is less than or equal to the computing time, or the total time corresponding to the current set quantity is greater than or equal to the total time corresponding to the previous set quantity.

[0089] For each currently set quantity, perform the following steps:

[0090] Based on the current set number of computation data volume, communication data volume, and communication computing cores, determine the communication time and computation time of a multi-card cluster executing parallel computing tasks, including the current set number of communication computing cores.

[0091] The total time is determined based on communication time and computation time.

[0092] Specifically, increasing the number of communication computing cores reduces communication time but increases computation time. Once the communication time becomes less than or equal to the computation time, the total time will be determined by the computation time. Even if the current set number is less than the maximum set number, adding more communication computing cores will only increase the computation time, thus increasing the total time. Therefore, this embodiment sets the loop termination condition to be either the current set number being less than the maximum and the communication time being less than or equal to the computation time, or the total time corresponding to the current set number being greater than or equal to the total time corresponding to the previous set number. The total time corresponding to the previous set number is the total time calculated in the previous loop. For example, if the interval between set numbers is 1, then the current set number corresponds to 5, and the set number corresponding to the total time of the previous set number is 4. The interval between set numbers can also be set to other values ​​according to the actual situation.

[0093] Figure 5 This is a second flowchart illustrating the communication resource allocation method provided in the embodiments of this application, as shown below. Figure 5 As shown, the loop starts from the initial number of communication computing cores and ends if the termination condition is met, thus obtaining the minimum total time.

[0094] For example, the communication bandwidth of a multi-GPU cluster is 300 GB / s, the total number of computing cores in the cluster is 64, the communication engine's communication bandwidth is 100 GB / s, the communication bandwidth of each computing core is 25 GB / s, the computing power of a single computing core is 2 trillion floating-point operations per second (TFLOPS), and the maximum number of computed targets is 8. The communication data volume of the parallel computing task is 1500 GB, and the computation data volume of the parallel computing task is 1440 TFLOPS.

[0095] The cyclical evaluation process is as follows:

[0096] The current set quantity N=0: 0 is the initial set quantity. The communication time is 1500GB / (100GB / s) = 15.0s, the calculation time is 1440TFLOPS / ((64-0)×2TFLOPS) = 11.25s, and the total time is Max(15.0, 11.25) = 15.0s. At this point, the current set quantity 0 is less than the maximum quantity 8, and the communication time > the calculation time, so the loop continues. The total time corresponding to the current set quantity is 15.0s, which is recorded as the minimum total time, and the optimal N is 0.

[0097] Increase the current set quantity to obtain a new current set quantity of 1, where N=1: Communication time = 1500GB / (100+1×25)GB / s = 12.0s, Calculation time = 1440TFLOPS / ((64-1)×2TFLOPS) = 11.43s, Total time = Max(12.0, 11.43) = 12.0s. At this point, the current set quantity 1 is less than the maximum quantity 8, and the communication time > the calculation time, so the loop continues. The total time corresponding to the current set quantity 1, 12.0s, is less than the total time corresponding to the previous set quantity 0, 15.0s. Update the minimum total time to 12.0s, and the optimal N is 1.

[0098] Increment the current set quantity to obtain a new current set quantity of 2, where N=2: Communication time = 1500GB / (100+2×25)GB / s = 10.0s, Calculation time = 1440TFLOPS / ((64-2)×2TFLOPS) = 11.61s, Total time = Max(10.0, 11.61) = 11.61s. At this point, the current set quantity 2 is less than the maximum quantity 8, and the communication time < calculation time, so the loop ends. The total time corresponding to the current set quantity 2, 11.61s, is less than the total time corresponding to the previous set quantity 1, 12.0s. Update the minimum total time to 11.61s, and the optimal N is 2.

[0099] Ultimately, the minimum total time was determined to be 2, which is the optimal setting. Two computing cores were allocated to the parallel computing task as communication computing cores for communication.

[0100] The communication resource allocation method provided in this application improves the efficiency of communication resource allocation by setting termination conditions.

[0101] In some embodiments, after step 130, the method further includes:

[0102] The communication subtask is a parallel computing task executed by the communication engine and a set number of communication computing cores with the minimum total time, and the computing subtask is a parallel computing task executed by computing cores other than the communication computing cores in a multi-card cluster.

[0103] Specifically, the communication engine's Application Programming Interface (API) receives the starting address and data of the data to be transmitted, and invokes communication hardware, such as DMA hardware, to perform data transfer. Simultaneously, the computing core assigned as the communication computing core runs the communication kernel, receives the corresponding data address and the data to be transmitted, and performs the data transfer. This enables the simultaneous use of the communication computing core and the communication engine to communicate and collaboratively complete communication subtasks. This breaks the limitation of related technologies that only use a computing core or only use the communication engine for communication at the same time.

[0104] The communication resource allocation method provided in this application embodiment enables the parallel utilization of various hardware resources, further improving the effective bandwidth of data transmission and the parallel computing efficiency.

[0105] The communication resource allocation apparatus provided in the embodiments of this application is described below. The communication resource allocation apparatus described below can be referred to in correspondence with the communication resource allocation method described above.

[0106] Figure 6 This is a schematic diagram of the communication resource allocation device provided in the embodiments of this application, as shown below. Figure 6 As shown, the device is applied to a multi-GPU cluster, which includes a communication engine and computing cores. Some computing cores serve as communication computing cores and work together with the communication engine for communication in parallel computing tasks. The device includes an acquisition module 610, a determination module 620, and an allocation module 630.

[0107] The acquisition module 610 is used to acquire the amount of computational data and communication data of the parallel computing task to be processed;

[0108] The determination module 620 is used to determine the total time taken for a multi-card cluster to perform parallel computing tasks when including each or a portion of the set number of communication computing cores, based on the amount of computing data, the amount of communication data, and each set number of communication computing cores.

[0109] The allocation module 630 is used to allocate communication computing cores to the parallel computing task based on the set number that minimizes the total time consumption.

[0110] The set quantity is determined based on the communication bandwidth of the multi-card cluster.

[0111] Specifically, according to the embodiments of this application, any multiple modules among the acquisition module 610, determination module 620 and allocation module 630 can be combined into one module, or any one of them can be split into multiple modules.

[0112] Alternatively, at least some of the functionality of one or more of these modules can be combined with at least some of the functionality of other modules and implemented in a single module.

[0113] According to embodiments of this application, at least one of the acquisition module 610, the determination module 620, and the allocation module 630 can be at least partially implemented as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-a-Chip, a System-on-a-Substrate, a System-on-a-Package, an Application Specific Integrated Circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in hardware or firmware, or in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of them.

[0114] Alternatively, at least one of the acquisition module 610, the determination module 620, and the allocation module 630 may be implemented at least partially as a computer program module that can perform corresponding functions when the computer program module is run.

[0115] The communication resource allocation device provided in this application determines the total time spent by a multi-card cluster executing a parallel computing task when including each or a portion of the set number of communication computing cores by considering the amount of computational data and communication data of the parallel computing task. It can dynamically determine the optimal number of computing cores used for communication, thereby allocating corresponding communication computing cores to the parallel computing task. By using the communication engine and communication computing cores for communication simultaneously, the total time spent by the parallel computing task is minimized. This solves the defect that static resource allocation strategies cannot adapt to different task loads and improves the execution efficiency of the parallel computing task.

[0116] In some embodiments, setting the quantity includes sequentially increasing from an initial quantity to a maximum quantity. The device further includes a setting module, which is specifically used for:

[0117] The maximum number of communication bandwidth is determined based on multi-card clusters, communication engines, and communication computing cores.

[0118] In some embodiments, the determining module 620 is specifically used for:

[0119] The initial quantity is used as the current set quantity, and the quantity is increased sequentially to the maximum quantity. The increased quantity is then used as the new current set quantity.

[0120] For each currently set quantity, perform the following steps:

[0121] Based on the amount of computational data, the amount of communication data, and the current set number of communication computing cores, determine the total time taken for a multi-card cluster to execute parallel computing tasks, including the currently set number of communication computing cores.

[0122] In some embodiments, the determining module 620 is specifically used for:

[0123] The initial quantity is used as the current set quantity. The quantity is increased sequentially, and the increased quantity is used as the new current set quantity, until the current set quantity is less than the maximum set quantity and the communication time of the parallel computing task is less than or equal to the computing time, or the total time corresponding to the current set quantity is greater than or equal to the total time corresponding to the previous set quantity.

[0124] For each currently set quantity, perform the following steps:

[0125] Based on the current set number of computation data volume, communication data volume, and communication computing cores, determine the communication time and computation time of a multi-card cluster executing parallel computing tasks, including the current set number of communication computing cores.

[0126] The total time is determined based on communication time and computation time.

[0127] In some embodiments, the determining module 620 is specifically used for:

[0128] In the case that the multi-card cluster includes any set number of communication computing cores, the number of computing cores other than communication computing cores in the multi-card cluster is determined based on any set number;

[0129] Based on the amount of data to be computed, the number of computing cores, and the computing power of the computing cores, the computation time for a multi-GPU cluster to execute parallel computing tasks is determined.

[0130] Based on the amount of communication data, the communication bandwidth of the communication engine, and the communication bandwidth of any set number of communication computing cores, determine the communication time for a multi-card cluster to execute parallel computing tasks.

[0131] The total time required for a multi-card cluster to execute parallel computing tasks is determined based on computation time and communication time.

[0132] In some embodiments, the apparatus further includes an execution module, which is specifically used for:

[0133] The communication subtask is a parallel computing task executed by the communication engine and a set number of communication computing cores with the minimum total time, and the computing subtask is a parallel computing task executed by computing cores other than the communication computing cores in a multi-card cluster.

[0134] It should be noted that the communication resource allocation device provided in this application embodiment can implement all the method steps implemented in the above communication resource allocation method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0135] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 can call a computer program stored in the memory 730 to execute the above-described methods, such as including:

[0136] Obtain the amount of computational data and communication data for the parallel computing task to be processed;

[0137] Based on the amount of computational data, the amount of communication data, and the set number of each communication computing core, determine the total time taken for a multi-card cluster to perform parallel computing tasks when including each or a portion of the set number of communication computing cores;

[0138] The number of communication computing cores is allocated to the parallel computing task based on the minimum total time consumption.

[0139] The set quantity is determined based on the communication bandwidth of the multi-card cluster.

[0140] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional modules and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or part 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 of the various embodiments of this application. 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.

[0141] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the methods provided in the above embodiments.

[0142] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing the processor to execute the methods provided in the above embodiments.

[0143] Processor-readable storage media can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory, optical memory, and semiconductor memory.

[0144] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for allocating communication resources, characterized in that, Applied to multi-GPU clusters, the multi-GPU cluster includes a communication engine and computing cores, some of the computing cores serving as communication computing cores and working together with the communication engine for communication in parallel computing tasks. The method includes: Obtain the amount of computational data and communication data for the parallel computing task to be processed; Based on the amount of computational data, the amount of communication data, and the set number of each of the communication computing cores, determine the total time consumed by the multi-card cluster to execute the parallel computing task when including each or part of the set number of the communication computing cores; The communication computing cores are allocated to the parallel computing task based on the minimum set number of total time consumption. The set quantity is determined based on the communication bandwidth of the multi-card cluster.

2. The communication resource allocation method according to claim 1, characterized in that, The set number includes a number that increases sequentially from an initial number to a maximum number. Before determining the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the set number of communication computing cores, the method further includes: The maximum number is determined based on the communication bandwidth of the multi-card cluster, the communication engine, and the communication computing core.

3. The communication resource allocation method according to claim 2, characterized in that, The determination of the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes: The initial quantity is used as the current set quantity, and the quantity is increased sequentially to the maximum quantity. The increased quantity is then used as the new current set quantity. For each of the currently set quantities, perform the following steps: Based on the amount of computational data, the amount of communication data, and the currently set number of communication computing cores, the total time consumed by the multi-card cluster to execute the parallel computing task is determined, including the currently set number of communication computing cores.

4. The communication resource allocation method according to claim 1, characterized in that, The determination of the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes: The initial quantity is used as the current set quantity, and the quantity is increased sequentially. The increased quantity is used as the new current set quantity, until the current set quantity is less than the maximum quantity among the set quantities and the communication time of the parallel computing task is less than or equal to the computing time, or the total time corresponding to the current set quantity is greater than or equal to the total time corresponding to the previous set quantity. For each of the currently set quantities, perform the following steps: Based on the amount of computational data, the amount of communication data, and the current set number of communication computing cores, the communication time and the computation time of the multi-card cluster executing the parallel computing task are determined when the current set number of communication computing cores are included. The total time is determined based on the communication time and the computation time.

5. The communication resource allocation method according to claim 1, characterized in that, The determination of the total time taken for the multi-card cluster to execute the parallel computing task when including each or a portion of the predetermined number of communication computing cores, based on the amount of computational data, the amount of communication data, and each predetermined number of communication computing cores, includes: When the multi-card cluster includes any set number of the communication computing cores, the number of computing cores other than the communication computing cores in the multi-card cluster is determined based on the set number. Based on the amount of computational data, the number of computational cores, and the computing power of the computational cores, the computation time for the multi-card cluster to execute the parallel computing task is determined. Based on the amount of communication data, the communication bandwidth of the communication engine, and the communication bandwidth of any set number of communication computing cores, the communication time for the multi-card cluster to execute the parallel computing task is determined. The total time required for the multi-card cluster to execute the parallel computing task is determined based on the computation time and the communication time.

6. The communication resource allocation method according to claim 1, characterized in that, After allocating the communication computing cores to the parallel computing task based on the minimum set number of total time consumption, the method further includes: The communication subtasks of the parallel computing task are jointly executed by the communication engine and the set number of communication computing cores with the minimum total time, and the computing subtasks of the parallel computing task are executed by the computing cores other than the communication computing cores in the multi-card cluster.

7. A communication resource allocation device, characterized in that, An apparatus for use in multi-GPU clusters, wherein the multi-GPU cluster includes a communication engine and computing cores, and some of the computing cores serve as communication computing cores in conjunction with the communication engine for communication in parallel computing tasks, the apparatus comprising: The acquisition module is used to acquire the amount of computational data and communication data of the parallel computing task to be processed; A determining module is used to determine the total time taken for the multi-card cluster to execute the parallel computing task when including each or part of the predetermined number of the communication computing cores, based on the amount of computing data, the amount of communication data, and each predetermined number of the communication computing cores; The allocation module is used to allocate the communication computing cores to the parallel computing task based on the set number that minimizes the total time consumption. The set quantity is determined based on the communication bandwidth of the multi-card cluster.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the communication resource allocation method according to any one of claims 1 to 6 through the computer program.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the communication resource allocation method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the communication resource allocation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Parameter configuration method and device, equipment and storage medium

    CN114327888A

  • Artificial intelligence large model training method in heterogeneous multi-machine multi-card environment

    CN120909794A