A high-level integrated scheduling method and device for digital circuits based on dependency perception

By optimizing the construction of resource dependency graphs based on dependency-aware graph neural networks and reinforcement learning technology, the problem of dependency simplification in existing scheduling methods is solved, high-quality scheduling results and low latency are achieved, and data flow graphs with different structures are adapted.

CN118672748BActive Publication Date: 2025-09-12SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410809656.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2025-09-12
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Existing high-level synthesis scheduling methods for digital circuits often simplify or ignore dependencies when constructing resource dependency graphs, resulting in poor scheduling quality. These methods are difficult to adapt to data flow graphs of different structures and cannot quickly converge to high-quality scheduling results.

Method used

Through a dependency-aware approach, graph neural networks and reinforcement learning techniques are used to generate node embeddings and dependency information of operations, construct a legal action space, perform action sampling and rescheduling, optimize the construction of resource dependency graphs, and quickly converge to high-quality scheduling results.

Benefits of technology

The quality of scheduling results is improved, latency and resource utilization are reduced, the portability and adaptability of scheduling methods are enhanced, and they can quickly adapt to data flow graphs of different structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672748B_ABST
    Figure CN118672748B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of digital circuit technology, and discloses a high-level integrated scheduling method and device for digital circuits based on dependency perception. The method performs initial scheduling on digital circuits based on device information, data flow diagrams, and preset constraints to generate an initial scheduling result; by analyzing the information of the initial scheduling, several attributes of each operation are obtained, and the initial node embedding of each operation is generated, thereby generating a reinforcement learning state; the node embedding of each operation is updated using a policy network to generate a Gaussian distribution; each operation is screened according to the preset constraints to construct a legal action space; the Gaussian distribution is mapped to the legal action space, and a first legal action is sampled and calculated; the first legal action is executed to reschedule the operation corresponding to the first legal action and generate a rescheduling result. The present invention can quickly converge to a high-quality scheduling result, improve system performance, reduce the latency and resource utilization of the scheduling result, and has strong portability for circuits with different structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital circuit technology, and in particular to a dependency-aware high-level integrated scheduling method and device for digital circuits. Background Art

[0002] High-level synthesis (HLS) of digital circuits is a method for automatically synthesizing digital systems from algorithmic-level behavioral descriptions into register-transfer-level (RTL) structural descriptions. This synthesis process requires the resulting RTL description to meet resource and latency constraints, while also offering low latency, area, and power consumption. HLS design offers a lower barrier to entry and is faster. Moreover, when design requirements change, only the input source code needs to be modified, without redesigning register layouts, thus providing flexibility to accommodate software updates or changing requirements. Scheduling is one of the most critical steps in the HLS process. It determines the execution order and timing of operations in a dataflow graph (DFG). Its goal is to minimize resource usage and latency while satisfying latency, resource, and dependency constraints. Execution order and timing are affected by dependencies. If a dependency exists from operation i to j, operation j cannot begin until operation i completes. Data dependencies are represented as edges in the DFG and can be extracted from the dataflow. Resource dependencies are determined by scheduling methods based on resource constraints. Resource constraints can cause concurrently executed operations to contend for the same functional unit (FU), leading to resource conflicts. Scheduling methods resolve this conflict by adding resource dependencies. Adding resource dependencies is a combinatorial optimization problem whose probability scales factorially with the number of operations. Therefore, constructing an accurate and complete resource dependency graph is very difficult.

[0003] However, current scheduling methods have shortcomings. 1. Existing heuristic methods use manually customized strategies to construct resource dependency graphs. The As Soon As Possible / As Late As Possible (ASAP / ALAP) methods schedule operations sequentially to their earliest / latest available clock cycles. List scheduling (LS) builds on the ASAP method by adding resource dependencies to operations in a topologically sorted manner. Inspired by list scheduling, entropy-directed scheduling sequentially adds resource dependencies and schedules operations to maximize entropy. These heuristic methods ignore or simplify the construction of the resource dependency graph. These simplifications can speed up the solution but can result in performance degradation. 2. Existing linear programming (LP)-based methods formalize the scheduling problem as an LP problem to construct a complete resource dependency graph. Integer LP (ILP) scheduling uses a branch-and-bound approach to search for resource dependencies within the entire feasible space. This search employs a trial-and-error approach and does not leverage the program's dependency information. Consequently, it suffers from scalability issues when faced with DFGs of varying structures and exploding branches. System-by-differential-constraint (SDC) scheduling addresses scalability by heuristically converting resource constraints into resource dependencies and modifying the objective to minimize latency. This conversion simplifies the ILP problem to a LP problem with polynomial time complexity. However, it introduces invalid resource dependencies, resulting in poor scheduling quality. Existing machine learning (ML)-based methods leverage their high expressive power to learn complex scheduling policies. However, they neglect the construction of resource dependency graphs. NeuroSchedule utilizes graph neural networks (GNNs) to learn scheduling priorities. It generates customized scheduling priorities for each DFG, replacing the uniform topological sorting used in legacy systems (LS) to achieve lower latency than legacy systems. However, it neglects the perception of operation execution priorities, i.e., resource dependencies, resulting in poor scheduling quality. DeepRL transforms the scheduling problem into a Markov decision process (MDP) and solves it using reinforcement learning (RL) with a discrete action space. It employs convolutional neural networks (CNNs) to learn the temporal characteristics of scheduling. However, temporal characteristics make it difficult to express operation relationships, i.e., dependencies. Furthermore, DeepRL employs a decomposition approach to accommodate variable-sized DFGs. This approach makes data dependencies and FU allocations outside the field of view invisible, thus misleading the agent. Furthermore, it lacks a rollback mechanism and cannot compensate for erroneous modifications introduced by the aforementioned shortcomings. Therefore, the performance of DeepRL needs to be improved. Summary of the Invention

[0004] The present invention provides a high-level integrated scheduling method and device for digital circuits based on dependency perception, which can quickly converge to high-quality scheduling results, improve system performance, reduce the delay and resource utilization of scheduling results, and enhance the portability of scheduling methods.

[0005] In order to solve the above technical problems, the present invention provides a high-level integrated scheduling method for digital circuits based on dependency awareness, comprising:

[0006] Performing initialization scheduling on the digital circuit according to the device information, the data flow graph and the preset constraints to generate an initial scheduling result; wherein the initialization scheduling includes several operations;

[0007] Analyzing the device information, the data flow graph, the preset constraints, and the initial scheduling result to obtain several attributes of each operation and generate an initial node embedding for each operation;

[0008] Generate reinforcement learning state by concatenating the initial node embeddings of each operation into a node embedding matrix;

[0009] Inputting the reinforcement learning state into a preset policy network, updating the initial node embedding of each operation, and generating a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is integrated with operation dependency information;

[0010] Filtering the operations according to the preset constraints to construct a legal action space;

[0011] Mapping the Gaussian distribution to the legal action space, sampling and calculating the first legal action of the current time step in the legal action space;

[0012] The first legal action is executed to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

[0013] Furthermore, the device information, the data flow graph, the preset constraints and the initial scheduling result are analyzed to obtain several attributes of each operation and generate an initial node embedding for each operation, specifically:

[0014] Determining the functional unit delay of each operation by analyzing the device information;

[0015] Determining the number of predecessors and successors of each operation by analyzing the data flow graph;

[0016] Determining the earliest possible start clock cycle, the latest possible start clock cycle, and the current scheduled start clock cycle of each operation by analyzing the initial scheduling result;

[0017] Obtain the cumulative number of failures of each operation in the previous state, and analyze and obtain the number of rescheduling failures of each operation in combination with the data flow graph, the preset constraints and the initial scheduling result;

[0018] The initial node embedding of each operation is generated based on the functional unit delay, number of predecessors, number of successors, earliest possible start clock cycle, latest possible start clock cycle, current scheduling start clock cycle and number of rescheduling failures of each operation.

[0019] Furthermore, the reinforcement learning state is input into a preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated according to the updated node embedding of each operation, specifically:

[0020] Using four bidirectional graph neural network modules, the initial node embeddings of each operation are updated to obtain updated node embeddings of each operation; wherein each bidirectional graph neural network module includes a forward aggregation module, a backward aggregation module, and a fully connected layer; the first bidirectional graph neural network module, the second bidirectional graph neural network module, and the third bidirectional graph neural network module are connected to the fourth bidirectional graph neural network module via a multi-precision aggregation module;

[0021] Using the global message aggregation module, the updated node embeddings of each operation are weighted summed to generate the graph embedding;

[0022] Using a mean multilayer perceptron and a tanh activation function, the graph embedding is converted into a Gaussian distribution mean;

[0023] The graph embedding is converted into Gaussian distribution variance using variance multilayer perceptron and softplus activation function;

[0024] The Gaussian distribution mean and the Gaussian distribution variance are combined to form a Gaussian distribution.

[0025] Furthermore, the four bidirectional graph neural network modules are used to update the initial node embedding of each operation to obtain the updated node embedding of each operation, specifically:

[0026] Using a first bidirectional graph neural network module to update the initial node embedding of each operation, generating a first intermediate node embedding of each operation and dependency information of the operation to be rescheduled;

[0027] Using a second bidirectional graph neural network module, updating the first intermediate node embedding of each operation to generate the second intermediate node embedding and second operation dependency information of each operation;

[0028] Using a third bidirectional graph neural network module, the second intermediate node embedding of each operation is updated to generate a third intermediate node embedding and third operation dependency information of each operation;

[0029] The updated node embeddings of each operation are generated using the fourth bidirectional graph neural network module, combining the initial node embedding, the first intermediate node embedding, the second intermediate node embedding, and the third intermediate node embedding of each operation, as well as the dependency information of the operation to be rescheduled, the second operation dependency information, and the third operation dependency information.

[0030] Furthermore, the global message aggregation module is used to perform weighted summation on the updated node embeddings of each operation to generate a graph embedding, specifically:

[0031] Perform attention calculation on the updated node embedding of each operation;

[0032] The attention of each operation is determined as the weight of each operation, and the updated node embeddings of each operation are weighted summed to generate a graph embedding; wherein the graph embedding includes a dependency graph.

[0033] Furthermore, the operations are screened according to the preset constraints to construct a legal action space, specifically:

[0034] By analyzing the dependency graph, each operation is scheduled to the previous clock cycle and the next clock cycle in turn, and the legality of each operation is judged;

[0035] Determining an operation that satisfies the preset constraint when scheduled to the previous clock cycle or the next clock cycle as a legal operation;

[0036] Based on all legal operations, a legal action space is constructed.

[0037] Furthermore, mapping the Gaussian distribution to the legal action space, sampling and calculating the first legal action of the current time step in the legal action space, is specifically as follows:

[0038] Determining the size of the legal action space according to the number of legal operations in the legal action space;

[0039] Scale the Gaussian distribution according to the size of the legal action space;

[0040] Sampling the adjusted Gaussian distribution to obtain sample values, and calculating a legal action space index based on the sample values;

[0041] An operation corresponding to the first legal action is determined in the legal action space according to the legal action space index.

[0042] Furthermore, the executing the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result is specifically:

[0043] executing the first legal action according to the positive or negative value of the legal action space index to reschedule an operation corresponding to the first legal action and generate a rescheduling result;

[0044] Obtaining changed operation attributes by analyzing the rescheduling result; wherein the changed operation attributes include a currently scheduled start clock cycle of the operation corresponding to the first legal action, a latest possible start clock cycle of a predecessor operation of the operation corresponding to the first legal action, and an earliest possible start clock cycle of a successor operation of the operation corresponding to the first legal action;

[0045] The reinforcement learning state is updated according to the changed operational attributes.

[0046] Furthermore, after executing the first legal action to reschedule the operation corresponding to the first legal action and generating a rescheduling result, the method further includes:

[0047] The probability density function of Gaussian distribution is used to calculate the conditional transition probability;

[0048] Generating a reward by comparing the initial scheduling result and the rescheduling result;

[0049] Update the parameters of the policy network according to the conditional transition probability and the reward.

[0050] The present invention provides a high-level integrated scheduling method for digital circuits based on dependency awareness. The method performs initial scheduling of digital circuits based on device information, data flow graphs, and preset constraints, generating an initial scheduling result. By analyzing the initial scheduling information, several attributes of each operation are derived, and an initial node embedding for each operation is generated, thereby generating a reinforcement learning state. A preset policy network is used to update the initial node embedding for each operation and generate a Gaussian distribution. Each operation is screened according to preset constraints to construct a legal action space. The Gaussian distribution is mapped to the legal action space, and the first legal action at the current time step is sampled and calculated in the legal action space. The first legal action is executed to reschedule the operation corresponding to the first legal action and generate a rescheduling result. The method utilizes bidirectional message passing and global message aggregation to obtain operation relationships and learn program behavior, and constructs a precise and complete data dependency graph to guide search. A continuous action space and action legalization are used to accommodate DFGs of varying sizes and structures and reduce constraint violations. Furthermore, by learning the common dependency features between these DFGs, the method exhibits strong portability for circuits of different structures. By iteratively modifying resource dependencies and scheduling, the method rapidly converges to high-quality scheduling results, improving system performance and reducing latency and resource utilization.

[0051] Accordingly, the present invention provides a high-level integrated scheduling device for digital circuits based on dependency perception, comprising: an initial scheduling module, an attribute generation module, a state generation module, a dependency information fusion module, an action space construction module, an action sampling module, and a rescheduling module;

[0052] The initial scheduling module is used to perform initial scheduling on the digital circuit according to the device information, data flow graph and preset constraints, and generate an initial scheduling result; wherein the initial scheduling includes several operations;

[0053] The attribute generation module is used to analyze the device information, the data flow graph, the preset constraints and the initial scheduling result, obtain several attributes of each operation, and generate an initial node embedding of each operation;

[0054] The state generation module is used to generate a reinforcement learning state by splicing the initial node embeddings of each operation into a node embedding matrix;

[0055] The dependency information fusion module is used to input the reinforcement learning state into a preset policy network, update the initial node embedding of each operation, and generate a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is fused with the operation dependency information;

[0056] The action space construction module is used to filter the operations according to the preset constraints and construct a legal action space;

[0057] The action sampling module is used to map the Gaussian distribution to the legal action space, sample and calculate the first legal action of the current time step in the legal action space;

[0058] The rescheduling module is used to execute the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

[0059] The present invention provides a high-level integrated scheduling device for digital circuits based on dependency perception. Based on the organic combination of modules, the device information, data flow diagram and preset constraints are used to initialize the scheduling of digital circuits and generate an initial scheduling result. By analyzing the information of the initial scheduling, several attributes of each operation are obtained, and the initial node embedding of each operation is generated, thereby generating a reinforcement learning state. The initial node embedding of each operation is updated using a preset policy network, and a Gaussian distribution is generated. The operations are screened according to the preset constraints to construct a legal action space. The Gaussian distribution is mapped to the legal action space, and the first legal action of the current time step is sampled and calculated in the legal action space. The first legal action is executed to reschedule the operation corresponding to the first legal action and generate a rescheduling result. The present invention utilizes bidirectional message passing and global message aggregation to obtain operational relationships and learn program behaviors, and constructs an accurate and complete data dependency graph to guide the search; it accommodates DFGs of different sizes and structures and reduces constraint violations through continuous action space and action legalization; in addition, by learning the common dependency features between these DFGs, it has strong portability for circuits with different structures; by iteratively modifying resource dependencies and scheduling, it quickly converges to high-quality scheduling results, improves system performance, and reduces latency and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A flowchart of an embodiment of a high-level integrated scheduling method for digital circuits based on dependency awareness provided by the present invention;

[0061] Figure 2 A schematic diagram of a high-level integrated scheduling method for digital circuits provided by the present invention;

[0062] Figure 3 A schematic diagram of the reinforcement learning state generation method provided by the present invention;

[0063] Figure 4 A schematic diagram of the structure of an embodiment of the policy network provided by the present invention;

[0064] Figure 5 A schematic structural diagram of an embodiment of a bidirectional graph neural network module provided by the present invention;

[0065] Figure 6 A schematic diagram of the action legalization method provided by the present invention;

[0066] Figure 7 A schematic diagram of the reward generation method provided by the present invention;

[0067] Figure 8 A flow chart of another embodiment of the dependency-aware high-level integrated scheduling method for digital circuits provided by the present invention;

[0068] Figure 9 This is a structural diagram of an embodiment of a high-level integrated scheduling device for digital circuits based on dependency awareness provided by the present invention. DETAILED DESCRIPTION

[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0070] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0071] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0072] Example 1

[0073] In the first embodiment of the present invention, during scheduling, resource constraints may cause simultaneously executed operations to compete for the same functional unit, thereby causing resource conflicts. The scheduling method can resolve this conflict by adding resource dependencies. By reasonably adding resource constraints, resource overhead can be reduced and performance can be optimized. However, adding resource dependencies is a combinatorial optimization problem, and its probability is factorially related to the number of operations. Therefore, the present invention learns operation dependencies through a graph neural network and trains a reinforcement learning agent. The present invention can efficiently add resource dependencies, thereby quickly improving the initial scheduling and achieving high-performance scheduling within a limited time.

[0074] See also Figure 1 , is a flow chart of an embodiment of a high-level integrated scheduling method for digital circuits based on dependency awareness provided by the present invention. The method includes steps 101 to 107, each of which is specifically as follows:

[0075] Step 101: Initialize and schedule the digital circuit according to the device information, data flow graph and preset constraints to generate an initial scheduling result; wherein the initialization scheduling includes several operations.

[0076] As an example of the first embodiment of the present invention, see Figure 2 , is a schematic diagram of a high-level integrated scheduling method for digital circuits provided by the present invention. Figure 2 c ini and o i Represent the clock cycle index and operation index respectively. i ,o i ) elements are marked as "M" or "A", then the function unit MUL or function unit ALU is used respectively in c i Execute in i . When multiple "M"s appear in a column, it means that the delay of MUL is greater than 1 clock cycle. Assuming the delay constraint is 6 clock cycles, all operations must be executed within [c1,c6]. Schedule 1 schedules each operation to its earliest feasible clock cycle, which can satisfy all its corresponding data dependencies. Schedule 2 schedules o4 to [c4,c5] by adding a MUL resource constraint to avoid parallel execution with o3, thereby causing resource contention. Schedule 3 schedules o4 to [c4,c5] by adding the dependency constraint o3→o4 to avoid dependency conflicts. Since Schedule 2 and Schedule 3 have lower resource utilization with the same delay, Schedule 2 and Schedule 3 are better than Schedule 1.

[0077] Step 102: Analyze the device information, the data flow graph, the preset constraints and the initial scheduling result, obtain several attributes of each operation, and generate an initial node embedding for each operation.

[0078] Furthermore, in the first embodiment of the present invention, the device information, the data flow graph, the preset constraints, and the initial scheduling result are analyzed to obtain several attributes of each operation, and generate an initial node embedding for each operation, specifically:

[0079] Determining the functional unit delay of each operation by analyzing the device information;

[0080] Determining the number of predecessors and successors of each operation by analyzing the data flow graph;

[0081] Determining the earliest possible start clock cycle, the latest possible start clock cycle, and the current scheduled start clock cycle of each operation by analyzing the initial scheduling result;

[0082] Obtain the cumulative number of failures of each operation in the previous state, and analyze and obtain the number of rescheduling failures of each operation in combination with the data flow graph, the preset constraints and the initial scheduling result;

[0083] The initial node embedding of each operation is generated based on the functional unit delay, number of predecessors, number of successors, earliest possible start clock cycle, latest possible start clock cycle, current scheduling start clock cycle and number of rescheduling failures of each operation.

[0084] In the first embodiment of the present invention, seven attributes of each operation can be obtained by analyzing the information in the initialization schedule. The delay of the functional unit is obtained by analyzing the device information; the number of predecessors and successors is obtained by analyzing the data flow graph (DFG); the earliest / latest possible starting clock cycle and the starting clock cycle of the current schedule are obtained by analyzing the initial schedule result; and the number of failures during rescheduling of the current operation can be obtained by analyzing the data flow graph (DFG), constraints, current schedule results, and the cumulative number of failures of operations in the previous state, helping subsequent reinforcement learning agents avoid invalid operations.

[0085] Step 103: Generate a reinforcement learning state by concatenating the initial node embeddings of each operation into a node embedding matrix.

[0086] In the first embodiment of the present invention, see Figure 3 , is a schematic diagram of the reinforcement learning state generation method provided by the present invention. Assume that the target device has two available ADDs and two MULs, with delays of one and two clock cycles, respectively. Taking o4 as an example, according to the data flow graph, ASAP / ALAP scheduling, device parameters, and constraints, it is known that it is executed on the MUL with a delay of two clock cycles. o4 has a predecessor, o2, and no successor. The earliest feasible / latest feasible / currently scheduled clock cycles of o4 are c3, c5, and c3, respectively. In addition, o4 has not previously violated any constraints, resulting in errors. Therefore, after analyzing the seven attributes of o4, the node embedding of o4 can be expressed as o4 = [2, 1, 0, 3, 5, 3, 0]. The initial node embeddings of each operation are concatenated to obtain the node embedding matrix, thereby generating the reinforcement learning state s = [o1, o2, …, o6].

[0087] Step 104: Input the reinforcement learning state into a preset policy network, update the initial node embedding of each operation, and generate a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is integrated with the operation dependency information.

[0088] Furthermore, in the first embodiment of the present invention, the reinforcement learning state is input into a preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated according to the updated node embedding of each operation, specifically:

[0089] Using four bidirectional graph neural network modules, the initial node embeddings of each operation are updated to obtain updated node embeddings of each operation; wherein each bidirectional graph neural network module includes a forward aggregation module, a backward aggregation module, and a fully connected layer; the first bidirectional graph neural network module, the second bidirectional graph neural network module, and the third bidirectional graph neural network module are connected to the fourth bidirectional graph neural network module via a multi-precision aggregation module;

[0090] Using the global message aggregation module, the updated node embeddings of each operation are weighted summed to generate the graph embedding;

[0091] Using a mean multilayer perceptron and a tanh activation function, the graph embedding is converted into a Gaussian distribution mean;

[0092] The graph embedding is converted into Gaussian distribution variance using variance multilayer perceptron and softplus activation function;

[0093] The Gaussian distribution mean and the Gaussian distribution variance are combined to form a Gaussian distribution.

[0094] In the first embodiment of the present invention, see Figure 4 , is a structural diagram of an embodiment of the policy network provided by the present invention. After the reinforcement learning state is input into the policy network based on the graph neural network, the normalized mean and variance of the Gaussian distribution can be inferred. Among them, the policy network based on the graph neural network includes three stages: a two-way message passing stage, a global message aggregation stage, and a Gaussian distribution generation stage. The two-way message passing stage includes four two-way graph neural network modules, and the first three two-way graph neural network modules are connected to the fourth two-way graph neural network module through a multi-precision aggregation module. This stage is used to update the node embedding and fuse the multi-precision operation dependency information. The global message aggregation stage includes an attention fully connected (FC) layer, a scaling layer, and a sum pooling layer. This stage is used to aggregate node embeddings to generate graph embeddings. The Gaussian distribution generation stage converts the graph embedding into the Gaussian distribution mean μ' through a mean multi-layer perceptron and a tanh activation function, and converts the graph embedding into the Gaussian distribution variance δ through a variance multi-layer perceptron and a softplus activation function. 2 .

[0095] Furthermore, in the first embodiment of the present invention, four bidirectional graph neural network modules are used to update the initial node embedding of each operation to obtain the updated node embedding of each operation, specifically:

[0096] Using a first bidirectional graph neural network module to update the initial node embedding of each operation, generating a first intermediate node embedding of each operation and dependency information of the operation to be rescheduled;

[0097] Using a second bidirectional graph neural network module, updating the first intermediate node embedding of each operation to generate the second intermediate node embedding and second operation dependency information of each operation;

[0098] Using a third bidirectional graph neural network module, the second intermediate node embedding of each operation is updated to generate a third intermediate node embedding and third operation dependency information of each operation;

[0099] The updated node embeddings of each operation are generated using the fourth bidirectional graph neural network module, combining the initial node embedding, the first intermediate node embedding, the second intermediate node embedding, and the third intermediate node embedding of each operation, as well as the dependency information of the operation to be rescheduled, the second operation dependency information, and the third operation dependency information.

[0100] In the first embodiment of the present invention, see Figure 5 , is a structural diagram of an embodiment of the bidirectional graph neural network module provided by the present invention. The bidirectional graph neural network module includes a forward aggregation layer, a backward aggregation layer and a fully connected layer. Compared with the original design without backward aggregation, the bidirectional graph neural network module of the present invention can enhance the expression of operation dependencies and update the embedding vector of each node by aggregating the embeddings of its predecessor / successor. For example, in the forward aggregation, the embedding of o2 aggregates the embedding of o1 to generate its forward embedding. In the backward aggregation, o2 aggregates the embeddings of o4 and o6 to generate the backward embedding. After all operations are aggregated, the forward aggregation embedding matrix and the backward aggregation embedding matrix generated are cascaded and converted to the required output size through a fully connected layer. The transformed embedding is then activated by the leakyRelu function to generate the updated embedding matrix of the bidirectional graph neural network module. After updating the node embedding through multiple graph neural network modules, the perception domain of each node to the neighboring nodes will gradually expand, thereby capturing operation dependency information of multiple precisions and obtaining the relationship between the node and its high-order neighbors. Furthermore, the fourth bidirectional graph neural network module not only embeds the aggregated embeddings in the forward and backward directions, but also the initial and updated embeddings from the first to third bidirectional graph neural network modules, thereby alleviating vanishing gradients and over-smoothing, and obtaining dependency graphs at all resolutions for better perception of resource dependencies. The bidirectional message passing stage can convert 7-dimensional node attributes into 64-dimensional node attributes.

[0101] Furthermore, in the first embodiment of the present invention, a global message aggregation module is used to perform weighted summation on the updated node embeddings of each operation to generate a graph embedding, specifically:

[0102] Perform attention calculation on the updated node embedding of each operation;

[0103] The attention of each operation is determined as the weight of each operation, and the updated node embeddings of each operation are weighted summed to generate a graph embedding; wherein the graph embedding includes a dependency graph.

[0104] In the first embodiment of the present invention, during the global message aggregation phase, attention is first calculated for each node embedding using the fully connected attention layer. These attentions are then used to perform a weighted summation of these node embeddings, ultimately generating a graph embedding. This graph embedding implicitly incorporates information about the dependency graph, which can guide reinforcement learning agents to better perceive resource dependencies, thereby improving scheduling performance.

[0105] In the first embodiment of the present invention, in the Gaussian distribution generation stage, the 64-dimensional graph embedding is converted into a 1-dimensional [0,1] real number μ' by the mean multi-layer perceptron and the tanh activation function to obtain the Gaussian distribution mean. The 64-dimensional graph embedding is converted into a 1-dimensional positive real number δ by the variance multi-layer perceptron and the softplus activation function. 2 , we can get the Gaussian distribution variance. According to the Gaussian distribution mean μ' and Gaussian distribution variance δ 2 , we can get the Gaussian distribution N(μ',δ 2 ).

[0106] Step 105: Filter the operations according to the preset constraints to construct a legal action space.

[0107] Furthermore, in the first embodiment of the present invention, the operations are screened according to the preset constraints to construct a legal action space, specifically:

[0108] By analyzing the dependency graph, each operation is scheduled to the previous clock cycle and the next clock cycle in turn, and the legality of each operation is judged;

[0109] Determining an operation that satisfies the preset constraint when scheduled to the previous clock cycle or the next clock cycle as a legal operation;

[0110] Based on all legal operations, a legal action space is constructed.

[0111] In the first embodiment of the present invention, action legalization can adapt to data flow graphs of different topological structures and reduce the violation of constraints. To perform action legalization, it is necessary to first construct a legal action space. Each operation is judged. When an operation is scheduled to the previous clock cycle or the next clock cycle and can meet all the preset constraints, the operation is added to the legal action space A. legal When all operations are judged, the size of the legal action space can be determined based on the number of operations in the legal action space.

[0112] As an example of the first embodiment of the present invention, see Figure 6 , is a schematic diagram of the action legalization method provided by the present invention, Figure 6In the figure, o1 is in the first clock cycle (clock cycle), so it cannot move to the previous clock cycle. Due to the dependency relationships o1→o2 and o1→o3, and their starting clock cycles are both c2, o1 cannot move to the next clock cycle. Therefore, operation o1 is not a legal operation. Similarly, by analyzing the dependencies of o2, o3, and o5, we can see that they are not legal operations either. Only operations o4 and o6 can be scheduled to their next clock cycles respectively, so o4 and o6 are legal operations. By analyzing each operation, we can conclude that the legal action space is A legal ={o4,o6}.

[0113] Step 106: Map the Gaussian distribution to the legal action space, sample and calculate the first legal action of the current time step in the legal action space.

[0114] Furthermore, in the first embodiment of the present invention, the Gaussian distribution is mapped to the legal action space, and the first legal action at the current time step is sampled and calculated in the legal action space, specifically:

[0115] Determining the size of the legal action space according to the number of legal operations in the legal action space;

[0116] Scale the Gaussian distribution according to the size of the legal action space;

[0117] Sampling the adjusted Gaussian distribution to obtain sample values, and calculating a legal action space index based on the sample values;

[0118] An operation corresponding to the first legal action is determined in the legal action space according to the legal action space index.

[0119] In the first embodiment of the present invention, the size of the legal action space |A legal |For the normalized Gaussian distribution N(μ',δ 2 ) is scaled, specifically the Gaussian distribution mean μ' is scaled to obtain μ=|A legal |μ'. In the scaled Gaussian distribution N(μ,δ 2 ) to obtain the sample value i t , and then find the legal action space index i t,r =min(|A legal |,round(|i t -μ|)+1), according to the legal action space index, sample the legal action of the corresponding action number in the legal action space, adjust the clock cycle of the operation corresponding to the action number, that is, the i-th action in the legal action space t,r Action a t =A legal (i t,r) is the operation to be rescheduled. In addition, since the operation to be rescheduled a t is the legal action space index i t Therefore, the probability density function of the Gaussian distribution can be used to calculate its conditional transition probability, which is used in the gradient calculation used in training the policy network.

[0120] As an example of the first embodiment of the present invention, see Figure 6 , is a schematic diagram of the action legalization method provided by the present invention, Figure 6 The Gaussian distribution obtained in is N(0.5,2). Since the legal action space contains 2 operations, the size of the legal action space |A legal |=2. According to the size of the legal action space, the Gaussian distribution N(0.5,2) can be scaled to N(0.5*|A legal |,2)=N(1,2), and sample the sample value i from it t =1.2, then the legal action space index is calculated as i t,r =min(|A legal |,round(|i t -μ|)+1)=min(2,round(0.2)+1)=1. Therefore, for the legal action space A legal The first operation a in t =A legal (i t,r )=o4 clock cycle is adjusted.

[0121] Step 107: Execute the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

[0122] Furthermore, in the first embodiment of the present invention, in executing the first legal action, the operation corresponding to the first legal action is rescheduled to generate a rescheduling result, specifically:

[0123] executing the first legal action according to the positive or negative value of the legal action space index to reschedule an operation corresponding to the first legal action and generate a rescheduling result;

[0124] Obtaining changed operation attributes by analyzing the rescheduling result; wherein the changed operation attributes include a currently scheduled start clock cycle of the operation corresponding to the first legal action, a latest possible start clock cycle of a predecessor operation of the operation corresponding to the first legal action, and an earliest possible start clock cycle of a successor operation of the operation corresponding to the first legal action;

[0125] The reinforcement learning state is updated according to the changed operational attributes.

[0126] In the first embodiment of the present invention, when a first legal action is sampled in the legal action space and an operation to be rescheduled is obtained, the clock period of the sampled action is adjusted according to the positive or negative index of the legal action space. t ≥0, the sampling action is scheduled forward by one clock cycle, otherwise it is scheduled backward by one clock cycle. Figure 6 For example, since the sample value i t =1.2, i.e. i t ≥0, so add resource dependency o3→o4 and schedule o4 to the next clock cycle, which is c5.

[0127] In a first embodiment of the present invention, based on the initial scheduling result, the scheduling result of the previous time step can be improved by performing a first legal action to adjust the clock period of the corresponding operation, thereby changing the current scheduling start clock period of the rescheduled operation, the latest execution time of the predecessor of the rescheduled operation, and the earliest execution time of the successor of the rescheduled operation, thereby generating a new reinforcement learning state. The current new reinforcement learning state is input into the policy network loop, and rescheduling is iterated repeatedly until the maximum time step is reached, or if the schedule does not improve within a few time steps, the iteration is terminated.

[0128] Furthermore, in the first embodiment of the present invention, after executing the first legal action to reschedule the operation corresponding to the first legal action and generating a rescheduling result, the method further includes:

[0129] The probability density function of Gaussian distribution is used to calculate the conditional transition probability;

[0130] Generating a reward by comparing the initial scheduling result and the rescheduling result;

[0131] Update the parameters of the policy network according to the conditional transition probability and the reward.

[0132] In the first embodiment of the present invention, during the training process of the policy network, the reward r can be generated by comparing the delay and resource overhead of the initial scheduling results and the rescheduling results before and after rescheduling. t =∑ f R reduction,f +L reduction +δ, where R reduction,f and L reduction are the amount by which the functional unit f and the latency are reduced in the time step of the rescheduling operation, and δ is the penalty used to guide the reinforcement learning agent to avoid violating the constraints. For a trajectory τ of an episode, by adding the reward r tBy multiplying by the discount factor γ∈(0,1], the cumulative total reward R(τ) can be calculated and used to update the parameters of the policy network. If the reward is e time steps earlier than the last time step of this round, it is discounted to γ e r. The reward discount indicates the preference for immediate rewards. If the current reinforcement learning has completed one round, the reinforcement learning agent will be updated using the gradient descent method. The reward expectation is in, is the training set of data flow graph, E θ,g [] is to find the reward variable R when the g-th data flow graph and parameter are θ θg The expected value of . The parameter update method is Where η is the learning rate,

[0133]

[0134] Where N is the number of rounds of the Monte Carlo method, n is the round number, T n is the total number of steps in the nth reinforcement learning round, t is the sequence number of the step, γ is the discount factor, is the conditional transition probability calculated when sampling actions in the legal action space, r t is the reward, and b is the reward baseline value, which is used to stabilize the training process.

[0135] As an example of the first embodiment of the present invention, see Figure 7 , is a schematic diagram of the reward generation method provided by the present invention. After executing operation o4, the required multiplier MUL is reduced from 2 to 1, while the required adder ADD remains 1, so R reduction = 1. In addition, there is no delay reduction and no constraint violation, so r t =1.

[0136] As an example of the first embodiment of the present invention, see Figure 8, is a flow chart of another embodiment of the dependency-aware high-level integrated scheduling method for digital circuits provided by the present invention. It primarily includes seven phases: initialization, analysis, inference, action legalization, rescheduling, comparison, and update. In the initialization phase, initial scheduling is performed based on device information, constraints, and a given data flow graph (DFG). In the analysis phase, the information from the initialization phase is analyzed to obtain the seven attributes of each operation, thereby generating a node embedding. These node embeddings are then connected to generate a reinforcement learning state. In the inference phase, the reinforcement learning state is input into a policy network based on a graph neural network, and the normalized mean and variance of the Gaussian distribution are inferred. In the action legalization phase, a legal action space is constructed, the Gaussian distribution mean is scaled, and actions are sampled from the legal action space according to the Gaussian distribution. In the rescheduling phase, the sampled actions are executed, the reinforcement learning state is updated, and a new time step is subsequently entered. The comparison and update phases are performed during the training of the policy network. In the comparison phase, the latency and resource overhead of the two scheduling results before and after executing the sampled action are compared, and a reward is generated to guide the update of the reinforcement learning agent. During the update phase, if the current reinforcement learning has completed a round, the reinforcement learning agent will be updated using gradient descent. This invention utilizes graph neural networks to capture the relationships between operations and learn program behaviors. These learned relationships and behaviors guide the reinforcement learning agent in constructing a complete resource dependency graph and performing reward-guided exploration, ultimately converging quickly to high-quality scheduling results.

[0137] In summary, the first embodiment of the present invention provides a high-level integrated scheduling method for digital circuits based on dependency perception, which initializes the scheduling of digital circuits according to device information, data flow diagrams and preset constraints to generate an initial scheduling result; by analyzing the information of the initialization scheduling, several attributes of each operation are obtained, and the initial node embedding of each operation is generated, and then the reinforcement learning state is generated; using the preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated; each operation is screened according to the preset constraints to construct a legal action space; the Gaussian distribution is mapped to the legal action space, and the first legal action of the current time step is sampled and calculated in the legal action space; the first legal action is executed to reschedule the operation corresponding to the first legal action to generate a rescheduling result. The present invention utilizes bidirectional message passing and global message aggregation to obtain operational relationships and learn program behaviors, and constructs an accurate and complete data dependency graph to guide the search; it accommodates DFGs of different sizes and structures and reduces constraint violations through continuous action space and action legalization; in addition, by learning the common dependency features between these DFGs, it has strong portability for circuits with different structures; by iteratively modifying resource dependencies and scheduling, it quickly converges to high-quality scheduling results, improves system performance, and reduces latency and resource utilization.

[0138] Example 2

[0139] See also Figure 9 , is a schematic structural diagram of an embodiment of a high-level integrated scheduling device for digital circuits based on dependency awareness provided by the present invention, the device comprising an initial scheduling module 201, an attribute generation module 202, a state generation module 203, a dependency information fusion module 204, an action space construction module 205, an action sampling module 206, and a rescheduling module 207;

[0140] The initial scheduling module 201 is used to perform initial scheduling on the digital circuit according to the device information, data flow graph and preset constraints, and generate an initial scheduling result; wherein, the initial scheduling includes several operations;

[0141] The attribute generation module 202 is used to analyze the device information, the data flow graph, the preset constraints and the initial scheduling result, obtain several attributes of each operation, and generate an initial node embedding for each operation;

[0142] The state generation module 203 is used to generate a reinforcement learning state by concatenating the initial node embeddings of each operation into a node embedding matrix;

[0143] The dependency information fusion module 204 is used to input the reinforcement learning state into a preset policy network, update the initial node embedding of each operation, and generate a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is fused with the operation dependency information;

[0144] The action space construction module 205 is used to filter the operations according to the preset constraints and construct a legal action space;

[0145] The action sampling module 206 is used to map the Gaussian distribution to the legal action space, sample and calculate the first legal action in the current time step in the legal action space;

[0146] The rescheduling module 207 is configured to execute the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

[0147] Furthermore, in the second embodiment of the present invention, the device information, the data flow graph, the preset constraints, and the initial scheduling result are analyzed to obtain several attributes of each operation, and generate an initial node embedding for each operation, specifically:

[0148] Determining the functional unit delay of each operation by analyzing the device information;

[0149] Determining the number of predecessors and successors of each operation by analyzing the data flow graph;

[0150] Determining the earliest possible start clock cycle, the latest possible start clock cycle, and the current scheduled start clock cycle of each operation by analyzing the initial scheduling result;

[0151] Obtain the cumulative number of failures of each operation in the previous state, and analyze and obtain the number of rescheduling failures of each operation in combination with the data flow graph, the preset constraints and the initial scheduling result;

[0152] The initial node embedding of each operation is generated based on the functional unit delay, number of predecessors, number of successors, earliest possible start clock cycle, latest possible start clock cycle, current scheduling start clock cycle and number of rescheduling failures of each operation.

[0153] Furthermore, in a second embodiment of the present invention, the reinforcement learning state is input into a preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated based on the updated node embedding of each operation, specifically:

[0154] Using four bidirectional graph neural network modules, the initial node embeddings of each operation are updated to obtain updated node embeddings of each operation; wherein each bidirectional graph neural network module includes a forward aggregation module, a backward aggregation module, and a fully connected layer; the first bidirectional graph neural network module, the second bidirectional graph neural network module, and the third bidirectional graph neural network module are connected to the fourth bidirectional graph neural network module via a multi-precision aggregation module;

[0155] Using the global message aggregation module, the updated node embeddings of each operation are weighted summed to generate the graph embedding;

[0156] Using a mean multilayer perceptron and a tanh activation function, the graph embedding is converted into a Gaussian distribution mean;

[0157] The graph embedding is converted into Gaussian distribution variance using variance multilayer perceptron and softplus activation function;

[0158] The Gaussian distribution mean and the Gaussian distribution variance are combined to form a Gaussian distribution.

[0159] Furthermore, in the second embodiment of the present invention, four bidirectional graph neural network modules are used to update the initial node embedding of each operation to obtain the updated node embedding of each operation, specifically:

[0160] Using a first bidirectional graph neural network module to update the initial node embedding of each operation, generating a first intermediate node embedding of each operation and dependency information of the operation to be rescheduled;

[0161] Using a second bidirectional graph neural network module, updating the first intermediate node embedding of each operation to generate the second intermediate node embedding and second operation dependency information of each operation;

[0162] Using a third bidirectional graph neural network module, the second intermediate node embedding of each operation is updated to generate a third intermediate node embedding and third operation dependency information of each operation;

[0163] The updated node embeddings of each operation are generated using the fourth bidirectional graph neural network module, combining the initial node embedding, the first intermediate node embedding, the second intermediate node embedding, and the third intermediate node embedding of each operation, as well as the dependency information of the operation to be rescheduled, the second operation dependency information, and the third operation dependency information.

[0164] Furthermore, in the second embodiment of the present invention, a global message aggregation module is used to perform weighted summation on the updated node embeddings of each operation to generate a graph embedding, specifically:

[0165] Perform attention calculation on the updated node embedding of each operation;

[0166] The attention of each operation is determined as the weight of each operation, and the updated node embeddings of each operation are weighted summed to generate a graph embedding; wherein the graph embedding includes a dependency graph.

[0167] Furthermore, in the second embodiment of the present invention, the operations are screened according to the preset constraints to construct a legal action space, specifically:

[0168] By analyzing the dependency graph, each operation is scheduled to the previous clock cycle and the next clock cycle in turn, and the legality of each operation is judged;

[0169] Determining an operation that satisfies the preset constraint when scheduled to the previous clock cycle or the next clock cycle as a legal operation;

[0170] Based on all legal operations, a legal action space is constructed.

[0171] Furthermore, in a second embodiment of the present invention, the Gaussian distribution is mapped to the legal action space, and the first legal action at the current time step is sampled and calculated in the legal action space, specifically:

[0172] Determining the size of the legal action space according to the number of legal operations in the legal action space;

[0173] Scale the Gaussian distribution according to the size of the legal action space;

[0174] Sampling the adjusted Gaussian distribution to obtain sample values, and calculating a legal action space index based on the sample values;

[0175] An operation corresponding to the first legal action is determined in the legal action space according to the legal action space index.

[0176] Furthermore, in the second embodiment of the present invention, executing the first legal action to reschedule the operation corresponding to the first legal action and generating a rescheduling result is specifically:

[0177] executing the first legal action according to the positive or negative value of the legal action space index to reschedule an operation corresponding to the first legal action and generate a rescheduling result;

[0178] Obtaining changed operation attributes by analyzing the rescheduling result; wherein the changed operation attributes include a currently scheduled start clock cycle of the operation corresponding to the first legal action, a latest possible start clock cycle of a predecessor operation of the operation corresponding to the first legal action, and an earliest possible start clock cycle of a successor operation of the operation corresponding to the first legal action;

[0179] The reinforcement learning state is updated according to the changed operational attributes.

[0180] Furthermore, in the second embodiment of the present invention, after executing the first legal action to reschedule the operation corresponding to the first legal action and generating a rescheduling result, the method further includes:

[0181] The probability density function of Gaussian distribution is used to calculate the conditional transition probability;

[0182] Generating a reward by comparing the initial scheduling result and the rescheduling result;

[0183] Update the parameters of the policy network according to the conditional transition probability and the reward.

[0184] In summary, the second embodiment of the present invention provides a high-level integrated scheduling device for digital circuits based on dependency perception, which is based on the organic combination of modules, and initializes the scheduling of digital circuits according to device information, data flow diagrams and preset constraints to generate initial scheduling results; by analyzing the information of the initialization scheduling, several attributes of each operation are obtained, and the initial node embedding of each operation is generated, and then the reinforcement learning state is generated; using the preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated; each operation is screened according to the preset constraints to construct a legal action space; the Gaussian distribution is mapped to the legal action space, and the first legal action of the current time step is sampled and calculated in the legal action space; the first legal action is executed to reschedule the operation corresponding to the first legal action to generate a rescheduling result. The present invention utilizes bidirectional message passing and global message aggregation to obtain operational relationships and learn program behaviors, and constructs an accurate and complete data dependency graph to guide the search; it accommodates DFGs of different sizes and structures and reduces constraint violations through continuous action space and action legalization; in addition, by learning the common dependency features between these DFGs, it has strong portability for circuits with different structures; by iteratively modifying resource dependencies and scheduling, it quickly converges to high-quality scheduling results, improves system performance, and reduces latency and resource utilization.

[0185] The specific embodiments described above further illustrate the objectives, technical solutions, 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 high-level integrated scheduling method for digital circuits based on dependency awareness, characterized in that: include: Performing initialization scheduling on the digital circuit according to the device information, the data flow graph and the preset constraints to generate an initial scheduling result; wherein the initialization scheduling includes several operations; Analyzing the device information, the data flow graph, the preset constraints, and the initial scheduling result to obtain several attributes of each operation and generate an initial node embedding for each operation; Generate reinforcement learning state by concatenating the initial node embeddings of each operation into a node embedding matrix; Inputting the reinforcement learning state into a preset policy network, updating the initial node embedding of each operation, and generating a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is integrated with operation dependency information; Filter the operations according to the preset constraints to construct a legal action space; Mapping the Gaussian distribution to the legal action space, sampling and calculating the first legal action of the current time step in the legal action space; The first legal action is executed to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

2. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 1, characterized in that: The analyzing the device information, the data flow graph, the preset constraints and the initial scheduling result to obtain several attributes of each operation and generate an initial node embedding for each operation is specifically as follows: Determining the functional unit delay of each operation by analyzing the device information; Determining the number of predecessors and successors of each operation by analyzing the data flow graph; Determining the earliest possible start clock cycle, the latest possible start clock cycle, and the current scheduled start clock cycle of each operation by analyzing the initial scheduling result; Obtain the cumulative number of failures of each operation in the previous state, and analyze and obtain the number of rescheduling failures of each operation by combining the data flow graph, the preset constraints and the initial scheduling result; The initial node embedding of each operation is generated based on the functional unit delay, number of predecessors, number of successors, earliest possible start clock cycle, latest possible start clock cycle, current scheduling start clock cycle and number of rescheduling failures of each operation.

3. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 1, characterized in that: The reinforcement learning state is input into the preset policy network, the initial node embedding of each operation is updated, and a Gaussian distribution is generated according to the updated node embedding of each operation, specifically: Using four bidirectional graph neural network modules, the initial node embeddings of each operation are updated to obtain updated node embeddings of each operation; wherein each bidirectional graph neural network module includes a forward aggregation module, a backward aggregation module, and a fully connected layer; the first bidirectional graph neural network module, the second bidirectional graph neural network module, and the third bidirectional graph neural network module are connected to the fourth bidirectional graph neural network module via a multi-precision aggregation module; Using the global message aggregation module, the updated node embeddings of each operation are weighted summed to generate the graph embedding; Using a mean multilayer perceptron and a tanh activation function, the graph embedding is converted into a Gaussian distribution mean; The graph embedding is converted into Gaussian distribution variance using variance multilayer perceptron and softplus activation function; The Gaussian distribution mean and the Gaussian distribution variance are combined to form a Gaussian distribution.

4. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 3, characterized in that: The four bidirectional graph neural network modules are used to update the initial node embedding of each operation to obtain the updated node embedding of each operation, specifically: Using a first bidirectional graph neural network module to update the initial node embedding of each operation, generating a first intermediate node embedding of each operation and dependency information of the operation to be rescheduled; Using a second bidirectional graph neural network module, updating the first intermediate node embedding of each operation to generate the second intermediate node embedding and second operation dependency information of each operation; Using a third bidirectional graph neural network module, the second intermediate node embedding of each operation is updated to generate a third intermediate node embedding and third operation dependency information of each operation; The updated node embeddings of each operation are generated using the fourth bidirectional graph neural network module, combining the initial node embedding, the first intermediate node embedding, the second intermediate node embedding, and the third intermediate node embedding of each operation, as well as the dependency information of the operation to be rescheduled, the second operation dependency information, and the third operation dependency information.

5. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 3, characterized in that: The global message aggregation module is used to perform weighted summation on the updated node embeddings of each operation to generate a graph embedding, specifically: Perform attention calculation on the updated node embedding of each operation; The attention of each operation is determined as the weight of each operation, and the updated node embeddings of each operation are weighted summed to generate a graph embedding; wherein the graph embedding includes a dependency graph.

6. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 5, characterized in that: The operations are screened according to the preset constraints to construct a legal action space, specifically: By analyzing the dependency graph, each operation is scheduled to the previous clock cycle and the next clock cycle in turn, and the legality of each operation is judged; Determining an operation that satisfies the preset constraint when scheduled to the previous clock cycle or the next clock cycle as a legal operation; Based on all legal operations, a legal action space is constructed.

7. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 6, characterized in that: Mapping the Gaussian distribution to the legal action space, sampling and calculating the first legal action of the current time step in the legal action space, specifically: Determining the size of the legal action space according to the number of legal operations in the legal action space; Scale the Gaussian distribution according to the size of the legal action space; Sampling the adjusted Gaussian distribution to obtain sample values, and calculating a legal action space index based on the sample values; An operation corresponding to the first legal action is determined in the legal action space according to the legal action space index.

8. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 7, characterized in that: The executing the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result is specifically: executing the first legal action according to the positive or negative value of the legal action space index to reschedule an operation corresponding to the first legal action and generate a rescheduling result; Obtaining changed operation attributes by analyzing the rescheduling result; wherein the changed operation attributes include a currently scheduled start clock cycle of the operation corresponding to the first legal action, a latest possible start clock cycle of a predecessor operation of the operation corresponding to the first legal action, and an earliest possible start clock cycle of a successor operation of the operation corresponding to the first legal action; The reinforcement learning state is updated according to the changed operational attributes.

9. The dependency-aware high-level integrated scheduling method for digital circuits according to claim 1, wherein: After executing the first legal action to reschedule the operation corresponding to the first legal action and generating a rescheduling result, the method further includes: The probability density function of Gaussian distribution is used to calculate the conditional transition probability; Generate a reward by comparing the initial scheduling result and the rescheduling result; Update the parameters of the policy network according to the conditional transition probability and the reward.

10. A high-level integrated scheduling device for digital circuits based on dependency perception, characterized in that: include: Initial scheduling module, attribute generation module, state generation module, dependency information fusion module, action space construction module, action sampling module and rescheduling module; The initial scheduling module is used to perform initial scheduling on the digital circuit according to the device information, data flow graph and preset constraints, and generate an initial scheduling result; wherein the initial scheduling includes several operations; The attribute generation module is used to analyze the device information, the data flow graph, the preset constraints and the initial scheduling result, obtain several attributes of each operation, and generate an initial node embedding of each operation; The state generation module is used to generate a reinforcement learning state by concatenating the initial node embeddings of each operation into a node embedding matrix; The dependency information fusion module is used to input the reinforcement learning state into a preset policy network, update the initial node embedding of each operation, and generate a Gaussian distribution based on the updated node embedding of each operation; wherein the updated node embedding of each operation is fused with the operation dependency information; The action space construction module is used to filter the operations according to the preset constraints and construct a legal action space; The action sampling module is used to map the Gaussian distribution to the legal action space, sample and calculate the first legal action of the current time step in the legal action space; The rescheduling module is used to execute the first legal action to reschedule the operation corresponding to the first legal action and generate a rescheduling result.

Citation Information

Patent Citations

  • Power grid dispatching method based on combination of inverse reinforcement learning and multi-factor multi-action fusion

    CN114997672A

  • Graph neural network-based high-level comprehensive scheduling method and device

    CN116187242A