Self-adaptive partition decision task scheduling method and system based on integrated computing architecture
By using an adaptive partitioning decision method to dynamically adjust the allocation of CPU and GPU tasks, the problem of load imbalance in heterogeneous systems is solved, achieving efficient load balancing and resource utilization, and improving the overall performance of CPU-GPU collaborative computing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-03-26
- Publication Date
- 2026-04-24
AI Technical Summary
In CPU-GPU heterogeneous systems, existing technologies struggle to dynamically adapt to changes in computing task characteristics, leading to unbalanced loads and impacting overall computing efficiency and resource utilization.
An adaptive partitioning decision method is adopted, and a closed-loop control system based on real-time performance feedback and historical load trends is used to dynamically adjust the task allocation between CPU and GPU. Load balancing optimization is performed using comprehensive scheduling metrics, and multi-feature weighted fusion is performed by combining oscillation exploration factor, convergence acceleration factor and load distribution factor. A binary search strategy is used to ensure convergence.
It achieves efficient load balancing of CPU-GPU heterogeneous systems, significantly improves overall computing performance and resource utilization, optimizes task allocation between CPU and GPU, and improves program execution efficiency.
Smart Images

Figure CN121918971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an adaptive partitioning decision-making task scheduling method and system based on an integrated computing architecture, belonging to the technical field of electronic information. Background Technology
[0002] With the ever-increasing demand for computing, especially from fields such as artificial intelligence, big data analytics, and high-end graphics processing, integrated computing architectures have rapidly developed, becoming the cornerstone of modern high-performance computing. Early integrated computing architectures primarily revolved around homogeneous architectures, but their simplistic architecture resulted in unsatisfactory efficiency and power consumption ratios when handling specific types of computing tasks. To further improve computing performance and energy efficiency, computing architectures began to evolve towards heterogeneous collaborative systems, with the CPU-GPU collaborative architecture being the most typical example. In this architecture, the CPU acts as the host, excelling at handling complex control logic and serial tasks; while the GPU acts as the device, excelling at handling large-scale parallel computing. The CPU and GPU each perform their respective functions, together forming a powerful and complementary integrated computing platform. A CPU-GPU architecture diagram is shown below. Figure 1 As shown.
[0003] The CPU-GPU architecture is essentially a heterogeneous parallel computing system with asymmetric functionality. It extends the traditional multiprocessor concept from "multiple CPUs" to "cooperation between different types of processors." However, while this heterogeneity brings enormous computing potential, it also introduces new technical challenges.
[0004] First, the programming model is complex. Developers need to manage two different memory spaces, CPU and GPU, simultaneously, and use specific programming languages (such as CUDA and OpenCL) to write GPU kernel functions, which greatly increases the difficulty of program development and optimization. Second, the system load is unbalanced. In traditional CPU-GPU collaborative computing, task scheduling strategies are often relatively static and simple. Due to the fundamental differences between CPUs and GPUs in terms of computing power, memory bandwidth, and architecture, a task that is theoretically evenly distributed can easily lead to one side (usually the GPU) completing computation prematurely and entering idle waiting, while the other side is still busy; or conversely, the GPU becomes a performance bottleneck due to excessive workload. This load imbalance problem severely restricts the overall computing efficiency of CPU-GPU heterogeneous systems, preventing their powerful theoretical computing power from being fully utilized.
[0005] During program optimization, conventional strategies typically involve identifying hot functions and migrating their parallel computation portions to the GPU for execution, thereby fully leveraging its large-scale data parallel processing capabilities. While this GPU-centric computational migration can significantly improve local computational efficiency, it introduces new performance bottlenecks at the system level. Due to the lack of dynamic adaptability in task allocation strategies, a load imbalance often occurs, resulting in excessive GPU load while CPU resources remain idle. Specifically, static task allocation strategies struggle to adapt to dynamically changing computational characteristics, leading to a load mismatch between the CPU and GPU. Furthermore, the lack of sufficient consideration for the differences between heterogeneous processors and the failure to establish effective real-time load assessment and dynamic adjustment mechanisms not only prevent the effective utilization of the CPU's computational potential but also become a key factor restricting overall system performance improvement. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention proposes an innovative CPU-GPU adaptive task scheduling method.
[0007] First, to address the issue of CPU data allocation, an adaptive partitioning decision-making method is designed. The core idea of this method is to dynamically adjust the task allocation ratio between the CPU and GPU through an adaptive closed-loop control system based on real-time performance feedback and historical load trends. The core algorithm involves dynamic decision-making and load adjustment, based on a comprehensive scheduling metric composed of two weighted components: real-time performance difference and historical load trends. Based on a comparison of the metric with a threshold, the algorithm employs multiple adjustment strategies: when approaching equilibrium, the number of CPU task blocks is fine-tuned by increasing or decreasing by one; when significantly unbalanced, a proportional adjustment of 20% of the current load ratio is made based on the direction and severity of the imbalance. If the adjustment is ineffective, a revert to a bisection search strategy is used to ensure convergence. Ultimately, the new CPU load is constrained within the search interval and used for the next round of computation. Next, the relative error between CPU and GPU execution times is calculated. If the error is less than or equal to a threshold, the system is considered to have achieved load balance; otherwise, the search interval is updated based on the current performance feedback, rapidly narrowing the search space and accelerating the convergence process. This iterative process continues until equilibrium is reached or the maximum number of iterations is reached. In summary, the adaptive task scheduling method transforms a static, predictive task allocation problem into a dynamic, measured, online optimization problem through a closed-loop control logic of "measurement-decision-adjustment-remeasurement".
[0008] This invention also proposes an adaptive partitioning decision task scheduling system based on an integrated computing architecture.
[0009] The technical solution of this invention is as follows: An adaptive partitioning decision task scheduling method based on an integrated computing architecture includes: Step 1: Use adaptive partitioning decision to rationally allocate CPU data volume; this refers to: achieving adaptive optimal allocation of workload in a CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis, and intelligent feedback adjustment. Step 2: Perform CPU-GPU task scheduling.
[0010] According to a preferred embodiment of the present invention, the specific implementation process of step 1 includes: Step 1.1: Multi-source information fusion and feature extraction; By combining dynamic parameters and historical data, a comprehensive measurement calculation is performed to complete the weighted fusion of multiple features; Step 1.2: Divide the system into three distinct decision regions based on the comprehensive scheduling metrics, and adopt a different load adjustment strategy for each region; Step 1.3: After steps 1.1 and 1.2, the number of CPU task blocks is calculated. If the calculated value does not change, it automatically reverts to the classic binary search strategy, and the allocation result is always within the valid search interval through double boundary constraints.
[0011] In a further preferred embodiment, step 1.1 combines dynamic parameters and historical data to perform comprehensive measurement calculations, completing multi-feature weighted fusion; including: Step 1.1.1: Adaptive adjustment of dynamic parameters; An oscillation exploration factor α, a convergence acceleration factor β, and a load distribution factor γ are introduced for adjustment. k represents the current iteration number, and α is periodically fine-tuned using a sine function, allowing α to vary periodically between 0.35 and 0.55. The corresponding formula is expressed as: ; in, That is, the oscillation exploration factor α; β is an exponentially saturated convergence accelerator, initially converging rapidly and then stabilizing and refining, increasing from 0.9 to 1.2; the corresponding formula is expressed as: ; Wherein, β(k) is the convergence acceleration factor β; γ is a distribution factor based on the current CPU load ratio; the heavier the load, the greater the impact. It enables load-aware weight adjustment, and the corresponding formula is expressed as: ; in, That is, the load distribution factor γ, b(k)=B_cpu(k) / N_bl, where B_cpu refers to the number of blocks allocated to the CPU, N_bl refers to the total number of blocks, and N≥1; Step 1.1.2: Recursively update historical status, i.e., historical data; A historical state (historical_state) is introduced, and an exponentially weighted moving average is used to track the historical load distribution. The initial iteration is set to a balance state of 0.5. Subsequently, the historical influence is balanced with the current state according to weights of 0.7 and 0.3. The corresponding formula is expressed as: ; Where η(k) represents the k-th round value of the historical state, and η(k-1) represents the (k-1)-th round value of the historical state; Step 1.1.3: Synthesize a comprehensive metric; Let m be the value of the comprehensive metric, and the corresponding formula is expressed as: ; in, That is, m, T_c, and T_g are the CPU and GPU time used in the kth round, and ε is 1.0×10^(-10).
[0012] Further preferably, in step 1.2, the system is divided into three distinct decision regions based on the comprehensive scheduling metric, with each region employing a different load adjustment strategy; including: When the absolute value of the comprehensive metric is less than or equal to the threshold, the system enters fine-tuning mode. Specifically, in the task allocation problem, the CPU task quantity B_cpu is a discrete integer variable representing the number of thread blocks. In the integer field, 1 is the smallest non-zero change. A unit adjustment amount is used to optimize task partitioning. The adjustment direction is determined based on the real-time performance difference. If the CPU's computation time is greater than the GPU's computation time, the CPU's data quantity is reduced, i.e., B_cpu is decreased by 1. Otherwise, B_cpu is increased by 1. When the overall metric value exceeds the threshold, a portion of the computational load is migrated from the CPU to the GPU, reduced by 0.2 × m of the current CPU data volume. This ensures that the adjusted CPU workload B_cpu is a valid integer value. The adjusted CPU workload B_cpu is expressed as: ; Here, B_cpu(k+1) refers to the adjusted CPU data amount, which is used to allocate CPU and GPU data in the next round; low refers to the lower bound, which is used for boundary protection; round() means rounding the floating-point number to the nearest integer. When the overall metric value is less than a negative threshold, a portion of the computational load is migrated from the GPU to the CPU, increasing by 0.2 × |m| of the remaining allocated space. This ensures that the adjusted B_cpu is a valid integer value, with the upper bound set to high, which is the minimum of N_bl and N_bl / 10. The adjusted CPU data volume, i.e., the adjusted CPU workload B_cpu, is expressed as: ; More preferably, the threshold is 10%.
[0013] A further preferred embodiment of step 1.3 includes the following specific implementation process: After calculating the number of CPU task blocks, B_cpu, in steps 1.1 and 1.2, if the CPU task load remains unchanged before and after the adjustment, a binary search is performed. At this point, the CPU task load is (low + high) / 2. Double boundary constraints ensure that the allocation result always lies within the valid search interval. The double boundary constraints are expressed as follows: ; According to a preferred embodiment of the present invention, CPU-GPU task scheduling is performed, including: First, determine a reasonable division of computing tasks between the CPU and GPU. When the program is executed for the first time, initialization is performed first, and the specific process is as follows: Let `chunk_size` represent the size of each data block, and `total_size` represent the size of the input data. Then, the maximum number of data blocks for the task is: ; Initially, based on experience, 1% of the blocks are allocated to the CPU. Then, a search interval [low, high] is set, where low=1 and high=min(N_bl, N_bl / 10), ensuring that the CPU handles at most approximately 10% of the total blocks. Therefore, the initial number of blocks for the CPU is: ; Let the initial number of data blocks allocated to the CPU be B_cpu, and take the smaller value between B_cpu_initial and high. Let the number of data blocks allocated to the GPU be B_gpu, and the number of data blocks allocated to the CPU be... They are represented as follows: ; ; Let the time spent by the CPU and GPU in computation be T_c and T_g, respectively, and the relative imbalance δ be expressed as: ; Let the maximum number of iterations be `max_iter`. Binary search has a time complexity of O(logn), while adaptive search converges faster. Therefore, `max_iter` equals ⌈log2(N_bl)⌉. Then, the task scheduler, based on the data blocks allocated to the CPU, enters the iteration process, calculates the execution time of each task, and calculates the relative imbalance δ. If the value of δ is greater than 0.1, it indicates that the current task allocation has a load imbalance. At this point, the scheduler enters the adaptive partitioning decision to adjust the number of task blocks per CPU. If the metric is not greater than 10%, `B_cpu_new` is assigned the value `B_cpu`. Exit the loop directly; otherwise, after obtaining B_cpu_new, update the binary search interval according to the relative size of T_c and T_g. If low > high, end the loop early with the current solution; otherwise, assign B_cpu_new to B_cpu and enter the next iteration. The entire process involves a maximum of max_iter iterations. If the value of δ is not greater than 0.1 in a certain iteration, the load balancing condition is considered to be met, and the current B_cpu, B_gpu, and times T_c and T_g are used as the optimal solution output. If the error threshold is not reached after the iteration ends, the B_cpu, B_gpu, and the measured T_c and T_g from the last iteration are used as the approximate optimal solution.
[0014] An automated interface SLBO is provided to implement the aforementioned adaptive partitioning decision task scheduling method based on an integrated computing architecture.
[0015] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described adaptive partitioning decision task scheduling method based on an integrated computing architecture.
[0016] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described adaptive partitioning decision task scheduling method based on an integrated computing architecture.
[0017] An adaptive partitioning decision-making task scheduling system based on an integrated computing architecture includes: The adaptive partitioning module is configured to: rationally allocate CPU data volume using adaptive partitioning decisions; that is: to achieve adaptive optimal allocation of workload in CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis and intelligent feedback adjustment. The CPU-GPU task scheduling module is configured to perform CPU-GPU task scheduling.
[0018] The beneficial effects of this invention are as follows: This invention presents a method for addressing task load imbalance in integrated computing architectures. This method optimizes workload distribution in heterogeneous processor environments (e.g., CPUs and GPUs). Through adaptive task mapping and scheduling strategies, it effectively bridges the architectural and performance differences between different processing units, thereby achieving efficient load balancing at the system level and ultimately significantly improving overall computing performance and resource utilization. Attached Figure Description
[0019] Figure 1 This is a diagram of the CPU-GPU architecture. Figure 2 A flowchart illustrating the adaptive partitioning decision-making method; Figure 3 This is a flowchart illustrating the task scheduling process. Detailed Implementation
[0020] The present invention will be further defined below with reference to the accompanying drawings and embodiments, but is not limited thereto.
[0021] Example 1 In integrated computing architectures, relying solely on traditional strategies that delegate all large-scale computing tasks to GPUs while the CPU only handles auxiliary functions like task scheduling and data forwarding often fails to fully leverage the overall synergistic advantages of the system. In this model, CPU computing resources are prone to idleness, and significant imbalances in computing load can occur between different processors. This invention addresses this issue by optimizing the system, effectively improving program execution efficiency. Furthermore, this invention includes an automated interface, SLBO (Solve Load Balancing Optimization), for convenient direct invocation by programmers.
[0022] An adaptive partitioning decision task scheduling method based on an integrated computing architecture includes: Step 1: Adaptive partitioning decision to rationally allocate CPU data volume; refers to: in order to solve the problem of load imbalance caused by unreasonable allocation of CPU and GPU data volume, an adaptive partitioning decision method is designed to achieve adaptive optimal allocation of workload in CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis and intelligent feedback adjustment. Step 2: Perform CPU-GPU task scheduling.
[0023] Example 2 The adaptive partitioning decision task scheduling method based on an integrated computing architecture described in Example 1 differs in that: The specific implementation process of step 1 includes: Step 1.1: Multi-source information fusion and feature extraction; By combining dynamic parameters and historical data, a comprehensive measurement calculation is performed to complete the weighted fusion of multiple features; Step 1.2: Divide the system into three distinct decision regions based on the comprehensive scheduling metrics, and adopt a different load adjustment strategy for each region; Step 1.3: After calculating the number of CPU task blocks in Steps 1.1 and 1.2, if the calculated value does not change, automatically revert to the classic binary search strategy to prevent the adjustment from being ineffective. The mathematically reliable convergence property of binary search ensures the algorithm's progress, and the double boundary constraints ensure that the allocation result is always within the effective search interval.
[0024] In step 1.1, dynamic parameters and historical data are combined to perform comprehensive measurement calculations, completing multi-feature weighted fusion; including: Step 1.1.1: Adaptive adjustment of dynamic parameters; An oscillation exploration factor α, a convergence acceleration factor β, and a load distribution factor γ are introduced for adjustment. k represents the current iteration number, and α is periodically fine-tuned using a sine function, allowing α to vary periodically between 0.35 and 0.55. This avoids getting trapped in local optima and introduces slight oscillations during iteration, helping to explore a better solution space. The corresponding formula is as follows: ; in, That is, the oscillation exploration factor α; β is an exponentially saturated convergence accelerator, resulting in rapid initial convergence followed by a more refined and stable convergence later on, increasing from 0.9 to 1.2; balancing convergence speed and stability, the corresponding formula is expressed as: ; Wherein, β(k) is the convergence acceleration factor β; γ is a distribution factor based on the current CPU load ratio; the heavier the load, the greater the impact. It enables load-aware weight adjustment, and the corresponding formula is expressed as: ; in, That is, the load distribution factor γ, b(k)=B_cpu(k) / N_bl, where B_cpu refers to the number of blocks allocated to the CPU, N_bl refers to the total number of blocks, and N≥1; Step 1.1.2: Recursively update historical status, i.e., historical data; A historical state (historical_state) is introduced, and an exponentially weighted moving average (EWMA) is used to track the history of load distribution. The initial iteration is set to a balance state of 0.5. Subsequently, the historical influence is balanced with the current state according to weights of 0.7 and 0.3 to avoid drastic oscillations in the distribution strategy, improve system stability, and correct the current decision based on historical trends to achieve incremental optimization. The corresponding formula is expressed as follows: ; Where η(k) represents the k-th round value of the historical state, and η(k-1) represents the (k-1)-th round value of the historical state; Step 1.1.3: Synthesize a comprehensive metric; Let m be the metric value of the comprehensive metric. It combines real-time performance deviation and historical trend correction, and is essentially an intelligent heuristic function. It transforms human scheduling experience into a computable optimization objective through mathematical modeling, realizing intelligent decision-making based on multi-source information in complex heterogeneous computing environments. The corresponding formula is expressed as: ; in, That is, m, T_c, and T_g are the CPU and GPU time used in the k-th round, and ε is 1.0 × 10^(-10). This is used to avoid the denominator being 0.
[0025] In step 1.2, the system is divided into three distinct decision regions based on the comprehensive scheduling metrics, with each region employing a different load adjustment strategy; including: Convergence Region - Fine-tuning Mode: When the absolute value of the comprehensive metric is less than or equal to the threshold, the system enters fine-tuning mode. This indicates that the system has reached a near-load-balanced state. To avoid unnecessary oscillations near the optimal solution, anti-stagnation fine-tuning is required. Specifically, in the task allocation problem, the CPU task quantity B_cpu is a discrete integer variable representing the number of thread blocks. In the integer domain, 1 is the smallest non-zero change. A unit adjustment is used to optimize task partitioning with a finer step size, ensuring stable convergence of the scheduling algorithm and providing reliable computational results. Even at the search space boundary, unit adjustment is safe. The adjustment direction is determined based on real-time performance differences. If the CPU's computation time is greater than the GPU's, the CPU's data quantity is reduced (B_cpu - 1); otherwise, B_cpu is increased by 1. The computation time of the CPU and GPU is obtained by calling the `system_clock` function in the program. A start variable, an end variable, and a final time variable are defined. `system_clock` is called at the beginning and end of the CPU and GPU code, respectively. At the end, the final computation time is obtained by subtracting the start time from the end time.
[0026] CPU overload zone - aggressive load reduction mode; When the comprehensive metric value exceeds the threshold, it indicates that the system is in an unbalanced state. At this time, the CPU execution time significantly exceeds the GPU execution time, indicating that the CPU computing resources are saturated and the GPU resources are relatively idle. It is necessary to migrate some of the computing load from the CPU to the GPU, reducing it by 0.2 × m of the current CPU data volume. This ensures that the adjusted CPU workload B_cpu is a valid integer value obtained through rounding, and also requires boundary protection, with the lower bound set to low (1). The adjusted CPU workload B_cpu is expressed as: ; Here, B_cpu(k+1) refers to the adjusted CPU data amount, which is used to allocate CPU and GPU data in the next round; low refers to the lower bound, which is used for boundary protection; round() means rounding the floating-point number to the nearest integer. GPU overload area - progressive loading mode; When the overall metric value is less than the negative threshold, it indicates that the system is in an unbalanced state. At this time, the GPU execution time significantly exceeds the CPU execution time, indicating that the GPU computing resources are saturated and the CPU resources are relatively idle. It is necessary to migrate some computing load from the GPU to the CPU, increasing it by 0.2 × |m| of the remaining allocated space. This ensures that the adjusted B_cpu is a valid integer value, obtained through rounding, and also requires boundary protection. The upper bound is set to high, which is the minimum of N_bl and N_bl / 10. The adjusted CPU data volume, i.e., the adjusted CPU task volume B_cpu, is expressed as: ; The threshold is 10%. In the field of load balancing, a 10% performance difference is generally considered an acceptable balance, so 10% is chosen as the threshold. When the load is unbalanced, the amount of data is adjusted by a ratio of 0.2×m. 10% matches the sensitivity coefficient of 0.2, resulting in a mild adjustment of 2% at the threshold boundary, ensuring a smooth transition from aggressive to fine-tuning. At the same time, when testing the code, it was found that when the difference is less than 10%, the benefits of further optimization are significantly reduced.
[0027] The specific implementation process of step 1.3 includes: After calculating the number of CPU task blocks, B_cpu, in steps 1.1 and 1.2, if the CPU task load remains unchanged before and after the adjustment, a binary search is performed. At this point, the CPU task load is (low + high) / 2. To prevent the adjustment from being ineffective, the mathematically reliable convergence property of binary search is used to ensure the algorithm's progress. Double boundary constraints are used to ensure that the allocation result always remains within the valid search interval. The double boundary constraints are expressed as follows: ; In summary, this adaptive partitioning decision-making mechanism utilizes a strategy combining dynamic metrics and binary search. Through real-time feedback and intelligent adjustment, it achieves efficient and stable load balancing in complex heterogeneous computing environments. To better illustrate this process, let the amount of CPU data obtained through adaptive partitioning calculation be B_cpu_new, the metric be 'metric', and the threshold be 10%. The process is as follows: Figure 2 As shown.
[0028] Figure 2 The flowchart illustrates an adaptive partitioning decision-making process that dynamically adjusts system parameters (B_cpu). This adaptive partitioning combines three strategies: fine-tuning, scaling, and binary search. First, the dynamic coefficients α, β, and γ are calculated. Then, a comprehensive metric is obtained by combining this metric with the historical state. Finally, adaptive partitioning is performed by comparing the metric with the 10% threshold.
[0029] Fine-tuning: If the metric is not greater than 10%, it means that the system is close to a balanced state. Fine-tune the amount of data for the CPU based on the computing time of the CPU and GPU to avoid drastic fluctuations. If T_c > T_g, B_cpu_new = B_cpu - 1; otherwise, B_cpu_new = B_cpu + 1. Then, assign the adjusted B_cpu_new to B_cpu for output.
[0030] Scaling adjustment: If the metric is greater than 10%, it indicates that the CPU load is too heavy. The amount of CPU data is changed according to B_cpu - round(0.2 * B_cpu * metric) to obtain B_cpu_new. The max function is used to ensure that the result is not lower than the lower limit low. If the metric is less than negative 10%, it indicates that the GPU load is too heavy. The amount of CPU data is changed according to B_cpu + round(0.2 * (high - B_cpu) * |metric|) to obtain B_cpu_new. The min function is used to ensure that the result does not exceed the upper limit high. Binary search: Check if B_cpu_new obtained by proportional adjustment is equal to B_cpu. If they are equal, it means that proportional adjustment has no effect, and only the classic binary search method can be used to solve the load imbalance problem. In this case, B_cpu_new = (low + high) / 2 and output it. If they are not equal, just output B_cpu_new directly.
[0031] Perform CPU-GPU task scheduling; including: When executing program code, the appropriate division of computing tasks between the CPU and GPU is determined first. Initialization is performed upon the first execution of the program, as shown in the following process: Let `chunk_size` represent the size of each data block, and `total_size` represent the size of the input data. Then, the maximum number of data blocks for the task is: ; Initially, based on experience, 1% of the blocks are allocated to the CPU. Then, a search interval [low, high] is set, where low=1 and high=min(N_bl, N_bl / 10), ensuring that the CPU handles at most approximately 10% of the total blocks. Therefore, the initial number of blocks for the CPU is: ; Let the initial number of data blocks allocated to the CPU be B_cpu. Taking the smaller value between B_cpu_initial and high is equivalent to giving the CPU a conservatively small starting point within a reasonable range, leaving sufficient room for subsequent adaptive adjustments. The number of data blocks allocated to the GPU is B_gpu, and the number of data blocks allocated to the CPU is... They are represented as follows: ; ; Let the time spent by the CPU and GPU in computation be T_c and T_g, respectively, and the relative imbalance δ ( >0) represents the degree of load unevenness in the system; the smaller the δ, the smaller the load unevenness. δ can be expressed as: ;
[0032] Let the maximum number of iterations be `max_iter`. Binary search has a time complexity of O(logn), while adaptive search converges faster. Therefore, `max_iter` equals ⌈log2(N_bl)⌉. The task scheduler then iterates based on the data blocks allocated to the CPU, calculating the execution time of each task and the relative imbalance δ. Typically, load balancing is achieved when the load difference between the CPU and GPU does not exceed 10%. If δ is greater than 0.1, it indicates a load imbalance in the current task allocation, and the scheduler enters an adaptive partitioning decision to adjust the number of task blocks on the CPU. If the metric is less than 10%, `B_cpu_new` is assigned the value `B_cpu`, and the loop exits directly. Otherwise...
[0033] After obtaining B_cpu_new, update the binary search interval according to the relative size of T_c and T_g. If low > high, it means that the interval has been compressed to an illegal state, and it is considered that continuing the binary search is meaningless. The search ends early with the current solution. Otherwise, assign B_cpu_new to B_cpu and enter the next iteration. The entire process involves a maximum of `max_iter` iterations. If the value of δ is not greater than 0.1 in any iteration, the load balancing condition is considered met, and the current B_cpu, B_gpu, and times T_c and T_g are output as the optimal solution. If the error threshold is not reached by the end of the iteration, the B_cpu, B_gpu, and measured T_c and T_g from the last iteration are used as the approximate optimal solution. The task scheduling process is as follows: Figure 3 As shown.
[0034] Through the implementation of the above method, the invention tested the method in a CPU-GPU heterogeneous system based on the computing environment of NVIDIA A100 GPU.
[0035] This test takes the hot spot function part of the GYCAVA guidance center orbit program as an example. Under the same parameter conditions, the CPU serial program, the GPU ordinary optimized program, and the optimized program of this invention are tested for time when the number of particles is 2712969, 5382875, 10765750 and 21708288, respectively.
[0036] This experiment compares the time and speedup of using only the CPU serial program, only the GPU optimized program, and the invented optimized program. The experimental results demonstrate that the method of this invention has a significant speedup effect compared to the CPU serial method and the GPU optimized method.
[0037] Table 1 shows the runtime, speedup, and improvement of the invented method compared to the GPU-only method before and after optimization for different data volumes. Table 1. Time comparison between different data volumes (unit: ms); Example 3 An automated interface, SLBO (Solve Load Balancing Optimization), is provided to implement the adaptive partitioning decision-making task scheduling method based on an integrated computing architecture as described in Embodiment 1 or 2. The SLBO interface aims to address the load imbalance problem between the CPU and GPU on an integrated computing architecture. Implementing the SLBO interface reduces programming complexity, allowing programmers to directly call this interface to solve the problem. Interface descriptions are shown in Table 2.
[0038] Table 2 Interface Description; The following demonstrates an example of calling the SLBO interface from the host side using C language: / / Call the SLBO interface on the host side (CPU) #include “SLBO.h” int main() { / / Define the required variables / / Initialize the interface SLBO_Init(); / / Calculation begins / / Hot spots in the program / / Calculation complete / / Call the interface SLBO_Scheduling_Metric(k, alpha, beta, gamma, historical_state,metric); SLBO_LOAD_BALANCE(total_size, chunk_size, cpu_ratio); / / End of interface SLBO_Finalize(); return 0; } Example 4 A computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the adaptive partitioning decision task scheduling method based on an integrated computing architecture as described in Embodiment 1 or 2.
[0039] Example 5 A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the adaptive partitioning decision task scheduling method based on an integrated computing architecture as described in Embodiment 1 or 2.
[0040] Example 6 An adaptive partitioning decision-making task scheduling system based on an integrated computing architecture includes: The adaptive partitioning module is configured to: rationally allocate CPU data volume using adaptive partitioning decisions; that is: in order to solve the problem of load imbalance caused by unreasonable allocation of CPU and GPU data volume, an adaptive partitioning decision method is designed to achieve adaptive optimal allocation of workload in CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis and intelligent feedback adjustment. The CPU-GPU task scheduling module is configured to perform CPU-GPU task scheduling.
Claims
1. An adaptive partitioning decision-making task scheduling method based on an integrated computing architecture, characterized in that, include: Step 1: Use adaptive partitioning decision to rationally allocate CPU data volume; including: achieving adaptive optimal allocation of workload in CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis and intelligent feedback adjustment; Step 2: Perform CPU-GPU task scheduling; The specific implementation process of step 1 includes: Step 1.1: Multi-source information fusion and feature extraction; By combining dynamic parameters and historical data, a comprehensive measurement calculation is performed to complete the weighted fusion of multiple features; Step 1.2: Divide the system into three distinct decision regions based on the comprehensive scheduling metrics, and adopt a different load adjustment strategy for each region; Step 1.3: After steps 1.1 and 1.2, the number of CPU task blocks is calculated. If the calculated value does not change, it automatically reverts to the classic binary search strategy, and the allocation result is always within the valid search interval through double boundary constraints.
2. The adaptive partitioning decision task scheduling method based on an integrated computing architecture according to claim 1, characterized in that, In step 1.1, dynamic parameters and historical data are combined to perform comprehensive measurement calculations, completing multi-feature weighted fusion; including: Step 1.1.1: Adaptive adjustment of dynamic parameters; An oscillation exploration factor α, a convergence acceleration factor β, and a load distribution factor γ are introduced for adjustment. k represents the current iteration number, and α is periodically fine-tuned using a sine function, allowing α to vary periodically between 0.35 and 0.
55. The corresponding formula is expressed as: ; in, That is, the oscillation exploration factor α; β is an exponentially saturated convergence accelerator, initially converging rapidly and then stabilizing and refining, increasing from 0.9 to 1.2; the corresponding formula is expressed as: ; Wherein, β(k) is the convergence acceleration factor β; γ is a distribution factor based on the current CPU load ratio; the heavier the load, the greater the impact. It enables load-aware weight adjustment, and the corresponding formula is expressed as: ; in, That is, the load distribution factor γ, b(k)=B_cpu(k) / N_bl, where B_cpu refers to the number of blocks allocated to the CPU, N_bl refers to the total number of blocks, and N≥1; Step 1.1.2: Recursively update historical status, i.e., historical data; A historical state (historical_state) is introduced, and an exponentially weighted moving average is used to track the historical load distribution. The initial iteration is set to a balance state of 0.
5. Subsequently, the historical influence is balanced with the current state according to weights of 0.7 and 0.
3. The corresponding formula is expressed as: ; Where η(k) represents the k-th round value of the historical state, and η(k-1) represents the (k-1)-th round value of the historical state; Step 1.1.3: Synthesize a comprehensive metric; Let m be the value of the comprehensive metric, and the corresponding formula is expressed as: ; in, That is, m, T_c, and T_g are the CPU and GPU time used in the kth round, and ε is 1.0×10^(-10).
3. The adaptive partitioning decision task scheduling method based on an integrated computing architecture according to claim 2, characterized in that, In step 1.2, the system is divided into three distinct decision regions based on the comprehensive scheduling metrics, with each region employing a different load adjustment strategy; including: When the absolute value of the comprehensive metric is less than or equal to the threshold, the system enters fine-tuning mode. Specifically, in the task allocation problem, the CPU task quantity B_cpu is a discrete integer variable representing the number of thread blocks. In the integer field, 1 is the smallest non-zero change. A unit adjustment amount is used to optimize task partitioning. The adjustment direction is determined based on the real-time performance difference. If the CPU's computation time is greater than the GPU's computation time, the CPU's data quantity is reduced, i.e., B_cpu is decreased by 1. Otherwise, B_cpu is increased by 1. When the overall metric value exceeds the threshold, a portion of the computational load is migrated from the CPU to the GPU, reduced by 0.2 × m of the current CPU data volume. This ensures that the adjusted CPU workload B_cpu is a valid integer value. The adjusted CPU workload B_cpu is expressed as: ; Here, B_cpu(k+1) refers to the adjusted CPU data amount, which is used to allocate CPU and GPU data in the next round; low refers to the lower bound, which is used for boundary protection; round() means rounding the floating-point number to the nearest integer. When the overall metric value is less than a negative threshold, a portion of the computational load is migrated from the GPU to the CPU, increasing by 0.2 × |m| of the remaining allocated space. This ensures that the adjusted B_cpu is a valid integer value, with the upper bound set to high, which is the minimum of N_bl and N_bl / 10. The adjusted CPU data volume, i.e., the adjusted CPU workload B_cpu, is expressed as: ; The threshold is 10%.
4. The adaptive partitioning decision task scheduling method based on an integrated computing architecture according to claim 2, characterized in that, The specific implementation process of step 1.3 includes: After calculating the number of CPU task blocks, B_cpu, in steps 1.1 and 1.2, if the CPU task load remains unchanged before and after the adjustment, a binary search is performed. At this point, the CPU task load is (low + high) / 2. Double boundary constraints ensure that the allocation result always lies within the valid search interval. The double boundary constraints are expressed as follows: 。 5. The adaptive partitioning decision task scheduling method based on an integrated computing architecture according to any one of claims 1-4, characterized in that, Perform CPU-GPU task scheduling; including: First, determine a reasonable division of computing tasks between the CPU and GPU. When the program is executed for the first time, initialization is performed first, and the specific process is as follows: Let `chunk_size` represent the size of each data block, and `total_size` represent the size of the input data. Then, the maximum number of data blocks for the task is: ; Initially, based on experience, 1% of the blocks are allocated to the CPU. Then, a search interval [low, high] is set, where low=1 and high=min(N_bl, N_bl / 10), ensuring that the CPU handles at most approximately 10% of the total blocks. Therefore, the initial number of blocks for the CPU is: ; Let the initial number of data blocks allocated to the CPU be B_cpu, and take the smaller value between B_cpu_initial and high. Let the number of data blocks allocated to the GPU be B_gpu, and the number of data blocks allocated to the CPU be... They are represented as follows: ; ; Let the time spent by the CPU and GPU in computation be T_c and T_g, respectively, and the relative imbalance δ be expressed as: ; Let the maximum number of iterations be `max_iter`. Binary search has a time complexity of O(logn), while adaptive search converges faster. Therefore, `max_iter` equals ⌈log2(N_bl)⌉. Then, the task scheduler, based on the data blocks allocated to the CPU, enters the iteration process, calculates the execution time of each task, and calculates the relative imbalance δ. If the value of δ is greater than 0.1, it indicates that the current task allocation has a load imbalance. At this point, the scheduler enters the adaptive partitioning decision to adjust the number of task blocks per CPU. If the metric is not greater than 10%, `B_cpu_new` is assigned the value `B_cpu`. Exit the loop directly; otherwise, after obtaining B_cpu_new, update the binary search interval according to the relative size of T_c and T_g. If low > high, end the loop early with the current solution; otherwise, assign B_cpu_new to B_cpu and enter the next iteration. The entire process involves a maximum of max_iter iterations. If the value of δ is not greater than 0.1 in a certain iteration, the load balancing condition is considered to be met, and the current B_cpu, B_gpu, and times T_c and T_g are used as the optimal solution output. If the error threshold is not reached after the iteration ends, the B_cpu, B_gpu, and the measured T_c and T_g from the last iteration are used as the approximate optimal solution.
6. An adaptive partitioning decision-making task scheduling system based on an integrated computing architecture, characterized in that, include: The adaptive partitioning module is configured to: rationally allocate CPU data volume using adaptive partitioning decisions; including: achieving adaptive optimal workload allocation in a CPU-GPU heterogeneous computing architecture through real-time system status monitoring, historical trend analysis, and intelligent feedback adjustment; the specific implementation process includes: Step 1.1: Multi-source information fusion and feature extraction; By combining dynamic parameters and historical data, a comprehensive measurement calculation is performed to complete the weighted fusion of multiple features; Step 1.2: Divide the system into three distinct decision regions based on the comprehensive scheduling metrics, and adopt a different load adjustment strategy for each region; Step 1.3: After steps 1.1 and 1.2, the number of task blocks for the CPU is calculated. If the calculated value does not change, it automatically reverts to the classic binary search strategy, and the allocation result is always within the effective search interval through double boundary constraints. The CPU-GPU task scheduling module is configured to perform CPU-GPU task scheduling.
Citation Information
Patent Citations
Multi-granularity GPU-CPU cooperative scheduling method for heterogeneous computing system
CN119621299A
Heterogeneous computing power scheduling method and device, equipment, storage medium and product
CN119781990A
Self-adaptive task scheduling method based on multiprocessor cooperative system
CN119917297A
Energy efficiency data detection processing method and system of data center
CN120215678A
Heterogeneous computing power-oriented multi-policy intelligent scheduling method and apparatus
WO2024060571A1