A task deployment method, apparatus, system, and readable storage medium

By automatically optimizing the deployment of computing tasks on heterogeneous computing devices through reinforcement learning, the problem of low efficiency in manual configuration is solved, and more efficient task deployment and device performance improvement are achieved.

CN114428617BActive Publication Date: 2026-01-30SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111666498.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2026-01-30
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In existing technologies, the efficiency and rationality of manually configuring computing tasks for deployment in heterogeneous computing devices are low, resulting in poor performance optimization of heterogeneous computing devices.

Method used

By employing reinforcement learning, the system automatically determines the computing components corresponding to computing tasks by acquiring status and reward/penalty information from heterogeneous computing devices, and repeatedly optimizes the process until the information stabilizes, thereby achieving a reasonable deployment of computing tasks.

Benefits of technology

It improves the rationality of task deployment and the execution performance of heterogeneous computing devices, eliminates the limitations of manpower and cumbersome manual configuration, and enhances the adaptation efficiency and running performance of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428617B_ABST
    Figure CN114428617B_ABST
Patent Text Reader

Abstract

This application discloses a task deployment method, apparatus, system, and readable storage medium. The method includes: acquiring state information of each layer of computing tasks in an application after execution by corresponding computing components, and reward / penalty information of the heterogeneous computing device, based on feedback from the heterogeneous computing device; determining the computing components corresponding to each layer of computing tasks based on the state information and reward / penalty information, and having each computing component execute the corresponding computing task; and executing the step of acquiring the state information of each layer of computing tasks in an application after execution by corresponding computing components, and reward / penalty information of the heterogeneous computing device, until the state information and reward / penalty information are stable, to obtain the computing components corresponding to each layer of computing tasks, and having each computing component execute the corresponding computing task. The technical solution disclosed in this application utilizes reinforcement learning to automatically deploy computing tasks from the perspective of top-level applications, thereby improving the rationality and efficiency of task deployment and the task execution performance of heterogeneous computing devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mission deployment technology, and more specifically, to a mission deployment method, apparatus, system, and readable storage medium. Background Technology

[0002] Given the large computational demands of neural networks, dedicated deep learning chips or artificial intelligence chips have become one of the hottest areas of development for major technology companies in recent years.

[0003] Currently, when deploying computational tasks in neural network-based applications across heterogeneous computing devices containing dedicated chips, the common approach is to manually configure the corresponding computing hardware for each task. Then, the power-on and power-off times of each hardware component are analyzed, and power management tools are used to control these times to optimize the performance and power consumption of the heterogeneous computing device. However, this manual task deployment method is inefficient and lacks rationality. Furthermore, it optimizes the performance and power consumption of the heterogeneous computing device from a low-level hardware control perspective. If the computational task deployment is not optimized properly, even the most sophisticated power management tools will have limited impact on improving the performance of the heterogeneous computing device.

[0004] In conclusion, how to improve the rationality of task deployment is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a task deployment method, apparatus, system, and readable storage medium to improve the rationality of task deployment.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] A task deployment method, comprising:

[0008] Obtain the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing devices, from the feedback of the heterogeneous computing devices.

[0009] Based on the status information and the reward / penalty information, the computing components corresponding to the computing tasks at each layer are determined, and each computing component executes the corresponding computing task.

[0010] The steps of obtaining the status information of each layer of computing tasks in the application after execution by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices are performed until the status information and the reward and punishment information are stable, so as to obtain the computing components corresponding to each layer of computing tasks, and each computing component executes the corresponding computing tasks.

[0011] Preferably, the acquisition of status information of each layer of computing tasks in the application after execution by the corresponding computing components, and the reward and penalty information of the heterogeneous computing device, fed back by the heterogeneous computing device, includes:

[0012] The system obtains the status information of the computing tasks at each layer of the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing devices, which are sent by the control device and fed back by the heterogeneous computing devices.

[0013] After determining the computing components corresponding to the computing tasks at each layer, the process also includes:

[0014] The information of the computing components corresponding to the computing tasks at each layer is sent to the control device, which then sends an execution command to the computing component corresponding to the first-layer computing task. After receiving the execution completion notification from the computing component corresponding to the first-layer computing task, the control device sends an execution command to the computing component corresponding to the next-layer computing task, until it receives the execution completion notification from the computing component corresponding to the last-layer computing task.

[0015] Preferably, sending the computing components corresponding to the computing tasks at each layer to the control device includes:

[0016] The deployment diagram of the computing components corresponding to the computing tasks in each layer is sent to the control device.

[0017] Preferably, the status information of each layer of computing tasks in the application after execution by the corresponding computing components is obtained from the feedback of heterogeneous computing devices, including:

[0018] Obtain the status information O, fed back by the heterogeneous computing device, after the computing tasks at each layer of the application have been executed by the corresponding computing components. k :

[0019] O k =(k,s in ,s out ,n params i c ,a k-1 )

[0020] Where k is the layer number of the computation task, s in and s out These are the feature maps of the input and output of the computation task at layer k, respectively, and n params i represents the number of parameters or weights for the task computed at layer k. c Let a be the computation type of the k-th layer computation task. k-1 This refers to the execution action of the computation task at level k-1.

[0021] Preferably, obtaining the reward and penalty information of the heterogeneous computing devices fed back by the heterogeneous computing devices includes:

[0022] Obtain the reward function R fed back by the heterogeneous computing device:

[0023] R = α × (energy) pro -energy origin )+β×(latency pro -latency origin )

[0024] Where α and β are the energy consumption coefficient and delay coefficient, respectively. pro The energy is the total energy consumed when the computing tasks described in each layer are executed by the corresponding computing components. origin The latency is the energy consumption reported by the heterogeneous computing devices under the initial settings. pro The latency is the total computation time consumed when the computational tasks described in each layer are executed by the corresponding computational components. origin The computation time fed back by the heterogeneous computing device under the initial settings.

[0025] Preferably, based on the status information and the reward / penalty information, the computing components corresponding to the computing tasks at each layer are determined, including:

[0026] Based on the status information and the reward / penalty information, determine the execution action corresponding to the computing task at each layer;

[0027] Using h k =round(a k ×(h max -h min )+h min -0.5), determine the number h of the computing component corresponding to the k-th layer computing task. k ; where round() means returning an integer value rounded to the nearest whole number, a k h represents the execution action corresponding to the k-th layer computation task. max h is the number of the largest computing component in the heterogeneous computing device. min The smallest computing component in the heterogeneous computing device is numbered.

[0028] Preferably, based on the status information and the reward / penalty information, the execution action corresponding to each layer of the computation task is determined, including:

[0029] Based on the status information and the reward / penalty information, the execution actions corresponding to the computational tasks at each layer are determined using the DDPG algorithm.

[0030] A mission deployment device, comprising:

[0031] The acquisition module is used to acquire the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing device, which are fed back by the heterogeneous computing device.

[0032] The determination module is used to determine the computing component corresponding to the computing task at each layer based on the status information and the reward and punishment information, and to have each computing component execute the corresponding computing task.

[0033] The execution module is used to execute the steps of obtaining the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices, until the status information and the reward and punishment information are stable, so as to obtain the computing components corresponding to each layer of computing tasks, and each computing component executes the corresponding computing tasks.

[0034] A task deployment system includes an intelligent agent and heterogeneous computing devices, wherein the heterogeneous computing devices include multiple computing components, wherein:

[0035] The heterogeneous computing device is used to provide feedback on the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and penalty information of the heterogeneous computing device.

[0036] The intelligent agent is used to perform the steps of the task deployment method as described in any of the above.

[0037] A readable storage medium storing a computer program that, when executed by a processor, implements the steps of the task deployment method as described in any of the preceding claims.

[0038] This application provides a task deployment method, apparatus, system, and readable storage medium. The method includes: acquiring status information of each layer of computing tasks in an application after execution by corresponding computing components and reward / penalty information of the heterogeneous computing devices, as fed back by the heterogeneous computing devices; determining the computing components corresponding to each layer of computing tasks based on the status information and reward / penalty information, and having each computing component execute the corresponding computing task; and performing the step of acquiring the status information of each layer of computing tasks in an application after execution by corresponding computing components and reward / penalty information of the heterogeneous computing devices, as fed back by the heterogeneous computing devices, until the status information and reward / penalty information are stable, so as to obtain the computing components corresponding to each layer of computing tasks, and having each computing component execute the corresponding computing task.

[0039] The technical solution disclosed in this application determines the computing components corresponding to each layer of computing tasks based on the status information of each layer of computing tasks after execution by the corresponding computing components and the reward and penalty information of the heterogeneous computing devices, and then each computing component executes the corresponding computing task. This process is repeated until the status information and reward and penalty information are stable, and finally the computing components corresponding to each layer of computing tasks in the application are obtained. This application realizes the automatic deployment of computing tasks from the perspective of top-level applications using reinforcement learning, thereby improving the rationality of task deployment and the task execution performance of heterogeneous computing devices, and completely eliminating the limitations of human resources and cumbersome manual configuration, so as to improve the adaptation efficiency and running performance of applications. Attached Figure Description

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

[0041] Figure 1 A flowchart illustrating a task deployment method provided in an embodiment of this application;

[0042] Figure 2 A hardware and software architecture diagram for task deployment is provided in an embodiment of this application;

[0043] Figure 3 This is a schematic diagram of a task deployment device provided in an embodiment of this application. Detailed Implementation

[0044] Artificial intelligence (AI) is increasingly permeating people's daily lives, and its applications are inseparable from AI algorithms, which are composed of neural networks of various types and structures. Neural networks are computationally intensive algorithms; the deeper the neural network, the greater the computational demands, and the higher the performance requirements of the target device. In pursuit of optimal performance in research and applications, neural networks are being designed to be increasingly deep and large. As neural network structures become larger, the computational load increases exponentially. General-purpose computing devices like CPUs (Central Processing Units) and GPUs (Graphics Processing Units) struggle to run neural networks effectively. They either have insufficient computing power, resulting in excessively long execution times that fail to meet the real-time requirements of applications, or they exhibit low computational efficiency and excessive energy consumption, making deep learning-based applications extremely energy-intensive. Therefore, dedicated deep learning chips or artificial intelligence chips (AI chips) have become a hot topic of development for major technology companies in recent years.

[0045] AI chips, specifically optimized for the characteristics of deep learning computations, make neural network calculations in deep learning highly efficient. Furthermore, being AI-specific chips, they are significantly more energy-efficient than general-purpose computing devices. In addition to designing dedicated AI chips to adapt to deep neural network computations, software must also be adapted to the AI ​​chip to fully realize its performance and energy efficiency advantages.

[0046] Currently, when deploying computational tasks in neural network-based applications across heterogeneous computing devices containing AI chips, the common approach is to manually configure the corresponding computing hardware for each task. Then, the power-on and power-off times of each hardware component are analyzed, and power management tools are used to control these times to optimize the performance and power consumption of the heterogeneous computing device. However, this manual task deployment method is inefficient and lacks rationality. Furthermore, it optimizes the performance and power consumption of the heterogeneous computing device from a low-level hardware control perspective. If the computational task deployment is not optimized properly, even the most sophisticated power management tools will have limited impact on improving the performance of the heterogeneous computing device.

[0047] Therefore, this application provides a task deployment method, apparatus, system, and readable storage medium to improve the rationality of task deployment.

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

[0049] See Figure 1 and Figure 2 ,in, Figure 1 A flowchart of a task deployment method provided in an embodiment of this application is shown. Figure 2 This illustration shows a hardware and software architecture diagram for task deployment according to an embodiment of this application. A task deployment method provided in this embodiment may include:

[0050] S11: Obtain the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing devices, from the feedback of the heterogeneous computing devices.

[0051] It should be noted that, in this application, "heterogeneous computing device" refers to a computing device containing an AI chip, and "heterogeneous" means that a single computing device includes multiple components capable of performing calculations, such as... Figure 2 As shown, heterogeneous computing devices contain a graphics processing unit (GPU), a central processing unit (CPU), a microcontroller, and an AI chip. The AI ​​chip includes matrix computation units, single-point data processors, and planar data processors. Taking the CPU as an example, it can perform general-purpose calculations as well as calculations that can be performed by matrix computation unit arrays (for convolution calculations in neural networks) and planar data processors (for pooling in neural networks).

[0052] This application utilizes reinforcement learning to deploy computational tasks at various layers within an application. Specifically, the application mentioned here can be a neural network or artificial intelligence application. Reinforcement learning is a field of computational learning, primarily composed of an agent, environment, state, action, and reward. The agent is the unit that issues action commands based on a specified policy, and the environment is the external object being executed; in this case, the external object being executed is a heterogeneous computing device.

[0053] Specifically, firstly, the heterogeneous computing devices provide feedback to the agent on the status information of each layer of computing tasks in the application after they have been executed by the corresponding internal computing components, as well as the reward and penalty information of the heterogeneous computing devices. The status information mentioned here includes the time consumption, energy consumption, and operational information after computation.

[0054] Taking neural networks as an example, the computational tasks of each layer in the applications mentioned in this application are the neural network layers, such as... Figure 2As shown, it presents a simple neural network structure that includes computations such as convolution, pooling, summation, activation, and classification.

[0055] S12: Based on the status information and reward / penalty information, determine the computing components corresponding to each layer of computing tasks, and have each computing component execute the corresponding computing tasks.

[0056] After receiving status information and reward / penalty information from heterogeneous computing devices, the intelligent agent formulates deployment strategies for computing tasks at each layer of the application based on the status information and reward / penalty information from the heterogeneous computing devices. Based on the deployment strategies, it determines the computing components corresponding to each layer of computing tasks in the heterogeneous computing devices and notifies each computing component of the corresponding computing tasks to be executed.

[0057] After receiving their respective computing tasks, each computing component in a heterogeneous computing device executes those tasks. Then, the heterogeneous computing device continues to provide feedback to the intelligent agent regarding the status of each layer of computing tasks executed by their corresponding computing components, as well as the reward / penalty information from the heterogeneous computing device itself.

[0058] It should be noted that, in the initial state, the agent obtains the initial state information of each computing component and the initial reward and penalty information of the heterogeneous computing device from the feedback of the heterogeneous computing device. Then, based on the initial state information and the initial reward and penalty information, it determines the computing component corresponding to each layer of computing task in the application.

[0059] S13: Execute the steps of obtaining the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices, until the status information and reward and punishment information are stable, so as to obtain the computing components corresponding to each layer of computing tasks, and the corresponding computing tasks are executed by each computing component.

[0060] Based on step S12, the agent continues to execute the steps of obtaining the state information of each layer of computing tasks in the application after being executed by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices, until the state information and reward and punishment information fed back by the heterogeneous computing devices are stable, that is, until the two can no longer be optimized (or the two converge).

[0061] As can be seen from the above process, this application automatically deploys computing tasks at each layer from a software perspective and from the perspective of top-level applications, solving the performance and power consumption problems of heterogeneous computing devices, improving the rationality of task deployment, and having greater universality by starting from the top level. Moreover, this application uses an end-to-end deep learning method—reinforcement learning—to solve the task deployment performance optimization problem, completely eliminating the limitations of human resources and tedious manual configuration, and greatly improving the application's adaptation efficiency and running performance.

[0062] The technical solution disclosed in this application determines the computing components corresponding to each layer of computing tasks based on the status information of each layer of computing tasks after execution by the corresponding computing components and the reward and penalty information of the heterogeneous computing devices, as well as the feedback from the heterogeneous computing devices. Each computing component then executes the corresponding computing task. This process is repeated until the status information and reward and penalty information are stable, ultimately yielding the computing components corresponding to each layer of computing tasks in the application. This application achieves automatic deployment of computing tasks from the perspective of top-level applications using reinforcement learning, thereby improving the rationality of task deployment and the task execution performance of heterogeneous computing devices. It also completely eliminates the limitations of human resources and tedious manual configuration, thereby improving the application's adaptation efficiency and operating performance.

[0063] This application provides a task deployment method that obtains status information of computing tasks at each layer of the application after execution by corresponding computing components, as well as reward and penalty information of the heterogeneous computing devices, which may include:

[0064] Obtain the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing devices, sent by the control device and fed back by the heterogeneous computing devices;

[0065] After determining the computing components corresponding to each layer of computing tasks, it may also include:

[0066] The information of the computing components corresponding to each layer of computing tasks is sent to the control device, which then sends an execution command to the computing component corresponding to the first layer of computing tasks. After receiving the execution completion notification from the computing component corresponding to the first layer of computing tasks, the control device sends an execution command to the computing component corresponding to the next layer of computing tasks, until it receives the execution completion notification from the computing component corresponding to the last layer of computing tasks.

[0067] In this application, the heterogeneous computing device can send the status information of each layer of computing tasks after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing device, to the control device, which then sends the information to the intelligent agent to improve the convenience of information transmission.

[0068] With a control device present in the task deployment system, after the intelligent agent identifies the computing components corresponding to each layer of computing tasks, it can send the information of the computing components (specifically, information used to confirm the identity of the computing components, such as the component's number and name) to the control device. Upon receiving this information, the control device can send an execution command to the computing component corresponding to the first-layer computing task in the application, causing the corresponding computing component to perform the computation on the first-layer task. After completing the computation on the first-layer task, the corresponding computing component can send an execution completion notification back to the control device. After receiving the execution completion notification from the computing component corresponding to the first-layer task, the control device sends an execution command to the computing component corresponding to the second-layer task, causing the second-layer computing component to perform the computation on that layer and send an execution completion notification back to the control device upon completion. After receiving the execution completion notification from the computing component corresponding to the second-layer task, the control device continues with similar operations until it receives the execution completion notification from the computing component corresponding to the last-layer computing task. In other words, control devices can be used to control the execution of each layer of computing tasks in the application by the corresponding computing components in sequence, so that the application can be executed normally and smoothly.

[0069] It should be noted that, while sending completion notifications to the control device, the computing components corresponding to each layer of computing tasks can also send the status information of the corresponding computing tasks after execution by the corresponding computing components to the control device. The control device can then sequentially provide feedback on the status information of the corresponding computing tasks to the intelligent agent, or it can save the status information fed back by the computing components until the computing component corresponding to the last layer of computing tasks sends its status information, at which point it packages and sends the status information of all layers of computing tasks together to the intelligent agent. Furthermore, after the last layer of computing tasks is completed by its corresponding computing component, the heterogeneous computing device can feed back reward and penalty information to the control device, which can then send it to the intelligent agent, enabling the intelligent agent to formulate the next round of task deployment strategies based on the status information and reward and penalty information.

[0070] This application provides a task deployment method that sends computing components corresponding to computing tasks at each layer to a control device, which may include:

[0071] Send the deployment diagram of the computing components corresponding to each layer of computing tasks to the control device.

[0072] In this application, when the intelligent agent sends the computing components corresponding to each layer of computing tasks to the control device, it can specifically send a deployment diagram of the computing components corresponding to each layer of computing tasks to the control device, so that the control device can intuitively determine the computing components corresponding to each layer of computing tasks, as shown in the following example. Figure 2 As shown, it illustrates the deployment diagram of computing components corresponding to each layer of computing tasks in the application, as determined in a certain round of task deployment.

[0073] In addition, the deployment diagram of computing components corresponding to each layer of computing tasks can be displayed so that relevant personnel can know which computing component executes each layer of computing tasks in the application.

[0074] This application provides a task deployment method that obtains status information from heterogeneous computing devices after each layer of computing tasks in the application has been executed by the corresponding computing components. This method may include:

[0075] Obtain the status information of each layer of computing tasks in the application after they have been executed by the corresponding computing components, based on feedback from heterogeneous computing devices. k :

[0076] O k =(k,s in ,s out ,n params i c ,a k-1 )

[0077] Where k is the layer number of the computation task, s in and s out These are the feature maps of the input and output of the computation task at layer k, respectively, and n params i represents the number of parameters or weights for the task computed at layer k. c Let a be the computation type of the k-th layer computation task. k-1 This refers to the execution action of the computation task at level k-1.

[0078] In this application, the state information (also referred to as the state space) obtained by the intelligent agent from the heterogeneous computing devices after the computational tasks at each layer of the application have been executed by the corresponding computing components is specifically O k =(k,s in ,s out ,n params i c ,a k-1 That is, the state information of each layer of computation tasks is specifically a 6-dimensional vector, where k is the layer number of the computation task, s in and s out The feature map sizes for the input and output of the k-th layer computation task are n, respectively. params i represents the number of parameters or weights for the task computed at layer k. c Let a be the computation type of the k-th layer computation task. k-1 For the execution action of the computation task at level k-1, where a k-1After the agent formulates a deployment strategy for the (k-1)th layer computation task, the specific execution action (also known as execution configuration) issued according to this deployment strategy is as follows. It should be noted that when k equals 1, then a... k-1 This can be the default action to perform.

[0079] In the above vector, each element is uniformized to the range [0,1] to ensure that the data are on the same scale.

[0080] The aforementioned state information facilitates the formulation of task deployment strategies for the computational tasks of the corresponding layers by the intelligent agent.

[0081] This application provides a task deployment method that obtains reward and penalty information from heterogeneous computing devices, which may include:

[0082] Obtain the reward function R from the heterogeneous computing devices:

[0083] R = α × (energy) pro -energy origin )+β×(latency pro -latency origin )

[0084] Where α and β are the energy consumption coefficient and delay coefficient, respectively. pro energy represents the total energy consumed when each layer of computing tasks is executed by its corresponding computing component. origin The latency is the energy consumption reported by the heterogeneous computing devices under initial settings. pro The latency is the total computation time consumed when each layer of computation tasks is executed by its corresponding computation component. origin This refers to the computation time reported by the heterogeneous computing devices under initial settings.

[0085] In this application, the reward function fed back by the heterogeneous computing device is specifically: R = α × (energy) pro -energy origin )+β×(latency pro -latency origin ), where α and β are the energy consumption coefficient and delay coefficient, respectively. pro This refers to the total energy consumed when each layer of computing tasks is executed by its corresponding computing component, which is also the energy consumption reported by the heterogeneous computing device after one execution. origin This refers to the energy consumption reported by heterogeneous computing devices under initial settings; similarly, latency. proThe latency is the total computation time consumed when each layer of computing tasks is executed by its corresponding computing component; that is, the time taken by each layer of computing tasks in a heterogeneous computing device computing application after one execution. origin This refers to the computation time reported by the heterogeneous computing devices under initial settings.

[0086] Feeding energy consumption and computation time as reward and penalty information to the agent allows it to deploy tasks in a way that minimizes both time and energy consumption. It should be noted that when energy consumption and computation time are the objectives, then... Figure 2 The hardware feedback from heterogeneous computing devices is the energy consumption and latency of the entire computing process, that is, the energy consumption and time consumed to complete the computing tasks at each layer of the application.

[0087] Of course, if energy consumption is the objective, then the reward function R fed back by the heterogeneous computing device is specifically: R = α × (energy pro -energy origin If latency is the objective, then the reward function fed back by the heterogeneous computing devices is R = β × (latency) pro -latency origin This application has the ability to adjust the reward function according to the achieved goal in order to better meet user needs and improve user experience.

[0088] This application provides a task deployment method that determines the computing components corresponding to each layer of computing tasks based on status information and reward / penalty information, and may include:

[0089] Based on the status information and reward / penalty information, determine the execution actions corresponding to each layer of computing tasks;

[0090] Using h k =round(a k ×(h max -h min )+h min -0.5), determine the number h of the computing component corresponding to the k-th layer computing task. k ; where round() means returning an integer value rounded to the nearest whole number, a k h represents the execution action corresponding to the k-th layer computation task. max h is the number of the largest computing component in a heterogeneous computing device. min This is the number of the smallest computing component in a heterogeneous computing device.

[0091] In this application, when determining the computing components corresponding to each layer of computing tasks based on status information and reward / penalty information, the next step strategy can be executed based on the status information and reward / penalty information, and the execution action corresponding to each layer of computing tasks can be determined based on the specified next step strategy. Then, h can be used k =round(a k ×(h max -h min )+h min -0.5) Determine the number h of the computing component corresponding to the k-th layer computing task. k `round()` returns a rounded integer value. k h represents the execution action corresponding to the k-th layer computation task. max h is the number of the largest computing component in a heterogeneous computing device. min This is the number of the smallest computing component in a heterogeneous computing device.

[0092] by Figure 2 For example, assuming the planar data processor, single-point data processor, central processing unit, microcontroller, matrix computing unit, and graphics processor are numbered 0, 1, 2, 3, 4, and 5 respectively, then h max =5,h min =0.

[0093] Using the above method, the computing components corresponding to each layer of computing tasks in the application can be accurately determined.

[0094] It should be noted that, considering some computing components only support specific types of computation, if unsupported computational tasks are assigned to these components, then h k It will automatically shift until the shifted computing component can support the computing task, that is, if the calculated h k If the current computation task cannot be supported, then h k Automatically shift down one position. If the shifted computing component can support the current computing task, then the shifted computing component will execute the current computing task. If the shifted computing component cannot support the current computing task, then h... k Continue to automatically shift down one position... until the shifted computing component can support the current computing task.

[0095] This application provides a task deployment method that determines the execution actions corresponding to each layer of computing tasks based on status information and reward / penalty information, and may include:

[0096] Based on the status information and reward / penalty information, the DDPG algorithm is used to determine the execution actions corresponding to each layer of computation tasks.

[0097] In this application, the DDPG (Deep Deterministic Policy Gradient) algorithm can be used to determine the execution actions corresponding to each layer of computation tasks based on state information and reward / penalty information. The DDPG algorithm itself is composed of a small neural network. Through the policy gradient algorithm, DDPG can output a continuous action.

[0098] pass Figure 2 As can be seen, the agent utilizing the DDPG algorithm consists of two parts: a Critic (called the evaluation network, Q network) and an Action (called the policy network). The Q network is mainly used to evaluate the actions specified by the policy network and output evaluation values; the policy network mainly outputs actions based on information such as the state fed back from the environment. The architecture of the Q network and the policy network is the same.

[0099] Taking the Q-network as an example, it is expressed as Q(O) k ,a k |θ Q ), where O k Let a be the state vector of the task at layer k. k For the action taken at level k, θ Q These are the parameters of the Q-network. The Q-network is further composed of a target network and an online network.

[0100] The expression for the Q function is: Q k =R k -B+γ×Q(O k+1 ,ω(O k+1 )|θ Q This function is used to calculate the expected reward value. For the k-th layer of a neural network, the expected reward is Q. k R k Let Q(O) be the actual reward value obtained by the reward function for the k-th layer, B be an exponentially moving average of the previous reward values, which can be considered as a reward baseline value, γ be a weighting factor, set to 1 (because we assume that the action performed on each layer contributes equally to the final result), and Q(O) be the actual reward value obtained by the reward function for the k-th layer. k+1 ,ω(O k+1 )|θ Q ) represents the output of the (k+1)th layer of the Q-target network, O k+1 Let ω(O) be the state vector for the task at layer k+1. k+1 ) represents the output of the (k+1)th layer of the policy target network.

[0101] The loss function is: Where, N s Q represents the number of steps the agent needs to process, or the number of layers in the neural network (i.e., the number of layers in the computational tasks included in the application). k The output of the Q function represents the expected reward value of the k-th layer, Q(O). k ,a k |θ Q The output of the Q-network is shown below. When the value of the loss function stabilizes without significant change as training progresses (i.e., through round after round of task deployment), the Q-network is considered to have completed training.

[0102] In addition, the input, output and intermediate structure of the Q network and the policy network are as follows: the input is a 6-dimensional state and action vector and the previous reward information, the middle consists of two hidden fully connected layers of size 400, followed by a fully connected layer of size 300, and the final output is a one-dimensional action [0-1] (as mentioned above, this action determines the computational components required for the current layer).

[0103] Using the DDPG algorithm to determine the execution action can improve the efficiency of action determination and make the determination of the execution action relatively easy.

[0104] This application also provides a task deployment device, see [link to relevant documentation] Figure 3 It shows a schematic diagram of the structure of a task deployment device provided in an embodiment of this application, which may include:

[0105] The acquisition module 31 is used to acquire the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of the heterogeneous computing devices, which are fed back by the heterogeneous computing devices.

[0106] The determination module 32 is used to determine the computing components corresponding to each layer of computing tasks based on the status information and reward and punishment information, and to have each computing component execute the corresponding computing tasks.

[0107] The execution module 33 is used to perform the steps of obtaining the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices, until the status information and reward and punishment information are stable, so as to obtain the computing components corresponding to each layer of computing tasks and have each computing component execute the corresponding computing tasks.

[0108] This application provides a task deployment device, wherein the acquisition module 31 may include:

[0109] The first acquisition unit is used to acquire the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components and the reward and punishment information of the heterogeneous computing devices, which are sent by the control device and fed back by the heterogeneous computing devices.

[0110] The mission deployment device may also include:

[0111] The sending module is used to send the information of the computing components corresponding to each layer of computing tasks to the control device after determining the computing components corresponding to each layer of computing tasks. The control device then sends an execution command to the computing component corresponding to the first layer of computing tasks. After receiving the execution completion notification from the computing component corresponding to the first layer of computing tasks, it sends an execution command to the computing component corresponding to the next layer of computing tasks until it receives the execution completion notification from the computing component corresponding to the last layer of computing tasks.

[0112] This application provides a task deployment device, wherein the sending module may include:

[0113] The sending unit is used to send the deployment diagram of computing components corresponding to each layer of computing tasks to the control device.

[0114] This application provides a task deployment device, wherein the acquisition module 31 may include:

[0115] The second acquisition unit is used to acquire the status information (O) of each layer of computing tasks in the application after they have been executed by the corresponding computing components, as fed back by heterogeneous computing devices. k :

[0116] O k =(k,s in ,s out ,n params i c ,a k-1 )

[0117] Where k is the layer number of the computation task, s in and s out These are the feature maps of the input and output of the computation task at layer k, respectively, and n params i represents the number of parameters or weights for the task computed at layer k. c Let a be the computation type of the k-th layer computation task. k-1 This refers to the execution action of the computation task at level k-1.

[0118] This application provides a task deployment device, wherein the acquisition module 31 may include:

[0119] The third acquisition unit is used to acquire the reward function R fed back by the heterogeneous computing devices:

[0120] R = α × (energy) pro -energy origin )+β×(latency pro -latency origin )

[0121] Where α and β are the energy consumption coefficient and delay coefficient, respectively. pro energy represents the total energy consumed when each layer of computing tasks is executed by its corresponding computing component. origin The latency is the energy consumption reported by the heterogeneous computing devices under initial settings. pro The latency is the total computation time consumed when each layer of computation tasks is executed by its corresponding computation component. origin This refers to the computation time reported by the heterogeneous computing devices under initial settings.

[0122] This application provides a task deployment apparatus, wherein the determining module 32 may include:

[0123] The first determining unit is used to determine the execution actions corresponding to each layer of computing tasks based on the status information and reward / penalty information.

[0124] The second determining unit is used to utilize h k =round(a k ×(h max -h min )+h min -0.5), determine the number h of the computing component corresponding to the k-th layer computing task. k ; where round() means returning an integer value rounded to the nearest whole number, a k h represents the execution action corresponding to the k-th layer computation task. max h is the number of the largest computing component in a heterogeneous computing device. min This is the number of the smallest computing component in a heterogeneous computing device.

[0125] This application provides a task deployment apparatus, wherein the first determining unit may include:

[0126] The sub-unit is determined based on the status information and reward / penalty information, and uses the DDPG algorithm to determine the execution actions corresponding to each layer of computation tasks.

[0127] This application also provides a task deployment system, which can be found in the following embodiments: Figure 2 It can include intelligent agents and heterogeneous computing devices. Heterogeneous computing devices can include multiple computing components, among which:

[0128] Heterogeneous computing devices are used to provide feedback on the status information of each layer of computing tasks in the application after they are executed by the corresponding computing components, as well as the reward and punishment information of heterogeneous computing devices.

[0129] An intelligent agent is used to perform the following steps:

[0130] The process involves obtaining status information of each layer of computing tasks in the application after execution by the corresponding computing components, as well as reward and penalty information of the heterogeneous computing devices, from feedback from the heterogeneous computing devices. Based on the status information and reward and penalty information, the computing components corresponding to each layer of computing tasks are determined, and each computing component executes the corresponding computing tasks. The process continues until the status information and reward and penalty information stabilize, thus obtaining the computing components corresponding to each layer of computing tasks, and then having each computing component execute the corresponding computing tasks.

[0131] The task deployment system provided in this application embodiment may further include a control device connected to an intelligent agent and a heterogeneous computing device. This control device is used to acquire status information of each layer of computing tasks in the application after execution by the corresponding computing components, as well as reward / penalty information of the heterogeneous computing device, and send this information to the intelligent agent. It is also used to receive information from the intelligent agent regarding the computing components corresponding to each layer of computing tasks, send execution commands to the computing components corresponding to the first layer of computing tasks, and after receiving an execution completion notification from the computing components corresponding to the first layer of computing tasks, send execution commands to the computing components corresponding to the next layer of computing tasks, until an execution completion notification is received from the computing components corresponding to the last layer of computing tasks.

[0132] This application embodiment also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the following steps:

[0133] The process involves obtaining status information of each layer of computing tasks in the application after execution by the corresponding computing components, as well as reward and penalty information of the heterogeneous computing devices, from feedback from the heterogeneous computing devices. Based on the status information and reward and penalty information, the computing components corresponding to each layer of computing tasks are determined, and each computing component executes the corresponding computing tasks. The process continues until the status information and reward and penalty information stabilize, thus obtaining the computing components corresponding to each layer of computing tasks, and then having each computing component execute the corresponding computing tasks.

[0134] The readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0135] For a description of the relevant parts of the task deployment apparatus, system and readable storage medium provided in this application, please refer to the detailed description of the corresponding parts in the task deployment method provided in the embodiments of this application, and will not be repeated here.

[0136] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that the elements inherent in a process, method, article, or apparatus that includes a list of elements are included. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Additionally, portions of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0137] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of task deployment, characterized by, The method comprises the following steps: acquiring state information of each layer of computing tasks in an application after the computing tasks are executed by corresponding computing components of a heterogeneous computing device and reward and punishment information of the heterogeneous computing device; determining the computing components corresponding to each layer of the computing tasks according to the state information and the reward and punishment information, and executing the corresponding computing tasks by the computing components; wherein, determining the computing components corresponding to each layer of the computing tasks according to the state information and the reward and punishment information comprises: determining execution actions corresponding to each layer of the computing tasks according to the state information and the reward and punishment information; Utilizing , determine the number of computing components corresponding to the computing task of the layer ; wherein, represents a rounding integer value, is the execution action corresponding to the computing task of the layer is the largest computing component number in the heterogeneous computing device, is the smallest computing component number in the heterogeneous computing device; wherein, determining the execution actions corresponding to each layer of the computing tasks according to the state information and the reward and punishment information comprises: determining the execution actions corresponding to each layer of the computing tasks by using a DDPG algorithm according to the state information and the reward and punishment information; The step of acquiring the state information of each layer of computing tasks in an application after the computing tasks are executed by corresponding computing components of a heterogeneous computing device and reward and punishment information of the heterogeneous computing device is executed until the state information and the reward and punishment information are stable, so as to obtain the computing components corresponding to each layer of the computing tasks and execute the corresponding computing tasks by the computing components.

2. The method of claim 1, wherein, The step of acquiring the state information of each layer of computing tasks in an application after the computing tasks are executed by corresponding computing components of a heterogeneous computing device and reward and punishment information of the heterogeneous computing device comprises: acquiring the state information of each layer of the computing tasks in the application after the computing tasks are executed by the corresponding computing components of the heterogeneous computing device and the reward and punishment information of the heterogeneous computing device which are fed back by a control device; after determining the computing components corresponding to each layer of the computing tasks, the method further comprises: sending information of the computing components corresponding to each layer of the computing tasks to the control device, sending an execution command to the computing component corresponding to a first layer of computing tasks by the control device, sending an execution command to the computing component corresponding to a next layer of computing tasks after receiving an execution completion notification fed back by the computing component corresponding to the first layer of computing tasks, and sending an execution completion notification sent by the computing component corresponding to a last layer of computing tasks until the execution completion notification is received.

3. The method of claim 2, wherein, The step of sending the computing components corresponding to each layer of the computing tasks to the control device comprises: sending a computing component deployment graph corresponding to each layer of the computing tasks to the control device.

4. The method of claim 1, wherein, The step of acquiring the state information of each layer of computing tasks in an application after the computing tasks are executed by corresponding computing components of a heterogeneous computing device comprises: obtaining state information of each layer computing task in the application executed by the corresponding computing component after the heterogeneous computing device feeds back : ; wherein, is a number of layers of the computing task, and are respectively a first layer computing task input and output feature map, is a number of parameters or weights of the first layer computing task, is a computing type of the first layer computing task, is an execution action of the first layer computing task.

5. The method of claim 1, wherein, The step of acquiring reward and punishment information of a heterogeneous computing device which is fed back by the heterogeneous computing device comprises: acquiring a reward function fed back by the heterogeneous computing device : ; wherein, and are energy consumption coefficient and delay coefficient, respectively, is the total energy consumption consumed by the computing tasks of each layer when executed by the corresponding computing components, is the energy consumption feedback by the heterogeneous computing device under the initial setting, is the total computing time consumed by the computing tasks of each layer when executed by the corresponding computing components, is the computing time feedback by the heterogeneous computing device under the initial setting.

6. A task deployment apparatus characterized by comprising: The method comprises the following steps: an acquiring module, configured to acquire state information of each layer of computing tasks in an application after the computing tasks are executed by corresponding computing components of a heterogeneous computing device and reward and punishment information of the heterogeneous computing device; a determining module, configured to determine the computing components corresponding to each layer of the computing tasks according to the state information and the reward and punishment information, and execute the corresponding computing tasks by the computing components; wherein, determining the computing components corresponding to each layer of the computing tasks according to the state information and the reward and punishment information comprises: determining execution actions corresponding to each layer of the computing tasks according to the state information and the reward and punishment information; wherein, determining the execution actions corresponding to each layer of the computing tasks according to the state information and the reward and punishment information comprises: determining the execution actions corresponding to each layer of the computing tasks by using a DDPG algorithm according to the state information and the reward and punishment information. use Determine the first The number of the computing component corresponding to the layer computing task ;in, This indicates that the value is returned as a rounded integer. For the first The execution actions corresponding to the layer computing tasks This is the number of the largest computing component in the heterogeneous computing device. Number the smallest computing component in the heterogeneous computing device; The execution action corresponding to each layer of the computing task is determined according to the state information and the reward and punishment information, and the execution action corresponding to each layer of the computing task is determined by using a DDPG algorithm according to the state information and the reward and punishment information. The execution module is configured to execute the steps of obtaining the state information of each layer of the computing task in the application after being executed by the corresponding computing component of the heterogeneous computing device and the reward and punishment information of the heterogeneous computing device until the state information and the reward and punishment information are stable, so as to obtain the computing component corresponding to each layer of the computing task, and the corresponding computing task is executed by each computing component. The application further provides a task deployment method, and the method comprises the following steps:

7. A task deployment system characterized by, The heterogeneous computing device is configured to feed back the state information of each layer of the computing task in the application after being executed by the corresponding computing component of the heterogeneous computing device and the reward and punishment information of the heterogeneous computing device. The agent is configured to execute the steps of the task deployment method according to any one of claims 1 to 5. The readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the task deployment method according to any one of claims 1 to 5.

8. A readable storage medium, characterized by, ​

Citation Information

Patent Citations

  • Method for executing deep neural network on heterogeneous processing unit

    CN111738434A

  • Scheduling computation graph heterogeneous computer system

    US20200249998A1