Calculation task scheduling method, electronic equipment, storage medium and product
By decomposing the input matrix into submatrix and dynamically adjusting the task allocation, the problem of unbalanced load of computing nodes in the traditional matrix multiplication algorithm is solved, and efficient parallelization of computing tasks and load balancing is achieved.
Patent Information
- Application Number
- CN202411800169.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-15
AI Technical Summary
When traditional matrix multiplication algorithms deal with large-scale matrices, they cause unbalanced load of computing nodes, some nodes are overloaded while other nodes are idle, reducing overall computing efficiency.
By decomposing the input matrix into multiple smaller submatrixes and assigning these submatrix multiplication tasks to each computing node for execution, the running status of the computing nodes is monitored and optimized in real time to adjust task allocation.
The parallel processing of computing tasks and dynamic load balancing are realized, overloading and idleness of computing nodes are avoided, and the calculation efficiency of matrix multiplication is significantly improved.
Smart Images

Figure CN119829898A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer architecture optimization, and in particular to a computing task scheduling method, system, electronic device, storage medium and computer program product. Background Art
[0002] Matrix multiplication is the core computing operation in deep learning model training, scientific simulation and large-scale data processing, especially in the forward propagation, back propagation and parameter update of neural networks. When traditional computing methods process large-scale matrices, the distribution of matrix decomposition tasks is often unbalanced, which may cause some computing nodes to be overloaded while other nodes are idle, reducing the overall computing efficiency. As the matrix scale and the number of nodes increase, the complexity of task scheduling increases exponentially. Traditional static scheduling methods are difficult to dynamically respond to load changes, further affecting the matrix calculation efficiency. Therefore, there is a problem of low computational efficiency in the current matrix multiplication algorithm. Summary of the invention
[0003] The main purpose of this application is to provide a computing task scheduling method, system, electronic device, storage medium and computer program product, aiming to solve the technical problem of how to improve the computational efficiency of matrix multiplication algorithms.
[0004] To achieve the above object, the present application proposes a computing task scheduling method, which is applied to a computing task scheduling system. The computing task scheduling system includes computing nodes. The computing task scheduling method includes:
[0005] Allocating each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task;
[0006] For any one of the computing nodes, monitoring the running state of the computing node, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the running state;
[0007] The task calculation result of the computing task is determined by the sub-calculation results of each target sub-matrix multiplication task in each computing node.
[0008] In one embodiment, the input matrix includes a first input matrix and a second input matrix, the computing task is a multiplication task of the first input matrix and the second input matrix, and before the step of allocating each sub-matrix multiplication task to each computing node for execution, the step further includes:
[0009] Decomposing the first input matrix and the second input matrix into first sub-matrices and second sub-matrices;
[0010] For any one of the first sub-matrices and any one of the second sub-matrices, a product combination of the first sub-matrix and the second sub-matrix is recorded as a sub-matrix multiplication task.
[0011] In one embodiment, the step of monitoring the operating state of the computing node and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the operating state comprises:
[0012] Monitoring the operating status of the computing node according to a preset period, wherein the operating status includes the task queue length and the computing load;
[0013] When the task queue length exceeds a preset queue length upper limit, searching for idle nodes in each computing node whose computing load does not exceed a preset computing load threshold;
[0014] When the task queue length of the idle node does not exceed the preset queue length lower limit, the sub-matrix multiplication task on the computing node is migrated to the idle node.
[0015] In one embodiment, the computing task scheduling system includes various intermediate aggregation layers, the intermediate aggregation layer closest to the computing nodes in the intermediate aggregation layers is the bottom layer, the intermediate aggregation layer farthest from the computing nodes in the intermediate aggregation layers is the final layer, the intermediate aggregation layer includes various intermediate nodes, and the step of determining the task calculation result of the computing task by the sub-calculation results of each target sub-matrix multiplication task in each computing node includes:
[0016] For any one of the sub-computation results, detecting the network delay between the target computing node of the sub-computation result and each intermediate node in the bottom layer, searching for an intermediate node with the lowest network delay among the intermediate nodes, and sending the sub-computation result to the intermediate node;
[0017] Aggregating the sub-computation results of each target sub-matrix multiplication task in each computing node received through the intermediate node at the bottom layer to generate an aggregated result;
[0018] The aggregation result is sent to the upper intermediate aggregation layer, the aggregation results are merged, and based on the merged aggregation result, the steps of sending the aggregation result to the upper intermediate aggregation layer and merging the aggregation results are returned to execute, until the aggregation results of each layer are merged at the final layer, and the task calculation result is generated.
[0019] In one embodiment, the computing task scheduling method further includes:
[0020] Detecting the shortest path from the computing node to other computing nodes in the computing task scheduling system, and storing the shortest path in a transmission matrix;
[0021] When the computing node exchanges data with a target node to be exchanged with data, the shortest path from the computing node to the target node is retrieved in the transmission matrix, and data exchange is performed according to the shortest path.
[0022] In one embodiment, the step of allocating each sub-matrix multiplication task to each computing node for execution includes:
[0023] Collecting performance indicators of each computing node, and calculating a performance score of the computing node according to the performance indicators;
[0024] When the performance score is higher than a preset score threshold, allocating a computationally intensive task to the computing node, wherein the computationally intensive task includes a sub-matrix multiplication task;
[0025] When the performance score is lower than a preset score threshold, a data handling task is assigned to the computing node, wherein the data handling task includes an input matrix decomposition task, a sub-computation result aggregation task, and a data exchange task between a computing node and a target node.
[0026] In one embodiment, the running state further includes bandwidth occupancy, the computing load corresponds to a load adjustment coefficient, the bandwidth occupancy corresponds to a bandwidth adjustment coefficient, and the computing task scheduling method further includes:
[0027] Obtaining a load weight of the computing node through the computing load, the bandwidth occupancy, the load adjustment coefficient and the bandwidth adjustment coefficient;
[0028] When the load weight of the computing node is higher than a preset load weight threshold, if the computing node is performing a computing-intensive task, reducing the bandwidth adjustment coefficient;
[0029] When the load weight of the computing node is higher than a preset load weight threshold, if the computing node performs a data handling task, the load adjustment coefficient is reduced.
[0030] In addition, to achieve the above purpose, the present application also proposes a computing task scheduling system, wherein the computing task scheduling system includes computing nodes, and the computing task scheduling system includes:
[0031] An allocation module, used for allocating each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task;
[0032] A monitoring module, configured to monitor the operating state of any one of the computing nodes, and optimize the allocation of each target sub-matrix multiplication task executed in the computing node according to the operating state;
[0033] The aggregation module is used to determine the task calculation result of the computing task through the sub-calculation results of each target sub-matrix multiplication task in each computing node.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the computing task scheduling method described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the computing task scheduling method described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the computing task scheduling method described above are implemented.
[0037] The present application provides a computing task scheduling method, which is applied to a computing task scheduling system. The computing task scheduling system includes computing nodes. The computing task scheduling method includes: allocating each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task; for any one of the computing nodes, monitoring the operating status of the computing node, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the operating status; and determining the task calculation result of the computing task through the sub-calculation results of each target sub-matrix multiplication task in each computing node.
[0038] This application decomposes the input matrix in the original matrix multiplication task to obtain multiple smaller sub-matrix multiplication tasks, and distributes these sub-matrix multiplication tasks to various computing nodes in the system for execution. Due to the independence between computing nodes, it is possible to achieve parallel processing of computing tasks, thereby significantly improving computing efficiency. By real-time monitoring and optimizing task allocation, dynamic load balancing is achieved, and overload and idle problems of computing nodes are avoided. Compared with related solutions that improve static task allocation and directly perform matrix multiplication, this application monitors the operating status of computing nodes in real time and optimizes task allocation through matrix decomposition and task allocation. By dividing a large computing task into multiple small sub-tasks for execution, parallel processing of computing tasks and parallel aggregation of computing results are achieved, overload and idle problems of computing nodes are avoided, and the computing efficiency of matrix multiplication is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flowchart of the first embodiment of the method for scheduling computing tasks in this application is provided;
[0042] Figure 2 A flowchart of the second embodiment of the method for scheduling computing tasks in this application is provided;
[0043] Figure 3 A flowchart of the third embodiment of the method for scheduling computing tasks in this application is provided;
[0044] Figure 4 This is a schematic diagram of the module structure of the computing task scheduling device according to an embodiment of the present application;
[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the computing task scheduling method in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The embodiment of the present application is applied to a computing task scheduling system, which includes computing nodes. The main solution is: assigning each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task; for any one of the computing nodes, monitoring the operating status of the computing node, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the operating status; and determining the task calculation result of the computing task through the sub-calculation results of each target sub-matrix multiplication task in each computing node.
[0050] In this embodiment, for ease of description, the following description is made by taking the matrix multiplication task scheduling system as the execution subject.
[0051] Matrix multiplication is crucial in deep learning model training, scientific simulation and large-scale data processing, especially in the forward and back propagation and parameter update of neural networks. However, traditional computing methods face multiple challenges when processing large-scale matrices: uneven load distribution between computing nodes leads to reduced computing efficiency; matrix calculation results need to be exchanged frequently, and data transmission will cause computing bottlenecks; due to the lack of dynamic adaptation of resources, the utilization rate of heterogeneous hardware resources (such as GPU, CPU, etc.) is low; and as the matrix size and the number of nodes increase, the complexity of task scheduling increases dramatically, and static scheduling methods are difficult to cope with dynamic load changes, further affecting the efficiency of matrix calculations.
[0052] The present application provides a solution that monitors the operating status of computing nodes in real time and optimizes task scheduling through matrix decomposition and dynamic task allocation, and uses intermediate nodes to achieve parallel aggregation of computing results, effectively avoiding overload and idleness of computing nodes, ensuring parallel processing of computing tasks, and significantly improving the computational efficiency of matrix multiplication.
[0053] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a matrix multiplication task scheduling system, etc. The following takes the matrix multiplication task scheduling system as an example to illustrate this embodiment and the following embodiments.
[0054] Based on this, the present application embodiment provides a computing task scheduling method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the computing task scheduling method of the present application.
[0055] In this embodiment, the computing task scheduling system is applied, the computing task scheduling system includes various computing nodes, and the computing task scheduling method includes steps S01 to S03:
[0056] Step S01, allocating each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task;
[0057] It should be noted that the matrix multiplication task scheduling system is used to decompose the computing task into multiple subtasks and assign these subtasks to different computing nodes for parallel processing. In the matrix multiplication task scheduling system, the large computing task needs to be decomposed first. The computing task refers to the task that needs to be calculated and completed, including the multiplication operation of two or more large input matrices. The input matrix refers to the original data involved in the matrix multiplication task, that is, the matrix that needs to be multiplied. After decomposition, multiple smaller sub-matrix multiplication tasks are obtained. The sub-matrix multiplication task refers to the smaller-scale computing task decomposed from the computing task. These tasks are then assigned to each computing node in the system and executed in parallel by each computing node. The computing node refers to the basic computing unit in the system, which is responsible for executing the assigned sub-matrix multiplication task. Each computing node is responsible for executing one or more sub-matrix multiplication tasks.
[0058] In addition, it should be noted that the system defines a task allocation matrix, which is used to record the task allocation information of each subtask, including the submatrix block number of the subtask, the number of the computing node to which it is assigned, etc. Before allocation, the future load of each subtask is predicted based on a pre-designed prediction model. The prediction model is trained based on the load data of each historical subtask generated in the historical computing tasks, and can learn the complex patterns and relationships in the load data. When allocating subtasks, by evaluating the performance of each computing node in the system (such as computing power, memory size, etc.) and the node load status, each submatrix is matched with a computing node that can meet the computing resource requirements, and the computing node index to which each subtask is assigned is updated to the task allocation matrix. When the subtask allocation strategy changes, the task allocation matrix is dynamically adjusted to ensure the consistency of the allocation information.
[0059] It is understandable that, since traditional matrix multiplication algorithms often use direct, undecomposed methods to perform calculations when processing large-scale matrices, resulting in low computational efficiency, step S01 is performed to achieve parallelization of computing tasks through matrix decomposition and task allocation, thereby reducing the computational burden of a single computing node and improving overall computing efficiency.
[0060] Step S02, for any one of the computing nodes, monitoring the running state of the computing node, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the running state;
[0061] It should be noted that in the process of executing the sub-matrix multiplication task, the system will monitor the operating status of each computing node in real time, including key performance indicators such as the current task queue length, computing load, and data transmission bandwidth. Based on these operating status information, the system will dynamically adjust and optimize the allocation of target sub-matrix multiplication tasks executed in each computing node to ensure the effective use of computing resources and load balancing.
[0062] It is understandable that in traditional matrix multiplication algorithms, the distribution of matrix decomposition tasks is often unbalanced, which may cause some computing nodes to be overloaded while other nodes are idle, reducing the overall computing efficiency. Therefore, step S02 is performed to dynamically optimize the distribution of sub-matrix multiplication tasks executed in each computing node by real-time monitoring of the operating status of each computing node to achieve load balancing.
[0063] Step S03, determining the task calculation result of the calculation task through the sub-calculation results of each target sub-matrix multiplication task in each calculation node.
[0064] It should be noted that after completing each sub-matrix multiplication task, the sub-computation results of these tasks are aggregated through the intermediate node. The intermediate node refers to a node in a distributed computing system that is used to receive, process and forward data. It is responsible for aggregating the calculation results of sub-matrix multiplication tasks from different computing nodes. The sub-computation result refers to the partial product result obtained after the computing node executes the sub-matrix multiplication task. The intermediate node obtains the aggregated result by aggregating these calculation results. The aggregated result refers to the intermediate data obtained after the intermediate node summarizes the calculation results from different computing nodes. These aggregated results are further aggregated through the upper intermediate node to finally output the complete product matrix. The product matrix refers to the final matrix multiplication result obtained after all sub-matrix multiplication tasks are calculated and aggregated.
[0065] It is understandable that in the traditional matrix multiplication algorithm, it is necessary to wait until all computing nodes complete their tasks before aggregation can be performed, so step S03 is performed. By introducing intermediate nodes and parallel aggregation mechanisms, efficient aggregation and output of calculation results are achieved, which significantly reduces communication overhead and data transmission bandwidth occupancy, thereby improving computing efficiency.
[0066] In a feasible implementation manner, in step S01, the input matrix includes a first input matrix and a second input matrix, the computing task is a multiplication task of the first input matrix and the second input matrix, and before the step of allocating each sub-matrix multiplication task to each computing node for execution, steps A01 to A02 are also included:
[0067] Step A01, decomposing a first input matrix and a second input matrix into first sub-matrices and second sub-matrices;
[0068] It should be noted that the system decomposes the two input matrices in the matrix multiplication task: the first input matrix and the second input matrix, and splits the large matrix into multiple smaller sub-matrices for parallel processing on multiple computing nodes. Specifically, the first input matrix is decomposed into multiple first sub-matrices with the same dimensional size, and the second input matrix is decomposed into multiple second sub-matrices with the same dimensional size. The dimensional size refers to the number of rows and columns of the sub-matrix. In order to ensure the consistency of the sub-matrix multiplication tasks, the dimensional size of all first sub-matrices must be the same, and the dimensional size of all second sub-matrices must also be the same.
[0069] For example, suppose there are two input matrices A (with dimension m×n) and B (with dimension n×p), decompose matrix A into q×r blocks, each with dimension m / q×n / r, and decompose matrix B into r×s blocks, each with dimension n / r×p / s. The dimensions are the same, which can ensure that the computational amount of sub-matrices allocated to different computing nodes is relatively balanced, thereby making the task computation time of each node close.
[0070] Step A02: for any one of the first sub-matrices and any one of the second sub-matrices, record the product combination of the first sub-matrix and the second sub-matrix as a sub-matrix multiplication task.
[0071] It should be noted that for each first sub-matrix A_i and each second sub-matrix B_j, they are multiplied and the results are combined into a sub-matrix multiplication task, which can be expressed as calculating C_ij=A_i*B_j, where C_ij is a sub-matrix block of the product matrix C.
[0072] Exemplarily, assume there is a 4x4 first input matrix A and a 4x4 second input matrix B, and decompose them into 2x2 sub-matrix blocks respectively. In this way, A is decomposed into 4 2x2 first sub-matrices (A_1, A_2, A_3, A_4), and B is decomposed into 4 2x2 second sub-matrices (B_1, B_2, B_3, B_4). These sub-matrices are multiplied to obtain 4 2x2 product sub-matrices (C_11, C_12, C_21, C_22). These sub-matrices are combined to form the final product matrix C.
[0073] In this implementation, by decomposing the matrix and combining it into sub-matrix multiplication tasks of smaller dimensions, the system can allocate computing resources more flexibly and efficiently, avoid overloading of a single computing node, and achieve load balancing of computing tasks. At the same time, since each sub-matrix multiplication task is independent, it can take advantage of parallel computing to further improve the computational efficiency of matrix multiplication.
[0074] In a feasible implementation, in step S02, the operation status of the computing node is monitored, and the step of optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the operation status includes steps A11 to A13:
[0075] Step A11, monitoring the operating status of the computing node according to a preset period, wherein the operating status includes the task queue length and computing load;
[0076] It should be noted that the system automatically triggers the monitoring mechanism according to a preset period (for example, every minute). The preset period is a fixed time interval set by the system to periodically perform monitoring tasks to ensure that the system can continuously and stably obtain the operating status information of each node. The monitoring mechanism collects the operating status of each computing node, including the task queue length and computing load information, which is used to determine the working status of the computing node at the current moment. This information will be stored in the system database for subsequent analysis and processing.
[0077] Step A12, when the task queue length exceeds the preset queue length upper limit, searching for idle nodes in each computing node whose computing load does not exceed the preset computing load threshold;
[0078] It should be noted that the task queue length refers to the number of tasks waiting to be executed on the current computing node. The computing load reflects the current computing resource usage of the computing node, such as CPU usage, memory usage, etc. The preset queue length upper limit is an upper limit value of the task queue length set by the system, which is used to determine whether the node is overloaded. The preset computing load threshold is the upper limit value of the computing load set by the system, which is used to determine whether the computing load of the computing node is too high. Idle nodes refer to nodes whose current computing load does not exceed the preset computing load threshold, and they have sufficient computing resources to receive new tasks.
[0079] In addition, it should be noted that the system checks the task queue length of the computing node. If the task queue length of the computing node exceeds the preset queue length upper limit (for example, 100), the system will consider the computing node to be overloaded, obtain the operating status of all computing nodes, and retrieve nodes whose computing load does not exceed the preset computing load threshold (for example, CPU utilization is less than 80%). These nodes are considered to be idle nodes.
[0080] Step A13: When the task queue length of the idle node does not exceed the preset queue length lower limit, the sub-matrix multiplication task on the computing node is migrated to the idle node.
[0081] It should be noted that all idle nodes found are traversed, and for each idle node, the task queue length is checked. If the task queue length of the idle node does not exceed the preset queue length lower limit (for example, not exceeding 50), the system will perform a task migration operation to transfer the data of the sub-matrix multiplication task from the overloaded node to the idle node, and restart these tasks on the idle node. The preset queue length lower limit is a lower limit value of the task queue length set by the system, which is used to determine whether the node is idle.
[0082] In this implementation, through regular monitoring, the system can understand the load status of each node in real time, so as to promptly discover potential overloaded or idle nodes. By setting a preset queue length upper limit and a preset computing load threshold, the system can accurately identify overloaded nodes and idle nodes, providing a basis for task migration. Through task migration, the system can balance the load of each node, avoid task accumulation and delay on overloaded nodes, and make full use of the computing resources of idle nodes, thereby improving the overall computing efficiency of the system.
[0083] In a feasible implementation, in step S03, the computing task scheduling system includes various intermediate aggregation layers, the intermediate aggregation layer closest to each computing node in the intermediate aggregation layer is the bottom layer, the intermediate aggregation layer farthest from each computing node in the intermediate aggregation layer is the final layer, the intermediate aggregation layer includes various intermediate nodes, and the step of determining the task calculation result of the computing task through the sub-calculation result of each target sub-matrix multiplication task in each computing node includes steps A21 to A23:
[0084] Step A21, for any one of the sub-computation results, detecting the network delay between the target computing node that obtains the sub-computation result and each intermediate node in the bottom layer, searching for an intermediate node with the lowest network delay among the intermediate nodes, and sending the sub-computation result to the intermediate node;
[0085] It should be noted that the intermediate aggregation layer is a logical layer in the system, located between the computing nodes and the final result output, including the bottom layer and the final layer. The bottom layer refers to the intermediate aggregation layer closest to each computing node, which is responsible for receiving the sub-computation results from the computing nodes and performing preliminary aggregation. Since it is closest to the computing nodes, it can receive the sub-computation results the fastest and process them. The final layer refers to the intermediate aggregation layer farthest from each computing node, which is responsible for completing the merging of the aggregation results of all levels and generating the final task calculation results. Since it is located at the top of the entire multi-level aggregation structure, it can globally view all sub-computation results and perform global aggregation. Each intermediate aggregation layer contains multiple intermediate nodes, which are responsible for receiving the calculation results from the lower layer (computation nodes or lower intermediate aggregation layers) and aggregating these results. Through multi-layer aggregation, the system can gradually reduce the amount of data transmission and improve computing efficiency. The intermediate node is an entity in the intermediate aggregation layer, responsible for performing specific aggregation operations. Each intermediate node can receive data from multiple computing nodes or lower intermediate nodes, and aggregate these data according to specific rules. The aggregated results will be passed as input to the intermediate nodes of the upper layer or the final result output layer.
[0086] In addition, it should be noted that the system maintains a network delay table in advance, by generating multiple delay detection requests, the delay detection request contains the identifier of the computing node and the timestamp of the request, and sends these requests to each intermediate node in the bottom layer through the network. After each intermediate node receives the delay detection request, it will immediately return a response, which contains the identifier of the intermediate node and the timestamp of receiving the request. After the computing node receives the response, it calculates the network delay according to the timestamp of the request sending and the timestamp of the response receiving, and stores each network delay in the network delay table. When each sub-matrix multiplication task in the computing node is completed, find the intermediate node with the lowest network delay in the network delay table so that the calculation result can be efficiently transmitted to the node.
[0087] For example, if there are three intermediate nodes in the system, and the network delay between the computing node and node A is 10 milliseconds, the network delay with node B is 20 milliseconds, and the network delay with node C is 15 milliseconds, the system will select node A as the optimal intermediate node.
[0088] Step A22, aggregating the sub-computation results of each target sub-matrix multiplication task in each computing node received through the bottom intermediate node to generate an aggregated result;
[0089] It should be noted that the bottom-level intermediate node receives sub-computation results from multiple computing nodes, aggregates the received sub-computation results, and generates preliminary aggregated results. The aggregation process includes operations such as collating, aligning or merging the sub-computation results.
[0090] Step A23, sends the aggregation result to the upper intermediate aggregation layer, merges the aggregation results, and returns to execute the step of sending the aggregation result to the upper intermediate aggregation layer and merging the aggregation results based on the merged aggregation results, until the aggregation results of each layer are merged in the final layer, and the task calculation result is generated.
[0091] It should be noted that the system sends the aggregation results to the upper intermediate aggregation layer and merges these aggregation results. The aggregation of the aggregation results is performed layer by layer. Each layer will generate one or more aggregation results and pass them to the intermediate nodes of the upper layer. This step is repeated based on the merged aggregation results until all aggregation results are merged in the final layer. In the final layer, the system will merge all aggregation results into a complete product matrix, that is, the task calculation result. This step is the last step of the system output result and the end point of the entire calculation process.
[0092] Exemplarily, in the first intermediate aggregation layer, multiple intermediate nodes respectively receive calculation results from different computing nodes, aggregate these calculation results and pass them to the intermediate nodes of the second layer. The intermediate nodes of the second layer aggregate the aggregation results of the first layer and send them to the intermediate nodes of the third layer, and so on, until the final layer completes the merging of all aggregation results, indicating that the aggregation process is completed, and finally the product matrix is obtained.
[0093] In this embodiment, by selecting the intermediate node with the lowest network delay, the system can reduce the delay of data transmission. By sending the calculation results to the intermediate node, the system can offload the calculation task from the calculation node, thereby releasing the resources occupied by the current calculation task to process more sub-matrix multiplication tasks. Through the aggregation operation of the intermediate aggregation layer, the system can reduce the amount of data transmission, because only the aggregation result needs to be passed to the upper intermediate aggregation layer, rather than the calculation result of each sub-matrix, thereby reducing the network bandwidth occupancy. By merging the aggregation results layer by layer, the system can gradually construct the final product matrix. Since each merging operation reduces the amount of data to be processed, the storage requirements of the intermediate results are reduced, thereby improving the overall computing efficiency.
[0094] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 The computing task scheduling method further includes steps S11 to S12:
[0095] Step S11, detecting the shortest path from the computing node to other computing nodes in the computing task scheduling system, and storing the shortest path in a transmission matrix;
[0096] It should be noted that the computing task scheduling system initializes the transmission matrix to store the shortest path information between all pairs of computing nodes. This matrix can be regarded as a two-dimensional array, in which each element represents the path information between two computing nodes. A path detection algorithm (such as the Dijkstra algorithm, the Floyd-Warshall algorithm, etc.) is used to calculate the shortest path from each computing node to all other computing nodes. By traversing all nodes and edges in the network, the shortest path from the current computing node to the target node can be found. Once the calculation is completed, the system stores this shortest path information in the transmission matrix. Each element (or item of the matrix) contains detailed information about the shortest path from the current computing node to the target node, such as the path length, the intermediate nodes passed, etc.
[0097] Step S12, when the computing node exchanges data with the target node to be exchanged with data, the shortest path from the computing node to the target node is retrieved in the transmission matrix, and data is exchanged according to the shortest path.
[0098] It should be noted that after the computing node and the target node that needs to exchange data are determined, the system retrieves the shortest path between the two nodes in the transmission matrix, finds the corresponding element in the matrix, and reads the path information therein. Based on the retrieved shortest path information, the system establishes a data transmission link from the computing node to the target node. This includes configuring network equipment, setting routing rules and other steps to ensure that data can be efficiently transmitted along the shortest path. Once the data transmission link is established, the system starts the data exchange process and sends the data to be transmitted from the computing node to the target node, while ensuring the integrity and security of the data.
[0099] In this implementation, by calculating the shortest path, the system can find the optimal path for data transmission, thereby reducing communication delays. At the same time, due to the reduction in communication delays, the system can complete data exchange and calculation tasks more quickly, thereby improving the computational efficiency of the matrix multiplication algorithm.
[0100] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 3 In step S01, the step of allocating each sub-matrix multiplication task to each computing node for execution includes steps S21 to S23:
[0101] Step S21, collecting performance indicators of each computing node, and calculating the performance score of the computing node according to the performance indicators;
[0102] It should be noted that the performance indicators of each computing node in the system are obtained in real time through monitoring and collection tools. Performance indicators refer to various parameters that can reflect the processing capabilities of computing nodes, including computing power, memory bandwidth, power consumption, etc. For distributed computing tasks, computing power determines the computing resources that the node can provide when completing the task. For example, the computing power of GPU or NPU is usually high, which can accelerate deep learning tasks such as matrix calculation. In distributed matrix multiplication, a large amount of data needs to be transferred between nodes. The level of memory bandwidth directly affects the ability of nodes to process matrix data. Low bandwidth will cause bottlenecks in the data transmission process of nodes, thereby reducing overall performance. In high-performance computing, the size of power consumption is often proportional to computing power. However, higher power consumption may cause equipment overheating and low energy efficiency. Power consumption management is crucial for large-scale parallel computing systems. Excessive power consumption may limit the scalability and stability of the system. These indicators jointly determine the performance of computing nodes when performing different types of tasks. According to the collected performance indicators, the indicator score is calculated. The calculation formula for the indicator score is:
[0103] Perf node =f(Compute capability , Memory bandwidth ,Power usage )
[0104] Among them, Perf node Represents the performance of the computing node. capability Represents the computing power of the computing node, that is, the speed or processing power of the computing operations that the node can perform. This is directly related to the computing power of the node's CPU, GPU, NPU and other hardware. bandwidth Represents the memory bandwidth of the node, that is, the rate at which data is transferred between the memory and the processor. The higher the memory bandwidth, the faster the node can read and write data. usage Represents the power consumption of the node, usually in watts (W), which means the energy consumption required for the computing node to perform tasks. This function takes computing power, memory bandwidth, and power consumption as input, and outputs the performance score of the computing node. The specific form depends on the design of the node hardware and algorithm. It may be a weighted average, product model, or other complex mathematical model. The main goal is to evaluate the overall performance of the node by comprehensively considering these hardware characteristics.
[0105] Step S22, when the performance score is higher than a preset score threshold, allocating a computationally intensive task to a computing node, wherein the computationally intensive task includes a sub-matrix multiplication task;
[0106] It should be noted that the indicator score of each computing node is compared with the preset score threshold. For computing nodes with indicator scores higher than the preset score threshold, the system considers that they have good performance and sufficient resources to handle complex computing tasks. Therefore, these nodes will be assigned computationally intensive tasks. Computationally intensive tasks refer to computing tasks that require processing large amounts of data in matrix multiplication, including sub-matrix multiplication tasks. In distributed computing, data-intensive tasks usually need to be executed in parallel on multiple nodes, with each node processing a portion of the data. This requires that each node have sufficient memory and computing resources to process the data assigned to it.
[0107] Step S23, when the performance score is lower than the preset score threshold, assign data handling tasks to the computing nodes, wherein the data handling tasks include input matrix decomposition tasks, sub-computation result aggregation tasks, and data exchange tasks between computing nodes and target nodes.
[0108] It should be noted that, similar to step S22, the index score of each computing node is compared with the preset scoring threshold. For computing nodes whose index scores are lower than the preset scoring threshold, the system considers that their performance is poor or the current load is heavy and they are not suitable for processing computing-intensive tasks. Therefore, these nodes will be assigned data handling tasks. Data handling tasks refer to the process of moving data from one place to another in matrix multiplication, including input matrix decomposition tasks, sub-computation result aggregation tasks, and data exchange tasks between computing nodes and target nodes. Such tasks have low requirements for CPU computing resources, but have certain requirements for network bandwidth and disk I / O speed.
[0109] In addition, it should be noted that before assigning each sub-matrix multiplication task, it is first necessary to distinguish the task type. The system presets a task classifier, and trains the task classifier by extracting features such as resource usage and execution time during the execution of historical tasks. When a new task arrives, it makes a prediction based on its features to distinguish between computationally intensive tasks and data handling tasks. If the current task involves numerical calculations or computational tasks that require a lot of processing, such as neural network training and matrix calculations in deep learning, it indicates that the task type is a computationally intensive task. At this time, the computing nodes are more involved in complex mathematical operations, and the data flow is relatively small. If the current task mainly performs large-scale data transmission or storage operations, such as large-scale data synchronization, batch data loading, etc., it indicates that the task type is a data handling task. In these tasks, the calculation part is usually simple or does not involve complex calculations. After each classification task, the classification result is fed back to the preset task classifier to continuously improve the classification effect of the preset task classifier.
[0110] In this implementation, by collecting and calculating performance indicators, the system can accurately understand the actual performance of each computing node, providing a reliable basis for subsequent task allocation. By allocating computing-intensive tasks to high-performance nodes, it can ensure that these tasks are executed quickly and accurately, thereby improving the computing efficiency of the entire system. By allocating data-moving tasks to low-performance nodes, the allocation of system resources can be optimized and the overall resource utilization can be improved. At the same time, this also avoids the waste of resources of high-performance nodes when processing simple tasks.
[0111] In a feasible implementation manner, the running state further includes bandwidth occupancy, the computing load corresponds to a load adjustment coefficient, the bandwidth occupancy corresponds to a bandwidth adjustment coefficient, and the computing task scheduling method further includes steps B01 to B03:
[0112] Step B01, obtaining the load weight of the computing node by calculating the load, bandwidth occupancy, load adjustment coefficient and bandwidth adjustment coefficient;
[0113] It should be noted that bandwidth occupancy refers to the bandwidth resources occupied by computing nodes when transmitting data through the network when performing tasks. The load adjustment coefficient is used to adjust the contribution of computing load in the load weight of computing nodes. The bandwidth adjustment coefficient is used to adjust the contribution of bandwidth occupancy in the load weight of computing nodes. The load weight comprehensively reflects the real-time load status of computing nodes in terms of computing load and bandwidth occupancy.
[0114] In addition, it should be noted that the system evaluates the current state of each computing node by calculating its computing load and bandwidth occupancy. The computing load mainly reflects the computing pressure of the node when performing mathematical operations (such as matrix multiplication), while the bandwidth occupancy reflects the network pressure when data is transmitted between nodes. In order to comprehensively consider these two factors, the system introduces the load adjustment coefficient and the bandwidth adjustment coefficient as weight factors to adjust the contribution of the computing load and bandwidth occupancy in the computing node load weight. The calculation formula for the load weight is:
[0115] W i (t) = α·C i (t)+β·B i (t)
[0116] Among them, W i (t) represents the real-time load weight of computing node i, C i (t) is the computing load of computing node i, B i (t) is the bandwidth occupancy of computing node i, α is the load adjustment coefficient, and β is the bandwidth adjustment coefficient.
[0117] Step B02, when the load weight of the computing node is higher than a preset load weight threshold, if the computing node is performing a computing-intensive task, reducing the bandwidth adjustment coefficient;
[0118] It should be noted that the preset load weight threshold refers to the threshold set according to system performance and task requirements, which is used to determine whether the load of the computing node is too high and trigger the corresponding optimization strategy. When the load weight of the computing node is higher than the preset load weight threshold, if the computing node is performing computationally intensive tasks (such as large-scale matrix multiplication operations), the system will reduce the bandwidth adjustment coefficient. This is because the main bottleneck of computationally intensive tasks lies in computing resources (such as CPU, GPU), and the impact of network bandwidth occupancy on task performance is relatively small. By reducing the bandwidth adjustment coefficient, the system can reduce the contribution of bandwidth occupancy to the load weight of the computing node, thereby avoiding unnecessary network data transmission competition for computing resources and improving the execution efficiency of computationally intensive tasks.
[0119] Step B03, when the load weight of the computing node is higher than the preset load weight threshold, if the computing node is performing a data handling task, the load adjustment coefficient is reduced.
[0120] It should be noted that, similar to step B02, when the load weight of the computing node is higher than the preset load weight threshold, if the computing node is performing a data handling task (such as large-scale data synchronization or loading), the system will reduce the load adjustment coefficient. This is because the main bottleneck of data handling tasks lies in the data transmission speed and network bandwidth, and the occupation of computing resources has little impact on task performance. By reducing the load adjustment coefficient, the system can reduce the contribution of computing load to the computing node load weight, thereby optimizing the use of network bandwidth and improving the execution efficiency of data handling tasks.
[0121] In this implementation, by dynamically adjusting the load adjustment coefficient and the bandwidth adjustment coefficient, the system can flexibly respond to different types of task requirements based on the real-time load conditions of the computing nodes, improve the adaptability and scalability of the system, and reasonably allocate computing resources and network resources by dynamically adjusting the resource usage strategy, thereby avoiding unnecessary resource competition and waste and improving resource utilization.
[0122] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the computing task scheduling method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0123] The present application also provides a computing task scheduling system, which includes computing nodes. Figure 4 ,The computing task scheduling system includes:
[0124] An allocation module 10 is used to allocate each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task;
[0125] A monitoring module 20, for monitoring the running state of any one of the computing nodes, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the running state;
[0126] The aggregation module 30 is used to determine the task calculation result of the computing task through the sub-computation results of each target sub-matrix multiplication task in each computing node.
[0127] Optionally, the computing task scheduling device further includes a decomposition module 40, the input matrix includes a first input matrix and a second input matrix, the computing task is a multiplication task of the first input matrix and the second input matrix, and the decomposition module 40 is further used to:
[0128] Decomposing the first input matrix and the second input matrix into first sub-matrices and second sub-matrices;
[0129] For any one of the first sub-matrices and any one of the second sub-matrices, a product combination of the first sub-matrix and the second sub-matrix is recorded as a sub-matrix multiplication task.
[0130] Optionally, the monitoring module 20 is further used for:
[0131] Monitor the running status of the computing node according to a preset period, wherein the running status includes the task queue length and computing load;
[0132] When the task queue length exceeds the preset queue length upper limit, searching for idle nodes in each computing node whose computing load does not exceed the preset computing load threshold;
[0133] When the task queue length of the idle node does not exceed the preset queue length lower limit, the sub-matrix multiplication task on the computing node is migrated to the idle node.
[0134] Optionally, the computing task scheduling system includes various intermediate aggregation layers, wherein the intermediate aggregation layer closest to each computing node in the intermediate aggregation layer is the bottom layer, and the intermediate aggregation layer farthest from each computing node in the intermediate aggregation layer is the final layer, and the intermediate aggregation layer includes various intermediate nodes, and the aggregation module 30 is further used for:
[0135] For any of the sub-computation results, detect the network delay between the target computing node that obtains the sub-computation result and each intermediate node in the bottom layer, find the intermediate node with the lowest network delay among the intermediate nodes, and send the sub-computation result to the intermediate node;
[0136] Aggregate the sub-computation results of each target sub-matrix multiplication task in each computing node received through the lowest intermediate node to generate an aggregated result;
[0137] The aggregation results are sent to the upper intermediate aggregation layer, the aggregation results are merged, and based on the merged aggregation results, the steps of sending the aggregation results to the upper intermediate aggregation layer and merging the aggregation results are returned, until the aggregation results of each layer are merged in the final layer, and the task calculation results are generated.
[0138] Optionally, the computing task scheduling device further includes a transmission module 50, and the transmission module 50 is further used for:
[0139] Detect the shortest path from the computing node to other computing nodes in the computing task scheduling system, and store the shortest path in the transmission matrix;
[0140] When the computing node exchanges data with a target node to be exchanged with data, the shortest path from the computing node to the target node is retrieved in the transmission matrix, and data is exchanged according to the shortest path.
[0141] Optionally, the allocation module 10 is further used for:
[0142] Collect the performance indicators of each computing node, and calculate the performance score of the computing node based on the performance indicators;
[0143] When the performance score is higher than a preset score threshold, allocating a computationally intensive task to the computing node, wherein the computationally intensive task includes a sub-matrix multiplication task;
[0144] When the performance score is lower than the preset score threshold, data handling tasks are assigned to the computing nodes, where the data handling tasks include input matrix decomposition tasks, sub-computation result aggregation tasks, and data exchange tasks between computing nodes and target nodes.
[0145] Optionally, the computing task scheduling device further includes an adjustment module 60, the computing load corresponds to a load adjustment coefficient, the bandwidth occupancy corresponds to a bandwidth adjustment coefficient, and the adjustment module 60 is further used to:
[0146] The load weight of the computing node is obtained by calculating the load, bandwidth occupancy, load adjustment coefficient and bandwidth adjustment coefficient;
[0147] When the load weight of the computing node is higher than the preset load weight threshold, if the computing node is performing a computing-intensive task, the bandwidth adjustment factor is reduced;
[0148] When the load weight of the computing node is higher than the preset load weight threshold, if the computing node is performing a data handling task, the load adjustment coefficient is reduced.
[0149] The computing task scheduling device provided by the present application adopts the computing task scheduling method in the above embodiment, which can solve the technical problem of improving the computing efficiency of the matrix multiplication algorithm. Compared with the prior art, the beneficial effects of the computing task scheduling device provided by the present application are the same as the beneficial effects of the computing task scheduling method provided by the above embodiment, and other technical features in the computing task scheduling device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0150] The present application provides an electronic device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the computing task scheduling method in the above-mentioned embodiment 1.
[0151] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, PADs (Portable Application Description: tablet computers), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0152] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0153] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0154] The electronic device provided by the present application adopts the computing task scheduling method in the above embodiment to solve the technical problem of improving the computing efficiency of the matrix multiplication algorithm. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the computing task scheduling method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0155] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0156] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0157] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the computing task scheduling method in the above-mentioned embodiment.
[0158] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0159] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0160] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the computing task scheduling device is applied to a computing task scheduling system. The computing task scheduling system includes computing nodes, and each sub-matrix multiplication task can be assigned to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task; for any one of the computing nodes, the operating status of the computing node is monitored, and the allocation of each target sub-matrix multiplication task executed in the computing node is optimized according to the operating status; and the task calculation result of the computing task is determined through the sub-calculation results of each target sub-matrix multiplication task in each computing node.
[0161] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0162] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0163] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0164] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned computing task scheduling method, and can solve the technical problem of improving the computational efficiency of the matrix multiplication algorithm. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the computing task scheduling method provided by the above-mentioned embodiment, and will not be described in detail here.
[0165] The present application also provides a computer program product, including a computer program, which implements the steps of the computing task scheduling method as described above when the computer program is executed by a processor.
[0166] The computer program product provided by the present application can solve the technical problem of improving the computational efficiency of the matrix multiplication algorithm. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the computing task scheduling method provided by the above embodiment, which will not be repeated here.
[0167] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A computing task scheduling method, characterized in that: Applied to a computing scheduling system, the computing task scheduling system includes computing nodes, and the computing task scheduling method includes: Allocating each sub-matrix multiplication task to each computing node for execution, wherein each sub-matrix multiplication task is obtained by decomposing an input matrix in the computing task; For any one of the computing nodes, monitoring the running state of the computing node, and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the running state; The task calculation result of the computing task is determined by the sub-calculation results of each target sub-matrix multiplication task in each computing node.
2. The computing task scheduling method according to claim 1, characterized in that: The input matrix includes a first input matrix and a second input matrix, the computing task is a multiplication task of the first input matrix and the second input matrix, and before the step of allocating each sub-matrix multiplication task to each computing node for execution, the step also includes: Decomposing the first input matrix and the second input matrix into first sub-matrices and second sub-matrices; For any one of the first sub-matrices and any one of the second sub-matrices, a product combination of the first sub-matrix and the second sub-matrix is recorded as a sub-matrix multiplication task.
3. The computing task scheduling method according to claim 1, characterized in that: The step of monitoring the operating state of the computing node and optimizing the allocation of each target sub-matrix multiplication task executed in the computing node according to the operating state comprises: Monitoring the operating status of the computing node according to a preset period, wherein the operating status includes the task queue length and the computing load; When the task queue length exceeds a preset queue length upper limit, searching for idle nodes in each computing node whose computing load does not exceed a preset computing load threshold; When the task queue length of the idle node does not exceed the preset queue length lower limit, the sub-matrix multiplication task on the computing node is migrated to the idle node.
4. The computing task scheduling method according to claim 1, characterized in that: The computing task scheduling system includes various intermediate aggregation layers, wherein the intermediate aggregation layer closest to the computing nodes in the intermediate aggregation layers is the bottom layer, and the intermediate aggregation layer farthest from the computing nodes in the intermediate aggregation layers is the final layer, and the intermediate aggregation layers include various intermediate nodes. The step of determining the task calculation result of the computing task by the sub-calculation result of each target sub-matrix multiplication task in the computing nodes includes: For any one of the sub-computation results, detecting the network delay between the target computing node of the sub-computation result and each intermediate node in the bottom layer, searching for an intermediate node with the lowest network delay among the intermediate nodes, and sending the sub-computation result to the intermediate node; Aggregating the sub-computation results of each target sub-matrix multiplication task in each computing node received through the intermediate node at the bottom layer to generate an aggregated result; The aggregation result is sent to the upper intermediate aggregation layer, the aggregation results are merged, and based on the merged aggregation result, the steps of sending the aggregation result to the upper intermediate aggregation layer and merging the aggregation results are returned to execute, until the aggregation results of each layer are merged at the final layer, and the task calculation result is generated.
5. The computing task scheduling method according to claim 1, characterized in that: The computing task scheduling method further includes: Detecting the shortest path from the computing node to other computing nodes in the computing task scheduling system, and storing the shortest path in a transmission matrix; When the computing node exchanges data with a target node to be exchanged with data, the shortest path from the computing node to the target node is retrieved in the transmission matrix, and data exchange is performed according to the shortest path.
6. The computing task scheduling method according to claim 1, characterized in that: The step of allocating each sub-matrix multiplication task to each computing node for execution comprises: Collecting performance indicators of each computing node, and calculating a performance score of the computing node according to the performance indicators; When the performance score is higher than a preset score threshold, allocating a computationally intensive task to the computing node, wherein the computationally intensive task includes a sub-matrix multiplication task; When the performance score is lower than a preset score threshold, a data handling task is assigned to the computing node, wherein the data handling task includes an input matrix decomposition task, a sub-computation result aggregation task, and a data exchange task between a computing node and a target node.
7. The computing task scheduling method according to claim 3, characterized in that: The running state also includes bandwidth occupancy, the computing load corresponds to a load adjustment coefficient, the bandwidth occupancy corresponds to a bandwidth adjustment coefficient, and the computing task scheduling method further includes: Obtaining a load weight of the computing node through the computing load, the bandwidth occupancy, the load adjustment coefficient and the bandwidth adjustment coefficient; When the load weight of the computing node is higher than a preset load weight threshold, if the computing node is performing a computing-intensive task, reducing the bandwidth adjustment coefficient; When the load weight of the computing node is higher than a preset load weight threshold, if the computing node performs a data handling task, the load adjustment coefficient is reduced.
8. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the computing task scheduling method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the computing task scheduling method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the computing task scheduling method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Task scheduling method and device in circuit simulation, medium and product
CN120295740A
Task scheduling system and method
CN120750682A