CN114756358A - DAG task scheduling method, device, equipment and storage medium - Google Patents
DAG task scheduling method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114756358A CN114756358A CN202210671115.8A CN202210671115A CN114756358A CN 114756358 A CN114756358 A CN 114756358A CN 202210671115 A CN202210671115 A CN 202210671115A CN 114756358 A CN114756358 A CN 114756358A
- Authority
- CN
- China
- Prior art keywords
- task
- dag
- dag task
- scheduling
- network model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 230000006870 function Effects 0.000 claims abstract description 92
- 239000011159 matrix material Substances 0.000 claims abstract description 88
- 238000013528 artificial neural network Methods 0.000 claims abstract description 51
- 230000002787 reinforcement Effects 0.000 claims abstract description 33
- 238000012549 training Methods 0.000 claims abstract description 24
- 238000009826 distribution Methods 0.000 claims abstract description 18
- 239000013598 vector Substances 0.000 claims description 32
- 238000010276 construction Methods 0.000 claims description 22
- 238000004422 calculation algorithm Methods 0.000 claims description 21
- 238000011156 evaluation Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 14
- 230000007246 mechanism Effects 0.000 claims description 13
- 230000004913 activation Effects 0.000 claims description 11
- 230000002776 aggregation Effects 0.000 claims description 9
- 238000004220 aggregation Methods 0.000 claims description 9
- 238000012913 prioritisation Methods 0.000 claims description 7
- 238000004891 communication Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000012163 sequencing technique Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 239000000126 substance Substances 0.000 description 5
- 238000005457 optimization Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000011478 gradient descent method Methods 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- KDYFGRWQOYBRFD-UHFFFAOYSA-N succinic acid Chemical compound OC(=O)CCC(O)=O KDYFGRWQOYBRFD-UHFFFAOYSA-N 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 241000287196 Asthenes Species 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a DAG task scheduling method, device, equipment and storage medium. The method comprises the following steps: constructing a network model according to the sequence of the directed graph neural network and the sequential decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective; acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set; training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model; and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using the parallel computing system according to the scheduling sequence. The method can shorten the DAG task scheduling length, improve the parallel execution efficiency of the DAG task, and solve the problem that enough supervision labels are difficult to collect for the optimal priority distribution of the DAG task.
Description
Technical Field
The present invention relates to the field of task scheduling technologies, and in particular, to a method, an apparatus, a device, and a storage medium for DAG task scheduling.
Background
Currently, driven by the demand for high performance and complex functionality, parallel computing systems are increasingly used to execute real-time applications, such as autonomous driving tasks with complex functional components such as perception, planning, and control, which have extremely high requirements for high performance and real-time. DAG (Directed Acyclic Graph) tasks are often used to represent complex dependencies between multiple task components (subtasks) similar to real-time applications and to formally describe fine-grained parallel task scheduling problems, i.e., DAG task scheduling problems. Considering that a Non-preemptive task model can avoid task migration and switching overhead, priority-based Non-preemptive scheduling for DAG tasks is receiving much attention, and this problem is how to Non-preemptively schedule a given DAG task to be executed on a parallel computing system, so that processing time is minimized, and is a typical NP (Non-preemptive multimedia Complete) Complete problem. In the prior art, a large number of excellent heuristic scheduling algorithms such as a table scheduling algorithm and a clustering scheduling algorithm are accumulated in long-term parallel computing practice. However, due to the nature of heuristic strategies, these algorithms cannot establish basic design principles for the DAG task scheduler, for example, how to allocate priorities to each subtask by using DAG task execution time and DAG task graph topological structure features under different DAG task scales and configurations, and scheduling performance is not ideal.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device, and a medium for scheduling DAG tasks, which can shorten a length of the DAG task scheduling and improve parallel execution efficiency of the DAG tasks. The specific scheme is as follows:
in a first aspect, the present application discloses a DAG task scheduling method, including:
constructing a network model according to the sequence of the directed graph neural network and the sequential decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective;
acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set;
training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model;
and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence.
Optionally, before the network model is built according to the sequence of the directed graph neural network and the sequential decoder, the method further includes:
Constructing a graph convolution layer for DAG task feature learning based on an aggregation function and a nonlinear activation function;
and constructing the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer.
Optionally, before constructing the network model according to the sequence of the directed graph neural network and the sequential decoder, the method further includes:
the priority distribution state of subtasks in the DAG task is taken as a variable, and a vector expression of a context environment is defined for the DAG task;
constructing a sequential decoder for prioritization based on an attention mechanism and a vector expression of the context environment.
Optionally, the defining an objective function of the network model with the minimum task scheduling length as a target includes:
generating a deceleration evaluation index of the DAG task by taking the task scheduling length corresponding to the priority sequence of the DAG task at different time steps and the lower limit of the task scheduling length as independent variables; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task;
constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index;
and constructing an objective function of the network model based on the reward function.
Optionally, the acquiring the DAG task dataset includes:
Configuring DAG task parameters; the DAG task parameters comprise the number of task layers, the number of sub-nodes of a target node, the generation probability of the sub-nodes of the target node, the adding probability of a connecting edge between two adjacent task layers and the calculation load of each sub-task;
and generating a DAG task according to the DAG task parameters to obtain the DAG task data set.
Optionally, the generating a corresponding information matrix for each DAG task in the DAG task data set includes:
generating a node characteristic matrix according to the characteristics of each subtask in the DAG task data set;
generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set;
and obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
Optionally, the training the network model by using the information matrix, and updating the model parameters of the network model by using reinforcement learning according to the objective function includes:
inputting the information matrix into the network model, and outputting vector representation of each subtask by using the directed graph neural network according to the characteristics of the subtasks and the dependency relationship among the subtasks;
Prioritizing, with the order decoder, the subtasks within the DAG task according to the vector representation of the subtasks based on attention mechanism and context environment of the DAG task;
calculating the task scheduling length of the DAG task by utilizing a DAG task scheduling simulator according to the priority sequence;
and updating the model parameters of the network model by utilizing reinforcement learning according to the task scheduling length and the objective function until the network model is converged.
In a second aspect, the present application discloses a DAG task scheduling apparatus, including:
the network construction module is used for constructing a network model according to the sequence of the directed graph neural network and the sequential decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective;
the data set acquisition module is used for acquiring a DAG task data set and generating a corresponding information matrix for each DAG task in the DAG task data set;
the training module is used for training the network model by using the information matrix and updating model parameters of the network model by using reinforcement learning according to the objective function so as to obtain a trained DAG task scheduling model;
And the scheduling sequence determining module is used for determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence.
Optionally, the DAG task scheduling device further includes:
the graph convolution layer construction unit is used for constructing a graph convolution layer for DAG task feature learning based on the aggregation function and the nonlinear activation function;
and the directed graph neural network construction unit is used for constructing and obtaining the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer.
Optionally, the DAG task scheduling device further includes:
the vector expression definition unit is used for defining a vector expression of a context environment for the DAG task by taking the priority distribution state of the subtasks in the DAG task as a variable;
a sequential decoder construction unit for constructing a sequential decoder for prioritization based on an attention mechanism and a vector expression of the context environment to arrive at the decoder.
Optionally, the network building module includes:
the deceleration evaluation index construction unit is used for generating a deceleration evaluation index of the DAG task by taking the task scheduling length and the lower limit of the task scheduling length corresponding to the priority sequence of the DAG task at different time steps as independent variables; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task;
The reward function construction unit is used for constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index;
and the target function construction unit is used for constructing a target function of the network model based on the reward function.
Optionally, the data set obtaining module includes:
a task parameter configuration unit, configured to configure DAG task parameters; the DAG task parameters comprise the number of task layers, the number of sub-nodes of a target node, the generation probability of the sub-nodes of the target node, the adding probability of a connecting edge between two adjacent task layers and the calculation load of each sub-task;
and the task generation unit is used for generating the DAG task according to the DAG task parameters so as to obtain the DAG task data set.
Optionally, the data set obtaining module includes:
a node feature matrix generating unit, configured to generate a node feature matrix according to a feature of each subtask in the DAG task data set;
the adjacency matrix generation unit is used for generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set;
and the information matrix determining unit is used for obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor configured to execute the computer program to implement the DAG task scheduling method described above.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the aforementioned DAG task scheduling method.
According to the method, a network model is constructed according to the sequence of a directed graph neural network and a sequential decoder, and an objective function of the network model is defined by taking the minimum task scheduling length as an objective; acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set; training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model; and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence. According to the method, a DAG task scheduling model is obtained based on the directed graph neural network and reinforcement learning, the directed graph neural network can automatically identify rich characteristics related to subtasks in the DAG task, a sequence decoder can utilize the characteristics to perform task priority sequencing on the subtasks, meanwhile, a scheduling target of minimizing the DAG task scheduling length is achieved by utilizing the reinforcement learning optimization model, the DAG task scheduling length can be shortened, the DAG task parallel execution efficiency is improved, and the problem that enough supervision labels are difficult to collect for optimal priority distribution of the DAG task can be solved by utilizing the reinforcement learning.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a DAG task scheduling method provided in the present application;
fig. 2 is a structural diagram of a specific DAG task scheduling system provided in the present application;
FIG. 3 is a diagram of a specific directed graph neural network architecture provided herein;
FIG. 4 is a flowchart of a specific training method for a DAG task scheduling model according to the present disclosure;
fig. 5 is a schematic structural diagram of a DAG task scheduling apparatus according to the present disclosure;
fig. 6 is a block diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, a large number of excellent heuristic scheduling algorithms such as a table scheduling algorithm and a clustering scheduling algorithm are accumulated in long-term parallel computing practice, but due to the nature of heuristic strategies, the algorithms cannot establish basic design principles for a DAG task scheduling program, for example, how to allocate priorities to sub-tasks by using DAG task execution time and DAG task graph topological structure characteristics under different DAG task scales and configurations, and scheduling performance is not ideal. In order to overcome the technical problem, the DAG task scheduling method can shorten the DAG task scheduling length and improve the parallel execution efficiency of DAG tasks.
The embodiment of the application discloses a DAG task scheduling method, which can comprise the following steps as shown in FIG. 1:
step S11: and constructing a network model according to the sequence of the directed graph neural network and the sequential decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective.
In this embodiment, a Network model is first constructed according to the sequence of a Directed Graph Neural Network (DGNN) and a sequential decoder, and an objective function of the Network model is defined with a minimum task scheduling length as an objective; the directed graph neural network is used for identifying task characteristics of subtasks in the DAG task and outputting embedded representations, namely vector representations, corresponding to each subtask, wherein the task characteristics comprise execution time and dependency relationship; the sequence decoder is used for sequencing the priorities of all the subtasks according to the embedded representation output by the directed graph neural network and outputting the priority sequencing of the subtasks. The objective function is used for guiding the learning of the network model, so that the network model can finally realize the minimum task scheduling length for outputting the DAG task according to the input DAG task. The network model also comprises a DAG task scheduling simulator which is used for calculating the scheduling length of the DAG task on the given parallel computing system.
Before performing a detailed description of the present embodiment, the basic concept involved in the present embodiment is explained first. Parallel computing systems, which can be generally described as a quad. Wherein:is a set of processing nodes;is a set of communication links between processing nodes;is a set of computation speeds for the processing nodes,representAnd satisfy; Is a collection of communication link bandwidths that may be,representing a communication linkOf the bandwidth of (c).
The DAG task refers to a plurality of subtasks which have complex dependency relationships and can be executed in parallel on a parallel computing system, is represented by a commonly-used weighted directed acyclic graph and is recorded as. Wherein the content of the first and second substances,is a set of nodes, each node representing a subtask,is the total number of subtasks.
Is a set of directed edges, directed edgesRepresenting subtasks connected from the edgeTo another subtask thereofThe communication and data dependencies between them,must be receivingCan only be started after the result of the calculation.Is a set of computational loads that are,representing subtasksAnd recording the sum of the computing loads of all the subtasks asThen there is。
Let Pred (t)i) And Succ (t)i) Are respectively asA direct predecessor subtask set and a direct successor subtask set. Balance And Pred (t)i) And Succ (t)i) The set of the connecting edges among all the subtasks in the task is respectivelyIncident edge set ofAnd an emergent edge set(ii) a Note bookRespectively areAndthen there isAnd. If it isThen callIs an entry subtask and is noted as tentry(ii) a If it isThen callIs an egress subtask and is denoted texit. Route of travelIs a finite sequence of subtask nodes and satisfiesIs provided with. If a path contains both an ingress subtask and an egress subtask, the path is said to be a complete path. The path length Λ (λ) of λ is the sum of the computational loads of all subtasks on that path, i.e.
Longest path length integrityThe path is called a critical path. Each subtask node viOriginal feature x ofiBesides the characteristics of task load, in-degree and out-degree node levels, the method also comprises the length of a critical path and the length of a non-critical path, wherein the length of the non-critical path can be obtained by subtracting the length of the critical path from the total calculation load of the DAG tasks. For example, as shown in fig. 2, a DAG task scheduling system is shown, which includes 9 nodes, and a DAG task having a unique entry and an exit, and the character strings in the nodes represent subtask IDs and computation loads. In fact, a DAG task may have multiple entries and exits, which can be changed to a DAG task with unique entries and exits by adding a virtual entry subtask or exit subtask and corresponding connecting edges. Unless otherwise stated, the latter type of DAG task is referred to in this embodiment, and the number of satisfied subtasks is satisfied nFar greater than the number of nodes of a parallel computing systemm。
In this embodiment, before constructing the network model according to the order of the directed graph neural network and the sequential decoder, the method may further include: constructing a graph convolution layer for DAG task feature learning based on an aggregation function and a nonlinear activation function; and constructing the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer. Learning the vector representation of each subtask in the DAG task by utilizing the directed graph neural network;
As shown in fig. 3, a directed graph neural network is designed, which is composed of an input layer (input layer), a K-layer graph conv layer (graph conv layer) and an output layer (output layer), wherein the input layer reads a node feature matrix X and an adjacency matrix a of a DAG task; the graph convolution operation of the k-th layer graph convolution layer is implemented by an aggregation function (aggregate function) and a nonlinear activation function, as follows:
wherein the aggregate function aggregates data from the subtasksThe update function performs nonlinear transformation on the aggregated messages; pred (t)i) Is composed ofIs directly preceding the set of subtasks. For the aggregate function, it can adopt many ways such as taking the maximum value, taking the average value, etc., and this patent adopts the attention mechanism to realize:
Wherein alpha isijRepresenting subtaskst j For is tot i The attention coefficient of (2), which is learned through training. For update function, it can be any non-linear activation function. Not in generality, the ReLu function is used in this embodiment to implement:
The output layer directly outputs the vertex embedded representation learned by the Kth layer graph convolution layer. It can be understood that the graph convolution layer constructed by using the aggregation function and the nonlinear activation function can better adapt to the directed characteristics of the DAG task graph, extract the dependency relationship among the subtasks, and identify the characteristics of the subtasks and the dependency relationship between the subtasks and other subtasks in the DAG task, so that the embedded representation of subtask nodes can be more effectively learned, richer characteristics can be provided for the priority ordering of the subsequent subtasks, and the accuracy of the priority ordering can be further improved.
In this embodimentBefore the network model is built according to the sequence of the directed graph neural network and the sequential decoder, the method may further include: defining a vector expression of a context environment for a DAG task by taking a priority distribution state of a subtask in the DAG task as a variable; a sequential decoder for prioritization is constructed based on an attention mechanism and a vector expression of the context environment. It will be appreciated that the decoder described above is a sequential decoder for ordering all sub-tasks of the DAG task, specifically all of the DAG task learned from the directed graph neural network nAn embedded representation of a subtask node.
The sequential decoder sequentially selects the subtask nodes to generate the size ofnIn a priority orderIt corresponds to a priority ordered arrangement of subtasksAnd satisfies: priority level。
The sequential decoder in this embodiment can formally describe the DAG task priority assignment as a probability distribution defined by the following equation:
wherein, the first and the second end of the pipe are connected with each other,are the network parameters to be optimized. The sequential decoder first derives a probability distributionThe subtask node with the highest priority is sampled and then the next timeAnd (5) sampling the subtask nodes with the second highest priority, and repeating the steps until all subtask nodes are selected by sampling.
At each time stepThe sequential decoder selects subtask nodes according to the following ruleAnd give priority to it:
Wherein the argmax function is used for determining a maximum independent variable point set; conditional probability distributionCalculated according to the following formula:
wherein softmax is a normalized exponential function;transforming a matrix for the features to be trained; tan h is an activation function; att is an attention function;is the time stepThe subtask set with the priority not yet distributed is recorded as the subtask set with the priority distributedAnd satisfyIn the process of prioritizing for a DAG task, aggregation Andwill be updated in real time according to the priority assignment status; cont is a context environment selected by the real-time subtask of the sequential decoder, and it can be understood that, in formula (6), the vector representation of the subtask is compared with the vector representation of the context environment, and then the weight of the subtask is assigned by using the attention mechanism; the vector representation of the context is calculated as follows:
cont=W[contO; contU]+b, (7)
wherein W represents a linear transformation, [;]"represents tensor connectors; contOAnd contUAre respectively asAndcorresponding embedded representations, which are calculated by the following formula:
where σ is a nonlinear activation function. Thus, a sequential decoder is constructed based on the attention mechanism, and the problem of selecting sub-task nodes is solved into the problem of randomly selecting sub-node numbers from the conditional probability distribution, so that the priority ordering of the sub-tasks can be more accurately determined according to the vector representation of the sub-task nodes.
In this embodiment, the defining an objective function of the network model with the minimum task scheduling length as a target may include: generating a deceleration evaluation index of the DAG task by taking the task scheduling length corresponding to the priority sequence of the DAG task at different time steps and the lower limit of the task scheduling length as independent variables; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task; constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index; and constructing an objective function of the network model based on the reward function. It is to be appreciated that the DAG task scheduling problem can be modeled as a Markov Decision Process (MDP); a basic MDP can be generally described by a five-tuple:
Wherein, the first and the second end of the pipe are connected with each other,is said sequential decodernSet of actions at time stepIs used to select subtask nodes from DAG taskAnd give priority to it;Is thatnA set of states for each time step; time stepState of (1)Embedded representation of all subtask nodes including DAG taskAnd assigned priority subtasks;
Indicating an ambient immediate return value for evaluating the effect of a select action on the sequential decoder. Since the goal of DAG task scheduling is to minimize the task scheduling length, in this embodiment, a reward function is designed based on the deceleration evaluation index:
Wherein the content of the first and second substances,is shown at time stepDAG task prioritizationCorresponding subtaskThe length of the schedule of (a) is,is shown at time stepDAG task prioritizationCorresponding subtaskIs lower bound of the task schedule length. On a parallel computing system consisting of m computing nodes,the calculation can be based on the length of the critical path, and the specific calculation formula is as follows:
wherein the content of the first and second substances,to be sorted according to priorityDeterministic to subtaskThe length of the critical path is such that,to be sorted according to priorityDeterministic to subtaskAll ofThe subtasks calculate the sum of the loads.
In MDP, it is assumed that the state transition matrix Π is deterministic, because for a given state and action, the determination of the next state is not random, because the scheduling action does not execute the task, it only affects the scheduling policy and changes the ranking of the tasks. Finally, setting the discount factor delta as constant 1, and according to formulas (4) and (10), utilizing a policy-gradient-based algorithm to target the expectation of the accumulated rewards corresponding to the maximum DAG task priority ordering pi, and defining an objective function J of the network model as follows:
Wherein, the first and the second end of the pipe are connected with each other,the characterization specifies DAG task priority order as sampled from the learning strategy.
Step S12: and acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set.
In this embodiment, a DAG task data set for model training is obtained, and then an information matrix of each DAG task in the DAG task data set, including a node feature matrix and an adjacency matrix, is extracted. Specifically, in this embodiment, the generating a corresponding information matrix for each DAG task in the DAG task data set may include: generating a node characteristic matrix according to the characteristics of each subtask in the DAG task data set; the node feature matrix is a feature matrix for representing the calculation load and the normalization calculation load of the subtasks and the in-degree and out-degree of the subtasks; generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set; and obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
In this embodiment, the acquiring the DAG task data set may include: configuring DAG task parameters; the DAG task parameters comprise the task layer number and the children of the target node The method comprises the following steps of counting nodes, generating probability of sub-nodes of a target node, adding probability of a connecting edge between two adjacent task layers and calculating load of each sub-task; and generating a DAG task according to the DAG task parameters to obtain the DAG task data set. Due to the lack of a publicly available large-scale DAG task data set, in this embodiment, a DAG task is generated first, and specifically, the DAG task can be acquired by using a parallel task generation model based on DAG task parameters. Synthesizing a DAG task like a nested fork-join task model; the model is controlled by four parameters, n respectivelydepth、nchild、pforkAnd ppert. Wherein n isdepthRepresenting the number or depth of DAG task layers; n ischildThe number of sub-nodes representing a certain node; p is a radical offorkRepresenting the probability of generating a child node for a node; p is a radical ofpertAnd randomly adding the probability of connecting edges between two adjacent layers of nodes. For the firstkEach subtask node in a layert i Sub-nodes thereoft j And edgee ij Is based on the probability pforkGenerating; first, thekThe number of sub-nodes in +1 layer is uniformly distributedn child And determining, namely determining the number of sub-nodes under the target node through uniform distribution. The process starts with the entry subtask node and repeats ndepthThen, thereby creating a block with ndepthA layered DAG task. Furthermore, with a probability ppertRandomly adding a connecting edge, p, between the kth level and the (k + 1) th level nodes of a DAG task pertThe larger the value the higher the parallelism of the generated DAG task. Finally, edges from the last level node to the egress node are added, and a computational load is distributed for each subtask. Wherein the calculation load obedience parameter of the subtask is mu (mu)>0) And a normal distribution of δ, where μ represents an average computation load of the subtasks, and δ represents a standard deviation of the computation load of each subtask, and of course, other distributions may be assumed as long as the computation load of each subtask is guaranteed to be a positive value, and the distribution is not limited herein. Extracting the characteristics of each subtask node and constructing a node characteristic matrix X for the constructed DAG task; and constructing an adjacency matrix A according to the interconnection relation among the nodes.
Step S13: and training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function so as to obtain a trained DAG task scheduling model.
In this embodiment, after the network model is constructed, model parameters are initialized first. Initializing parameters W of each layer of the directed graph neural network according to a specific strategy such as normal distribution random Initialization, Xavier Initialization or He Initialization, and initializing model parameters of a sequential decoder Initialization is performed.
And then, training a network model by using an information matrix corresponding to the DAG task data set, wherein after the DAG task data set is obtained, the DAG task data set is divided into a training set and a test set, and a cross validation method, a leave-out method or a leave-one method and other dividing methods can be specifically adopted, wherein the test set is used for training the network model, and the test set is used for testing the trained network model.
In this embodiment, the training the network model by using the information matrix and updating the model parameters of the network model by using reinforcement learning according to the objective function may include:
s130: inputting the information matrix into the network model, and outputting vector representation of each subtask by using the directed graph neural network according to the characteristics of the subtasks and the dependency relationship among the subtasks;
s131: prioritizing, with the sequential decoder, the subtasks within the DAG task according to the vector representation of the subtasks based on an attention mechanism and a context environment of the DAG task;
s132: calculating the task scheduling length of the DAG task by utilizing a DAG task scheduling simulator according to the priority sequence;
S133: and updating the model parameters of the network model by utilizing reinforcement learning according to the task scheduling length and the objective function until the network model is converged.
The node characteristic matrix and the adjacent matrix contained in the information matrix are used as the input of a network model, forward propagation is carried out, vector representation of all subtasks is obtained through a directed graph neural network, a sequence decoder outputs priority ordering of the subtasks, the subtasks can be sequentially scheduled to be executed by a DAG task simulation scheduler, corresponding scheduling length is calculated, and then a model objective function value is calculated according to a formula (12); and according to a certain strategy, such as random gradient descent or Adam and other algorithms, the network parameter values of each layer are corrected through back propagation. Therefore, by utilizing a reinforcement learning algorithm, aiming at minimizing DAG task scheduling length, and continuously optimizing a network model by rewarding DAG task priority sequencing with shorter scheduling length; therefore, the obtained scheduling length is shorter, and the parallel computing efficiency is higher. The difficulty of collecting enough supervision tags for optimal priority assignment for DAG tasks can be effectively avoided.
Specifically, the network model is trained by relating to an objective function J defined by equation (11) Gradient of (a):
(13)
wherein the content of the first and second substances,is a gradient operator. The model gradient in equation (12) can be estimated using the monte carlo stochastic gradient descent method:
wherein the content of the first and second substances,representing subtasks of DAG tasks resulting from random sampling in the data setAnd (4) collecting. And optimizing the objective function by using a random gradient descent method or an Adam algorithm, and terminating the model training when the objective function value is not reduced or reaches the maximum iteration number, wherein the obtained scheduling scheme is the optimal scheduling scheme. Namely, the objective function gradient is estimated based on the Monte Carlo random gradient descent method. Therefore, in the embodiment, deep reinforcement learning on the DAG task is realized based on the directed graph neural network and the objective function. The DAG task scheduling length can be obtained by sequentially scheduling all subtasks to the parallel computing system ARC according to the arrangement through the DAG task scheduling simulator and executing the subtasks in parallel, and recording the completion time of the export task.
Step S14: and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence.
In this embodiment, after the DAG task scheduling model is obtained through training, the node feature matrix and the adjacency matrix of the DAG task to be executed are input to the model, the optimal DAG task scheduling order obtained by the model is output as a result, and the DAG task to be executed is executed by using the parallel computing system according to the scheduling order. Therefore, for the non-preemptive scheduling problem of the DAG task, the task priority ordering is carried out based on the deep reinforcement learning and the directed graph neural network, the scheduling sequence of the tasks is further determined, the execution time of the tasks is reduced, and the execution efficiency of the tasks is improved.
The embodiment also provides a DAG task scheduling system based on the deep reinforcement learning and the directed graph neural network. As shown in fig. 2, the system is composed of an input module, a directed graph neural network, a sequence decoder, a schedule length calculation module, and a model parameter update module. The input module is responsible for reading a node characteristic matrix X and an adjacency matrix A of the DAG task; the directed graph neural network takes X and A as input, identifies the execution time and the dependency relationship of a DAG task, and learns the embedded representation of the subtasks; the embedded representations are decoded by a sequence decoder, and the priority sequence of all the subtasks is obtained through output; and the scheduling length calculation module schedules the parallel calculation system to execute according to the sequence, takes the scheduling length as a feedback signal and updates the model parameters by using a reinforcement learning algorithm. Therefore, the DAG task scheduling system based on the deep reinforcement learning and the directed graph neural network takes the DAG task as input, generates embedded representation for each subtask of the DAG task through the directed graph neural network, generates priority sequence of all subtasks by using a sequence decoder, and calculates task scheduling length or completion time corresponding to the sequence. The system targets minimizing the scheduled length of the DAG tasks, which is used as a reward signal to update the model through a reinforcement learning algorithm.
As can be seen from the above, in this embodiment, a network model is constructed according to the order of the directed graph neural network and the sequential decoder, and an objective function of the network model is defined with the minimum task scheduling length as an objective; acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set; training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model; and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence. According to the method, a DAG task scheduling model is obtained based on a directed graph neural network and reinforcement learning, the directed graph neural network can automatically identify rich characteristics related to subtasks in the DAG task, a sequence decoder can use the characteristics to perform task priority sequencing on the subtasks, meanwhile, a scheduling target of minimizing the DAG task scheduling length is achieved by using a reinforcement learning optimization model, the DAG task scheduling length can be shortened, the parallel execution efficiency of the DAG task is improved, and the problem that enough supervision labels are difficultly collected for optimal priority distribution of the DAG task can be solved by using reinforcement learning.
Correspondingly, an embodiment of the present application further discloses a DAG task scheduling device, as shown in fig. 5, the device includes:
the network construction module 11 is configured to construct a network model according to the sequence of the directed graph neural network and the sequential decoder, and define an objective function of the network model with a minimum task scheduling length as an objective;
the data set acquisition module 12 is configured to acquire a DAG task data set, and generate a corresponding information matrix for each DAG task in the DAG task data set;
the training module 13 is configured to train the network model by using the information matrix, and update model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model;
and a scheduling order determining module 14, configured to determine a scheduling order of sub-tasks within the DAG task to be executed by using the DAG task scheduling model, and execute the DAG task to be executed by using the parallel computing system according to the scheduling order.
As can be seen from the above, in this embodiment, a network model is constructed according to the sequence of the directed graph neural network and the sequential decoder, and an objective function of the network model is defined with the minimum task scheduling length as an objective; acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set; training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model; and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence. According to the method, a DAG task scheduling model is obtained based on the directed graph neural network and reinforcement learning, the directed graph neural network can automatically identify rich characteristics related to subtasks in the DAG task, a sequence decoder can utilize the characteristics to perform task priority sequencing on the subtasks, meanwhile, a scheduling target of minimizing the DAG task scheduling length is achieved by utilizing the reinforcement learning optimization model, the DAG task scheduling length can be shortened, the DAG task parallel execution efficiency is improved, and the problem that enough supervision labels are difficult to collect for optimal priority distribution of the DAG task can be solved by utilizing the reinforcement learning.
In some specific embodiments, the DAG task scheduling device may specifically include:
the graph convolution layer construction unit is used for constructing a graph convolution layer for DAG task feature learning based on the aggregation function and the nonlinear activation function;
and the directed graph neural network construction unit is used for constructing and obtaining the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer.
In some specific embodiments, the DAG task scheduling device may specifically include:
the vector expression definition unit is used for defining a vector expression of a context environment for the DAG task by taking the priority distribution state of the subtasks in the DAG task as a variable;
a sequential decoder construction unit for constructing a sequential decoder for priority ordering based on an attention mechanism and a vector expression of the context environment to obtain the decoder.
In some specific embodiments, the network building module 11 may specifically include:
the deceleration evaluation index construction unit is used for generating a deceleration evaluation index of the DAG task by taking the task scheduling length corresponding to the priority sequence of the DAG task at different time steps and the lower limit of the task scheduling length as arguments; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task;
The reward function construction unit is used for constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index;
and the target function construction unit is used for constructing a target function of the network model based on the reward function.
In some embodiments, the data set obtaining module 12 may specifically include:
the task parameter configuration unit is used for configuring DAG task parameters; the DAG task parameters comprise the number of task layers, the number of sub-nodes of a target node, the generation probability of the sub-nodes of the target node, the adding probability of a connecting edge between two adjacent task layers and the calculation load of each sub-task;
and the task generation unit is used for generating a DAG task according to the DAG task parameters to obtain the DAG task data set.
In some embodiments, the data set obtaining module 12 may specifically include:
a node feature matrix generating unit, configured to generate a node feature matrix according to a feature of each subtask in the DAG task data set;
the adjacency matrix generation unit is used for generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set;
and the information matrix determining unit is used for obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
In some embodiments, the training module 13 may specifically include:
the vector representation determining unit is used for inputting the information matrix into the network model and outputting the vector representation of each subtask by utilizing the directed graph neural network according to the characteristics of the subtasks and the dependency relationship among the subtasks;
a prioritization determination unit to prioritize, with the order decoder, subtasks within the DAG task according to the vector representation of the subtasks based on an attention mechanism and a context environment of the DAG task;
a task scheduling length determining unit, configured to calculate a task scheduling length of the DAG task by using a DAG task scheduling simulator according to the priority order;
and the model optimization unit is used for updating the model parameters of the network model by utilizing reinforcement learning according to the task scheduling length and the objective function until the network model is converged.
Further, the embodiment of the present application also discloses an electronic device, which is shown in fig. 6, and the content in the drawing cannot be considered as any limitation to the application scope.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the DAG task scheduling method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the memory 22 can be a read-only memory, a random access memory, a magnetic disk or an optical disk as a carrier for storing resources, the resources stored thereon include an operating system 221, a computer program 222, and data 223 including DAG tasks, and the storage manner can be transient storage or permanent storage.
The operating system 221 is configured to manage and control each hardware device and the computer program 222 on the electronic device 20, so as to implement the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, or the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the DAG task scheduling method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, an embodiment of the present application further discloses a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and when the computer-executable instructions are loaded and executed by a processor, the steps of the DAG task scheduling method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The DAG task scheduling method, apparatus, device and medium provided by the present invention are described in detail above, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understanding the method and its core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (15)
1. A DAG task scheduling method, comprising:
constructing a network model according to the sequence of the directed graph neural network and the sequence decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective;
acquiring a DAG task data set, and generating a corresponding information matrix for each DAG task in the DAG task data set;
training the network model by using the information matrix, and updating model parameters of the network model by using reinforcement learning according to the objective function to obtain a trained DAG task scheduling model;
and determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model, and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence.
2. The DAG task scheduling method of claim 1, wherein prior to constructing the network model in an order of the directed graph neural network and the sequential decoder, further comprising:
constructing a graph convolution layer for DAG task feature learning based on an aggregation function and a nonlinear activation function;
and constructing the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer.
3. The DAG task scheduling method of claim 1, wherein before constructing the network model according to the sequence of the directed graph neural network and the sequential decoder, the method further comprises:
the priority distribution state of subtasks in the DAG task is taken as a variable, and a vector expression of a context environment is defined for the DAG task;
constructing a sequential decoder for prioritization based on an attention mechanism and a vector expression of the context environment.
4. The DAG task scheduling method of claim 1, wherein defining an objective function of the network model with a minimum task scheduling length as an objective comprises:
taking the task scheduling length corresponding to the priority sequence of the DAG task at different time steps and the lower limit of the task scheduling length as independent variables to generate a deceleration evaluation index of the DAG task; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task;
constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index;
and constructing an objective function of the network model based on the reward function.
5. The DAG task scheduling method of claim 1, wherein the obtaining a DAG task dataset comprises:
Configuring DAG task parameters; the DAG task parameters comprise the task layer number, the sub-node number of the target node, the sub-node generation probability of the target node, the connecting edge adding probability between two adjacent task layers and the calculation load of each sub-task;
and generating a DAG task according to the DAG task parameters to obtain the DAG task data set.
6. The method as recited in claim 1, wherein the generating a corresponding information matrix for each DAG task within the DAG task dataset comprises:
generating a node characteristic matrix according to the characteristics of each subtask in the DAG task data set;
generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set;
and obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
7. The DAG task scheduling method according to any one of claims 1 to 6, wherein the training the network model by using the information matrix and updating model parameters of the network model by using reinforcement learning according to the objective function comprises:
inputting the information matrix into the network model, and outputting a vector representation of each subtask by using the directed graph neural network according to the characteristics of the subtasks and the dependency relationship among the subtasks;
Prioritizing, with the sequential decoder, the subtasks within the DAG task according to the vector representation of the subtasks based on an attention mechanism and a context environment of the DAG task;
calculating the task scheduling length of the DAG task by utilizing a DAG task scheduling simulator according to the priority sequence;
and updating the model parameters of the network model by using reinforcement learning according to the task scheduling length and the objective function until the network model converges.
8. A DAG task scheduling apparatus, comprising:
the network construction module is used for constructing a network model according to the sequence of the directed graph neural network and the sequential decoder, and defining an objective function of the network model by taking the minimum task scheduling length as an objective;
the data set acquisition module is used for acquiring a DAG task data set and generating a corresponding information matrix for each DAG task in the DAG task data set;
the training module is used for training the network model by using the information matrix and updating model parameters of the network model by using reinforcement learning according to the objective function so as to obtain a trained DAG task scheduling model;
And the scheduling sequence determining module is used for determining the scheduling sequence of the subtasks in the DAG task to be executed by using the DAG task scheduling model and executing the DAG task to be executed by using a parallel computing system according to the scheduling sequence.
9. The DAG task scheduling device of claim 8, further comprising:
the graph convolution layer construction unit is used for constructing a graph convolution layer for DAG task feature learning based on the aggregation function and the nonlinear activation function;
and the directed graph neural network construction unit is used for constructing and obtaining the directed graph neural network according to the sequence of the input layer, the K-layer graph convolution layer and the output layer.
10. The DAG task scheduling device of claim 8, further comprising:
the vector expression definition unit is used for defining a vector expression of a context environment for the DAG task by taking the priority distribution state of the subtasks in the DAG task as a variable;
a sequential decoder construction unit for constructing a sequential decoder for priority ordering based on an attention mechanism and a vector expression of the context environment to obtain the decoder.
11. The DAG task scheduler of claim 8, wherein the network construction module comprises:
The deceleration evaluation index construction unit is used for generating a deceleration evaluation index of the DAG task by taking the task scheduling length corresponding to the priority sequence of the DAG task at different time steps and the lower limit of the task scheduling length as arguments; the lower limit of the task scheduling length is determined according to the path length of the key path of the DAG task;
the reward function construction unit is used for constructing a reward function based on a strategy gradient algorithm and the deceleration evaluation index;
and the target function construction unit is used for constructing a target function of the network model based on the reward function.
12. The DAG task scheduler of claim 8, wherein the dataset acquisition module comprises:
a task parameter configuration unit, configured to configure DAG task parameters; the DAG task parameters comprise the number of task layers, the number of sub-nodes of a target node, the generation probability of the sub-nodes of the target node, the adding probability of a connecting edge between two adjacent task layers and the calculation load of each sub-task;
and the task generation unit is used for generating the DAG task according to the DAG task parameters so as to obtain the DAG task data set.
13. The DAG task scheduler of claim 8, wherein the dataset acquisition module comprises:
A node characteristic matrix generating unit, configured to generate a node characteristic matrix according to a characteristic of each subtask in the DAG task dataset;
the adjacency matrix generating unit is used for generating an adjacency matrix according to the connection relation between different subtasks in the DAG task data set;
and the information matrix determining unit is used for obtaining an information matrix corresponding to the DAG task based on the node characteristic matrix and the adjacency matrix.
14. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the DAG task scheduling method of any of claims 1 to 7.
15. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by the processor, implements the DAG task scheduling method of any of claims 1 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210671115.8A CN114756358B (en) | 2022-06-15 | 2022-06-15 | DAG task scheduling method, device, equipment and storage medium |
PCT/CN2022/142437 WO2023241000A1 (en) | 2022-06-15 | 2022-12-27 | Dag task scheduling method and apparatus, device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210671115.8A CN114756358B (en) | 2022-06-15 | 2022-06-15 | DAG task scheduling method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114756358A true CN114756358A (en) | 2022-07-15 |
CN114756358B CN114756358B (en) | 2022-11-04 |
Family
ID=82337171
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210671115.8A Active CN114756358B (en) | 2022-06-15 | 2022-06-15 | DAG task scheduling method, device, equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114756358B (en) |
WO (1) | WO2023241000A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116151315A (en) * | 2023-04-04 | 2023-05-23 | 之江实验室 | Attention network scheduling optimization method and device for on-chip system |
CN116739090A (en) * | 2023-05-12 | 2023-09-12 | 北京大学 | Deep neural network reasoning measurement method and device based on Web browser |
CN116755397A (en) * | 2023-05-26 | 2023-09-15 | 北京航空航天大学 | Multi-machine collaborative task scheduling method based on graph convolution strategy gradient |
CN116880994A (en) * | 2023-09-07 | 2023-10-13 | 之江实验室 | Multiprocessor task scheduling method, device and equipment based on dynamic DAG |
CN116974729A (en) * | 2023-09-22 | 2023-10-31 | 浪潮(北京)电子信息产业有限公司 | Task scheduling method and device for big data job, electronic equipment and storage medium |
WO2023241000A1 (en) * | 2022-06-15 | 2023-12-21 | 苏州元脑智能科技有限公司 | Dag task scheduling method and apparatus, device, and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117555306B (en) * | 2024-01-11 | 2024-04-05 | 天津斯巴克斯机电有限公司 | Digital twinning-based multi-production-line task self-adaptive scheduling method and system |
CN117648174B (en) * | 2024-01-29 | 2024-04-05 | 华北电力大学 | Cloud computing heterogeneous task scheduling and container management method based on artificial intelligence |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111756653A (en) * | 2020-06-04 | 2020-10-09 | 北京理工大学 | Multi-coflow scheduling method based on deep reinforcement learning of graph neural network |
CN113127169A (en) * | 2021-04-07 | 2021-07-16 | 中山大学 | Efficient link scheduling method for dynamic workflow in data center network |
CN114239711A (en) * | 2021-12-06 | 2022-03-25 | 中国人民解放军国防科技大学 | Node classification method based on heterogeneous information network small-sample learning |
US20220100763A1 (en) * | 2020-09-30 | 2022-03-31 | Microsoft Technology Licensing, Llc | Optimizing job runtimes via prediction-based token allocation |
CN114327925A (en) * | 2021-09-30 | 2022-04-12 | 国网山东省电力公司营销服务中心(计量中心) | Power data real-time calculation scheduling optimization method and system |
CN114422381A (en) * | 2021-12-14 | 2022-04-29 | 西安电子科技大学 | Communication network flow prediction method, system, storage medium and computer equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106228314A (en) * | 2016-08-11 | 2016-12-14 | 电子科技大学 | The workflow schedule method of study is strengthened based on the degree of depth |
US20200042856A1 (en) * | 2018-07-31 | 2020-02-06 | International Business Machines Corporation | Scheduler for mapping neural networks onto an array of neural cores in an inference processing unit |
CN114625517A (en) * | 2022-04-13 | 2022-06-14 | 北京赛博云睿智能科技有限公司 | DAG graph computation distributed big data workflow task scheduling platform |
CN114756358B (en) * | 2022-06-15 | 2022-11-04 | 苏州浪潮智能科技有限公司 | DAG task scheduling method, device, equipment and storage medium |
-
2022
- 2022-06-15 CN CN202210671115.8A patent/CN114756358B/en active Active
- 2022-12-27 WO PCT/CN2022/142437 patent/WO2023241000A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111756653A (en) * | 2020-06-04 | 2020-10-09 | 北京理工大学 | Multi-coflow scheduling method based on deep reinforcement learning of graph neural network |
US20220100763A1 (en) * | 2020-09-30 | 2022-03-31 | Microsoft Technology Licensing, Llc | Optimizing job runtimes via prediction-based token allocation |
CN113127169A (en) * | 2021-04-07 | 2021-07-16 | 中山大学 | Efficient link scheduling method for dynamic workflow in data center network |
CN114327925A (en) * | 2021-09-30 | 2022-04-12 | 国网山东省电力公司营销服务中心(计量中心) | Power data real-time calculation scheduling optimization method and system |
CN114239711A (en) * | 2021-12-06 | 2022-03-25 | 中国人民解放军国防科技大学 | Node classification method based on heterogeneous information network small-sample learning |
CN114422381A (en) * | 2021-12-14 | 2022-04-29 | 西安电子科技大学 | Communication network flow prediction method, system, storage medium and computer equipment |
Non-Patent Citations (1)
Title |
---|
橙子渣渣: "【论文解析】Fast Adaptive Task Offloading in Edge Computing Based on Meta Reinforcement Learning", 《(GRAPH NEURAL NETWORK) OR GNN》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023241000A1 (en) * | 2022-06-15 | 2023-12-21 | 苏州元脑智能科技有限公司 | Dag task scheduling method and apparatus, device, and storage medium |
CN116151315A (en) * | 2023-04-04 | 2023-05-23 | 之江实验室 | Attention network scheduling optimization method and device for on-chip system |
CN116151315B (en) * | 2023-04-04 | 2023-08-15 | 之江实验室 | Attention network scheduling optimization method and device for on-chip system |
CN116739090A (en) * | 2023-05-12 | 2023-09-12 | 北京大学 | Deep neural network reasoning measurement method and device based on Web browser |
CN116739090B (en) * | 2023-05-12 | 2023-11-28 | 北京大学 | Deep neural network reasoning measurement method and device based on Web browser |
CN116755397A (en) * | 2023-05-26 | 2023-09-15 | 北京航空航天大学 | Multi-machine collaborative task scheduling method based on graph convolution strategy gradient |
CN116755397B (en) * | 2023-05-26 | 2024-01-23 | 北京航空航天大学 | Multi-machine collaborative task scheduling method based on graph convolution strategy gradient |
CN116880994A (en) * | 2023-09-07 | 2023-10-13 | 之江实验室 | Multiprocessor task scheduling method, device and equipment based on dynamic DAG |
CN116880994B (en) * | 2023-09-07 | 2023-12-12 | 之江实验室 | Multiprocessor task scheduling method, device and equipment based on dynamic DAG |
CN116974729A (en) * | 2023-09-22 | 2023-10-31 | 浪潮(北京)电子信息产业有限公司 | Task scheduling method and device for big data job, electronic equipment and storage medium |
CN116974729B (en) * | 2023-09-22 | 2024-02-09 | 浪潮(北京)电子信息产业有限公司 | Task scheduling method and device for big data job, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2023241000A1 (en) | 2023-12-21 |
CN114756358B (en) | 2022-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114756358B (en) | DAG task scheduling method, device, equipment and storage medium | |
Tong et al. | QL-HEFT: a novel machine learning scheduling scheme base on cloud computing environment | |
CN109976909B (en) | Learning-based low-delay task scheduling method in edge computing network | |
Alkhanak et al. | A hyper-heuristic cost optimisation approach for scientific workflow scheduling in cloud computing | |
US10754709B2 (en) | Scalable task scheduling systems and methods for cyclic interdependent tasks using semantic analysis | |
Zhang et al. | DeepMAG: Deep reinforcement learning with multi-agent graphs for flexible job shop scheduling | |
CN113778646B (en) | Task level scheduling method and device based on execution time prediction | |
Khajemohammadi et al. | Efficient workflow scheduling for grid computing using a leveled multi-objective genetic algorithm | |
US7689978B2 (en) | System and method for autonomic optimization by computer programs | |
Sinclair et al. | Hindsight learning for mdps with exogenous inputs | |
CN114139730B (en) | Dynamic pricing and deployment method for machine learning tasks in edge cloud network | |
Fan et al. | Dras: Deep reinforcement learning for cluster scheduling in high performance computing | |
Vahidipour et al. | Priority assignment in queuing systems with unknown characteristics using learning automata and adaptive stochastic Petri nets | |
CN116069473A (en) | Deep reinforcement learning-based Yarn cluster workflow scheduling method | |
Tuli et al. | Optimizing the performance of fog computing environments using ai and co-simulation | |
Durán et al. | From static to dynamic analysis and allocation of resources for BPMN processes | |
CN113220437B (en) | Workflow multi-target scheduling method and device | |
Femmam et al. | Labelled evolutionary Petri nets/genetic algorithm based approach for workflow scheduling in cloud computing | |
CN114327925A (en) | Power data real-time calculation scheduling optimization method and system | |
Franke et al. | On advantages of scheduling using genetic fuzzy systems | |
Alkhanak et al. | A hyper-heuristic approach using a prioritized selection strategy for workflow scheduling in cloud computing | |
Brueckner et al. | Swarming Polyagents Executing Hierarchical Task Networks | |
Ge et al. | Capability-based project scheduling with genetic algorithms | |
Hegde et al. | COUNSEL: Cloud Resource Configuration Management using Deep Reinforcement Learning | |
Prasad et al. | Adaptive smoothed functional algorithms for optimal staffing levels in service systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |