Microcomputer host ai computing power scheduling optimization method for multitask scenarios

By analyzing and clustering artificial intelligence tasks, heterogeneous computing power scheduling configurations are generated, which solves the problem of heterogeneous operational attributes and execution dependency constraints in microcomputers, and improves the utilization efficiency of heterogeneous computing resources and system response efficiency.

CN123157440APending Publication Date: 2026-11-24SHENZHEN JIMOKE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611377977.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies cannot effectively construct hardware-matched task splitting blocks that take into account both operational heterogeneity and execution dependency constraints, resulting in poor multi-task scheduling performance of heterogeneous computing power in microcomputers.

Method used

By analyzing the computation graph of artificial intelligence computing tasks as operation nodes and data flow edges, the instruction types and memory access characteristics of operation nodes are extracted. The execution dependency strength is determined by using graph neural networks, and clustering is performed according to heterogeneous attributes and dependencies to generate heterogeneous computing power scheduling configurations.

Benefits of technology

It improves the utilization efficiency of heterogeneous computing resources, reduces the performance bottleneck of computing units and cross-hardware communication latency, and enhances the system response efficiency in multi-task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157440A_ABST
    Figure CN123157440A_ABST
Patent Text Reader

Abstract

This invention relates to the field of heterogeneous computing power scheduling technology for microcomputer mainframes, and discloses an AI computing power scheduling optimization method for microcomputer mainframes in multi-task scenarios. The method parses artificial intelligence computing tasks into a computation graph containing operation nodes and data flow edges; determines the heterogeneous attributes of operation nodes and the corresponding computing unit types based on instruction type characteristics and memory access characteristics; obtains the execution dependency strength between operation nodes through a pre-set graph neural network; clusters and groups operation nodes according to execution dependency strength and computing unit type to obtain task split blocks; allocates target computing units to task split blocks and determines data transmission channel information to generate a heterogeneous computing power scheduling configuration. This invention improves the utilization efficiency of heterogeneous computing power in microcomputer mainframes while ensuring execution dependency constraints and correct data flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of heterogeneous computing power scheduling technology for microcomputer mainframes, and in particular to a method for optimizing AI computing power scheduling of microcomputer mainframes for multi-tasking scenarios. Background Technology

[0002] As the core carrier of intelligent chips and personal intelligent terminals, microcomputer hosts often run multiple artificial intelligence tasks such as speech recognition, image processing and intelligent recommendation simultaneously in daily use. Due to limitations in size, power consumption and heat dissipation, microcomputer hosts are only equipped with limited heterogeneous computing resources such as general-purpose processors and graphics accelerators. They need to efficiently coordinate computing loads in multi-task concurrent scenarios, and their computing power scheduling capability directly determines the system response efficiency.

[0003] Currently, the mainstream computing power scheduling strategy for heterogeneous computing resources adopts a task-level scheduling strategy, which treats the complete artificial intelligence computing task as an indivisible whole and allocates the entire task to a certain idle computing unit for execution based on priority queues or task arrival order.

[0004] However, as the internal structure of AI computing tasks becomes increasingly complex, the granularity limitations of task-level scheduling are becoming increasingly apparent. Specifically, a typical AI inference task includes various subtasks such as convolution operations, matrix multiplication, activation function calculations, and data manipulation. The execution efficiency of different operation types varies significantly across different computing units. For example, convolution operations are far more efficient on an NPU than on a CPU, while complex logical judgments and branching operations are more efficient on a CPU. Task-level scheduling binds the entire task to a single computing unit, causing performance bottlenecks when that unit handles operation types it is not proficient in. Meanwhile, other computing units remain idle because they cannot participate in the task's processing, resulting in a decrease in the overall utilization efficiency of heterogeneous computing resources.

[0005] Therefore, existing technologies cannot construct hardware-matched task splitting blocks that take into account both operational heterogeneity and execution dependency constraints, resulting in poor multi-task scheduling performance of heterogeneous computing power in microcomputers. Summary of the Invention

[0006] This invention provides a method for optimizing AI computing power scheduling in microcomputer hosts for multi-task scenarios. It solves the problem in the prior art that the hardware matching task splitting blocks cannot be constructed to take into account both heterogeneous operational attributes and execution dependency constraints, resulting in poor multi-task scheduling performance of heterogeneous computing power in microcomputer hosts.

[0007] Firstly, to address the aforementioned technical problems, this invention provides a method for optimizing AI computing power scheduling in a microcomputer host for multi-tasking scenarios, comprising: Obtain an artificial intelligence computing task and parse the artificial intelligence computing task into a computing graph that includes operation nodes and data flow edges between the operation nodes; Extract the instruction type features and memory access features of the operation nodes, determine the operation heterogeneity attributes of each operation node based on the instruction type features and memory access features, and determine the computing unit type adapted to each operation node according to the preset attribute hardware mapping relationship. Using the node features of the operation nodes and the data flow edges as input, a preset graph neural network is used to perform feature aggregation and dependency reasoning to obtain the execution dependency strength between each operation node. Based on the execution dependency strength and the computing unit type adapted to each operation node, the operation nodes are clustered and grouped to obtain several task splitting blocks; Based on the type of computing unit adapted to the task splitting block, target computing units are allocated to each task splitting block from heterogeneous computing resources, and data transmission channel information between the target computing units is determined based on the data flow edges across the task splitting blocks. A heterogeneous computing power scheduling configuration containing the allocation relationship between the task splitting block and the target computing unit and the data transmission channel information is generated.

[0008] Secondly, the present invention also provides a microcomputer host AI computing power scheduling system for multi-task scenarios, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the microcomputer host AI computing power scheduling optimization method for multi-task scenarios as described above.

[0009] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the microcomputer host AI computing power scheduling optimization method for multi-tasking scenarios as described above.

[0010] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention determines the heterogeneous attributes of operations by extracting the instruction type features and memory access features of the operation nodes, and determines the type of computing unit that each operation node is adapted to according to the preset attribute hardware mapping relationship. This solution breaks the existing technology's task-level scheduling mode that binds the complete artificial intelligence computing task to a single computing unit, accurately identifies the matching relationship between operators and hardware architecture, avoids the performance bottleneck caused by the computing unit handling operations that it is not good at, and effectively improves the hardware adaptability and execution efficiency at the operator level.

[0011] (2) This invention uses the node features and data flow edges of the operation nodes as input, and utilizes a preset graph neural network to perform feature aggregation and dependency reasoning to calculate the execution dependency strength between each operation node. This method accurately quantifies the data flow and coupling tightness between operators, provides an objective basis for task decomposition based on dependency constraints, and avoids introducing excessive cross-hardware communication and data transfer overhead due to blindly decomposing operators.

[0012] (3) This invention clusters operation nodes according to the strength of execution dependency and the type of computing unit, divides nodes that meet the dependency conditions into clusters, and merges nodes of the same computing unit type within the clusters to obtain several task split blocks. This grouping mechanism, which takes into account both execution dependency and hardware characteristics, solves the problem in the prior art that it is impossible to construct hardware-matched task split blocks that take into account both heterogeneous operation attributes and execution dependency constraints, and avoids unnecessary idle computing units.

[0013] (4) This invention generates a heterogeneous computing power scheduling configuration by allocating target computing units to task split blocks and determining data transmission channel information by combining the data flow edges across task split blocks, communication bandwidth requirements, and hardware interconnection topology. This scheme organically integrates the allocation of heterogeneous computing resources with the planning of network data transmission channels, ensuring the timeliness of intermediate data transmission across hardware units, significantly reducing communication latency in multi-task concurrent scenarios, and significantly improving the overall utilization efficiency of heterogeneous computing power of microcomputer hosts. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating a method for optimizing AI computing power scheduling in a microcomputer host for multi-tasking scenarios, as provided in an embodiment of the present invention. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] like Figure 1 As shown in the figure, an embodiment of the present invention provides a method for optimizing AI computing power scheduling in a microcomputer host for multi-tasking scenarios, including steps S11 to S15: S11, Obtain the artificial intelligence computing task, and parse the artificial intelligence computing task into a computing graph containing operation nodes and data flow edges between the operation nodes; S12, extract the instruction type features and memory access features of the operation nodes, determine the operation heterogeneity attributes of each operation node based on the instruction type features and memory access features, and determine the computing unit type adapted to each operation node according to the preset attribute hardware mapping relationship. S13, using the node features of the operation node and the data flow edge as input, feature aggregation and dependency reasoning are performed through a preset graph neural network to obtain the execution dependency strength between each operation node; S14. Based on the execution dependency strength and the computing unit type adapted to each operation node, the operation nodes are clustered and grouped to obtain several task splitting blocks. S15, according to the computing unit type adapted to the task splitting block, allocate target computing units to each task splitting block from heterogeneous computing resources, and determine the data transmission channel information between the target computing units according to the data flow direction edge across the task splitting block, and generate a heterogeneous computing power scheduling configuration that includes the allocation relationship between the task splitting block and the target computing unit and the data transmission channel information.

[0017] This invention applies to the field of heterogeneous computing power scheduling in microcomputer hosts equipped with intelligent chips. For ease of explanation, this embodiment uses an image feature extraction task received by a microcomputer host in a multi-tasking scenario as an illustrative example, and uses the CPU and GPU built into the microcomputer host as computing units in heterogeneous computing resources to illustrate the method of this invention.

[0018] In step S11, an artificial intelligence computing task is obtained, and the artificial intelligence computing task is parsed into a computing graph containing operation nodes and data flow edges between the operation nodes, including: Lexical and syntactic analysis are performed on the computation instructions of the artificial intelligence computing task to obtain an abstract syntax tree; The operator nodes in the abstract syntax tree are traversed, and the operator nodes with operation identifiers are identified as the operation nodes. The data flow edges are established according to the input-output relationship and hierarchical relationship between the operator nodes to construct the computation graph.

[0019] Specifically, an AI computing task refers to a computational task received by a microcomputer host in a multi-tasking scenario. For example, while running a real-time speech recognition task, the microcomputer host receives an image feature extraction task. The computational instructions for this image feature extraction task include convolution instructions on the input image matrix and weight matrix, bias addition instructions, and activation function calculation instructions. Lexical analysis scans the linearly arranged computational instruction text, segmenting it into a token sequence according to the lexical rules of operators, operands, and delimiters. Syntax analysis recursively descents the token sequence according to the grammatical rules of the computational instructions, organizing the token sequence into a tree-like hierarchical structure, resulting in an abstract syntax tree (AST). In the AST, the root node represents the final assignment operation, the leaf nodes represent the specific input tensor data (e.g., a 224x224 image), and the intermediate nodes represent various operators. The AST structures the complex computational logic, providing a standardized data foundation for subsequent fine-grained task decomposition.

[0020] It should be noted that when traversing the operator nodes of the abstract syntax tree (AST), all intermediate nodes are traversed in a depth-first manner starting from the root node. During the traversal, the identifier fields of each operator node are compared. Operator nodes with operation identifiers such as multiplication, addition, and convolution are extracted as operator nodes, while operator nodes that do not produce actual operations, such as parentheses and assignment, are excluded. For example, three multiplication operator nodes and one addition operator node are extracted from the AST of the image feature extraction task.

[0021] In establishing data flow edges, the computation result of the child-level operator node is used as the input of the parent-level operator node. Therefore, when an operator node is at the child level of another operator node and its output is used as the input of the latter, a data flow edge is established from the former to the latter. For two operator nodes that do not have a hierarchical relationship but have intermediate variable transmission, a data flow edge is established from the writer to the reader of the intermediate variable. For example, the computation results of the three multiplication operator nodes are all used as the input of the addition operator node, thus establishing three data flow edges from each multiplication operator node to the addition operator node. After traversing all operator nodes and data flow edges, a computation graph is obtained with operator nodes as vertices and data flow edges as directed edges. This computation graph visually displays the complete computation path from input data to the final result, serving as the basic graph structure for operation-level scheduling in steps S12 to S15.

[0022] In step S12, the instruction type features and memory access features of the operation nodes are extracted. Based on these features, the operational heterogeneity attributes of each operation node are determined. Then, according to a preset attribute hardware mapping relationship, the type of computing unit adapted to each operation node is determined, including: Obtain the opcode and operand descriptor of the operation node, perform one-hot encoding on the opcode to obtain the instruction type feature, and extract the input data read volume and output data write volume from the operand descriptor; The input data read volume and the output data write volume are mapped to obtain the memory access characteristics. The instruction type characteristics and the memory access characteristics are then concatenated to obtain the node fusion characteristics. Based on the node fusion characteristics, the operational heterogeneous attributes of the operational nodes are determined according to the preset heterogeneous attribute division rules.

[0023] Specifically, the opcode is an encoded field in the computation instruction corresponding to the operation node that identifies the type of operation, and the operand descriptor is a descriptive field in the computation instruction that records the data type, dimension, and number of bytes of each input tensor and output tensor. When performing one-hot encoding on the opcode, a correspondence table between operation types and encoding bit order is pre-established. In this embodiment, the operation types are divided into eight categories: multiplication, addition, convolution, pooling, activation, data transfer, conditional judgment, and data recombination. Based on this, the output of the one-hot encoding is an 8-dimensional vector, with the bit corresponding to the operation type of the opcode set to 1 and the remaining bits set to 0. For example, after one-hot encoding, a matrix multiplication operation node obtains an 8-dimensional instruction type feature vector, where the third bit representing the multiplication operation is 1 and the remaining bits are 0. The input data read volume is the sum of all input tensor bytes read when the operation node is executed, and the output data write volume is the sum of all output tensor bytes written. For example, the input data read volume of this matrix multiplication operation node is 4096 bytes, and the output data write volume is 1024 bytes.

[0024] Specifically, when mapping the input data read volume and the output data write volume, a minimum-maximum linear mapping is used to normalize the two byte values ​​to a unified dimension. The mapping formula is as follows: in, Let be the memory access feature of the i-th operation node. It is a 2-dimensional vector, dimensionless, with each component ranging from 0 to 1. The input data read volume of the i-th operation node is in bytes, and its value ranges from 0 to the maximum value of the read volume in the computation graph. In this example, the value is 4096 bytes. The output data write amount of the i-th operation node, in bytes, with a value range from 0 to the maximum write amount in the computation graph. In this example, the value is 1024 bytes. and These are the maximum and minimum values ​​of the input data read volume for all operation nodes in the computation graph, in bytes. In this example, the values ​​are 8192 bytes and 64 bytes, respectively. and These represent the maximum and minimum values ​​of the output data written by all operation nodes in the computation graph, in bytes. In this example, the values ​​are 4096 bytes and 32 bytes, respectively. The minimum-maximum linear mapping eliminates the interference of the difference in the order of bytes between different operation nodes on the subsequent attribute partitioning. For example, the memory access feature [0.496, 0.244] is obtained after mapping the matrix multiplication operation node. The 8-dimensional instruction type feature vector and the 2-dimensional memory access feature vector are concatenated end to end in the order of instruction type feature first and memory access feature second to obtain the 10-dimensional node fusion feature vector. The node fusion feature fully represents the computational characteristics of the current operation node from two dimensions: operation type and memory interaction intensity, and serves as the input for partitioning the heterogeneous attributes of operations.

[0025] It should be noted that the heterogeneous attribute of an operation characterizes the computational characteristics of the operation node. In this embodiment, it is divided into two categories: computationally intensive and memory-intensive. Computationally intensive operations correspond to those primarily involving continuous high-intensity numerical computation, while memory-intensive operations correspond to those primarily involving frequent memory read / write operations and control flow switching. The preset heterogeneous attribute classification rule is a single-level determination rule based on the type of operation hit by the instruction type feature: when the instruction type feature hits multiplication, addition, convolution, pooling, or activation operations, which are primarily numerical computations, the operation heterogeneous attribute is determined to be computationally intensive; when the instruction type feature hits conditional judgment, data movement, or data reassembly operations, which are primarily memory read / write operations and control flow switching, the operation heterogeneous attribute is determined to be memory-intensive. Since one-hot encoding ensures that each operation node hits exactly one type of operation, the above classification result is uniquely determined. For example, if the instruction type feature of the matrix multiplication operation node hits the multiplication bit, its operation heterogeneity is determined to be computationally intensive; if the instruction type feature of a loop condition judgment operation node hits the condition judgment bit, its operation heterogeneity is determined to be memory-intensive.

[0026] In one implementation, determining the computing unit type adapted to each of the operation nodes according to a preset attribute hardware mapping relationship includes: Based on the attribute hardware mapping relationship, determine the computing unit type corresponding to each of the operation heterogeneous attributes, and bind the computing unit type as a hardware identifier to the corresponding operation node.

[0027] The classification of operation types covers common operator types in mainstream artificial intelligence frameworks. The classification of heterogeneous attributes is based on the ratio of computational cost to memory access cost for each operation type: multiplication, addition, convolution, pooling, and activation operations have high computational cost but low memory access cost, and are classified as computationally intensive; condition judgment, data movement, and data reorganization operations have low computational cost but frequent memory access operations, and are classified as memory-intensive. The attribute hardware mapping relationship is a pre-established key-value correspondence table between heterogeneous operation attributes and computing unit types. It is determined based on the hardware architecture characteristics of various computing units in heterogeneous computing resources: graphics accelerators have massively parallel multiply-accumulate arrays, suitable for computationally intensive operations; general-purpose processors have branch prediction and low-latency caching systems, suitable for memory-intensive operations. Therefore, in this embodiment, the attribute hardware mapping relationship is that computationally intensive operations correspond to graphics accelerator types, and memory-intensive operations correspond to general-purpose processor types. The computing unit type corresponding to the heterogeneous operation attribute of each operation node is queried according to this mapping relationship. The computing unit type is encoded as a hardware identifier and written into the metadata field of the operation node, thus binding the hardware identifier to the operation node. For example, the graphics accelerator type is encoded as 1, and the general-purpose processor type is encoded as 0. The matrix multiplication operation node is bound to a hardware identifier with a value of 1. The bound hardware identifier participates in the dependency reasoning in step S13 and the clustering grouping in step S14 along with the operation node, allowing hardware adaptation information to permeate the entire scheduling chain.

[0028] In step S13, using the node features of the operation nodes and the data flow edges as input, a preset graph neural network is used to perform feature aggregation and dependency reasoning to obtain the execution dependency strength between the operation nodes, including: Based on the node characteristics of each operation node and the data flow edges, an initial computation dependency graph is constructed; The initial computational dependency graph is input into a preset graph neural network, and the node features of adjacent nodes are aggregated to obtain the node interaction features of each operation node. The execution dependency strength is obtained based on the node interaction characteristics of the two operation nodes connected by the data flow edge.

[0029] Specifically, node features are constructed by concatenating the hardware identifier of the operation node with 10-dimensional node fusion features, resulting in an 11-dimensional vector for each operation node's node features. When constructing the initial computational dependency graph, each operation node is used as a vertex, and node features are used as vertex attributes. An adjacency matrix is ​​generated based on data flow edges to form the graph's topology: when a data flow edge exists between the i-th and j-th operation nodes, the element in the i-th row and j-th column of the adjacency matrix is ​​set to 1; otherwise, it is set to 0. For example, for a computational graph containing 256 operation nodes and 512 data flow edges, a 256x256 adjacency matrix is ​​generated, which, together with the 256 11-dimensional node features, constitutes the initial computational dependency graph.

[0030] The preset graph neural network is a graph convolutional network with a structure of 3 graph convolutional layers. The aggregation operation of each layer is as follows: in, Let v be the hidden state output by the operation node v at the k-th layer. It is a 64-dimensional vector with no dimension. The values ​​of each component range from 0 to 1. In this example, the value is a 64-dimensional vector output by a multiplication operation node at the 3rd layer, and its first component is 0.62. The hidden state of operation node v in the (k-1)th layer is taken as the initial hidden state of the node feature after the first layer linear transformation mapping in the 0th layer. The dimension and value are the same as before. In this embodiment, the example value of the 0th layer is the 64-dimensional vector after the 11-dimensional node feature of the node is mapped by the first layer weight matrix. This represents the hidden state of the adjacent operation node u at layer k-1, with the same dimensions and values ​​as before; Let v be the set of neighboring nodes of the operation node v determined by the adjacency matrix. It is dimensionless and the number of elements ranges from 0 to the total number of nodes minus 1. In this example, the value is 3 neighboring nodes. This is an aggregation function that calculates the arithmetic mean of each vector in the set on a component-by-component basis. Let be the trainable weight matrix of the k-th layer. It is dimensionless, and the value of each element ranges from -1 to 1. In this embodiment, the dimension of the first layer example is 64 x 11, and the dimension of the second and third layers example is 64 x 64. The activation function is a linear rectified function that takes the maximum value of its value plus 0 for each component of the input. The first layer weight matrix maps the 11-dimensional node features to 64-dimensional hidden layer states, ensuring that the hidden layer states in subsequent layers and iterations always maintain 64 dimensions, thus guaranteeing that the dimensions of the input and output are consistent during iteration.

[0031] The 500 AI computing task samples were collected from anonymized execution logs recorded during the historical operation of the same model of microcomputer host. The task types covered include speech recognition, image processing, intelligent recommendation, and natural language processing. The proportion of each task type is consistent with the load distribution of the target microcomputer host in daily multi-tasking scenarios.

[0032] It should be noted that the training method of the preset graph neural network is as follows: the training data is taken from the computation dependency graph corresponding to 500 historical AI computing task samples. The label is the measured value of the dependency strength of the connected operation node pairs in each sample during actual execution. This measured value is obtained by the ratio of the waiting time of the downstream operation waiting for the upstream output to its total execution time, recorded by the profiler. The profiler is a software instrumentation timing module integrated into the microcomputer host runtime system. By inserting timing stakes at the execution start point and execution end point of each operation node, the time difference between the completion of the output of the adjacent operation node and the start of the input reading of the downstream operation node along the data flow edge in the same computation graph is recorded as the waiting time. The total execution time is the number of clock cycles from the start of execution to the completion of execution of the downstream operation node. The ratio of the waiting time to the total execution time is normalized and used as the measured value of the dependency strength of the connected operation node pair, with a value range of 0 to 1.

[0033] The training objective is to minimize the mean squared error loss between the predicted execution dependency strength and the label. The predicted execution dependency strength is the value obtained from node interaction features through similarity calculation (described below). The same similarity calculation interface is used in both the training and inference phases. Gradient descent is used to update the weight matrices of each layer with a learning rate of 0.001. Training terminates when the mean squared error loss decreases by less than 0.0001 over 10 consecutive rounds or the training rounds reach the maximum value of 200 rounds. The Adam optimizer is used during training with a batch size of 32. The weight matrices of each layer are initialized using the He initialization method. The training set to validation set ratio is 4:1. The validation set is used to monitor overfitting during training. The model parameters corresponding to the rounds where the mean squared error loss no longer decreases on the validation set are used as the parameters of the final preset graph neural network. The trained graph convolutional network is used online as a preset graph neural network by inputting the currently constructed initial computation dependency graph into the network for forward computation.

[0034] In one implementation, obtaining the execution dependency strength based on the node interaction characteristics of the two operation nodes connected by the data flow edge includes: The preset graph neural network is iterated, the state difference between the hidden layer state sequences output by two adjacent iterations is calculated, and the iteration is stopped when the state difference is less than a preset convergence threshold. The hidden layer state sequence output by the current iteration is determined as the node interaction feature of each operation node. The similarity is calculated based on the node interaction features of the two operation nodes connected by the data flow edge to obtain the execution dependency strength between the two operation nodes.

[0035] In this context, iterating over the pre-defined graph neural network involves repeatedly performing aggregation operations, using the hidden layer state sequence output from the previous forward operation as the node input for the next forward operation. Since the first layer has mapped the node features to 64 dimensions, the input and output of each iteration are both 64-dimensional hidden layer states, maintaining consistent dimensionality. The hidden layer state sequence is a sequence composed of the hidden layer states of all operated nodes arranged by node index. The formula for calculating state differences is... in, The state difference in the t-th iteration is dimensionless and ranges from 0 to positive infinity. In this example, the value is 3.2 in the 4th iteration. Let v be the hidden state output by the operation node v in the t-th iteration. It is a 64-dimensional vector, dimensionless, with each component taking values ​​from 0 to 1. Let V be the hidden state output by the operation node v in the (t-1)th iteration, with the same dimensions and values ​​as before; is the 1 norm of the vector, i.e., the sum of the absolute values ​​of all components; n is the total number of operation nodes, dimensionless, and takes the value of a positive integer, with an example value of 256 in this embodiment. The preset convergence threshold is determined by statistically analyzing the state difference convergence curves of the above 500 historical task samples during the inference stage, sorting the state difference values ​​corresponding to the state differences of each sample when they tend to stabilize in ascending order, and taking the 90th percentile (upper quantile value) as the preset convergence threshold. The statistics are based on an independent calibration subset randomly selected from the 500 historical task samples, which does not participate in the subsequent training of the graph neural network. It has been verified that when the preset convergence threshold fluctuates within the range of 3 to 8, the impact on the final calculation result of the execution dependency strength does not exceed 5%. Technical personnel can also calibrate it themselves according to the target hardware platform using the statistical method of this embodiment. The example value in this embodiment is 5. The engineering trade-off is that if the threshold is too small, it will increase the number of iterations and prolong the scheduling decision time; if it is too large, the node interaction features will not be sufficiently stable. The iteration stops when the state difference is less than the preset convergence threshold of 5, and the hidden layer state sequence output by the current iteration is determined as the node interaction feature of each operation node.

[0036] Specifically, when performing similarity calculations based on the node interaction features of two operation nodes connected by the data flow edge, the similarity calculation uses cosine similarity, and the calculation formula is as follows: in, The execution dependency strength between operation node u and operation node v is dimensionless and ranges from -1 to 1. In this embodiment, the example value is 0.85. and These are the node interaction features of operation node u and operation node v, respectively. They are both 64-dimensional vectors, dimensionless, and each component takes values ​​from 0 to 1. The vector inner product of the interaction features between the two nodes; and These are the 2-norms of the interaction features between two nodes, i.e., the arithmetic square root of the sum of squares of each component. Since the linear rectified activation function may cause all components of a node's interaction feature to be zero, its 2-norm is zero, resulting in a zero denominator for the cosine similarity. Therefore, when the 2-norm of any node's interaction feature is zero, the execution dependency strength between that node pair is set to zero, indicating that there is no directional consistency in execution coupling. Cosine similarity reflects the degree of directional consistency of the interaction features between two nodes. For two operation nodes connected by data flow edges and whose computation processes are tightly coupled, their node interaction features tend to converge in direction after aggregation. Therefore, the larger the execution dependency strength value, the tighter the execution coupling between the two operation nodes. The execution dependency strength between each operation node is obtained by traversing all operation node pairs connected by data flow edges, serving as the association measure for clustering in step S14.

[0037] In step S14, based on the execution dependency strength and the computing unit type adapted to each operation node, the operation nodes are clustered and grouped to obtain several task splitting blocks, including: Based on the execution dependency strength, the operation nodes that meet the preset dependency conditions are divided into the same cluster. Within each cluster, operation nodes adapted to the same computing unit type are grouped into corresponding task splitting blocks; Each operation node that is not assigned to any cluster is identified as an independent task splitting block, thereby obtaining several task splitting blocks.

[0038] Specifically, the preset dependency condition is that the execution dependency strength between two operation nodes is greater than a preset dependency threshold. The preset dependency threshold is determined by statistically analyzing the relationship between the execution dependency strength of each connected operation node pair and the cross-computation unit transmission overhead during split execution for the aforementioned 500 historical task samples. The execution dependency strength of node pairs that cause an increase in total execution time due to split execution is sorted in descending order, and the 5th percentile (lower quantile value) is taken as the preset dependency threshold. The statistics are based on an independent calibration subset mutually exclusive with the graph neural network training set. It has been verified that when the preset dependency threshold fluctuates within the range of 0.75 to 0.85, the clustering result of the task split blocks changes by no more than 10%. Technicians can also calibrate it themselves according to the target hardware platform using the statistical method of this embodiment. The example value in this embodiment is 0.8. The physical reason is that after node pairs with execution dependency strength higher than this value are split into different computing units, the intermediate data transmission waiting time across computing units is offset and exceeds the benefits of parallel execution.

[0039] A connectivity-based graph traversal clustering method is employed. Data flow edges with an execution dependency strength greater than 0.8 are considered connected edges. A depth-first search traversal is performed along these edges, starting from any unvisited operation node with a connected edge. The traversal proceeds downstream to adjacent nodes along the outgoing edges. When the current path cannot be extended further, backtracking is performed and other branches are explored. Operation nodes on the same connected path are grouped into the same cluster. For example, among 256 operation nodes, nodes with an execution dependency strength greater than 0.8 are traversed to form 3 clusters, with the first cluster containing 15 operation nodes.

[0040] Within each cluster, the hardware identifiers bound to each operation node are read. The operation nodes are grouped according to their hardware identifier values, and the operation nodes in the same group are sorted topologically to form a sequence that satisfies the data flow order. These are then merged into corresponding task split blocks, ensuring that the operation nodes within each task split block are adapted to the same computing unit type and maintain their execution order. Since the computation graph is constructed from the hierarchical relationships of an abstract syntax tree and the intermediate variable transit relationships, the subgraphs within a block are naturally directed and acyclic, allowing topological sorting to proceed normally. If a feedback edge is detected, it is marked as a cross-block dependency edge and temporarily excluded from the sorting of this block to avoid sorting failure. For example, in the first cluster of 15 operation nodes, 11 operation nodes have a hardware identifier of 1, and 4 operation nodes have a hardware identifier of 0. After merging, one task split block adapted to the graphics accelerator type and one task split block adapted to the general-purpose processor type are obtained.

[0041] Operation nodes whose execution dependency strength with other nodes is no greater than a preset dependency threshold of 0.8 are not included in any cluster. These operation nodes have weak coupling with upstream and downstream execution, resulting in low splitting transmission overhead. They are each determined as a separate task splitting block, which ensures that every operation node in the computation graph is scheduled and covers the entire process, while also preserving the scheduling leeway for flexibly allocating these nodes to idle computing units. For example, after clustering and grouping, 256 operation nodes are divided into 9 task splitting blocks.

[0042] In step S15, target computing units are allocated to each task splitting block from heterogeneous computing resources according to the computing unit type adapted to the task splitting block, and data transmission channel information between the target computing units is determined according to the data flow edges across the task splitting blocks. A heterogeneous computing power scheduling configuration containing the allocation relationship between the task splitting blocks and the target computing units, as well as the data transmission channel information, is generated, including: From the heterogeneous computing resources, an appropriate target computing unit is allocated to each of the task split blocks, and the corresponding allocation relationship is recorded; For the data flow direction edge across the task split block, determine the data transmission direction between the corresponding two target computing units, and determine the communication bandwidth requirement based on the amount of data to be transmitted and the transmission time constraint. Based on the hardware interconnection topology between the two target computing units and the communication bandwidth requirements, the data transmission path and channel capacity are determined to obtain the data transmission channel information; Based on the allocation relationship and the data transmission channel information, the heterogeneous computing power scheduling configuration is generated.

[0043] Specifically, heterogeneous computing resources refer to the collection of all computing unit instances built into the microcomputer host. In this embodiment, it includes 4 graphics accelerator instances and 8 general-purpose processor instances. The computing unit type adapted to each task split block is read, and a round-robin scheduling method is used to sequentially distribute the task split blocks to idle computing unit instances of that type: the process proceeds cyclically by instance number, with each task split block assigned pointing to the next idle instance, thus achieving load balancing among instances of the same type. When all instances of a certain type of computing unit are busy, the task split blocks to be assigned are added to the waiting queue for that type, and distributed sequentially after the instances are released, according to the order of enqueueing. When the number of task split blocks exceeds the number of instances of that type, the excess blocks are queued in the waiting queue until an idle instance becomes available. For example, the 4 task split blocks adapted to the graphics accelerator type are sequentially distributed to graphics accelerator instances 0 to 3. After distribution, the corresponding entries of each task split block and the assigned computing unit instance number are recorded to obtain the allocation relationship.

[0044] Specifically, when the starting and ending operation nodes of a data flow edge belong to two different task splitting blocks, this data flow edge is a cross-task splitting block data flow edge. Based on its direction from the starting point to the ending point, and combined with the allocation relationship, it is mapped to the data transmission direction from the target computing unit of the task splitting block where the starting point is located to the target computing unit of the task splitting block where the ending point is located. For example, task splitting block A is assigned to graphics accelerator instance 0, task splitting block B is assigned to general-purpose processor instance 1, and the output of an operation node in task splitting block A points to an operation node in task splitting block B via a data flow edge. Therefore, the data transmission direction is determined to be from graphics accelerator instance 0 to general-purpose processor instance 1.

[0045] The amount of data to be transmitted is the number of intermediate data bytes actually transmitted on the data flow direction edge of the cross-task splitting block. When the starting operation node has more than one output tensor, only the number of bytes of the target output tensor pointing to the cross-block edge is counted, which is obtained from the write amount of the output tensor of the starting operation node. The transmission time constraint is the time margin for the downstream task splitting block to complete data reception before its start time limit, which is obtained from the difference between the latest start time of the downstream task splitting block in the topological order and the upstream output ready time. The two times are determined by accumulating the estimated execution time of each task splitting block in the topological order along the data flow direction edge.

[0046] In this embodiment, the estimated execution time of each task segment is determined by clock cycles. The method is as follows: based on the operation type and operand size of each operation node within the block, combined with a preset hardware performance model. The hardware performance model is a lookup table established after offline analysis of the average single execution clock cycles of various operation nodes on the target computing unit type. For a specific operation node, the operand size is multiplied by the average single execution clock cycles corresponding to its operation type to obtain the estimated execution clock cycles of that operation node. The estimated execution clock cycles of all operation nodes within the block are summed to obtain the estimated execution time of the task segment.

[0047] When the difference is zero or negative, it indicates that the downstream is ready to immediately read the upstream output. The communication bandwidth requirement across the block edge is then set to zero and marked as local multiplexing, no longer occupying the cross-computing unit transmission link. The formula for calculating the communication bandwidth requirement is... in, The communication bandwidth requirement is expressed in bytes per clock cycle, and the value range is a real number greater than or equal to 0. In this example, the value is 32 bytes per clock cycle. The value is the amount of data to be transmitted, in bytes, and is an integer greater than or equal to 0. In this example, the value is 8192 bytes. For the transmission time constraint, the unit is clock cycles, and the value range is an integer greater than 0. In this embodiment, the example value is 256 clock cycles. According to this formula, the minimum bandwidth required for intermediate data to be transmitted within the transmission time constraint is the communication bandwidth requirement, ensuring that the downstream task splitting block receives all input data before its start time limit.

[0048] The hardware interconnect topology is a connection diagram between computing unit instances and routing nodes in the on-chip network of a microcomputer host, with each connection link having a remaining bandwidth attribute. Using the hardware interconnect topology as the search graph and at the cost of link transmission latency, the shortest path search is used to find the path from the starting computing unit to the ending computing unit in the data transmission direction: during the search, only links with remaining bandwidth not less than the communication bandwidth requirement are extended, and each time the node with the smallest cumulative latency is selected from the undetermined nodes for extension, until the ending computing unit is reached, thus obtaining the data transmission path; after the path is selected, the corresponding remaining bandwidth is deducted from each link along the path as bandwidth reservation for the cross-block flow, and the reservation information is recorded.

[0049] When multiple cross-block flow transmission paths share the same link and the sum of reserved bandwidth exceeds the link's capacity, an alternative path is re-searched to avoid the link. At each routing node along the data transmission path, the virtual channel buffer capacity is configured to match the communication bandwidth requirements, thus obtaining the channel capacity. For example, a data transmission path via two routing nodes is determined for the transmission from graphics accelerator instance 0 to general-purpose processor instance 1, with a channel capacity configured to 32 bytes. The data transmission path and channel capacity together constitute the data transfer channel information for the cross-task split block data flow to the edge.

[0050] The virtual channel buffer capacity is configured by multiplying the communication bandwidth requirement B by the round-trip delay L of the link, i.e.: C ch =B×L Among them, C ch B is the virtual channel buffer capacity in bytes; L is the communication bandwidth requirement in bytes per clock cycle; and L is the round-trip delay of the link in clock cycles, determined by the physical propagation delay of each link in the hardware interconnection topology.

[0051] The process involves compiling all task splitting blocks and their allocation relationships to target computing units, along with all data transfer channel information entries for cross-task splitting block data flow edges, into structured scheduling configuration data according to the topological order of the task splitting blocks. This results in a heterogeneous computing power scheduling configuration. The runtime system of the microcomputer host loads each task splitting block into its corresponding target computing unit for execution according to this heterogeneous computing power scheduling configuration. It also locks transmission links between computing units based on the data transfer channel information to complete intermediate data flow. After a task splitting block is executed, the runtime system sends back a completion confirmation. In the event of data transmission timeout or computing unit malfunction, the affected task splitting block is reassigned to an idle instance of the same type according to the waiting queue in the scheduling configuration, and the bandwidth reservation of the faulty link is released. This allows each computing unit to collaboratively share the computing load in multi-task scenarios, improving the utilization efficiency of the microcomputer host's heterogeneous computing power.

[0052] In summary, this invention discloses a method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios. The method includes acquiring AI computing tasks and parsing them into a computation graph; determining the heterogeneous attributes of operations and the appropriate types of computing units; obtaining the execution dependency strength through a pre-defined graph neural network; clustering and grouping operation nodes to obtain task splitting blocks; allocating target computing units and determining data transmission channel information to generate a heterogeneous computing power scheduling configuration. This invention refines the scheduling granularity to the operation level and constructs hardware-matched task splitting blocks while considering the heterogeneous attributes of operations and execution dependency constraints. This achieves collaborative sharing of heterogeneous computing power in multi-task scenarios for microcomputer hosts, improving the utilization efficiency of heterogeneous computing power and the effectiveness of multi-task scheduling.

[0053] The second embodiment of the present invention provides a microcomputer host AI computing power scheduling system for multi-tasking scenarios, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the microcomputer host AI computing power scheduling optimization method for multi-tasking scenarios as described above.

[0054] It should be noted that the microcomputer host AI computing power scheduling system for multi-task scenarios provided in this embodiment of the invention is used to execute all the process steps of the microcomputer host AI computing power scheduling optimization method for multi-task scenarios in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0055] It should be noted that the present invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the above-described method for optimizing AI computing power scheduling of a microcomputer host in a multi-tasking scenario. Its working principle and beneficial effects correspond one-to-one with the above method, and therefore will not be described again.

[0056] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for optimizing AI computing power scheduling in a microcomputer host for multi-tasking scenarios, characterized in that, include: Obtain an artificial intelligence computing task and parse the artificial intelligence computing task into a computing graph that includes operation nodes and data flow edges between the operation nodes; Extract the instruction type features and memory access features of the operation nodes, determine the operation heterogeneity attributes of each operation node based on the instruction type features and memory access features, and determine the computing unit type adapted to each operation node according to the preset attribute hardware mapping relationship. Using the node features of the operation nodes and the data flow edges as input, a preset graph neural network is used to perform feature aggregation and dependency reasoning to obtain the execution dependency strength between each operation node. Based on the execution dependency strength and the computing unit type adapted to each operation node, the operation nodes are clustered and grouped to obtain several task splitting blocks; Based on the type of computing unit adapted to the task splitting block, target computing units are allocated to each task splitting block from heterogeneous computing resources, and data transmission channel information between the target computing units is determined based on the data flow edges across the task splitting blocks. A heterogeneous computing power scheduling configuration containing the allocation relationship between the task splitting block and the target computing unit and the data transmission channel information is generated.

2. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 1, characterized in that, The step of parsing the artificial intelligence computing task into a computational graph containing operation nodes and data flow edges between the operation nodes includes: Lexical and syntactic analysis are performed on the computation instructions of the artificial intelligence computing task to obtain an abstract syntax tree; The operator nodes in the abstract syntax tree are traversed, and the operator nodes with operation identifiers are identified as the operation nodes. The data flow edges are established according to the input-output relationship and hierarchical relationship between the operator nodes to construct the computation graph.

3. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 1, characterized in that, The step of extracting the instruction type features and memory access features of the operation nodes, and determining the operational heterogeneity attributes of each operation node based on the instruction type features and memory access features, includes: Obtain the opcode and operand descriptor of the operation node, perform one-hot encoding on the opcode to obtain the instruction type feature, and extract the input data read volume and output data write volume from the operand descriptor; The input data read volume and the output data write volume are mapped to obtain the memory access characteristics. The instruction type characteristics and the memory access characteristics are then concatenated to obtain the node fusion characteristics. Based on the node fusion characteristics, the operational heterogeneous attributes of the operational nodes are determined according to the preset heterogeneous attribute division rules.

4. The microcomputer host AI computing power scheduling optimization method for multi-task scenarios according to claim 3, characterized in that, The step of determining the computing unit type adapted to each of the operation nodes according to the preset attribute hardware mapping relationship includes determining the computing unit type corresponding to each of the operation heterogeneous attributes according to the attribute hardware mapping relationship, and binding the computing unit type as a hardware identifier to the corresponding operation node.

5. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 1, characterized in that, The step of using the node features of the operation nodes and the data flow edges as input, and performing feature aggregation and dependency reasoning through a preset graph neural network to obtain the execution dependency strength between the operation nodes includes: Based on the node characteristics of each operation node and the data flow edges between the node characteristics, an initial computation dependency graph is constructed; The initial computational dependency graph is input into a preset graph neural network, and the node features of adjacent nodes are aggregated to obtain the node interaction features of each operation node. The execution dependency strength is obtained based on the node interaction characteristics of the two operation nodes connected by the data flow edge.

6. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 5, characterized in that, The determination of the execution dependency strength based on the node interaction characteristics of the two operation nodes connected by the data flow edge includes: The preset graph neural network is iterated, the state difference between the hidden layer state sequences output by two adjacent iterations is calculated, and the iteration is stopped when the state difference is less than a preset convergence threshold. The hidden layer state sequence output by the current iteration is determined as the node interaction feature of each operation node. The similarity is calculated based on the node interaction features of the two operation nodes connected by the data flow edge to obtain the execution dependency strength between the two operation nodes.

7. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 1, characterized in that, The operation nodes are clustered and grouped according to the execution dependency strength and the computing unit type adapted to each operation node to obtain several task splitting blocks, including: Based on the execution dependency strength, the operation nodes that meet the preset dependency conditions are divided into the same cluster. Within each cluster, operation nodes adapted to the same computing unit type are grouped into corresponding task splitting blocks; Each operation node that is not assigned to any cluster is identified as an independent task splitting block, thereby obtaining several task splitting blocks.

8. The method for optimizing AI computing power scheduling in a microcomputer host for multi-task scenarios according to claim 1, characterized in that, The step of allocating target computing units to each task splitting block from heterogeneous computing resources according to the computing unit type adapted to the task splitting block, and determining the data transmission channel information between the target computing units based on the data flow edges across the task splitting blocks, and generating a heterogeneous computing power scheduling configuration that includes the allocation relationship between the task splitting blocks and the target computing units and the data transmission channel information, includes: From the heterogeneous computing resources, an appropriate target computing unit is allocated to each of the task split blocks, and the corresponding allocation relationship is recorded; For the data flow direction edge across the task split block, determine the data transmission direction between the corresponding two target computing units, and determine the communication bandwidth requirement based on the amount of data to be transmitted and the transmission time constraint. Based on the hardware interconnection topology between the two target computing units and the communication bandwidth requirements, the data transmission path and channel capacity are determined to obtain the data transmission channel information; Based on the allocation relationship and the data transmission channel information, the heterogeneous computing power scheduling configuration is generated.

9. A microcomputer host AI computing power scheduling system for multi-tasking scenarios, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to claims 1 to 8.

10. A 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 method described in claims 1 to 8.