Task scheduling method, processor and computer readable storage medium

The parallel computing processor manages the running queue and waiting queue, optimizes the user request scheduling of large language models, solves the performance bottleneck problem in the reasoning process of large language models, and improves the throughput capacity and response speed of the service.

CN118567798APending Publication Date: 2024-08-30THE FOURTH PARADIGM BEIJING TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311745196.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Due to complex calculations and high concurrency during the inference process of large language models, conventional software scheduling solutions cannot generate and execute a large number of scheduling instructions in real time in a short period of time, resulting in performance bottlenecks and resource waste.

Method used

A processor with parallel computing capabilities sets a run queue, generates and executes scheduling instructions requested by users in parallel based on the remaining resources of the second processor, manages user requests through run queues and waiting queues, and optimizes resource utilization and scheduling strategies.

Benefits of technology

It achieves real-time generation and execution of scheduling instructions based on user requests and system status in a short period of time, improves the throughput capacity and response speed of large language model services, and overcomes performance bottlenecks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567798A
    Figure CN118567798A
Patent Text Reader

Abstract

The invention provides a task scheduling method, a processor and a computer readable storage medium. The method comprises the steps of generating a scheduling instruction of a current calculation task corresponding to a user request stored in a running queue in parallel; a target user request is determined from the user requests stored in the operation queue based on the remaining resources of the second processor, and the total resources needed by the second processor for executing the current calculation task corresponding to the target user request do not exceed the remaining resources of the second processor; and sending a scheduling instruction of the current calculation task corresponding to the target user request to the second processor in parallel, so that the second processor executes the current calculation task corresponding to the target user request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and the following description relates to a task scheduling method, a processor, and a computer-readable storage medium. Background Art

[0002] At present, generative large language models have become a hot topic in the field of science and technology. They not only perform well in the field of natural language processing, but also have achieved impressive application results in various industries. For example, in the fields of intelligent assistants, automatic translation, content generation, financial analysis, medical diagnosis, etc., large language models have shown great potential.

[0003] In the reasoning process of large language models, the amount of computing resources and the number of computing tasks required for each different user request are different. In addition, in actual application deployment, the content, characteristics and arrival time of each user request cannot be predicted in advance, so it is impossible to pre-calculate the optimal scheduling plan for different user requests. At the same time, due to the characteristics of large language model reasoning process such as complex calculations, large concurrency, and sensitivity to delays, conventional software scheduling solutions often cannot achieve real-time generation and execution of a large number of scheduling instructions in a short period of time based on user requests and the current system operation status, resulting in performance bottlenecks for large language model services. Summary of the invention

[0004] Exemplary embodiments of the present disclosure may solve at least the above problems.

[0005] According to a first aspect of the present disclosure, a task scheduling method is provided, which is applied to a first processor, wherein a run queue is provided in the first processor, and the run queue is used to store user requests that need to be scheduled, wherein the user requests correspond to at least one computing task that needs to be executed in sequence, and the task scheduling method comprises: generating in parallel a scheduling instruction for a current computing task corresponding to the user requests stored in the run queue; determining a target user request from the user requests stored in the run queue based on the remaining resources of a second processor, wherein the total resources required for the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor; and issuing in parallel a scheduling instruction for the current computing task corresponding to the target user request to the second processor, so that the second processor executes the current computing task corresponding to the target user request.

[0006] Optionally, determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor includes: determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priority of the user requests stored in the running queue.

[0007] Optionally, a waiting queue is also provided in the first processor, and the waiting queue is used to store user requests waiting to enter the running queue; the above method also includes: receiving a new user request sent by the third processor; when the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, generating a scheduling instruction corresponding to the first computing task of the new user request, sending the scheduling instruction to the second processor, and adding the new user request to the running queue.

[0008] Optionally, when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, the new user request is added to the waiting queue.

[0009] Optionally, when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, the new user request is added to the waiting queue, including: when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, determining whether the waiting queue satisfies a preset rejection condition; if the waiting queue satisfies the preset rejection condition, rejecting the new user request; if the waiting queue does not satisfy the preset rejection condition, adding the new user request to the waiting queue.

[0010] Optionally, the preset rejection condition includes at least one of the following: a blocking flag is set for the waiting queue, wherein the blocking flag is used to indicate that the waiting queue refuses to receive new user requests; the waiting time of the earliest user request added to the waiting queue is greater than the preset waiting time.

[0011] Optionally, when the average word example generation speed of user requests in the running queue is less than a predetermined threshold, a blocking flag is set for the waiting queue; or, when the average word example generation speed of user requests in the running queue is greater than a predetermined threshold, the blocking flag of the waiting queue is cleared.

[0012] Optionally, when the waiting queue is not empty and the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request that was first added to the waiting queue, the user request that was first added to the waiting queue is added to the running queue; and / or, when all computing tasks of any user request are completed, the information of any user request is deleted from the running queue.

[0013] Optionally, before determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priority of the user request information stored in the running queue, obtain the word example generation speed corresponding to each user request stored in the running queue; based on the word example generation speed, determine the priority of each user request in the running queue, wherein the word example generation speed is inversely proportional to the priority of the user request.

[0014] Optionally, the computing task includes a large language model conduction computing task; the above method also includes: after any user requests the completion of the current conduction computing task, updating the current conduction computing task information of any user request in the running queue to the next conduction computing task information; determining the word example generation speed corresponding to the completed current conduction computing task as the latest word example generation speed of any user request, and based on the latest word example generation speed, updating the priority of any user request in the running queue.

[0015] Optionally, the first processor is a field programmable gate array, and the second processor is a graphics processor.

[0016] According to a second aspect of the present disclosure, a processor is provided, in which a run queue is provided, the run queue is used to store user requests that need to be scheduled, the user requests correspond to at least one computing task that needs to be executed in sequence, and the processor includes: an instruction generation unit, configured to generate in parallel a scheduling instruction for a current computing task corresponding to the user requests stored in the run queue; a determination unit, configured to determine a target user request from the user requests stored in the run queue based on the remaining resources of a second processor, wherein the total resources required for the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor; and a scheduling unit, configured to issue in parallel a scheduling instruction for the current computing task corresponding to the target user request to the second processor, so that the second processor executes the current computing task corresponding to the target user request.

[0017] Optionally, the determining unit is further configured to determine the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priorities of the user requests stored in the running queue.

[0018] Optionally, a waiting queue is also provided in the processor, and the waiting queue is used to store user requests waiting to enter the running queue; the above-mentioned processor also includes: a receiving unit, configured to receive a new user request sent by a third processor; the scheduling unit is also configured to generate a scheduling instruction corresponding to the first computing task of the new user request when the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, and send the scheduling instruction to the second processor, and add the new user request to the running queue.

[0019] Optionally, the scheduling unit is further configured to add the new user request to the waiting queue when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request.

[0020] Optionally, the scheduling unit is also configured to determine whether the waiting queue satisfies a preset rejection condition when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request; reject the new user request when the waiting queue satisfies the preset rejection condition; and add the new user request to the waiting queue when the waiting queue does not meet the preset rejection condition.

[0021] Optionally, the preset rejection condition includes at least one of the following: a blocking flag is set for the waiting queue, wherein the blocking flag is used to indicate that the waiting queue refuses to receive new user requests; the waiting time of the earliest user request added to the waiting queue is greater than the preset waiting time.

[0022] Optionally, the scheduling unit is further configured to set a blocking flag for the waiting queue when the average word example generation speed of user requests in the running queue is less than a predetermined threshold; or to clear the blocking flag of the waiting queue when the average word example generation speed of user requests in the running queue is greater than a predetermined threshold.

[0023] Optionally, the scheduling unit is further configured to, when the waiting queue is not empty and the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request earliest added to the waiting queue, add the user request that was first added to the waiting queue to the running queue; and / or, when all computing tasks of any user request are completed, delete the information of any user request from the running queue.

[0024] Optionally, the determination unit is further configured to obtain the word example generation speed corresponding to each user request stored in the running queue before determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priority of the user request information stored in the running queue; and determine the priority of each user request in the running queue based on the word example generation speed, wherein the word example generation speed is inversely proportional to the priority of the user request.

[0025] Optionally, the computing task includes a large language model conduction computing task; the determination unit is further configured to update the current conduction computing task information of any user request in the running queue to the next conduction computing task information after any user request completes the current conduction computing task; determine the word example generation speed corresponding to the completed current conduction computing task as the latest word example generation speed of any user request, and update the priority of any user request in the running queue based on the latest word example generation speed.

[0026] Optionally, the processor is a field programmable gate array, and the second processor is a graphics processor.

[0027] According to a third aspect of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the task scheduling method as described above.

[0028] According to a fourth aspect of the present disclosure, a system is provided comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, prompt the at least one computing device to execute the task scheduling method as described above.

[0029] The task scheduling method, processor and computer-readable storage medium disclosed in the present invention schedule user requests through a first processor with parallel computing capability, that is, a running queue is set in the first processor to store user requests that need to be scheduled, and scheduling instructions for the current computing tasks corresponding to the user requests stored in the running queue can be generated in parallel, and then the target user request is selected from the running queue according to the remaining resources of the second processor, and the total resources required for the current computing task corresponding to the selected target user request are less than the remaining resources of the second processor, and then the scheduling instructions corresponding to the selected target user request are sent to the second processor, so that the second processor can execute the current computing task corresponding to the target user request, thereby utilizing the parallel computing capability of the first processor, and generating and executing a large number of scheduling instructions in real time according to user requests and the current system operating status in a short time, thereby improving the real-time performance of user request scheduling and execution, which can not only meet the service needs of users, but also improve the throughput capacity of large language model services, and overcome the performance bottleneck of large language model services. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] These and / or other aspects and advantages of the present invention will become clear and more easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0031] Figure 1 A flowchart showing a task scheduling method according to an exemplary embodiment of the present disclosure is shown;

[0032] Figure 2 A schematic diagram showing an overall system structure according to an exemplary embodiment of the present disclosure;

[0033] Figure 3 A block diagram of a processor according to an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0034] The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the embodiments of the present invention as defined by the claims and their equivalents. Various specific details are included to assist in understanding, but these details are considered to be exemplary only. Therefore, one of ordinary skill in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. In addition, descriptions of well-known functions and structures are omitted for clarity and brevity.

[0035] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0036] Deploying a large language model to provide high-quality customer service requires the model to be able to handle high-concurrency requests and quickly respond to requests from different users to perform model reasoning to provide intelligent and accurate responses to user requests. However, large language model reasoning is a complex process involving multiple steps. The reasoning process for each user request begins with the input data provided by the user, that is, the user provides a piece of text. The large language model first encodes the text into a numerical representation suitable for its internal processing, and then selects a specified model (such as GPT, BERT, etc.) to build context by gradually processing each unit in the text. This process involves a multi-head attention mechanism and a neural network structure. The calculation of the attention mechanism occupies a large proportion of computing power and time in the large language model reasoning. Many optimization schemes focus on optimizing the attention mechanism.

[0037] At present, a widely used optimization scheme is to cache and reuse some intermediate matrices in the attention mechanism calculation. That is to say, in the process of calculating each forward pass, the matrix of the token that appeared before is reused, and only the last token is calculated for the complete attention mechanism. Such an optimization scheme greatly reduces the amount of calculation in the reasoning of large language models, so this optimization scheme is widely used in the reasoning framework of large language models. However, this optimization scheme brings some changes to the computing power requirements of large language model reasoning, that is, the computing power resources of the first conduction in the reasoning of large language models are not the same as those of the subsequent forward conduction. Specifically, in the first conduction calculation of each user request, since the entire attention matrix needs to be pre-calculated, more computing power resources are required to complete the calculation. In the subsequent forward conduction calculation, since the intermediate matrix is ​​cached and reused to optimize the attention mechanism calculation, these calculations will occupy less computing power resources. In short, after adopting the above optimization scheme, for each user request, the reasoning calculation of the large language model will first use more computing resources (here mainly considering the memory usage in the calculation) to complete the calculation of the first transmission, and for the subsequent transmission, only less computing resources are needed to complete the corresponding calculation. It should be noted that the specific amount of computing resources required and the number of transmissions are not fixed. For each different user request, the required amount of computing resources and the number of transmissions are different.

[0038] In addition, from another perspective, the currently popular large language model inference frameworks all use a streaming output mechanism. The user's perception of the output speed of the large language model inference service can be mainly decomposed into two indicators: 1. Queuing time T queue , that is, to calculate the time from receiving the user's request to outputting the first reply token; Second, the token generation speed V token , that is, the speed of generating examples when responding to user requests, that is, the time interval between each output word example. Since the words output by large language model reasoning are mainly generated from the calculation of each transmission in the large language model, the throughput of the large language model reasoning system can be improved as much as possible by controlling the scheduling of the current transmission calculation in the graphics card in each user request, while ensuring that the computing power resources do not exceed the available hardware resources and meeting the customer service quality requirements.

[0039] Combining the characteristics of the above optimization schemes and the perception indicators of input speed, the following scheduling goals can be obtained:

[0040] 1. Assume that the computing power resources required for each user request i in the kth transmission calculation are R i,k, and there is a set C whose user requests can be processed concurrently in the system, but at any time, ∑R i,k <Hardware available resources, i∈C, and R i,1 >R i,j ,j≠1;

[0041] 2. According to the service quality requirements in specific application scenarios, service indicators can be formulated. Specific service indicators can be set according to user needs. For example, the waiting time can be set, that is, the average T queue <10s, and V token >300tokens / sec.

[0042] In order to achieve the above scheduling goals, the system needs to generate and execute a large number of scheduling instructions in real time in a short period of time according to user requests and the current system operation status. That is, if a large language model is to be successfully deployed to serve a large number of customers, the large language model needs to have the ability to handle high-concurrency user requests during deployment, that is, it needs to have high throughput to ensure that the large language model can quickly respond to requests from different users. Because the large language model itself has the characteristics of large model size and complex calculations, greater throughput often requires more computing resources, such as high-performance GPUs or dedicated chips, but the cost of these computing resources is quite high, which may be a huge investment for many organizations. Therefore, if the throughput of the deployed large language model can be improved under fixed computing resources, its application cost in production and life can be greatly reduced.

[0043] However, existing solutions are often limited to optimization at the software level, and fail to fully utilize the combination of software and hardware to optimize scheduling and management. These single-dimensional optimizations cannot fully release the potential of hardware resources due to software defects in real-time performance and response speed, resulting in performance bottlenecks and resource waste. At the same time, existing solutions generally do not consider the special computing power requirements during large language model reasoning, and do not optimize the computing power characteristics of large language model reasoning. In the application scenario of large language model reasoning, these scheduling optimization solutions cannot effectively improve the throughput of large language model services.

[0044] In response to the above problems, the present disclosure proposes a task scheduling method, a processor and a computer-readable storage medium, in which user requests are scheduled and managed by a first processor with parallel computing capabilities, that is, a running queue is set on the first processor to store user requests that need to be scheduled, and scheduling instructions for the current computing tasks corresponding to the user requests stored in the running queue can be generated in parallel, and then the target user request is selected from the running queue according to the remaining resources of the second processor, and the total resources required for the current computing task corresponding to the selected target user request are less than the remaining resources of the second processor, and then the scheduling instructions corresponding to the selected target user request are sent to the second processor, so that the second processor can execute the current computing task corresponding to the target user request in parallel, thereby utilizing the parallel computing capability of the first processor, and being able to generate and execute a large number of scheduling instructions in real time in a short time according to the user request and the current system operation status, thereby improving the real-time scheduling and execution of user requests, which can not only meet the service needs of users, but also improve the throughput of large language model services, and overcome the performance bottleneck of large language model services.

[0045] It should be noted that, based on the above introduction, the scheduling method of the present disclosure can use the conduction computing task in the large language model reasoning as the granularity to implement the scheduling of different conduction computing tasks requested by different users. If the system supports it, the present disclosure can also schedule computing tasks with finer or coarser granularity, which is not limited by the present disclosure.

[0046] The task scheduling method, processor, and computer-readable storage medium according to the embodiments of the present disclosure will be described below with reference to the accompanying drawings in order to explain the present disclosure.

[0047] Figure 1 A flowchart of a task scheduling method according to an exemplary embodiment of the present disclosure is shown. Figure 1 As shown, it is applied to a first processor, a running queue is set in the first processor, and the running queue is used to store user requests that need to be scheduled. The user request corresponds to at least one computing task that needs to be executed in sequence. The task scheduling method includes the following steps:

[0048] In step S101, a scheduling instruction for a current computing task corresponding to a user request stored in a running queue is generated in parallel.

[0049] The above-mentioned computing task may be a conduction computing task in large language model reasoning, or may be other computing tasks of finer or coarser granularity, and the present disclosure does not limit this.

[0050] As an example, for the user requests stored in the above-mentioned running queue, the scheduling instructions for the current computing tasks requested by each user can be generated in parallel, that is, the scheduling instructions for the current computing tasks requested by each user are generated independently and do not interfere with the generation of scheduling instructions for the current computing tasks requested by other users.

[0051] It should be noted that the computing task corresponding to each user request may include multiple calculations. Therefore, the current computing task corresponding to each user request in the running queue may be a different computing task. For example, the current computing task requested by the first user may be the second computing task requested by the first user, the current computing task requested by the second user may be the fourth computing task requested by the second user, and the current computing task requested by the third user may be the third computing task requested by the third user. The current computing tasks requested by other users may also be other computing tasks requested by other users, and the present disclosure does not limit this.

[0052] In step S102, based on the remaining resources of the second processor, a target user request is determined from the user requests stored in the running queue, wherein the total resources required by the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor.

[0053] The above-mentioned target user request may be one or more. Generally, in order to realize parallel processing, there are multiple target user requests, that is, the total resources required for the current computing tasks corresponding to the multiple target user requests should not exceed the remaining resources of the second processor.

[0054] As an example, when there are multiple target user requests, multiple target user requests can be selected from the running queue together according to the remaining resources and priority, or one target user request can be selected from the running queue one by one according to priority until the remaining resources are insufficient or there are no remaining resources. The present disclosure does not limit this.

[0055] The first processor mentioned above needs to have parallel computing capabilities and the ability to process concurrent requests in real time. For example, it can be a field programmable gate array (FPGA). FPGA is a commonly used hardware accelerator. Its outstanding features include excellent parallel computing capabilities, efficient pipeline optimization, and the ability to process concurrent requests in real time. Compared with traditional general-purpose processors, FPGA has greater flexibility and customization capabilities, which enables it to perform well in applications requiring high-performance parallel computing. Therefore, using FPGA to manage and control the scheduling tasks between different user requests in large language model reasoning can be regarded as a scheduling solution that combines software and hardware, which can better exert its own parallel computing and real-time processing of concurrent requests. , So that a large number of scheduling instructions can be generated and executed in real time in a short period of time according to user requests and the current system operation status.

[0056] The second processor is used for reasoning execution of a large language model, for example, it can be a graphics processing unit (Graphics Processing Unit, abbreviated as GPU). In the present disclosure, the resources of the second processor can be computing resources such as memory for executing user requests. When the second processor is a GPU, the resources of the second processor can be video memory.

[0057] It should be noted that the present disclosure does not limit the first processor and the second processor.

[0058] According to an embodiment of the present disclosure, determining a target user request from user requests stored in a run queue based on the remaining resources of the second processor may include: determining the target user request from user requests stored in the run queue based on the remaining resources of the second processor and the priority of the user requests stored in the run queue. Through this embodiment, when determining the target user request from user requests stored in the run queue, not only the remaining resources of the second processor but also the priority of the user request are considered, so that the determined target user request can be a user request with higher priority in the run queue and better meets user needs.

[0059] Before determining the target user request from the user requests stored in the running queue, the remaining resources of the second processor and the priority of the user requests stored in the row queue can be obtained, wherein the remaining resources of the second processor can be obtained from the second processor by sending an acquisition request to the second processor; the priority of each user request can be determined according to the current word example generation speed of each user request. Then, based on the remaining resources of the second processor and the priority of the user requests stored in the running queue, the target user request is selected from the user requests stored in the running queue.

[0060] According to an embodiment of the present disclosure, before determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priority of the information of the user request stored in the running queue, the word example generation speed corresponding to each user request stored in the running queue is obtained; based on the word example generation speed, the priority of each user request in the running queue is determined, wherein the word example generation speed is inversely proportional to the priority of the user request. Through this embodiment, the priority of each user request in the running queue is determined by the word example generation speed of each user request, that is, the word example generation speed is inversely proportional to the priority of the corresponding user request, which can ensure that the waiting time of each user request will not be too long, thereby balancing the waiting time of each user request.

[0061] As an example, the speed of generating examples for each user request can be determined based on the time intervals between the examples in response to the current user request. For example, for a user request, when 3 examples are responded to, the average of the time intervals between the 3 examples can be obtained first, and then 3 is divided by the average, and the result can be used as the speed of generating examples for the user request.

[0062] As an example, the priority of the above-mentioned user request is generally inversely proportional to the corresponding word example generation speed, because the word example generation speed represents the speed at which the user request is responded to. When the word example generation speed is high, it means that the user request is responded to relatively quickly. When the word example generation speed is low, it means that the user request is responded to relatively slowly. Since user requests with a slower response speed require a relatively longer waiting time than user requests with a faster response speed, in order to avoid user requests with a slower response speed waiting for a longer time, the priority will be set higher, thereby shortening the waiting time and improving the user experience.

[0063] It should be noted that the inverse proportion between the speed of generating the above-mentioned word examples and the priority of the user request can be set as needed, and the present disclosure does not limit this.

[0064] According to an embodiment of the present disclosure, the above-mentioned computing task includes a large language model conduction computing task; the above-mentioned method can also update the current conduction computing task information of any user request in the running queue to the next conduction computing task information after any user request completes the current conduction computing task; determine the word example generation speed corresponding to the completed current conduction computing task as the latest word example generation speed of any user request, and update the priority of any user request in the running queue based on the latest word example generation speed. Through this embodiment, each time a user request completes the current conduction computing task, the conduction computing task in the running queue can be updated to the next conduction computing task requested by the user, and the priority of the user request in the running queue can be updated at the same time, to ensure that the information in the running queue is the latest, thereby avoiding scheduling problems.

[0065] According to an embodiment of the present disclosure, the above-mentioned computing tasks may include a large language model conduction computing task. At this time, the computing task corresponding to each user request includes at least one conduction computing task executed in sequence. The above-mentioned running queue may also include the current conduction computing task information of each user request, which is used to indicate which conduction computing task each user request in the running queue has run to.

[0066] As an example, after any user request completes the current conduction calculation task, the current conduction calculation task information of any user request in the running queue can be updated to the next conduction calculation task information. For example, assuming that the current conduction calculation task of a user request is the second conduction calculation, since the second conduction calculation task has been completed, the current conduction calculation task information in the running queue can be changed to indicate the third conduction calculation task; and the word example generation speed corresponding to the completed current conduction calculation task is determined as the latest word example generation speed of any user request, and then based on the latest word example generation speed, the priority of any user request in the running queue is updated. For example, after the user request completes the second conduction calculation, a new word example will be replied, and there will be a corresponding new time interval. The average value is recalculated based on the time interval and the time interval of the previous reply word example, and combined with the latest number of reply word examples, the latest word example generation speed can be determined, and then based on the latest word example generation speed, the priority of the user request is updated.

[0067] In step S103, a scheduling instruction for the current computing task corresponding to the target user request is issued in parallel to the second processor, so that the second processor executes the current computing task corresponding to the target user request.

[0068] As an example, after determining the target user request, the scheduling instruction of the current computing task corresponding to the target user request can be sent to the second processor in parallel, so that the second processor can execute the current computing task corresponding to the target user request.

[0069] According to an embodiment of the present disclosure, a waiting queue may also be provided in the first processor, and the waiting queue is used to store user requests waiting to enter the running queue; the method may also receive a new user request sent by the third processor; when the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, a scheduling instruction corresponding to the first computing task of the new user request is generated, and the scheduling instruction is sent to the second processor, and the new user request is added to the running queue. Through this embodiment, if the information of the waiting queue indicates that the waiting queue is empty or the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, it means that there are no user requests waiting to be scheduled or there are not many user requests waiting to be scheduled, then the information of the new user request can be added to the running queue to avoid the new user request waiting too long.

[0070] The third processor may be any processor capable of issuing a user request, for example, a central processing unit (CPU), which is not limited in the present disclosure. The waiting queue may adopt a first-in-first-out form, so that the waiting time corresponding to the user request can be balanced.

[0071] As an example, after receiving a new user request, it can be determined whether the waiting queue is empty, and the relationship between the remaining resources of the second processor and the resources required to execute the first computing task of the new user request, to determine whether to add the new user request to the waiting queue or the running queue. Specifically, when the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, it means that there are no user requests waiting to be scheduled or there are not many user requests waiting to be scheduled. At this time, a scheduling instruction corresponding to the first computing task of the new user request can be generated and sent to the second processor. At the same time, the new user request is added to the running queue, and at this time, the computing task information of the new user request in the running queue indicates the second computing task.

[0072] According to an embodiment of the present disclosure, when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, the new user request is added to the waiting queue. Through this embodiment, if the information of the waiting queue indicates that the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, it means that there are already many user requests waiting to be scheduled, and the information of the new user request is added to the waiting queue to avoid excessive redundancy of the running queue.

[0073] As an example, after receiving a new user request, it can be determined whether the waiting queue is empty, as well as the relationship between the remaining resources of the second processor and the resources required to execute the first computing task of the new user request, to determine whether to add the new user request to the waiting queue or the running queue. Specifically, when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, it means that there are already many user requests waiting to be scheduled. At this time, a scheduling instruction corresponding to the first computing task of the new user request can also be generated, but the new user request will be added to the waiting queue, waiting to be added to the running queue.

[0074] According to an embodiment of the present disclosure, when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required for executing the first computing task of the new user request, adding the new user request to the waiting queue may include: when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required for executing the first computing task of the new user request, determining whether the waiting queue meets the preset rejection condition; when the waiting queue meets the preset rejection condition, rejecting the new user request; when the waiting queue does not meet the preset rejection condition, adding the new user request to the waiting queue. Through this embodiment, if the waiting queue meets the preset rejection condition, it means that even if the new user request is added to the waiting queue, the waiting time is too long. In this way, the new user request can be directly rejected, which can avoid too many user requests in the waiting queue and the user waiting for too long without getting a result, otherwise the user will be added to the waiting queue.

[0075] As an example, in order to avoid an excessive number of user requests in the waiting queue and the user waiting for too long without getting any results, rejection conditions can be set in advance for the waiting queue, that is, the conditions for rejecting user requests to join the waiting queue. That is, when the waiting queue meets the preset rejection conditions, new user requests are rejected; when the waiting queue does not meet the preset rejection conditions, new user requests are added to the waiting queue.

[0076] According to an embodiment of the present disclosure, the preset rejection condition includes at least one of the following: a blocking flag is set for the waiting queue, wherein the blocking flag is used to indicate that the waiting queue refuses to receive new user requests; the waiting time of the earliest user request added to the waiting queue is greater than the preset waiting time. Through this embodiment, by setting a blocking flag for the waiting queue or the waiting time of the earliest user request added to the waiting queue is greater than the preset waiting time, it can be conveniently and quickly indicated that even if a new user request is added to the waiting queue, it will wait too long.

[0077] As an example, a blocking flag can be set for the waiting queue according to actual needs to prevent new user requests from being added to the waiting queue. The waiting time of the earliest user request added to the waiting queue can also be determined. If the waiting time is longer than the preset waiting time, the preset waiting time can be the waiting time that users can wait without feeling bad based on a survey. If the preset waiting time is exceeded, it means that the user has begun to feel bad. At this time, it means that the user requests in the waiting queue have been waiting for more than the preset waiting time. Therefore, it is not recommended to add new user requests to the waiting queue. The new user request can be directly rejected and the user is informed that the system is busy.

[0078] According to an embodiment of the present disclosure, when the average word generation speed of user requests in the running queue is less than a predetermined threshold, a blocking flag is set for the waiting queue; or, when the average word generation speed of user request information in the running queue is greater than a predetermined threshold, the blocking flag of the waiting queue is cleared. Through this embodiment, if the average word generation speed of the running queue is too low, it means that the reply speed of user requests in the running queue is slow. By setting a blocking flag for the waiting queue, new user requests can be avoided from being sent to the running queue, that is, the waiting queue has to suspend receiving new user requests, thereby avoiding lengthening the execution time of user requests in the running queue; and if the average word generation speed of the running queue is relatively high, it means that the reply speed of user requests in the running queue is still relatively fast. By clearing the blocking flag of the waiting queue, new user requests can continue to be sent to the running queue, that is, the waiting queue can also start receiving new user requests.

[0079] As an example, the above preset threshold can be set as needed, and the present disclosure does not limit this. For example, it can be determined whether to set a blocking flag for the waiting queue based on the average word example generation speed of user requests in the running queue. Specifically, when the average word example generation speed of user requests in the running queue is less than the predetermined threshold, it means that the reply speed of user requests in the running queue is slow, and a blocking flag can be set for the waiting queue to avoid sending new user requests to the running queue; and when the average word example generation speed of information of user requests in the running queue is greater than the predetermined threshold, it means that the reply speed of user requests in the running queue is still relatively fast, and the blocking flag of the waiting queue can be cleared, that is, new user requests can continue to be sent to the running queue.

[0080] According to an embodiment of the present disclosure, when the waiting queue is not empty and the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request that first joined the waiting queue, the user request that first joined the waiting queue is added to the running queue. Through this embodiment, once the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request that first joined the waiting queue, the user request can be added to the running queue to wait for scheduling and execution, so as to avoid the user request being in the waiting queue for too long, causing the user to wait too long and resulting in a bad user experience;

[0081] According to an embodiment of the present disclosure, when all computing tasks of any user request are completed, the information of any user request can be deleted from the running queue. When all computing tasks corresponding to a user request are completed, the user request is deleted from the running queue to avoid unnecessary calls and scheduling errors.

[0082] As an example, for the user request that is added to the waiting queue earliest, if the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request, the user request can be added to the running queue to ensure that the number of user requests in the running queue remains in a relatively full state. Moreover, it can also avoid spending too much time in the waiting queue, causing the user to wait too long.

[0083] In order to better understand the embodiments of the present disclosure, Figure 2 The task scheduling method disclosed in the present invention is systematically described through a specific embodiment.

[0084] Figure 2 An overall system structure of the scheduling solution disclosed in the present invention is shown, Figure 2 As shown, in this embodiment, taking the first processor being FPGA, the second processor being GPU, and the third processor being CPU as an example, the roles of the CPU and GPU in the entire system are basically the same as those of the traditional large language model inference framework, that is, the CPU is mainly responsible for loading the large language model, user management, and system management and control, and the GPU is mainly responsible for providing the computing power resources required for large language model inference and executing inference calculations of the large language model.

[0085] In this embodiment, a hardware acceleration card such as FPGA is used to specifically schedule and manage user requests, implement parallel scheduling of user requests, monitor resource operation status, and push scheduling instructions of user requests to the GPU in real time and in parallel to control the use of computing resources in the GPU.

[0086] The FPGA is provided with a running queue and a waiting queue. The waiting queue is used to store user requests waiting to enter the running queue, and the running queue is used to store user requests that need to be scheduled and executed. The specific scheduling scheme of the FPGA is as follows:

[0087] First, the FPGA may obtain request information of a new user request from the CPU. The request information may include the new user request itself or identification information of the new user request, which is not limited in the present disclosure.

[0088] Secondly, we can determine whether to add the new user request to the waiting queue or the running queue. Assume that the new user request is represented by k:

[0089] If the waiting queue is empty and the remaining GPU resources are greater than or equal to R k,1 , where R k,1 represents the resources required to execute the first computing task of user request k, then schedule the first computing task O to execute user request k k,1 , that is, generate the scheduling instruction for the first computing task of user request k, send it to the GPU, and add user request k to the running queue.

[0090] If the waiting queue is not empty or the remaining GPU resources are less than R k,1 , then check the information of the waiting queue, that is, if the blocking flag S is set for the waiting queue, reject the user request k, that is, reject to add the user request k to the waiting queue; if the waiting time of the earliest user request added to the waiting queue is longer than the preset waiting time (such as the average T queue ), then user request k is rejected, that is, user request k is rejected to be added to the waiting queue; otherwise, user request k is added to the waiting queue;

[0091] It should be noted that for the waiting queue, the following judgment is made: determine the earliest user request j in the waiting queue, if the remaining resources of the GPU are greater than R j,i , then user request j is added to the running queue, where R j,i Represents the resources required to execute the current i-th computing task of user request j.

[0092] Furthermore, in the absence of new user requests, the high concurrency of FPGA can be used to schedule user requests according to the running queue, that is, the scheduling instructions of the current computing tasks corresponding to the user requests in the running queue can be generated in parallel, and the real-time resource usage of the GPU can be obtained. According to the remaining resources of the GPU, a certain number of target user requests are selected from the user requests stored in the running queue, wherein the total resources required for the current conduction computing tasks of the certain number of target user requests do not exceed the remaining resources of the GPU, and then, the scheduling instructions of the current computing tasks of the selected target user requests are sent to the GPU in parallel, so that the user requests in the running queue enter the GPU for execution.

[0093] Finally, if all computing tasks of user request k are completed, they can be removed from the running queue to complete the scheduling of user request k.

[0094] It should be noted that in this process, the running queue can be maintained and monitored. The running queue can be implemented by a priority queue data structure, that is, each user request in the running queue has a priority, and the priority is determined by the current word generation speed of each user request. Moreover, for each user request i, a computing task is completed once, such as completing the nth computing task O. i,n , then the current conduction computing task O of the queue user request i will be run i,n The information is updated to the next conduction calculation task O i,n+1 , and updates the priority of user request i in the running queue according to the latest word example generation speed. In addition, if the average word example generation speed of all user requests in the running queue is lower than the threshold set by the system, a blocking flag S is set for the waiting queue; if the average word example generation speed of all user requests in the running queue is higher than the threshold set by the system, the blocking flag S of the waiting queue is cleared.

[0095] In summary, this embodiment proposes a scheduling solution that combines software and hardware, that is, using a field programmable gate array (FPGA) hardware acceleration card to manage and control the scheduling tasks between different user requests in large model reasoning, that is, under the premise of ensuring that the computing power resources do not exceed the available hardware resources and meet the customer service quality requirements, by controlling the scheduling of each computing task (specifically, the conduction computing task) requested by each user in the graphics card, the throughput of the large language model reasoning system can be improved as much as possible. In view of the complex calculation, large concurrency, and delay sensitivity of large model reasoning, the parallel computing capability of FPGA is used to ensure the real-time generation and execution of scheduling strategies, thereby improving the throughput of the large language model reasoning system.

[0096] Figure 3 1 is a block diagram of a processor according to an exemplary embodiment of the present disclosure. Figure 3 As shown, a running queue is provided in the processor, and the running queue is used to store user requests that need to be scheduled. The user request corresponds to at least one computing task that needs to be executed in sequence. The processor includes: an instruction generating unit 32, a determining unit 34 and a scheduling unit 36.

[0097] The instruction generation unit 32 is configured to generate scheduling instructions for the current computing task corresponding to the user request stored in the running queue in parallel; the determination unit 34 is configured to determine the target user request from the user requests stored in the running queue based on the remaining resources of the second processor, wherein the total resources required for the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor; the scheduling unit 36 ​​is configured to issue scheduling instructions for the current computing task corresponding to the target user request to the second processor in parallel, so that the second processor executes the current computing task corresponding to the target user request.

[0098] According to an embodiment of the present disclosure, the determining unit 34 is further configured to determine a target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priorities of the user requests stored in the running queue.

[0099] According to an embodiment of the present disclosure, a waiting queue is also provided in the processor, and the waiting queue is used to store user requests waiting to enter the running queue; the above-mentioned processor also includes: a receiving unit, configured to receive a new user request sent by the third processor; the scheduling unit 36 ​​is also configured to generate a scheduling instruction corresponding to the first computing task of the new user request when the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, and send the scheduling instruction to the second processor, and add the new user request to the running queue.

[0100] According to an embodiment of the present disclosure, the scheduling unit 36 ​​is further configured to add a new user request to the waiting queue when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request.

[0101] According to an embodiment of the present disclosure, the scheduling unit 36 ​​is also configured to determine whether the waiting queue satisfies a preset rejection condition when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request; reject the new user request when the waiting queue satisfies the preset rejection condition; and add the new user request to the waiting queue when the waiting queue does not satisfy the preset rejection condition.

[0102] According to an embodiment of the present disclosure, the preset rejection condition includes at least one of the following: a blocking flag is set for the waiting queue, wherein the blocking flag is used to indicate that the waiting queue refuses to receive new user requests; the waiting time of the user request that joins the waiting queue earliest is greater than the preset waiting time.

[0103] According to an embodiment of the present disclosure, the scheduling unit 36 ​​is also configured to set a blocking flag for the waiting queue when the average word example generation speed of user requests in the running queue is less than a predetermined threshold; or, when the average word example generation speed of user requests in the running queue is greater than a predetermined threshold, clear the blocking flag of the waiting queue.

[0104] According to an embodiment of the present disclosure, the scheduling unit 36 ​​is also configured to, when the waiting queue is not empty and the remaining resources of the second processor are greater than the resources required to execute the current computing task of the user request that was earliest added to the waiting queue, add the user request that was earliest added to the waiting queue to the running queue; and / or, when all computing tasks of any user request are completed, delete the information of any user request from the running queue.

[0105] According to an embodiment of the present disclosure, the determination unit 34 is also configured to obtain the word example generation speed corresponding to each user request stored in the running queue before determining the target user request from the user requests stored in the running queue based on the remaining resources of the second processor and the priority of the user request information stored in the running queue; and determine the priority of each user request in the running queue based on the word example generation speed, wherein the word example generation speed is inversely proportional to the priority of the user request.

[0106] According to an embodiment of the present disclosure, the computing task includes a large language model conduction computing task; the determination unit 34 is further configured to update the current conduction computing task information of any user request in the running queue to the next conduction computing task information after any user request completes the current conduction computing task; determine the word example generation speed corresponding to the completed current conduction computing task as the latest word example generation speed of any user request, and update the priority of any user request in the running queue based on the latest word example generation speed.

[0107] According to an embodiment of the present disclosure, the processor is a field programmable gate array, and the second processor is a graphics processor.

[0108] The above has been referred to Figures 1 to 3 A task scheduling method and a processor according to exemplary embodiments of the present disclosure are described.

[0109] Figure 3Each unit in the processor shown may be configured as software, hardware, firmware, or any combination of the above items to perform a specific function. For example, each unit may correspond to a dedicated integrated circuit, or may correspond to pure software code, or may correspond to a module that combines software and hardware. In addition, one or more functions implemented by each unit may also be uniformly executed by components in a physical entity device (e.g., a processor, a client, or a server, etc.).

[0110] In addition, refer to Figure 1 The described task scheduling method can be implemented by a program (or instruction) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions can be provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to perform the task scheduling method according to the present disclosure.

[0111] The computer program in the computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above steps or perform more specific processing when performing the above steps. The contents of these additional steps and further processing have been described in reference to Figure 1 It is mentioned in the description of the related method, so it will not be repeated here to avoid repetition.

[0112] It should be noted that the various units in the processor according to the exemplary embodiment of the present disclosure can completely rely on the operation of the computer program to realize the corresponding functions, that is, the various units correspond to each step in the functional architecture of the computer program, so that the entire system is called through a special software package (for example, lib library) to realize the corresponding functions.

[0113] on the other hand, Figure 3 The various units shown may also be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented by software, firmware, middleware, or microcode, the program code or code segment for performing the corresponding operation may be stored in a computer-readable medium such as a storage medium, so that the processor may perform the corresponding operation by reading and running the corresponding program code or code segment.

[0114] For example, the exemplary embodiments of the present disclosure may also be implemented as a computing device, which includes a storage component and a processor, wherein a computer executable instruction set is stored in the storage component, and when the computer executable instruction set is executed by the processor, a task scheduling method according to the exemplary embodiments of the present disclosure is executed.

[0115] Specifically, the computing device can be deployed in a server or client, or can be deployed on a node device in a distributed network environment. In addition, the computing device can be a PC, a tablet device, a personal digital assistant, a smart phone, a web application, or other device capable of executing the above instruction set.

[0116] Here, the computing device is not necessarily a single computing device, but may also be any device or circuit collection that can execute the above instructions (or instruction sets) individually or jointly. The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.

[0117] In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0118] According to the exemplary embodiment of the present disclosure, some operations described in the task scheduling method can be implemented by software, some operations can be implemented by hardware, and in addition, these operations can also be implemented by a combination of software and hardware.

[0119] The processor may execute instructions or codes stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.

[0120] The storage component may be integrated with the processor, for example, RAM or flash memory is arranged within an integrated circuit microprocessor, etc. In addition, the storage component may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor can read files stored in the storage component.

[0121] In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the computing device may be connected to each other via a bus and / or a network.

[0122] The task scheduling method according to the exemplary embodiment of the present disclosure can be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams can be equally integrated into a single logical device or operate according to non-exact boundaries.

[0123] Therefore, refer to Figure 1 The described task scheduling method may be implemented by a system including at least one computing device and at least one storage device storing instructions.

[0124] According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing a task scheduling method according to an exemplary embodiment of the present disclosure, and a computer executable instruction set is stored in the storage device. When the computer executable instruction set is executed by the at least one computing device, the execution reference Figure 1 The described task scheduling method.

[0125] The above describes various exemplary embodiments of the present disclosure, and it should be understood that the above description is only exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure, many modifications and changes are obvious to those of ordinary skill in the art. Therefore, the scope of protection of the present disclosure should be based on the scope of the claims.

Claims

1. A task scheduling method, wherein: The method is applied to a first processor, wherein a run queue is provided in the first processor, wherein the run queue is used to store user requests that need to be scheduled, wherein the user requests correspond to at least one computing task that needs to be executed in sequence, and the method comprises: Generate in parallel the scheduling instructions for the current computing tasks corresponding to the user requests stored in the running queue; Based on the remaining resources of the second processor, determining a target user request from the user requests stored in the run queue, wherein the total resources required for the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor; A scheduling instruction for the current computing task corresponding to the target user request is issued in parallel to the second processor so that the second processor executes the current computing task corresponding to the target user request.

2. The method according to claim 1, wherein: The determining, based on the remaining resources of the second processor, a target user request from the user requests stored in the run queue comprises: Based on the remaining resources of the second processor and the priorities of the user requests stored in the run queue, a target user request is determined from the user requests stored in the run queue.

3. The method according to claim 1, wherein: The first processor is also provided with a waiting queue, and the waiting queue is used to store user requests waiting to enter the running queue; The method further comprises: receiving a new user request sent by a third processor; When the waiting queue is empty and the remaining resources of the second processor are greater than or equal to the resources required to execute the first computing task of the new user request, a scheduling instruction corresponding to the first computing task of the new user request is generated, the scheduling instruction is sent to the second processor, and the new user request is added to the running queue.

4. The method according to claim 3, wherein: Also includes: When the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request, the new user request is added to the waiting queue.

5. The method according to claim 4, wherein: The step of adding the new user request to the waiting queue when the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task of the new user request comprises: In the case where the waiting queue is not empty or the remaining resources of the second processor are less than the resources required to execute the first computing task requested by the new user, determining whether the waiting queue meets a preset rejection condition; If the waiting queue meets the preset rejection condition, reject the new user request; When the waiting queue does not satisfy the preset rejection condition, the new user request is added to the waiting queue.

6. The method according to claim 5, wherein: The preset rejection condition includes at least one of the following: The waiting queue is set with a blocking flag, wherein the blocking flag is used to indicate that the waiting queue refuses to receive new user requests; The waiting time of the earliest user request added to the waiting queue is greater than the preset waiting time.

7. The method according to any one of claims 1 to 6, wherein: The first processor is a field programmable gate array, and the second processor is a graphics processor.

8. A processor, wherein: The processor is provided with a running queue, the running queue is used to store user requests that need to be scheduled, the user request corresponds to at least one computing task that needs to be executed in sequence, and the processor includes: An instruction generation unit, configured to generate in parallel a scheduling instruction for a current computing task corresponding to a user request stored in the run queue; a determining unit configured to determine a target user request from the user requests stored in the run queue based on the remaining resources of the second processor, wherein the total resources required for the second processor to execute the current computing task corresponding to the target user request do not exceed the remaining resources of the second processor; The scheduling unit is configured to issue a scheduling instruction for the current computing task corresponding to the target user request to the second processor in parallel, so that the second processor executes the current computing task corresponding to the target user request.

9. A computer-readable storage medium storing instructions, wherein: When the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the task scheduling method according to any one of claims 1 to 7.

10. A system comprising at least one computing device and at least one storage device storing instructions, wherein: When the instructions are executed by the at least one computing device, the at least one computing device is prompted to perform the task scheduling method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Request processing method, and electronic device, storage medium and program product

    WO2026081772A1