A task scheduling method, apparatus, device, and medium

By optimizing task scheduling based on the relationship between tasks and processing engines in heterogeneous systems, the problems of low task efficiency and low resource utilization in heterogeneous systems are solved, achieving more efficient task execution and resource utilization.

CN114116149BActive Publication Date: 2026-02-06HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010863869.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-25
Publication Date
2026-02-06
Estimated Expiration
2040-08-25

AI Technical Summary

Technical Problem

Heterogeneous systems are inefficient and have low resource utilization when executing tasks from heterogeneous applications. Existing scheduling methods fail to effectively consider the affinity between tasks and processing engines, resulting in tasks being scheduled to unsuitable slave nodes and increasing scheduling overhead.

Method used

The master node determines the target processing engine corresponding to the target task based on the relationship between the task and the processing engine, and schedules the task to a slave node with higher affinity for execution. Combined with load balancing strategies and cross-node scheduling, the task allocation is optimized to improve execution efficiency and resource utilization.

Benefits of technology

It improves the task execution efficiency of heterogeneous applications, reduces the number of cross-node scheduling operations, lowers scheduling overhead, optimizes resource utilization, and avoids resource waste and long-term occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116149B_ABST
    Figure CN114116149B_ABST
Patent Text Reader

Abstract

The application provides a task scheduling method, comprising: obtaining a target task, the target task comprising at least one heterogeneous API call; determining a target processing engine corresponding to the target task according to the relationship between the task and the processing engine; and scheduling the target task to a first slave node comprising the target processing engine. In one aspect, the relationship between the task and the processing engine can reflect the affinity between the task and various processing engines, so that the master node can reasonably schedule the target task to the slave node with higher affinity according to the relationship between the task and the processing engine, thereby improving the overall execution efficiency of the target task. Moreover, the method can avoid scheduling the target task to an inappropriate slave node, thereby preventing the resources of the slave node from being occupied for a long time and improving the utilization rate of resources in the heterogeneous system. In addition, the method can reduce the number of times of scheduling the heterogeneous API call across nodes, thereby reducing the scheduling overhead.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computing, and particularly relates to a task scheduling method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] With the in-depth popularization of intelligent devices such as computers in different application fields, more and more domain specific architectures (DSAs) are emerging. Based on these domain specific architectures, new processing engines are generated. The processing engine refers to a processor for processing data.

[0003] For example, in the field of image processing, the processing engine based on the domain specific architecture includes a graphical processing unit (GPU), an image processor (IP), etc. In the field of digital signal processing, the processing engine based on the domain specific architecture includes a digital signal processor (DSP). In the field of artificial intelligence, the processing engine based on the domain specific architecture includes a neural-network processing unit (NPU), etc.

[0004] Among them, the data processing system including two or more processing engines is called a heterogeneous system. The application developed for the heterogeneous system is a heterogeneous application. The heterogeneous application usually includes at least one heterogeneous application programming interface (API). The heterogeneous API is an API with uniform interfaces but different optimized implementations on different processing engines.

[0005] At present, the efficiency of the heterogeneous system in executing the task of the heterogeneous application is low. The industry urgently needs to provide a task scheduling method to improve the execution efficiency of the task of the heterogeneous application. SUMMARY

[0006] The present application provides a task scheduling method. According to the relationship between the task and the processing engine, the target processing engine corresponding to the target task to be executed is determined, and the target task is scheduled to a first slave node including the target processing engine. On the one hand, the execution efficiency of the task as a whole can be provided, and on the other hand, the number of cross-node scheduling can be reduced, and the scheduling overhead can be reduced. The present application also provides a device, equipment, computer readable storage medium and computer program product corresponding to the above method.

[0007] In a first aspect, the present application provides a task scheduling method. Specifically, a master node of a heterogeneous system obtains a target task, the target task comprising at least one heterogeneous application programming interface (API) call, and then the master node can determine a target processing engine corresponding to the target task according to a relationship between the task and the processing engine, and schedule the target task to a first slave node comprising the target processing engine.

[0008] In an aspect, the relationship between the task and the processing engine can reflect the affinity between the task and various processing engines, and therefore the master node can reasonably schedule the target task to a slave node with higher affinity according to the relationship between the task and the processing engine, thereby improving the overall execution efficiency of the target task. Moreover, the method can avoid scheduling the task of the heterogeneous application to an inappropriate slave node, thereby preventing the resources of the slave node from being occupied for a long time, and improving the utilization rate of resources in the heterogeneous system. In addition, the method can reduce the number of times of scheduling the heterogeneous API call across nodes, thereby reducing the scheduling overhead.

[0009] In some possible implementation manners, the master node can determine a plurality of second slave nodes from the heterogeneous system, the second slave node being a slave node comprising the target processing engine, and then the master node can determine the first slave node from the plurality of second slave nodes according to a load balancing strategy. For example, the master node can determine a second slave node with a load rate less than a preset load rate from the plurality of second slave nodes as the first slave node. In this way, the task can be prevented from being accumulated in a certain slave node, thereby causing the resources of other slave nodes to be idle, which on the one hand improves the execution efficiency of the task, and on the other hand improves the utilization rate of resources.

[0010] In some possible implementation manners, different second slave nodes can comprise different numbers of target processing engines (specifically, available target processing engines). Based on this, the master node can further determine the first slave node from the plurality of second slave nodes according to the number of (available) target processing engines in the plurality of second slave nodes after determining the plurality of second slave nodes from the heterogeneous system. In this way, the target task can be scheduled to a slave node comprising the target processing engine and having sufficient number of target processing engines, thereby improving the concurrency granularity of the task and further improving the execution efficiency of the task.

[0011] In some possible implementation manners, considering that different heterogeneous API calls have different execution efficiencies on different processing engines, after the target task is scheduled to the first slave node, the first slave node can further determine a parameter scale value of the heterogeneous API call, and then determine scheduling reference information of the heterogeneous API call according to the parameter scale value of the heterogeneous API call. Then, the first slave node determines, according to the scheduling reference information, a processing engine that has execution efficiency satisfying a preset condition from the processing engines available to the first slave node, and schedules the heterogeneous API call to the processing engine that has execution efficiency satisfying the preset condition.

[0012] The parameter scale can describe a size of a parameter required for calling the heterogeneous API. It should be noted that the size of the parameter in the embodiments of the present application does not refer to a numerical size of the parameter, but refers to a number of bytes occupied by the parameter in a memory or a processing engine. Based on this, the value of the parameter scale (i.e., the parameter scale value) can be any integer in the interval (0, +∞).

[0013] The scheduling reference information is used to describe execution efficiency of the heterogeneous API call on at least one processing engine. Similar to the scheduling reference information of the task, the scheduling reference information can include any one or more of execution efficiency, execution time, and ranking of execution efficiency (execution time). The format of the scheduling reference information is various, for example, the scheduling reference information can be in a vector format or a key-value pair format, which will not be enumerated one by one here.

[0014] The processing engine satisfying the preset condition can be a processing engine with the highest execution efficiency or a processing engine with execution efficiency higher than a preset efficiency, which is not limited in the embodiments of the present application.

[0015] Since the first slave node schedules the heterogeneous API call to a suitable processing engine, the execution efficiency of the heterogeneous API call can be improved, and the execution efficiency of the task of the heterogeneous application can be improved. Moreover, the heterogeneous API call is scheduled to a suitable processing engine respectively, which avoids resource waste and improves resource utilization.

[0016] In some possible implementation manners, the first slave node can further support cross-node scheduling of the heterogeneous API call. Specifically, when the processing engine with execution efficiency satisfying the preset condition is unavailable in the first slave node, the first slave node can further determine a third slave node from the heterogeneous system, the processing engines available to the third slave node including the processing engine with execution efficiency satisfying the preset condition. The heterogeneous API call can be scheduled to the third slave node, and the third slave node can determine, from the processing engines available to the third slave node, the processing engine with execution efficiency satisfying the preset condition, for executing the heterogeneous API call.

[0017] Therefore, the processing engines of all the slave nodes in the heterogeneous system can be comprehensively utilized, the heterogeneous API call is dispatched to a suitable processing engine in the heterogeneous system instead of being limited to the processing engine of the first slave node, and the execution efficiency of the heterogeneous API call can be further improved, thereby improving the execution efficiency of the heterogeneous application. In addition, the cross-node dispatching of the heterogeneous API call is conducive to balancing the load of each slave node and improving the resource utilization.

[0018] In some possible implementation manners, when the first slave node dispatches the heterogeneous API call across nodes, additional overheads, such as overheads of transmitting arguments and writing back results, are also generated. Based on this, the first slave node can also determine the third slave node according to the dispatch overhead. Specifically, the first slave node can determine a plurality of slave nodes from the heterogeneous system, in which the available processing engines of the plurality of slave nodes satisfy a preset condition, and then determine the third slave node from the plurality of slave nodes according to the dispatch overheads of the plurality of slave nodes. For example, the first slave node can determine a plurality of fourth slave nodes from the heterogeneous system. The execution efficiency of the available processing engines of the fourth slave nodes satisfies the preset condition. Then, the first slave node determines, from the plurality of fourth slave nodes, a slave node with a dispatch overhead less than a preset overhead or a smallest dispatch overhead as the third slave node.

[0019] In this way, the heterogeneous API call can be dispatched to a suitable processing engine, and the dispatch overhead is not substantially increased, thereby having high availability.

[0020] In some possible implementation manners, the processing engine with the execution efficiency satisfying the preset condition includes a processing engine with the highest execution efficiency or a processing engine with an execution efficiency higher than a preset efficiency. When the processing engines with the highest execution efficiency corresponding to the plurality of target tasks or the plurality of heterogeneous API calls are the same kind of processing engine, or the processing engines with the highest execution efficiency corresponding to the plurality of heterogeneous API calls are the same kind of processing engine, and the number of such processing engines is insufficient, a part of the target tasks or a part of the heterogeneous API calls are dispatched to a processing engine with an execution efficiency higher than the preset efficiency, such as a processing engine with the second highest execution efficiency. In this way, the target tasks or the heterogeneous API calls can be prevented from being blocked, and the execution efficiency of the target tasks or the heterogeneous API calls is improved.

[0021] In some possible implementation manners, the heterogeneous system can also execute at least one heterogeneous API call on each kind of processing engine to obtain the total execution time of the target task on each kind of processing engine, and then construct the relationship between the task and the processing engine according to the identifier of the at least one kind of processing engine and the total execution time of the target task on the at least one kind of processing engine. In this way, the relationship between the task and the processing engine can provide assistance for the dispatch of the task from the master node to the slave node, specifically, assisting the master node to select a suitable slave node and dispatch the target task to the slave node, thereby improving the overall execution efficiency of the task.

[0022] In some possible implementation manners, at least two of the plurality of slave nodes are heterogeneous single-node heterogeneous systems. The single-node heterogeneous system refers to a heterogeneous system formed by a single node including different kinds of processing engines.

[0023] The heterogeneous single-node heterogeneous system refers to a single node with different structures. For example, slave node 1 is a node including processing engine 1 and processing engine 2, and slave node 2 is a node including processing engine 3 and processing engine 4, and node 1 and node 2 are heterogeneous single-node heterogeneous systems.

[0024] In this way, the heterogeneous API call can be scheduled within a node or across nodes, so as to improve the execution efficiency of the heterogeneous API call, and further improve the overall execution efficiency of the task.

[0025] In some possible implementation manners, each of the plurality of slave nodes is a homogeneous system, that is, one slave node includes one kind of processing engine. And the processing engines of at least two slave nodes are different in architecture, for example, slave node 1 includes CPU as the only kind of processing engine, and slave node 2 includes GPU as the only kind of processing engine.

[0026] In this way, the heterogeneous API call can be scheduled across nodes, so as to improve the execution efficiency of the heterogeneous API call.

[0027] In some possible implementation manners, the plurality of slave nodes are nodes in a cloud environment, an edge environment or a terminal environment. The cloud environment specifically refers to a computing cluster including at least one cloud computing device (for example, a central server). The edge environment specifically refers to a computing cluster including at least one edge computing device (for example, an edge server). The terminal environment includes at least one terminal computing device. The terminal computing device can be referred to as a terminal or a terminal device simply, and includes but is not limited to a desktop computer, a notebook computer, a smart phone and the like.

[0028] In a second aspect, the present application provides a task scheduling apparatus. The apparatus includes:

[0029] The acquisition module is configured to acquire a target task, and the target task includes at least one heterogeneous application programming interface (API) call;

[0030] The determination module is configured to determine a target processing engine corresponding to the target task according to a relationship between the task and the processing engine.

[0031] The scheduling module is configured to schedule the target task to a first slave node, and the first slave node includes the target processing engine.

[0032] In some possible implementation manners, the determination module is further configured to:

[0033] determine a plurality of second slave nodes from the heterogeneous system, the second slave node comprising a target processing engine;

[0034] determine a first slave node from the plurality of second slave nodes according to a load balancing strategy.

[0035] In some possible implementation manners, the determining module is further configured to:

[0036] determine a plurality of second slave nodes from the heterogeneous system, the second slave node comprising a target processing engine;

[0037] determine a first slave node from the plurality of second slave nodes according to a number of target processing engines in at least one second slave node.

[0038] In some possible implementation manners, the determining module is further configured to:

[0039] determine scheduling reference information of the heterogeneous API call according to a parameter size value of the heterogeneous API call, the scheduling reference information being used to describe execution efficiency of a plurality of processing engines;

[0040] determine a processing engine with execution efficiency satisfying a preset condition from processing engines available in the first slave node according to the scheduling reference information;

[0041] The scheduling module is further configured to:

[0042] schedule the heterogeneous API call to the processing engine with execution efficiency satisfying the preset condition.

[0043] In some possible implementation manners, the determining module is further configured to:

[0044] when the processing engine with execution efficiency satisfying the preset condition is unavailable in the first slave node, determine a third slave node from the heterogeneous system, the third slave node being available with the processing engine with execution efficiency satisfying the preset condition;

[0045] determine a processing engine with execution efficiency satisfying the preset condition from processing engines available in the third slave node, for executing the heterogeneous API call.

[0046] In some possible implementation manners, the determining module is specifically configured to:

[0047] determine a plurality of slave nodes from the heterogeneous system, the processing engines available in the plurality of slave nodes satisfying a preset condition;

[0048] determine a third slave node from the plurality of slave nodes according to scheduling overheads of the plurality of slave nodes.

[0049] In some possible implementation manners, the processing engine with execution efficiency satisfying the preset condition comprises: a processing engine with highest execution efficiency or a processing engine with execution efficiency higher than a preset efficiency.

[0050] In some possible implementation manners, the apparatus further includes:

[0051] The constructing module is configured to execute the at least one heterogeneous API call on each of the at least one processing engine to obtain total execution time of the target task on each of the at least one processing engine, and construct a relationship between the task and the processing engine according to the identity of the at least one processing engine and the total execution time of the target task on the at least one processing engine.

[0052] In some possible implementation manners, at least two of the plurality of slave nodes are heterogeneous single-node heterogeneous systems.

[0053] In some possible implementation manners, each of the plurality of slave nodes is a homogeneous system, and the processing engines of at least two of the slave nodes are different in architecture.

[0054] In some possible implementation manners, the plurality of slave nodes are nodes in a cloud environment, an edge environment, or a terminal environment.

[0055] In a third aspect, the present application provides a computing device, which includes a processor and a memory. The processor and the memory are in communication with each other. The processor is configured to execute instructions stored in the memory, so that the computing device performs the task scheduling method in the first aspect or any implementation manner of the first aspect.

[0056] In a fourth aspect, the present application provides a computer readable storage medium, which stores instructions. The instructions instruct a computing device to perform the task scheduling method in the first aspect or any implementation manner of the first aspect.

[0057] In a fifth aspect, the present application provides a computer program product including instructions, which, when executed on a computing device, cause the device to perform the task scheduling method in the first aspect or any implementation manner of the first aspect.

[0058] On the basis of the implementation manners of the aspects described above, the present application can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS

[0059] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows.

[0060] Figure 1A A system architecture diagram of a task scheduling method provided by the embodiments of the present application;

[0061] Figure 1A A system architecture diagram of a task scheduling method provided by the embodiments of the present application;

[0062] Figure 2 A schematic diagram of edge-cloud collaboration provided by an embodiment of the present application;

[0063] Figure 3 A flowchart of a task scheduling method provided by an embodiment of the present application;

[0064] Figure 4A A schematic diagram of a relationship table provided by an embodiment of the present application;

[0065] Figure 4B A schematic diagram of a relationship table provided by an embodiment of the present application;

[0066] Figure 5 A flowchart of a task scheduling method provided by an embodiment of the present application;

[0067] Figure 6 A flowchart of a task scheduling method provided by an embodiment of the present application;

[0068] Figure 7 A structural schematic diagram of a task scheduling apparatus provided by an embodiment of the present application;

[0069] Figure 8 A structural schematic diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0070] The terms “first”, “second” in the embodiments of the present application are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with “first”, “second” can explicitly or implicitly include one or more of the features.

[0071] First, some technical terms involved in the embodiments of the present application are introduced.

[0072] The processing engine, also known as hardware engine, is specifically a unit capable of data processing operation. The present application does not limit the specific type and form of the processing engine, and any unit capable of data processing operation can be used as the processing engine. In some examples, the processing engine can include a central processing unit (CPU).

[0073] Further, the processing engine can also include a domain specific architecture (DSA) based processing unit. For example, the processing engine can also include any one or more of a graphical processing unit (GPU), an image processor (IP), a digital signal processor (DSP), a neural-network processing unit (NPU), and a field programmable gate array (FPGA).

[0074] A heterogeneous system is a data processing system including multiple different types of processing engines. Specifically, the multiple different types of processing engines can include at least one CPU, and the rest of the processing engines can be processing engines of different types from the CPU. For example, the rest of the processing engines can include some or all of the following: GPU, IP, DSP, NPU, or FPGA. Of course, in some embodiments, the rest of the processing engines can also include CPUs.

[0075] The heterogeneous system can specifically be a multi-node heterogeneous system. A multi-node heterogeneous system refers to a heterogeneous system deployed on multiple computing nodes. In some embodiments, the heterogeneous system can be distributedly deployed on multiple computing nodes. Further, the multiple computing nodes can form a heterogeneous cluster. A heterogeneous cluster includes one master node and multiple slave nodes.

[0076] An application developed for the above heterogeneous system is a heterogeneous application. A heterogeneous application typically includes at least one heterogeneous application programming interface (API) call. Here, a heterogeneous API specifically refers to an API that is uniform in interface but has different optimized implementations on different processing engines.

[0077] A task of a heterogeneous application can also be referred to as a job of the heterogeneous application. Specifically, it is a collection of work that a user requires a heterogeneous system to perform when the user needs the heterogeneous system to implement a certain function. Here, the work done by the heterogeneous system includes executing the heterogeneous application.

[0078] Currently, the master node of the heterogeneous system schedules the task of the heterogeneous application to a slave node with relatively small load through a load balancing strategy, and the slave node executes the task of the heterogeneous application. Since the characteristics of the heterogeneous application are not considered, the task of the heterogeneous application can be scheduled to an unsuitable slave node, reducing the execution efficiency of the task. If the task of the heterogeneous application is rescheduled from the current slave node to another slave node, additional overhead will be generated.

[0079] Therefore, the embodiment of the present application provides a task scheduling method. Specifically, the master node of the heterogeneous system obtains a target task including at least one heterogeneous API call. Then the master node can determine a target processing engine corresponding to the target task according to the relationship between the task and the processing engine, and then the master node schedules the target task to a first slave node including the target processing engine, so as to execute the target task by the first slave node.

[0080] On the one hand, the relationship between the task and the processing engine can reflect the affinity between the task and various processing engines, so that the master node can reasonably schedule the target task to the slave node with higher affinity according to the relationship between the task and the processing engine, thereby improving the overall execution efficiency of the target task. And this method can avoid scheduling the target task to an unsuitable slave node, which causes the resources of the slave node to be occupied for a long time, thereby improving the utilization rate of resources in the heterogeneous system. In addition, this method can reduce the number of cross-node scheduling of heterogeneous API calls, thereby reducing the scheduling overhead.

[0081] In order to make the technical solutions of the present application clearer and easier to understand, the system architecture of the task scheduling method provided by the embodiment of the present application is introduced below with reference to the drawings.

[0082] Referring to Figure 1A the system architecture diagram shown in the figure, the heterogeneous system 100 includes one master node 102 and a plurality of slave nodes 104. Among them, at least two slave nodes 104 in the plurality of slave nodes 104 are heterogeneous single-node heterogeneous systems. Wherein, the single-node heterogeneous system refers to a single node including multiple processing engines. Based on this, at least two slave nodes 104 in the plurality of slave nodes 104 are single-node heterogeneous systems with different structures.

[0083] In Figure 1A the embodiment shown in the figure, one slave node 104 includes processing engine 11, processing engine 12, …, processing engine 1N, and another slave node includes processing engine 21, processing engine 22, …, processing engine 2N. Wherein, N is a positive integer. At least one of processing engine 11, processing engine 12, …, processing engine 1N and processing engine 21, processing engine 22, …, processing engine 2N is of different types.

[0084] When the heterogeneous system 100 includes two or more slave nodes 104, the other slave nodes 104 can include processing engines 11, processing engines 12, …, processing engines 1N, and / or processing engines 21, processing engines 22, …, processing engines 2N, and can also include other kinds of processing engines.

[0085] It should be noted that, Figure 1A The number of kinds of processing engines included in each slave node 104 is N, and in some embodiments, the number of kinds of processing engines included in different slave nodes 104 can also be different. For example, one slave node 104 can include N kinds of processing engines, and another slave node 104 can include M kinds of processing engines, where M is a positive integer.

[0086] Specifically, the master node 102 obtains a target task, determines a target processing engine corresponding to the target task according to the relationship between the task and the processing engine, and then schedules the target task to a first slave node including the target processing engine. The first slave node can select a processing engine whose execution efficiency meets a preset condition to execute at least one heterogeneous API call included in the target task.

[0087] In some possible implementations, each of the plurality of slave nodes 104 is a homogeneous system. Moreover, the processing engines of at least two slave nodes 104 are different in architecture. As Figure 1B shown, the processing engines of one slave node 104 are all processing engines 1, and the processing engines of another slave node 104 are all processing engines 2. When the heterogeneous system further includes other slave nodes 104, the processing engines of the other slave nodes 104 can all be processing engines 1 or processing engines 2. Of course, the processing engines of the other slave nodes 104 can also be other kinds of processing engines other than processing engines 1 and processing engines 2.

[0088] In Figure 1B the scenario, the master node 102 obtains a target task, determines a target processing engine corresponding to the target task according to the relationship between the task and the processing engine, and then the master node 102 schedules the target task to a first slave node including the target processing engine. The first node can select a processing engine whose execution efficiency meets a preset condition to execute at least one heterogeneous API call included in the target task.

[0089] It should be noted that the plurality of slave nodes 104 can be as Figure 2The nodes in the cloud environment, edge environment, or terminal environment shown. Among them, the cloud environment is specifically a computing cluster including at least one cloud computing device (for example, a central server). The edge environment is specifically a computing cluster including at least one edge computing device (for example, an edge server). The terminal environment includes at least one terminal computing device. The terminal computing device can be simply referred to as a terminal or a terminal device, including but not limited to desktops, laptops, and smartphones, and the like.

[0090] The system architecture of the task scheduling method is described in detail above. Next, the task scheduling method provided by the embodiments of the present application will be described in detail in combination with the drawings.

[0091] Referring to Figure 3 The flowchart of the task scheduling method shown, the method includes:

[0092] S302: The master node 102 of the heterogeneous system 100 acquires a target task.

[0093] The master node 102 can maintain a task queue, and the task queue stores at least one task submitted by a user. The master node 102 can take at least one task from the task queue according to the time of joining the task queue, thereby obtaining the target task.

[0094] Specifically, the master node 102 can take the task that first joins the task queue from the task queue to obtain the target task. In some embodiments, the master node 102 can also take the first Q tasks that join the task queue from the task queue to obtain the target task. Wherein, Q is a positive integer.

[0095] S304: The master node 102 determines the target processing engine corresponding to the target task according to the relationship between the task and the processing engine.

[0096] The relationship between the task and the processing engine is used to describe the execution efficiency of the task on at least one processing engine. The execution efficiency refers to the work amount of executing the task per unit time. The execution efficiency can be determined according to the execution time of the task. Assuming that the work amount of executing the task is 1, then the execution efficiency is the reciprocal of the execution time.

[0097] In some embodiments, the execution efficiency of the task on the processing engine can also be represented by the execution time of the task on the processing engine. Specifically, the shorter the execution time of the task on the processing engine, the higher the execution efficiency of the task on the processing engine, and the longer the execution time of the task on the processing engine, the lower the execution efficiency of the task on the processing engine.

[0098] Furthermore, the execution efficiency of a task on a processing engine can be characterized by ranking. Specifically, the execution time of a task on a processing engine is sorted to obtain a ranking of the task's execution efficiency on each processing engine. This ranking can be used to characterize the scheduling priority of the processing engines.

[0099] Based on this, the relationship between a task and a processing engine can include the task's identifier and its scheduling reference information. This scheduling reference information can be one or more of the following: the task's execution efficiency on at least one processing engine, the task's execution time on at least one processing engine, and the ranking of the task's execution time (execution efficiency) on at least one processing engine.

[0100] The relationship between tasks and processing engines can be represented through any one or more of the following: relationship tables, relationship text, and relationship graphs.

[0101] Each row in the relation table can represent scheduling reference information for a task. In some embodiments, such as... Figure 4A As shown, each row of the relation table can represent a ranking of a task's execution efficiency on different processing engines. In other embodiments, such as... Figure 4B As shown, each row of the relational table can represent the execution time of a task on different processing engines. Of course, each row can also represent the execution efficiency of a task on different processing engines. It should be noted that the relational table can also use each column to represent scheduling reference information for a task.

[0102] The aforementioned scheduling reference information can be in vector format, such as... Figure 4A As shown, the scheduling reference information can be a scheduling priority vector. In this example, the value of each element in the scheduling priority vector represents the ranking of the task's execution efficiency on a processing engine, that is, the scheduling priority of the task on that processing engine.

[0103] Of course, the scheduling reference information mentioned above can also be in key-value pair format, as shown in 4B. The scheduling reference information can be a collection of key-value pairs. Each key-value pair can be represented as (key, value). The key represents the processing engine, and the value represents the execution time, execution efficiency, or ranking of that processing engine's execution efficiency. Figure 4B Let's illustrate this using the value representing execution time. Each key-value pair corresponds to a processing engine and the execution time of the task on that engine. The key-value pairs in the collection can be unordered or ordered, for example, sorted by execution time. This helps improve the efficiency of finding processing engines that meet preset conditions.

[0104] In some embodiments, the relationship text stores the identification of the task and the scheduling reference information of the task. The relationship text can be in a JS object notation (JSON) format, an extensible markup language (XML) format, or a text (txt) format, which is not limited in the embodiments of the present application.

[0105] The relationship graph can also store the identification of the task and the scheduling reference information of the task. Specifically, each task can be a node of the relationship graph, and the scheduling reference information of the task can be an edge of the relationship graph. The scheduling reference information can be one or more of the execution efficiency of the task on at least one processing engine, the ranking of the execution efficiency, and the execution time. Thus, the relationship between the task and the processing engine is achieved.

[0106] The relationship between the task and the processing engine can be constructed by the task and the scheduling reference information of the task. Specifically, the heterogeneous system executes at least one heterogeneous API call included in the target task on at least one processing engine to obtain the total execution time of the target task on each processing engine, which can be the scheduling reference information of the task. Then, the relationship between the task and the processing engine is constructed according to the identification of the at least one processing engine and the total execution time of the target task on the at least one processing engine.

[0107] The master node 102 can determine the target processing engine corresponding to the target task by querying the relationship table, the relationship text, or the relationship graph. The target processing engine corresponding to the target task can be the processing engine with the highest execution efficiency of the target task, or the processing engine with an execution efficiency higher than a preset efficiency. The embodiments of the present application are not limited in this regard.

[0108] S306: The master node 102 schedules the target task to the first slave node.

[0109] The first slave node includes the target processing engine. Specifically, the master node 102 can filter the slave node 104 including the target processing engine from the plurality of slave nodes 104, and then determine the first slave node according to the slave node 104, and schedule the target task to the first slave node for execution of the target task.

[0110] When the slave node 104 including the target processing engine is one, the master node 102 can directly determine the slave node 104 as the first slave node and schedule the target task to the first slave node. When the slave node 104 including the target processing engine is multiple, the master node 102 can further determine the first slave node from the multiple slave nodes 104 and schedule the target task to the first slave node.

[0111] In some possible implementation manners, the master node 102 can determine multiple second slave nodes from the heterogeneous system, where the second slave node refers to the slave node 104 including the target processing engine, and then the master node 102 can determine the first slave node from the multiple second slave nodes according to a load balancing strategy. For example, the master node 102 can determine, as the first slave node, a second slave node with a load rate less than a preset load rate from the multiple second slave nodes. In this way, the task can be prevented from being accumulated in a certain slave node 104, and the resources of other slave nodes 104 can be prevented from being idle, which can improve the execution efficiency of the task on one hand and improve the utilization rate of the resources on the other hand.

[0112] In some possible implementation manners, different second slave nodes can include different numbers of target processing engines (specifically, available target processing engines). Based on this, after determining the multiple second slave nodes from the heterogeneous system, the master node 102 can determine the first slave node from the multiple second slave nodes according to the number of (available) target processing engines in the multiple second slave nodes. In this way, the target task can be scheduled to the slave node 104 including the target processing engine and having sufficient target processing engines, so that the concurrent granularity of the task is improved, and the execution efficiency of the task is further improved.

[0113] The master node 102 and each slave node 104 maintain a respective task queue. The master node 102 removes the target task from the task queue of the master node 102, and then adds the target task to the task queue of the first slave node, so as to schedule the target task to the first slave node.

[0114] Based on the above content description, the embodiment of the present application provides a task scheduling method. In the method, the master node 102 of the heterogeneous system 100 acquires a target task, and then determines a target processing engine corresponding to the target task according to the relationship between the task and the processing engine. Then, the master node schedules the target task to a first slave node including the target processing engine, so as to execute the target task by the first slave node. In one aspect, the relationship between the task and the processing engine can reflect the affinity of the task to various processing engines. Thus, the master node 102 can reasonably schedule the target task to the slave node 104 with higher affinity according to the relationship, thereby improving the overall execution efficiency of the target task. Moreover, the method can avoid scheduling the target task to an inappropriate slave node 104, so as to improve the utilization rate of resources in the heterogeneous system 100.

[0115] In Figure 3 In the embodiment shown in the figure, the key of the master node 102 to schedule the target task to a reasonable slave node 104 lies in the relationship between the task and the processing engine. Based on this, the embodiment of the present application further provides a specific implementation manner of constructing the relationship between the task and the processing engine.

[0116] Referring to Figure 5 The flowchart of constructing the relationship between the task and the processing engine is shown in the figure. As shown in the figure, the heterogeneous system 100 includes N kinds of processing engines. For a target task including at least one heterogeneous API call, the target task is executed on each kind of processing engine respectively, to obtain the total execution time of the target task on each kind of processing engine. Based on the identifier of the processing engine and the total execution time on the processing engine, the relationship between the task and the processing engine can be constructed. Figure 5

[0117] In some possible implementation manners, the process of constructing the relationship between the task and the processing engine can be implemented on a single-node heterogeneous system equipped with the N kinds of processing engines, or can be implemented in the heterogeneous system 100. For the convenience of understanding, the embodiment of the present application takes constructing a feature set on a single-node heterogeneous system as an example for illustration.

[0118] In this example, the scheduling processing engine, such as the host CPU, can initialize the total execution time of the target task on each kind of processing engine as 0, denoted as sum[1: N] = {0, 0, … 0}. Then, the host CPU schedules the target task to each kind of processing engine of the single-node heterogeneous system.

[0119] The target task includes at least one heterogeneous API call. The host CPU judges whether the heterogeneous API calls included in the current target task have all been processed. If not, the host CPU judges whether the current heterogeneous API call has been processed by each processing engine (E r ​) execution, the execution time (TE r ) of the heterogeneous API call is accumulated to the total execution time of the corresponding processing engine, i.e., sum[r]+ = TE r . The sum[r] is used to represent the total execution time of the processing engine E r . Then the step of judging whether all the heterogeneous API calls included in the target task have been processed is returned. If yes, a key-value pair is formed according to the identifier of the processing engine and the total execution time of the target task on the processing engine, for example, generating (GPU, 98), and then the key-value pair is sorted in the order of the total execution time from small to large (the priority from high to low), thereby the relationship between the task and the processing engine.

[0120] Figure 3 The embodiment shown mainly describes the specific implementation of scheduling the target task to the slave node 104. After the target task is scheduled to the first slave node, the first slave node executes the above target task. The target task includes at least one heterogeneous API call.

[0121] Considering that different heterogeneous API calls have different execution efficiencies on different processing engines, the first slave node can also determine the parameter size value of the heterogeneous API call, and then determine the scheduling reference information of the heterogeneous API call according to the parameter size value of the heterogeneous API call.

[0122] The parameter size can describe the size of the parameter required to call the heterogeneous API. It should be noted that in the embodiments of the present application, the size of the parameter does not refer to the numerical size of the parameter, but refers to the number of bytes occupied by the parameter or in the processing engine. Based on this, the value of the parameter size (i.e., the parameter size value) can take any integer in the interval (0, +∞).

[0123] The scheduling reference information is used to describe the execution efficiency of the heterogeneous API call on at least one processing engine. Similar to the scheduling reference information of the task, the scheduling reference information can include any one or more of the execution efficiency, the execution time, and the ranking of the execution efficiency (the execution time). The format of the scheduling reference information has diversity, for example, the scheduling reference information can be in a vector format or a key-value pair format, and specific contents can be referred to the related description of the scheduling reference information of the task, which will not be described here.

[0124] The first slave node can determine the scheduling reference information of the heterogeneous API call according to the identifier (such as API ID) of the heterogeneous API call and the parameter size value, in combination with the pre-constructed relationship between the parameter size and the processing engine. The pre-constructed relationship between the parameter size and the processing engine can be stored in a processing engine selection table, and the first slave node can query the processing engine selection table according to the API ID and the parameter size value to determine the scheduling reference information of the heterogeneous API call, such as the scheduling priority vector.

[0125] Then, the first slave node can determine a processing engine with execution efficiency satisfying the preset condition from the processing engines available to the first slave node according to the scheduling reference information (e.g., the scheduling priority vector). Then, the first slave node schedules the heterogeneous API call to the corresponding processing engine.

[0126] Since the first slave node schedules the heterogeneous API call to the appropriate processing engine, the execution efficiency of the heterogeneous API call can be improved, and thus the execution efficiency of the task of the heterogeneous application is improved. Moreover, the heterogeneous API call is scheduled to the appropriate processing engine respectively, which avoids resource waste and improves resource utilization.

[0127] In some possible implementation manners, the first slave node also supports scheduling the heterogeneous API call across nodes. Specifically, when the processing engine with execution efficiency satisfying the preset condition is unavailable in the first slave node, the first slave node can also determine a third slave node from the heterogeneous system, the processing engines available to the third slave node include the processing engine with execution efficiency satisfying the preset condition. The heterogeneous API call can be scheduled to the third slave node, and the third slave node can determine the processing engine with execution efficiency satisfying the preset condition from the processing engines available to the third slave node, schedule the heterogeneous API call to the processing engine, and execute the heterogeneous API call by the processing engine.

[0128] It should be noted that when the first slave node schedules the heterogeneous API call across nodes, additional overheads, such as the overhead of transmitting the actual argument, the overhead of writing back the result, and the like, are also generated. Based on this, the first slave node can also determine the third slave node according to the scheduling overhead. Specifically, the first slave node can determine a plurality of slave nodes with the processing engines satisfying the preset condition from the heterogeneous system, and then determine the third slave node from the plurality of slave nodes according to the scheduling overhead of the plurality of slave nodes. For example, the first slave node can determine a plurality of fourth slave nodes from the heterogeneous system. The processing engines available to the fourth slave nodes satisfy the preset condition. Then, the first slave node determines the slave node with scheduling overhead less than a preset overhead or the smallest scheduling overhead from the plurality of fourth slave nodes as the third slave node.

[0129] Next, the hierarchical scheduling method provided by the embodiments of the present application is described in detail in combination with the drawings.

[0130] Referring to Figure 6The master node and the slave node each maintain a heterogeneous application task queue. The heterogeneous application task queue is used to store tasks of the heterogeneous application. The master node is mainly responsible for scheduling tasks of the heterogeneous application to the slave node. The slave node is responsible for executing tasks of the heterogeneous application scheduled to the slave node. The master node schedules a task (specifically, a target task) of the heterogeneous application to a suitable slave node according to the relationship between the task and a processing engine. When the slave node executes the target task, the slave node executes a heterogeneous API call included in the target task by using a processing engine in the slave node. When the processing engine in the slave node that meets a preset condition is unavailable, the heterogeneous API call is scheduled to another node for execution.

[0131] Specifically, the master node schedules the target task to the slave node by using the following processing logic:

[0132] The master node detects the heterogeneous application task queue of the master node. When the heterogeneous application task queue is not empty, the master node removes a first task (denoted as task t) in the heterogeneous application task queue of the master node, determines a slave node n including a target processing engine according to the relationship between the task and the processing engine, and adds the task t to the heterogeneous application task queue of the slave node n.

[0133] Further, the master node balances the load of the slave node by using the following processing logic:

[0134] When the master node detects that the heterogeneous application task queue of the slave node m is empty, the master node finds a slave node n including a task t that can be scheduled to the slave node m from slave nodes with relatively full other heterogeneous application task queues, removes the task t from the heterogeneous application task queue of the slave node n, and adds the task t to the heterogeneous application task queue of the slave node m.

[0135] The slave node n mainly executes the task by using the following processing logic:

[0136] When the heterogeneous application task queue of the slave node n is not empty, the slave node n removes a first task (specifically, task t) in the heterogeneous application task queue of the slave node n, reports a state change of the task t to the master node, specifically, from a waiting state to an executing state, and executes the task t on the slave node heterogeneous system. After the execution is completed, the slave node n can also report the state change of the task t to the master node, specifically, from the executing state to a completed state.

[0137] Further, if the processing engine satisfying the preset condition in the slave node n is unavailable, the slave node n sends a query request to the master node, requesting to query the slave node whose processing engine satisfying the preset condition is available and whose execution of the current heterogeneous API call overhead is less than the preset overhead. The slave node n receives the query response returned by the master node. The query response carries the identifier of the slave node m queried by the master node. The slave node n sends a scheduling request to the slave node m according to the identifier of the slave node m, to request to schedule the heterogeneous API call to the slave node m.

[0138] The above is the detailed description of the task scheduling method provided by the embodiments of the present application. The device and equipment provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings. Figure 6 The task scheduling method provided by the embodiments of the present application is described in detail, and the device and equipment provided by the embodiments of the present application will be described below with reference to the accompanying drawings.

[0139] Referring to Figure 7 The device 700 includes:

[0140] The acquisition module 702 is configured to acquire a target task, and the target task includes at least one heterogeneous application programming interface (API) call;

[0141] The determination module 704 is configured to determine a target processing engine corresponding to the target task according to the relationship between the task and the processing engine;

[0142] The scheduling module 706 is configured to schedule the target task to a first slave node, and the first slave node includes the target processing engine.

[0143] In some possible implementation manners, the determination module 704 is further configured to:

[0144] determine a plurality of second slave nodes from the heterogeneous system, and the second slave node includes the target processing engine;

[0145] determine the first slave node from the plurality of second slave nodes according to a load balancing strategy.

[0146] In some possible implementation manners, the determination module 704 is further configured to:

[0147] determine a plurality of second slave nodes from the heterogeneous system, and the second slave node includes the target processing engine;

[0148] determine the first slave node from the plurality of second slave nodes according to the number of target processing engines in at least one second slave node.

[0149] In some possible implementation manners, the determination module 704 is further configured to:

[0150] determine scheduling reference information of the heterogeneous API call according to a parameter size value of the heterogeneous API call, and the scheduling reference information is used to describe the execution efficiency of a plurality of processing engines.

[0151] determine, according to the scheduling reference information, a processing engine with execution efficiency satisfying a preset condition from the processing engines available in the first slave node;

[0152] The scheduling module 706 is further configured to:

[0153] schedule the heterogeneous API call to the processing engine with execution efficiency satisfying the preset condition.

[0154] In some possible implementation manners, the determining module 704 is further configured to:

[0155] when the processing engine with execution efficiency satisfying the preset condition is unavailable in the first slave node, determine a third slave node from the heterogeneous system, the processing engines available in the third slave node including the processing engine with execution efficiency satisfying the preset condition;

[0156] determine, from the processing engines available in the third slave node, the processing engine with execution efficiency satisfying the preset condition, for executing the heterogeneous API call.

[0157] In some possible implementation manners, the determining module 704 is specifically configured to:

[0158] determine a plurality of slave nodes with the processing engines available in the plurality of slave nodes satisfying the preset condition from the heterogeneous system;

[0159] determine the third slave node from the plurality of slave nodes according to scheduling overheads of the plurality of slave nodes.

[0160] In some possible implementation manners, the processing engine with execution efficiency satisfying the preset condition includes a processing engine with highest execution efficiency or a processing engine with execution efficiency higher than a preset efficiency.

[0161] In some possible implementation manners, the apparatus 700 further includes:

[0162] a constructing module configured to execute at least one heterogeneous API call on each type of processing engine respectively to obtain total execution time of a target task on each type of processing engine, and construct a relationship between the task and the processing engine according to the identification of the at least one type of processing engine and the total execution time of the target task on the at least one type of processing engine.

[0163] In some possible implementation manners, at least two slave nodes in the plurality of slave nodes are heterogeneous single-node heterogeneous systems.

[0164] In some possible implementation manners, each slave node in the plurality of slave nodes is a homogeneous system, and the processing engines of at least two slave nodes are different in architecture.

[0165] In some possible implementation manners, the plurality of slave nodes are nodes in a cloud environment, an edge environment, or a terminal environment.

[0166] The task scheduling apparatus 700 according to the embodiments of the present application can correspond to performing the methods described in the embodiments of the present application, and the above and other operations and / or functions of each module / unit of the task scheduling apparatus 700 are respectively for realizing the corresponding flow of each method in the embodiments shown. Figure 3 For brevity, the above will not be repeated here.

[0167] The embodiments of the present application also provide a computing device 800. The computing device 800 can be a notebook computer, a desktop computer, etc. end-side device, or a cloud computing device in a cloud environment, such as a central server in a central cloud, or an edge server in an edge cloud. The computing device 800 is specifically configured to implement the functions of the task scheduling apparatus 700 in the embodiments shown. Figure 7

[0168] Figure 8 A structural schematic diagram of a computing device 800 is provided, as shown in the figure, the computing device 800 includes a bus 801, a processor 802, a communication interface 803 and a memory 804. The processor 802, the memory 804 and the communication interface 803 communicate through the bus 801. Figure 8

[0169] The bus 801 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0170] The processor 802 can be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0171] The communication interface 803 is used for communication with the outside. For example, obtaining a target task, or obtaining the relationship between the task and the processing engine, etc.

[0172] ​​The memory 804 can include volatile memory, such as random access memory (RAM), and non-volatile memory, such as read-only memory (ROM), floppy disks, hard disks, or solid state drives.

[0173] The executable code stored in the memory 804 is executed by the processor 802 to perform the aforementioned task scheduling method. Specifically, in the case of the embodiment shown in the figure, and Figure 7 The modules of the task scheduling apparatus 700 described in the embodiment are implemented by software, the software or program code required to perform the functions of the modules is stored in the memory 804. The processor 802 executes the program code stored in the memory 804 to perform the task scheduling method in the embodiment shown in the figure. Figure 7 The modules of the task scheduling apparatus 700 described in the embodiment are implemented by software, the software or program code required to perform the functions of the modules is stored in the memory 804. The processor 802 executes the program code stored in the memory 804 to perform the task scheduling method in the embodiment shown in the figure. Figure 7 The modules of the task scheduling apparatus 700 described in the embodiment are implemented by software, the software or program code required to perform the functions of the modules is stored in the memory 804. The processor 802 executes the program code stored in the memory 804 to perform the task scheduling method in the embodiment shown in the figure. Figure 3 The modules of the task scheduling apparatus 700 described in the embodiment are implemented by software, the software or program code required to perform the functions of the modules is stored in the memory 804. The processor 802 executes the program code stored in the memory 804 to perform the task scheduling method in the embodiment shown in the figure.

[0174] The computer readable storage medium can be any available medium or data storage device that can be accessed by a computing device. The available medium can be a magnetic medium, (e.g., floppy diskette, hard disk), optical medium (e.g., DVD), or semiconductor medium (e.g., solid state hard drive) etc. The computer readable storage medium includes instructions that instruct the computing device to perform the task scheduling method described above and applied to the task scheduling apparatus 700.

[0175] The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the processes or functions described in the embodiments of the present application are generated in whole or in part.

[0176] The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer or data center to another website, computer or data center through wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0177] The computer program product can be a software installation package, and in a case where any of the foregoing task scheduling methods needs to be used, the computer program product can be downloaded and executed on a computing device.

[0178] The descriptions of the corresponding processes or structures of the various drawings are each focused on, and parts not described in detail in a certain process or structure can be referred to the related descriptions of other processes or structures.

Claims

1. A task scheduling method, characterized in that, The method includes: Obtain the target task, which includes at least one heterogeneous application programming interface (API) call; Based on the relationship between tasks and processing engines, the target processing engine corresponding to the target task is determined. The relationship between tasks and processing engines is used to describe the execution efficiency of the task on at least one processing engine. The target task is scheduled to a first slave node, which includes the target processing engine.

2. The method according to claim 1, characterized in that, The method further includes: Multiple second slave nodes are identified from the heterogeneous system, each second slave node including the target processing engine; According to the load balancing strategy, the first slave node is determined from the plurality of second slave nodes.

3. The method according to claim 1, characterized in that, The method further includes: Multiple second slave nodes are identified from the heterogeneous system, each second slave node including the target processing engine; The first slave node is determined from the plurality of second slave nodes based on the number of target processing engines among the plurality of second slave nodes.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Based on the parameter scale values ​​of the heterogeneous API call, the scheduling reference information of the heterogeneous API call is determined, and the scheduling reference information is used to describe the execution efficiency of the heterogeneous API call on multiple processing engines. Based on the scheduling reference information, a processing engine whose execution efficiency meets a preset condition is determined from the processing engines available to the first slave node. The processing engine whose execution efficiency meets the preset condition includes the processing engine with the highest execution efficiency of the target task, or the processing engine whose execution efficiency of the target task is higher than the preset efficiency. The heterogeneous API calls are scheduled to the processing engine whose execution efficiency meets the preset conditions.

5. The method according to claim 4, characterized in that, The method further includes: When a processing engine whose execution efficiency meets the preset conditions is unavailable in the first slave node, a third slave node is determined from the heterogeneous system. The available processing engines in the third slave node include processing engines whose execution efficiency meets the preset conditions. The processing engine whose execution efficiency meets the preset conditions is determined from the processing engines available on the third slave node, and used to execute the heterogeneous API call.

6. The method according to claim 5, characterized in that, The process of determining the third slave node from the heterogeneous system includes: From a heterogeneous system, identify multiple slave nodes whose available processing engines meet preset conditions; Based on the scheduling overhead of the plurality of slave nodes, a third slave node is determined from the plurality of slave nodes.

7. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Execute the at least one heterogeneous API call on at least one processing engine to obtain the total execution time of the target task on each processing engine; The relationship between the task and the processing engine is constructed based on the identifier of the at least one processing engine and the total execution time of the target task on the at least one processing engine.

8. The method according to claim 6, characterized in that, At least two of the multiple slave nodes are heterogeneous single-node heterogeneous systems.

9. The method according to claim 6, characterized in that, Each of the plurality of slave nodes is a homogeneous system, and at least two of the slave nodes have different architectures for their processing engines.

10. The method according to claim 6, characterized in that, The multiple slave nodes are nodes in a cloud environment, edge environment, or terminal environment.

11. A task scheduling device, characterized in that, The device includes: An acquisition module is used to acquire a target task, wherein the target task includes at least one heterogeneous application programming interface (API) call; The determination module is used to determine the target processing engine corresponding to the target task based on the relationship between the task and the processing engine, wherein the relationship between the task and the processing engine is used to describe the execution efficiency of the task on at least one processing engine. The scheduling module is used to schedule the target task to a first slave node, the first slave node including the target processing engine.

12. The apparatus according to claim 11, characterized in that, The determining module is also used for: Multiple second slave nodes are identified from the heterogeneous system, each second slave node including the target processing engine; According to the load balancing strategy, the first slave node is determined from the plurality of second slave nodes.

13. The apparatus according to claim 11, characterized in that, The determining module is also used for: Multiple second slave nodes are identified from the heterogeneous system, each second slave node including the target processing engine; The first slave node is determined from the plurality of second slave nodes based on the number of target processing engines in at least one second slave node.

14. The apparatus according to any one of claims 11 to 13, characterized in that, The determining module is also used for: Based on the parameter scale values ​​of the heterogeneous API call, the scheduling reference information of the heterogeneous API call is determined, and the scheduling reference information is used to describe the execution efficiency of the heterogeneous API call on multiple processing engines. Based on the scheduling reference information, a processing engine whose execution efficiency meets a preset condition is determined from the processing engines available to the first slave node. The processing engine whose execution efficiency meets the preset condition includes the processing engine with the highest execution efficiency of the target task, or the processing engine whose execution efficiency of the target task is higher than the preset efficiency. The scheduling module is also used for: The heterogeneous API calls are scheduled to the processing engine whose execution efficiency meets the preset conditions.

15. The apparatus according to claim 14, characterized in that, The determining module is also used for: When a processing engine whose execution efficiency meets the preset conditions is unavailable in the first slave node, a third slave node is determined from the heterogeneous system. The available processing engines in the third slave node include processing engines whose execution efficiency meets the preset conditions. The processing engine whose execution efficiency meets the preset conditions is determined from the processing engines available on the third slave node, and used to execute the heterogeneous API call.

16. The apparatus according to claim 15, characterized in that, The determining module is specifically used for: From a heterogeneous system, identify multiple slave nodes whose available processing engines meet preset conditions; Based on the scheduling overhead of the plurality of slave nodes, a third slave node is determined from the plurality of slave nodes.

17. The apparatus according to any one of claims 11 to 14, characterized in that, The device further includes: A construction module is configured to execute the at least one heterogeneous API call on at least one processing engine respectively, obtain the total execution time of the target task on each processing engine, and construct the relationship between the task and the processing engine based on the identifier of the at least one processing engine and the total execution time of the target task on the at least one processing engine.

18. The apparatus according to claim 16, characterized in that, At least two of the multiple slave nodes are heterogeneous single-node heterogeneous systems.

19. The apparatus according to claim 16, characterized in that, Each of the plurality of slave nodes is a homogeneous system, and at least two of the slave nodes have different architectures for their processing engines.

20. The apparatus according to claim 16, characterized in that, The multiple slave nodes are nodes in a cloud environment, edge environment, or terminal environment.

21. A computing device, characterized in that, The computing device includes a processor and memory; The processor is configured to execute instructions stored in the memory to cause the device to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and apparatus for scheduling data flow task

    CN105900064A

  • Task scheduling method and device and related equipment

    CN114116150A