Efficient workflow probabilistic optimization method, apparatus, computer and storage medium accelerated by GPU

CN116541173BActive Publication Date: 2026-09-15SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310518679.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-09
Publication Date
2026-09-15
Estimated Expiration
2043-05-09

AI Technical Summary

Technical Problem

这样就产生了一个有别于传统资源调度的问题:使用概率优化的工作流资源调度

Benefits of technology

[0065] This invention proposes a GPU-accelerated, high-efficiency workflow probabilistic optimization algorithm. Addressing the challenges of large solution spaces and high computational overhead in workflow probabilistic optimization algorithms, this algorithm transforms probability distribution operations into parallel-compute GPU kernel functions. By calling these GPU kernel functions, performance is improved without compromising the algorithm's correctness. Key technologies include: writing corresponding GPU kernel functions based on the computational characteristics of probability distribution operations; using kernel function fusion to address the issues of low computational cost of individual kernel functions and high overhead from multiple kernel function launches, thus improving GPU utilization; reducing redundant computation of the same operation on the GPU by reusing identical probability distribution operations, increasing the proportion of effective GPU computation; and using CPU-GPU collaborative computing technology to overlap the computational overhead of the CPU and GPU, achieving efficient utilization of computing resources on heterogeneous platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116541173B_ABST
    Figure CN116541173B_ABST
Patent Text Reader

Abstract

The application discloses a GPU accelerated efficient workflow probability optimization method, comprising the following steps: constructing a directed acyclic graph corresponding to a workflow, wherein the directed acyclic graph comprises a probability distribution operation sequence of each task in the workflow; generating a resource configuration scheme of the workflow according to a type of allocated resources and the tasks in the workflow, and evaluating a monetary cost of the resource configuration scheme; comparing the monetary cost of the evaluated resource configuration scheme with a preset user monetary cost budget, and adding a resource configuration scheme smaller than the user monetary cost budget to a feasible configuration scheme queue; calculating an execution time of the resource configuration scheme added to the feasible configuration scheme queue, and judging whether the execution time of each resource configuration scheme is smaller than a current optimal execution time; and when the execution time is smaller than the current optimal execution time, updating the calculated execution time to the current optimal execution time. The method can realize efficient utilization of computing resources on a heterogeneous platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and particularly relates to a GPU-accelerated high-efficiency workflow probability optimization method, apparatus, computer, and storage medium. Background Technology

[0002] For the uncertainty of workflow resource scheduling on cloud platforms, the leading algorithm is Prob. Prob models the dynamics of resource performance on cloud platforms as a random variable and uses the probability distribution of this variable as the optimization input for the algorithm, thus achieving a general solution for workflow performance optimization that considers changes in cloud platform resource performance. This algorithm addresses the significant computational overhead introduced by the probability distribution by implementing three pruning methods to optimize the workflow structure, thereby reducing the computational steps and solution space. However, this method does not adequately consider the diversity of workflows on cloud platforms and the heterogeneity of computation on these platforms. Different computational purposes lead to different workflow processes and computational tasks, and simple pruning cannot effectively optimize all workflow structures. Therefore, the algorithm still faces situations where the search space is large and the number of resource configuration schemes to be computed is numerous. Prob only uses CPU for serial computation, making it difficult to achieve excellent computational speed in such scenarios. Consequently, the Prob algorithm cannot effectively utilize the computational resources on current cloud platforms, lacking in real-time performance and applicability for workflow resource scheduling problems.

[0003] Assigning cloud platform instances to tasks within a workflow, ensuring that the workflow fully utilizes various types of cloud platform resources during execution, is called workflow resource scheduling. Considering the dynamic nature of resource performance on the cloud platform, the performance of some instance resources cannot be evaluated statically; the execution time of computational tasks running on that instance should be represented by a probability distribution. This raises a problem distinct from traditional resource scheduling: workflow resource scheduling using probabilistic optimization.

[0004] The workflow resource scheduling algorithm using probabilistic optimization mainly includes four types of probability distribution operations: probability distribution addition, probability distribution maximization, probability distribution comparison, and the cost estimation operation (EstimateCost) which requires evaluating the cost of each resource configuration scheme due to user cost constraints.

[0005] The probability distribution is represented as a histogram, with the relevant parameters explained below:

[0006] N Number of computational tasks in the workflow Range Histogram distribution range midRange Histogram distribution interval median addRange Intermediate result data regarding the range in distributed addition operations. bestRange Histogram distribution range of the optimal configuration scheme Prob Histogram distribution interval probability cuProb Histogram distribution interval cumulative probability addProb Intermediate result data regarding interval probabilities in distributed addition operations. bestProb Histogram distribution interval probability of the optimal configuration scheme hisSize Number of histogram distribution intervals priceOd unit time monetary cost of cloud instances taskCost Monetary cost of a single task finalCost Total monetary cost of workflow compareRes Return value of distribution comparison

[0007] Define the total monetary cost of the workflow as finalCost, and the monetary cost of each task in the workflow as taskCost. i (i = 1, 2, ..., N). The monetary expenditure assessment operation can be expressed by the following formula:

[0008]

[0009] in

[0010] Among them priceOd i This represents the unit-time currency cost of the instance type to which the task is assigned.

[0011] Define the inputs for the probability distribution operation as histogram distribution A and histogram distribution B, respectively.

[0012] The output is a histogram distribution C. The probability distribution addition operation can be expressed by the following formula:

[0013] RangeC i =add(RangeA1, RangeB1)+i×interval

[0014] in

[0015] addRange k =RangeA i +RanegB i

[0016] addProbk = ProbA i ×ProbB j

[0017]

[0018] ProbC i =cuProbC i -cuProbC i-1

[0019] The values ​​of i and j are in the range of (1, hisSize), and the values ​​of k are in the range of (1, hisSize*hisSize).

[0020] The operation of finding the maximum value of a probability distribution can be expressed by the following formula:

[0021] RangeC i =max(RangeA1, RangeB1)+i×interval

[0022] in

[0023] The values ​​of i, j, and k are all in the range of (1, hisSize). The calculation method for the maximum Prob in the probability distribution is the same as the addition method for the probability distribution.

[0024] Let A be the probability distribution for comparing the execution time of the current resource allocation scheme with that of the optimal resource allocation scheme. Then, the probability distribution comparison operation can be expressed by the following formula:

[0025]

[0026] The GPU is used to calculate the four operations described in the above formula: monetary expense assessment, probability distribution addition, probability distribution maximization, and probability distribution comparison. In this process, the GPU should be used efficiently to maximize the performance improvement of the algorithm. Summary of the Invention

[0027] This invention provides a GPU-accelerated, high-efficiency workflow probability optimization method, comprising:

[0028] Construct a directed acyclic graph corresponding to the workflow, wherein the directed acyclic graph includes the probability distribution and operation order of each task in the workflow;

[0029] Generate a resource allocation scheme for the workflow based on the type of allocated resources and the tasks in the workflow, and evaluate the monetary cost of the resource allocation scheme.

[0030] The monetary cost of the evaluated resource allocation scheme is compared with the preset user monetary cost budget, and resource allocation schemes that are less than the user monetary cost budget are added to the feasible allocation scheme queue.

[0031] Calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, update the calculated execution time to the current optimal execution time.

[0032] Further, the step of generating a resource allocation scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and evaluating the monetary cost of the resource allocation scheme, includes:

[0033] Multiple resource configuration schemes are obtained by combining the number of tasks in the workflow and the type of allocated resources;

[0034] Kernel functions are written using the CUDA programming model, and the written kernel functions are merged using kernel function fusion techniques, as well as the monetary cost of each resource configuration scheme is calculated.

[0035] Furthermore, it also includes:

[0036] Determine if the queue of feasible configuration schemes is empty; if it is empty, terminate.

[0037] Further, the calculation of the execution time of the resource configuration scheme added to the feasible configuration scheme queue includes:

[0038] Sequentially execute the probability distribution operations corresponding to the tasks in the workflow;

[0039] The probability distribution operation is transformed into a kernel function, and the kernel functions are fused using function fusion technology;

[0040] By browsing the local resource configuration information, resource configuration schemes with the same probability distribution operation are identified, and the number of the local resource configuration corresponding to each probability distribution operation in the previous round of calculation is recorded.

[0041] Define the value of local resource configuration as the number of records, and use the number of records and operation numbers to cluster operations with the same probability distribution in different configuration schemes;

[0042] By utilizing a CPU-GPU collaborative approach, while the GPU is calculating the configuration scheme for the current round, a GPU sub-thread completes the CPU calculation operations for the configuration scheme of the next round, thus obtaining the execution time.

[0043] Furthermore, it also includes:

[0044] If the execution time of the resource configuration scheme is greater than or equal to the current optimal execution time, the resource configuration scheme will be removed.

[0045] A GPU-accelerated, high-efficiency workflow probability optimization device, comprising:

[0046] The acquisition module is used to construct a directed acyclic graph corresponding to the workflow, wherein the directed acyclic graph includes the probability distribution and operation order of each task in the workflow;

[0047] The acquisition module is used to generate a resource configuration scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and to evaluate the monetary cost of the resource configuration scheme.

[0048] The processing module is used to compare the monetary expenditure of the evaluated resource allocation scheme with the preset user monetary expenditure budget, and add the resource allocation scheme that is less than the user monetary expenditure budget to the feasible configuration scheme queue.

[0049] The execution module is used to calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and to determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, the calculated execution time is updated to the current optimal execution time.

[0050] Furthermore, the processing module includes:

[0051] The first acquisition submodule is used to combine the number of tasks in the workflow and the type of allocated resources to obtain multiple resource configuration schemes;

[0052] The first processing submodule is used to write kernel functions using the CUDA programming model, fuse the written kernel functions using kernel function fusion technology, and calculate the monetary cost of each of the resource configuration schemes.

[0053] Furthermore, it also includes:

[0054] The second processing submodule is used to determine whether the queue of feasible configuration schemes is empty. If it is empty, the process ends.

[0055] Furthermore, the execution module includes:

[0056] The third processing submodule is used to sequentially execute the probability distribution operations corresponding to the work tasks in the workflow.

[0057] The fourth processing submodule is used to convert the probability distribution operation into a kernel function and to fuse the kernel function using function fusion technology;

[0058] The first execution submodule is used to determine resource configuration schemes with the same probability distribution operations by browsing the local resource configuration information, and to record the number of the local resource configuration corresponding to each probability distribution operation in the previous round of calculation.

[0059] The second execution submodule is used to define the value of local resource configuration as the number of records, and use the number of records and operation numbers to cluster the same probability distribution operations in different configuration schemes;

[0060] The third execution submodule is used to utilize a CPU-GPU collaborative approach. While the GPU is calculating the configuration scheme for the current round, a GPU sub-thread completes the CPU calculation operation corresponding to the configuration scheme for the next round to obtain the execution time.

[0061] Furthermore, it also includes:

[0062] The fourth execution submodule is used to remove the resource configuration scheme when the execution time of the resource configuration scheme is greater than or equal to the current optimal execution time.

[0063] A computer device includes a memory and a processor, the memory storing computer-readable instructions that, when executed by the processor, cause the processor to perform steps of a GPU-accelerated, efficient workflow probabilistic optimization method.

[0064] A storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the GPU-accelerated efficient workflow probabilistic optimization method.

[0065] This invention proposes a GPU-accelerated, high-efficiency workflow probabilistic optimization algorithm. Addressing the challenges of large solution spaces and high computational overhead in workflow probabilistic optimization algorithms, this algorithm transforms probability distribution operations into parallel-compute GPU kernel functions. By calling these GPU kernel functions, performance is improved without compromising the algorithm's correctness. Key technologies include: writing corresponding GPU kernel functions based on the computational characteristics of probability distribution operations; using kernel function fusion to address the issues of low computational cost of individual kernel functions and high overhead from multiple kernel function launches, thus improving GPU utilization; reducing redundant computation of the same operation on the GPU by reusing identical probability distribution operations, increasing the proportion of effective GPU computation; and using CPU-GPU collaborative computing technology to overlap the computational overhead of the CPU and GPU, achieving efficient utilization of computing resources on heterogeneous platforms. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 The flowchart shows the GPU-accelerated high-efficiency workflow probability optimization method provided by the present invention.

[0068] Figure 2 This is a diagram of the efficient workflow structure for GPU acceleration provided by the present invention.

[0069] Figure 3 A schematic diagram of the configuration scheme corresponding to the GPU-accelerated high-efficiency workflow provided by the present invention.

[0070] Figure 4 This is a schematic diagram of the EstimateCost kernel function fusion process provided by the present invention.

[0071] Figure 5 This is a schematic diagram illustrating the operation of the same probability distribution in different configuration schemes provided by the present invention.

[0072] Figure 6 The flowchart provided by this invention illustrates the operation of reusing the same probability distribution.

[0073] Figure 7 A flowchart of CPU-GPU collaborative computing provided for this invention.

[0074] Figure 8 This is a basic structural block diagram of a container dispensing device provided in an embodiment of the present invention.

[0075] Figure 9 This is a basic structural block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0076] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0077] This invention provides a GPU-accelerated, high-efficiency workflow probability optimization method, comprising:

[0078] Step 1: Construct a directed acyclic graph (DAG) corresponding to the workflow, wherein the DAG includes the probability distribution and operation sequence of each task in the workflow;

[0079] Step 2: Generate a resource allocation scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and evaluate the monetary cost of the resource allocation scheme;

[0080] The embodiments of the present invention are applied to GPUs, such as... Figure 1 The diagram shows a flowchart of a GPU-accelerated, high-efficiency workflow probability optimization method. Figure 2 This is a diagram of the efficient workflow structure for GPU acceleration provided by the present invention. Figure 3 A schematic diagram of the configuration scheme corresponding to the GPU-accelerated high-efficiency workflow provided by the present invention.

[0081] In some embodiments, step two includes: combining the number of tasks in the workflow and the type of allocated resources to obtain multiple resource configuration schemes; writing kernel functions using the CUDA programming model, and fusing the written kernel functions using kernel function fusion technology; and calculating the monetary cost of each resource configuration scheme.

[0082] It should be noted that when combining resource configuration schemes, the GPU performs a global search, combines all tasks according to the type of allocated resources, and lists all the combined resource configuration schemes.

[0083] like Figure 2 and Figure 3 As shown in one embodiment of the present invention, a workflow has four tasks, numbered 0-3. There are two resource types on the cloud platform, numbered 0-1. The task connections in the workflow are as follows: task 0 and task 1 point to task 2, and task 2 points to task 3. A directed acyclic graph is constructed based on this information. The connections between workflows represent their execution order; for example, tasks 0 and 1 must be completed before task 2 can be executed. Therefore, the calculation order for the entire workflow execution time is as follows: calculate the maximum execution time of task 0 and task 1; add the maximum execution time to the execution time of task 2; add the result to the execution time of task 3 to obtain the final result.

[0084] There are two types of allocable resources, and the workflow contains four tasks. Sixteen resource configuration schemes are generated based on different combinations of tasks and resource types. The monetary expense calculation process is written into corresponding kernel functions using NVIDIA's CUDA (Compute Unified Device Architecture) programming model. Calling these kernel functions enables parallel computation of the monetary expense evaluation operation on the GPU. Considering that the computational load of a single monetary expense evaluation kernel function is relatively small and cannot fully utilize the computing power, kernel fusion is used to increase the computational workload of a single kernel function.

[0085] like Figure 4 The diagram illustrates the computation flow before and after kernel function fusion, assuming the granularity of kernel function fusion is 3 (i.e., the kernel functions corresponding to the EstimateCost operations of three adjacent configuration schemes are fused into one). After kernel function fusion, only one computation task needs to be submitted, and the utilization of GPU performance is higher during each computation than before fusion. Thus, after step two, each configuration scheme obtains its own monetary cost.

[0086] Step 3: Compare the monetary expenditure of the evaluated resource allocation plan with the preset user monetary expenditure budget, and add the resource allocation plan that is less than the user monetary expenditure budget to the feasible allocation plan queue.

[0087] The monetary expenditure is compared with the user-defined monetary expenditure budget (both values ​​are stored as floating-point numbers). If it is less than the budget, the configuration scheme meets the user's expectations and can be added to the feasible configuration scheme queue. If it does not meet the expectations, it will be discarded and the next step of calculation will not be scheduled. Assuming that configuration schemes 1 to 8 meet the user's expectations, they are added to the queue.

[0088] Step 4: Calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, update the calculated execution time to the current optimal execution time.

[0089] In this embodiment of the invention, calculating the execution time of resource configuration schemes added to the feasible configuration scheme queue includes: sequentially executing probability distribution operations corresponding to work tasks in the workflow; converting the probability distribution operations into kernel functions and fusing the kernel functions using function fusion technology; determining resource configuration schemes with the same probability distribution operations by browsing local resource configurations and recording the number of the local resource configuration corresponding to each probability distribution operation in the previous round of calculation; defining the value of the local resource configuration as the record number, and using the record number and operation number to cluster the same probability distribution operations in different configuration schemes; and using a CPU-GPU collaborative approach, when the GPU calculates the configuration scheme for the current round, the GPU sub-thread completes the CPU calculation operation corresponding to the configuration scheme for the next round to obtain the execution time.

[0090] After step three, all feasible configuration schemes were obtained. Next, the execution time for each scheme was calculated. The calculation process involves sequentially executing the probability distribution operations corresponding to the workflow. In this example, there is one Max operation and two Add operations. These three operations are converted into CUDA kernel functions, and kernel function fusion technology is used to increase the computational load of a single kernel function. Unlike the example in step two, the probability distribution operations in different configuration schemes may have the same type, either Max or Add, and the two input data are also the same. Since the input data values ​​are related to resource configuration, the same probability distribution operations are determined by observing the local resource configuration, such as... Figure 5 Assuming the number of kernel functions fused is 4, meaning one round of computation includes 4 configuration schemes, Figure 5 The top dashed box indicates that the resource configurations for tasks 0 and 1 are the same across the four configuration schemes, and the Max(0, 1) operation is also the same. The top-left dashed box indicates that the resource configurations for tasks 0, 1, and 2 are the same across configuration schemes 1 and 2, meaning the Add(Res1, 2) operation is also the same across configuration schemes 1 and 2. Similarly, the top-right dashed box indicates that the Add(Res1, 2) operation is the same across configuration schemes 3 and 4.

[0091] Record the local resource configuration corresponding to each probability distribution operation and its number in a round of computation. For example, the Max operation in configuration scheme 1 is the first probability distribution operation in this round of computation, with the number 1 and a local resource configuration of 00. The first Add operation in configuration scheme 1 is the fifth probability distribution operation in this round of computation, with the number 5 and a local resource configuration of 000. Define the value of the local resource configuration as the record number, and use the record number and operation number to cluster the same probability distribution operations in different configuration schemes, reducing the computation of duplicate operations in the GPU and improving the efficiency of GPU computation. Figure 6 The diagram shows a flowchart of reusing operations with the same probability distribution. The calculation queue stores the numbers of the probability distribution operations that need to be calculated, while the reuse result queue stores the numbers of the probability distribution operations that do not need to be calculated and only need to wait for the operations in the calculation queue to complete and reuse their results.

[0092] In this process, considering that the number of records corresponding to each operation in the calculation configuration scheme and the hash matching between the records, the CPU host-side operations will affect the continuous utilization of the GPU, a CPU-GPU collaborative approach is used. When the GPU is calculating the configuration scheme for the current round, the CPU sub-thread is used to complete the CPU calculation operations corresponding to the configuration scheme for the next round in advance.

[0093] like Figure 7 For the CPU-GPU collaborative computing process, assuming that the first round of configuration schemes includes configuration schemes 1 to 4, and the second round of configuration schemes includes configuration schemes 5 to 8, when we are performing GPU-side computation for the first round of configuration schemes, we can simultaneously start a CPU sub-thread to complete the CPU-side computation for the second round of configuration schemes.

[0094] After calculating the execution time for each configuration scheme, the execution time of each scheme is compared with the currently recorded optimal execution time. Initially, the optimal execution time is the execution time of the configuration scheme with the lowest monetary cost; in this example, it's the execution time of configuration scheme 1. Each comparison result is a floating-point number between 0 and 1. If the result is greater than 0.5, it means the current configuration scheme's execution time is greater than the optimal execution time; if it's less than 0.5, it means the current configuration scheme's execution time is less than the optimal execution time, and the optimal execution time is updated. Finally, after comparing the execution times of all eight configuration schemes, we select the configuration scheme with the optimal execution time and use it in subsequent workflow executions. Assume that the optimal configuration scheme under a given monetary budget is configuration scheme 8. Update the execution time of configuration scheme 8 to the current optimal execution time.

[0095] like Figure 1As shown, in some embodiments, the method further includes: determining whether the feasible configuration scheme queue is empty; if it is empty, the process ends. In some embodiments, the method further includes: removing the resource configuration scheme when its execution time is greater than or equal to the current optimal execution time.

[0096] This invention proposes a GPU-accelerated, high-efficiency workflow probabilistic optimization method. Addressing the challenges of large solution spaces and high computational overhead in workflow probabilistic optimization algorithms, this method transforms probability distribution operations into parallel-compute GPU kernel functions. By calling these GPU kernel functions, the algorithm's performance is improved without compromising its correctness. Key technologies include: writing corresponding GPU kernel functions based on the computational characteristics of probability distribution operations; using kernel function fusion to address the issues of low computational cost of individual kernel functions and high overhead from multiple kernel function launches, thus improving GPU utilization; reducing redundant computation of the same operation on the GPU by reusing identical probability distribution operations, increasing the proportion of effective GPU computation; and using CPU-GPU collaborative computing technology to overlap the computational overhead of the CPU and GPU, achieving efficient utilization of computing resources on heterogeneous platforms.

[0097] This invention provides a GPU-accelerated, high-efficiency workflow probability optimization device, such as... Figure 8 As shown, the acquisition module 2100 is used to construct a directed acyclic graph corresponding to the workflow, wherein the directed acyclic graph includes the probability distribution operation order of each task in the workflow; the acquisition module 2100 is used to generate a resource configuration scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and evaluate the monetary cost of the resource configuration scheme; the processing module 2200 is used to compare the monetary cost of the evaluated resource configuration scheme with the preset user monetary cost budget, and add the resource configuration schemes that are less than the user monetary cost budget to the feasible configuration scheme queue; the execution module 2300 is used to calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, the calculated execution time is updated to the current optimal execution time.

[0098] Furthermore, the processing module includes: a first acquisition submodule, used to combine the number of tasks in the workflow and the type of allocated resources to obtain multiple resource configuration schemes; and a first processing submodule, used to write kernel functions using the CUDA programming model, and to fuse the written kernel functions using kernel function fusion technology, as well as to calculate the monetary cost of each resource configuration scheme.

[0099] Furthermore, it also includes: a second processing submodule, used to determine whether the feasible configuration scheme queue is empty, and to terminate when it is empty.

[0100] Further, the execution module includes: a third processing submodule, used to sequentially execute probability distribution operations corresponding to work tasks in the workflow; a fourth processing submodule, used to convert the probability distribution operations into kernel functions and fuse the kernel functions using function fusion technology; a first execution submodule, used to determine resource configuration schemes with the same probability distribution operations by browsing local resource configurations and record the number of the local resource configuration corresponding to each probability distribution operation in the previous round of calculation; a second execution submodule, used to define the value of the local resource configuration as the record number and use the record number and operation number to cluster the same probability distribution operations in different configuration schemes; and a third execution submodule, used to utilize a CPU-GPU collaborative approach, where while the GPU calculates the configuration scheme for the current round, a GPU sub-thread completes the CPU calculation operation corresponding to the configuration scheme for the next round to obtain the execution time.

[0101] Furthermore, it also includes: a fourth execution submodule, used to remove the resource configuration scheme when the execution time of the resource configuration scheme is greater than or equal to the current optimal execution time.

[0102] This invention addresses the challenges of large solution spaces and high computational overhead in workflow probabilistic optimization algorithms by transforming probability distribution operations into parallel GPU kernel functions. By calling these GPU kernel functions, the performance of the algorithm is improved without compromising its correctness. Key technologies include: writing corresponding GPU kernel functions based on the computational characteristics of probability distribution operations; using kernel function fusion to address the issues of low computational cost of individual kernel functions and high overhead from multiple kernel function launches, thus improving GPU utilization; reducing redundant computation of the same operation on the GPU by reusing identical probability distribution operations, increasing the proportion of effective GPU computation; and using CPU-GPU collaborative computing technology to overlap the computational overhead of the CPU and GPU, achieving efficient utilization of computing resources on heterogeneous platforms.

[0103] This invention also provides a computer device. Please refer to the following for details. Figure 9 , Figure 9 This is a basic structural block diagram of the computer device in this embodiment.

[0104] like Figure 9 The diagram shows the internal structure of a computer device. Figure 9As shown, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When executed by the processor, the computer-readable instructions enable the processor to implement a GPU-accelerated, efficient workflow probabilistic optimization method. The processor provides computational and control capabilities, supporting the operation of the entire computer device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to execute a GPU-accelerated, efficient workflow probabilistic optimization method. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0105] In this embodiment, the processor is used to execute... Figure 8 The system acquires the specific contents of module 2100, processing module 2200, and execution module 2300. The memory stores the program code and various types of data required to execute these modules. A network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all sub-modules in the GPU-accelerated high-efficiency workflow probabilistic optimization method. The server can call the server's program code and data to execute the functions of all sub-modules.

[0106] The computer device provided in this invention addresses the characteristic of duplicate dependency packages in a large number of containers in a serverless computing platform. It divides the dependency packages in the containers into three layers: operating system, language, and runtime. For each function call, it finds a container with a shorter expected response time and utilizes existing idle containers for partial warm-starting. This achieves the goal of reducing the average function response time while satisfying the memory resource limitations of the container pool. The method also includes a container allocation algorithm that satisfies memory resource constraints, solving the container allocation problem with resource limitations. The generated container allocation scheme can meet the platform's resource constraints while achieving a shorter average function response time.

[0107] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the GPU-accelerated high-efficiency workflow probabilistic optimization method described in any of the above embodiments.

[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0109] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0110] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A GPU-accelerated, efficient workflow probabilistic optimization method, characterized in that, include: Construct a directed acyclic graph corresponding to the workflow, wherein the directed acyclic graph includes the probability distribution and operation order of each task in the workflow; Generate a resource allocation scheme for the workflow based on the type of allocated resources and the tasks in the workflow, and evaluate the monetary cost of the resource allocation scheme. The monetary cost of the evaluated resource allocation scheme is compared with the preset user monetary cost budget, and resource allocation schemes that are less than the user monetary cost budget are added to the feasible allocation scheme queue. Calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, update the calculated execution time to the current optimal execution time. The step of generating a resource allocation scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and evaluating the monetary cost of the resource allocation scheme, includes: Multiple resource configuration schemes are obtained by combining the number of tasks in the workflow and the type of allocated resources; Kernel functions are written using the CUDA programming model, and the written kernel functions are merged using kernel function fusion technology, as well as the monetary cost of each resource configuration scheme is calculated. The calculation of the execution time of the resource configuration scheme added to the feasible configuration scheme queue includes: Sequentially execute the probability distribution operations corresponding to the tasks in the workflow; The probability distribution operation is transformed into a kernel function, and the kernel functions are fused using function fusion technology; By browsing the local resource configuration information, resource configuration schemes with the same probability distribution operation are identified, and the number of the local resource configuration corresponding to each probability distribution operation in the previous round of calculation is recorded. Define the value of local resource configuration as the number of records, and use the number of records and operation numbers to cluster operations with the same probability distribution in different configuration schemes; By utilizing a CPU-GPU collaborative approach, while the GPU is calculating the configuration scheme for the current round, a GPU sub-thread completes the CPU calculation operations for the configuration scheme of the next round, thus obtaining the execution time.

2. The method of claim 1, wherein, Also includes: Determine if the queue of feasible configuration schemes is empty; if it is empty, terminate.

3. The method according to claim 1, characterized in that, Also includes: If the execution time of the resource configuration scheme is greater than or equal to the current optimal execution time, the resource configuration scheme will be removed.

4. An apparatus for a GPU-accelerated, high-efficiency workflow probabilistic optimization method based on any one of claims 1-3, characterized in that, include: The acquisition module is used to construct a directed acyclic graph corresponding to the workflow, wherein the directed acyclic graph includes the probability distribution and operation order of each task in the workflow; The acquisition module is used to generate a resource configuration scheme for the workflow according to the type of allocated resources and the tasks in the workflow, and to evaluate the monetary cost of the resource configuration scheme. The processing module is used to compare the monetary expenditure of the evaluated resource allocation scheme with the preset user monetary expenditure budget, and add the resource allocation scheme that is less than the user monetary expenditure budget to the feasible configuration scheme queue. The execution module is used to calculate the execution time of the resource configuration schemes added to the feasible configuration scheme queue, and to determine whether the execution time of each resource configuration scheme is less than the current optimal execution time. If it is less, the calculated execution time is updated to the current optimal execution time.

5. The apparatus according to claim 4, characterized in that, The processing module includes: The first acquisition submodule is used to combine the number of tasks in the workflow and the type of allocated resources to obtain multiple resource configuration schemes; The first processing submodule is used to write kernel functions using the CUDA programming model, fuse the written kernel functions using kernel function fusion technology, and calculate the monetary cost of each of the resource configuration schemes.

6. The apparatus according to claim 4, characterized in that, Also includes: The second processing submodule is used to determine whether the queue of feasible configuration schemes is empty. If it is empty, the process ends.

7. A computer device comprising a memory and a processor, the memory storing computer-readable instructions which, when executed by the processor, cause the processor to perform the steps of the GPU-accelerated efficient workflow probabilistic optimization method as claimed in any one of claims 1 to 3.

8. A storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the GPU-accelerated efficient workflow probabilistic optimization method as described in any one of claims 1 to 3.