GPU computing power scheduling method and device, equipment, medium and program product

By dividing GPU resources into dynamic partitions and combining preemptive and cooperative scheduling, and implementing dynamic voltage and frequency adjustment and task merging strategies, the problems of resource fragmentation and high task switching overhead in existing GPU computing power scheduling are solved, achieving higher resource utilization and energy efficiency.

CN120994411BActive Publication Date: 2026-01-27ZIGUANG HENGYUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511516592.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-27
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing GPU computing power scheduling mechanisms cannot dynamically adjust resource allocation, resulting in resource fragmentation and high task switching overhead, making it difficult to adapt to dynamic task requirements.

Method used

The GPU's computing units and memory resources are divided into multiple dynamically adjustable partitions. Combining preemptive scheduling and cooperative scheduling, dynamic voltage and frequency adjustment and task merging strategies are implemented. Resource allocation is optimized through greedy algorithms and buddy systems, and task priorities are dynamically evaluated.

Benefits of technology

It significantly improves GPU resource utilization and energy efficiency in multi-tasking scenarios, reduces energy consumption, and optimizes task response time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994411B_ABST
    Figure CN120994411B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a GPU computing power scheduling method, device, equipment, medium and program product, relates to the technical field of computing power scheduling, and the method comprises the following steps: according to real-time task demand, dividing the computing unit and the display memory resource of a GPU (Graphics Processing Unit) into a plurality of dynamically adjustable partitions; calculating the priority weight of each task; in combination with preemptive scheduling and cooperative scheduling, implementing resource preemption on a first priority task, and performing time-sharing multiplexing on a non-preempted task; performing dynamic voltage and frequency scaling (DVFS) and task merging strategy; through dynamic resource partitioning, dynamic priority evaluation, hybrid scheduling strategy and energy efficiency optimization algorithm, the GPU resource utilization and energy efficiency ratio in a multi-task scenario are significantly improved, and the energy consumption is reduced in combination with the DVFS and task merging strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing power scheduling technology, and more specifically, to a GPU computing power scheduling method, apparatus, device, medium, and program product. Background Technology

[0002] With the rapid development of fields such as artificial intelligence, scientific computing, and graphics rendering, GPUs have become the core computing power carrier due to their high parallel computing capabilities. However, existing GPU computing power scheduling mechanisms have the following problems: Traditional GPUs use static resource allocation (such as fixed binding of CUDA streaming multiprocessors), which cannot adjust resource allocation according to the dynamic needs of tasks, leading to resource fragmentation or contention. High-priority tasks (such as real-time inference) may be blocked by low-priority tasks (such as offline training), lacking a fine-grained preemption mechanism. Fixed-frequency operation mode cannot dynamically adjust power consumption according to the load, resulting in wasted energy from idle resources.

[0003] In recent years, GPU computing power scheduling algorithms have made breakthroughs in multi-task time-sharing reuse and task priority. However, applying GPU computing power scheduling systems to dynamic task scenarios such as intelligent computing and supercomputing still faces many challenges: Static partition scheduling: resource allocation is fixed and cannot be dynamically adjusted, resulting in serious fragmentation problems and making it difficult to adapt to dynamic task requirements; Time-slice round-robin scheduling: although it supports multi-task time-sharing reuse, the task switching overhead is large. Summary of the Invention

[0004] The purpose of this application is to provide a GPU computing power scheduling method, apparatus, device, medium, and program product to solve the problems that existing GPU computing power scheduling methods cannot dynamically adjust resource allocation, are difficult to adapt to dynamic task requirements, and have high task switching overhead.

[0005] In a first aspect, embodiments of this application provide a GPU computing power scheduling method, the method comprising:

[0006] Based on real-time task requirements, the GPU's computing units and memory resources are divided into multiple dynamically adjustable partitions.

[0007] Calculate the priority weight for each task;

[0008] By combining preemptive scheduling and cooperative scheduling, resources are preempted for the highest priority tasks, and non-preemptive tasks are reused in a time-sharing manner.

[0009] Execute Dynamic Voltage Frequency Scaling (DVFS) and task merging strategies;

[0010] The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes:

[0011] When the preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and waits to be executed.

[0012] For tasks involving atomic operations or persistent memory access, a cooperative scheduling approach is used, allocating computing units and video memory resources in a round-robin fashion based on time slices.

[0013] In the above implementation process, based on the real-time task requirements, the computing units and video memory resources of the GPU graphics processor are divided into multiple dynamically adjustable partitions; the priority weight of each task is calculated; preemptive scheduling and cooperative scheduling are combined to preempt resources for the first priority task and to time-share non-preemptive tasks; dynamic voltage and frequency adjustment (DVFS) and task merging strategies are executed; through dynamic resource partitioning, dynamic priority evaluation, hybrid scheduling strategies and energy efficiency optimization algorithms, the GPU resource utilization and energy efficiency ratio in multi-task scenarios are significantly improved, while energy consumption is reduced by combining DVFS and task merging strategies.

[0014] Furthermore, based on real-time task requirements, the GPU's computing units and video memory resources are divided into multiple dynamically adjustable partitions, including:

[0015] Based on priority tasks, a greedy algorithm is used to allocate GPU computing units;

[0016] A buddy system is used to dynamically allocate video memory resources, resulting in multiple dynamically adjustable partitions.

[0017] In the above implementation process, a greedy algorithm is used to allocate GPU computing units, prioritizing the computing unit requirements of high-priority tasks; a buddy system is used to dynamically allocate video memory resources to reduce video memory fragmentation.

[0018] Furthermore, based on real-time task requirements, the GPU's computing units and video memory resources are divided into multiple dynamically adjustable partitions, including:

[0019] When the first priority task arrives, the computing unit and video memory resources occupied by the second priority task are acquired, and the video memory data is isolated through the copy-on-write mechanism; wherein, the priority of the first priority task is higher than the priority of the second priority task;

[0020] Allocate a fixed time slice to each collaborative task that is not preemptive, and manage the scheduling queue;

[0021] If a second-priority task holds the same resources as a first-priority task, its priority will be raised to the same level as the first-priority task within a set time period.

[0022] The above implementation process significantly improves GPU resource utilization and energy efficiency in multi-tasking scenarios.

[0023] Furthermore, the calculation of the priority weight for each task includes:

[0024] The formula for evaluating task priority is:

[0025] ;

[0026] in, , , Let be the weight coefficient, and satisfy... The default value is , , , For task t i The urgency of the deadline For task t i resource requirements, For task t i User priority.

[0027] In the above implementation process, priority evaluation is implemented to facilitate scheduling.

[0028] Furthermore, the execution of the Dynamic Voltage Frequency Adjustment (DVFS) and task merging strategy includes:

[0029] Target frequency is calculated in real time based on computing unit and video memory resource utilization:

[0030] ;

[0031] Where U represents the utilization rate of computing units and video memory resources. Set the maximum utilization rate for computing units and video memory resources. To set the minimum utilization rate for computing units and video memory resources, This is the highest frequency at which the GPU core operates under full load. This is the minimum frequency at which the GPU core operates in power-saving mode;

[0032] Multiple computationally intensive small tasks are merged into a single kernel for startup.

[0033] In the above implementation process, energy consumption is reduced by combining DVFS with a task merging strategy.

[0034] Furthermore, it also includes:

[0035] Real-time acquisition of GPU computing unit and memory resource utilization, memory usage, temperature and power consumption data;

[0036] Resource reallocation or frequency adjustment is triggered based on monitoring data.

[0037] Resource monitoring is implemented during the above process.

[0038] Furthermore, the allocation of fixed time slices to each cooperative task of a non-preemptive task and the management of the scheduling queue include:

[0039] Allocate a fixed time slice to each cooperative task that is not preemptive, and release resources when the task runs to the end of the time slice or actively releases them.

[0040] Sort tasks by priority and maintain a round-robin queue;

[0041] At the end of each time slice, switch to the next task.

[0042] Secondly, embodiments of this application also provide a GPU computing power scheduling device, the device comprising:

[0043] The partitioning module is used to divide the GPU's computing units and video memory resources into multiple dynamically adjustable partitions according to real-time task requirements.

[0044] The weight calculation module is used to calculate the priority weight of each task;

[0045] The scheduling operation module is used to combine preemptive scheduling and cooperative scheduling to preempt resources for first-priority tasks and to reuse non-preemptive tasks in a time-sharing manner.

[0046] The strategy execution module is used to execute Dynamic Voltage Frequency Adjustment (DVFS) and task merging strategies;

[0047] The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes:

[0048] When the preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and waits to be executed.

[0049] For tasks involving atomic operations or persistent memory access, a cooperative scheduling approach is used, allocating computing units and video memory resources in a round-robin fashion based on time slices.

[0050] Thirdly, embodiments of this application provide an electronic device, including:

[0051] The system includes a processor, a memory, and a bus. The processor is connected to the memory via the bus. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the GPU computing power scheduling method described above.

[0052] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a server, implements the GPU computing power scheduling method as described above.

[0053] Fifthly, embodiments of this application provide a computer program product, the computer program product including instructions, which, when executed by a computer, cause the computer to implement the GPU computing power scheduling method as described above. Attached Figure Description

[0054] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 A flowchart illustrating a GPU computing power scheduling method provided in an embodiment of this application;

[0056] Figure 2 A comparison chart of performance metrics of a GPU computing power scheduling method provided in this application and a traditional scheduling method;

[0057] Figure 3 A schematic flowchart of a GPU computing power scheduling device provided in this application embodiment;

[0058] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0059] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0060] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0061] The Streaming Multiprocessor (SM) is a very important component of the GPU architecture, and can be regarded as the heart of the GPU, responsible for performing parallel computing tasks.

[0062] A GPU (Graphics Processing Unit) is a processor specifically designed for handling graphics and parallel computing tasks.

[0063] A greedy algorithm is an algorithm that makes the best or optimal choice in each step of the algorithm, hoping to lead to a globally optimal result.

[0064] The Buddy System is a memory management algorithm primarily used for dynamic memory allocation and deallocation in operating systems. Its core idea is to divide memory into equal-sized blocks and organize these blocks through "buddy" relationships to efficiently allocate and reclaim memory.

[0065] Copy-on-Write (COW) is an optimization strategy in the field of computer programming.

[0066] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a GPU computing power scheduling method provided in an embodiment of this application. The GPU computing power scheduling method includes:

[0067] 100. Based on real-time task requirements, the GPU's computing units and video memory resources are divided into multiple dynamically adjustable partitions.

[0068] Understandably, the core objective of dynamic resource partitioning is to divide the GPU's compute units (SMs) and memory resources into independently adjustable regions based on real-time task requirements, thereby avoiding resource waste and contention.

[0069] 110. Based on priority tasks, use a greedy algorithm to allocate GPU computing units.

[0070] For example, input: a set of tasks Each task priority and the number of computing units required Total number of GPU SMs .

[0071] Output: Resource allocation scheme ,in, Assigned to task The SM set.

[0072] Algorithm steps: Step 1: Task sorting: by priority Arrange the task set in descending order to form a queue. .

[0073] If priorities are the same, then the priority is determined by video memory requirements. Sort in ascending order (prioritize small resource tasks to reduce fragmentation).

[0074] Step 2: Greedy Allocation: Initialize the remaining SM pool .

[0075] Traversal Each task in Allocation condition: If Then from middle SMs are assigned to And mark it as exclusive mode. Elastic allocation: If However, if a low-priority task occupies the SM, a preemption mechanism will be triggered.

[0076] renew .

[0077] Step 3: Elastic Resource Pool Management: Remaining SM Pool Used for sudden high-priority tasks or future expansions; if the task is completed or terminated, its SM resources are immediately released and reclaimed. .

[0078] Example: Scenario: Total number of SMs on the GPU is 16, and the task requirements are... , , .

[0079] Allocation process: Sorted queue: ; 6SM allocated, 10SM remaining; Allocate 5SM, with 5SM remaining; The demand is 4SM, and the remaining 5SM will be allocated to 4SM, with the remaining 1SM going into the elastic pool.

[0080] 120. A buddy system is used to dynamically allocate video memory resources, resulting in multiple dynamically adjustable partitions.

[0081] Understandably, the buddy system is used to dynamically allocate video memory resources, reduce video memory fragmentation, and support fast allocation and release.

[0082] For example, the algorithm steps are as follows: Step 1: Memory initialization: Divide the memory into portions of size [size missing]. Blocks (e.g., 1GB, 2GB, 4GB, etc.); construct a list of free blocks and manage them in groups by block size.

[0083] Step 2: Assign request processing: Assign tasks Video memory requirements Calculate the minimum block size that satisfies the condition. If corresponding If an available block exists in the list of free blocks, allocate it directly.

[0084] If it does not exist, search upwards for a larger block (e.g., ...). () split into two One block is allocated, and the other is added to the free list.

[0085] Step 3: Release and Merge: When a task releases video memory, it marks the block as free. It checks if adjacent blocks are both free and the same size; if so, they are merged into a larger block, and the process is repeated recursively upwards.

[0086] Example: Scenario: Total video memory size is 8GB, initialized as one 8GB block.

[0087] Request to allocate 4 GB: Split 8 GB into two 4 GB blocks, allocate one of them, and reserve the remaining 4 GB blocks.

[0088] Subsequent 4 GB release: Combined with the reserved 4 GB block, restoring to 8 GB.

[0089] Therefore, a greedy algorithm is used to allocate GPU computing units, prioritizing the computing unit needs of high-priority tasks; a buddy system is used to dynamically allocate video memory resources, reducing video memory fragmentation.

[0090] 200. Calculate the priority weight of each task.

[0091] Specifically, a priority evaluation model should be established. Priority calculation should comprehensively consider the urgency of the task, resource requirements, and user-defined levels. Parameter definition and calculation should be performed first.

[0092] The formula for evaluating task priority is:

[0093] ;

[0094] in, , , Let be the weight coefficient, and satisfy... The default value is , , , For task t i The urgency of the deadline For task t i resource requirements, For task t i User priority.

[0095] Deadline Urgency:

[0096] ;

[0097] in, This value represents the estimated remaining execution time of the task (based on historical data or model prediction). A smaller value indicates a higher level of urgency (e.g., if 10% of the time remains, the urgency is 0.1). This reflects the urgency of the remaining execution time for a task and is related to the task deadline. The smaller the value, the higher the urgency (for example, when there is 10% of the time remaining, the urgency is 0.1).

[0098] Resource Demand:

[0099] ;

[0100] The overall demand intensity of a task on GPU resources (SM computing units and video memory) is quantified. The larger the value, the more resources the task consumes (the range is usually 0~1).

[0101] The normalized task's combined requirements for SM and VRAM are calculated; a higher value indicates higher resource consumption.

[0102] User Priority:

[0103] The user or system preset levels (e.g., 0~1) are typically higher for real-time tasks (e.g., inference) than for offline tasks (e.g., training). This reflects the priority of human intervention in the task. It is usually a scalar value between 0 and 1, for example, 0.8 for real-time inference tasks and 0.5 for offline training tasks. It is an urgency and resource requirement independent of dynamic computation, reflecting subjective scheduling preferences.

[0104] Then, set up a priority update mechanism.

[0105] Periodic updates: The priority of all tasks is recalculated every 100ms.

[0106] Event-triggered update: Immediately reassess when a new task arrives or resources are released.

[0107] Example: Task A: 20% remaining time, resource requirement 0.3, user priority 0.8; Task B: 50% remaining time, resource requirement 0.5, user priority 0.5.

[0108] Calculate (default weights):

[0109] ;

[0110] .

[0111] Result: Task B has a higher priority (the larger the value, the higher the priority), but it needs to be checked whether it is consistent with the expected logic (the formula symbols need to be adjusted according to the actual design).

[0112] 300. Combining preemptive scheduling and cooperative scheduling, resources are preempted for the highest priority tasks, and non-preemptive tasks are reused in a time-sharing manner.

[0113] The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes:

[0114] 310. When the preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and awaits execution.

[0115] Understandably, when the first priority task arrives, it acquires the computing units and video memory resources occupied by the second priority task and isolates the video memory data through a copy-on-write mechanism; among them, the priority of the first priority task is higher than that of the second priority task.

[0116] An example applicable scenario: High-priority tasks that need to immediately preempt resources (such as real-time inference).

[0117] Algorithm steps: Step 1: Preemption triggering conditions include: new task priority Higher than the currently running task priority Current resources are insufficient to meet the requirements. The demand.

[0118] Step 2: Resource Acquisition Process

[0119] SM takes over: From The required number of SMs are recycled and added to the idle pool. (Record) The execution context (such as register state and program counter) is saved to video memory.

[0120] Memory isolation: for The video memory region is marked as a Copy-on-Write (COW) mechanism. When When writing to the same video memory address, the Copy-on-Write (COW) mechanism is triggered, and the data is copied to a new area.

[0121] Step 3: Task Recovery Mechanism: Preempted Tasks Add to the waiting queue, and resume execution after the resources are released and the context is restored.

[0122] 320. For tasks involving atomic operations or persistent memory access, a cooperative scheduling approach is adopted, allocating computing units and video memory resources in a round-robin fashion based on time slices.

[0123] Optionally, a fixed time slice is allocated to each collaborative task of a non-preemptive task, and a scheduling queue is managed; if a second-priority task holds the resources required by a first-priority task, the priority of the second-priority task is increased to the same level as that of the first-priority task within a set time period.

[0124] Optionally, allocating fixed time slices to each cooperative task of a non-preemptive task and managing the scheduling queue includes:

[0125] Allocate a fixed time slice to each collaborative task that is not preemptive, and release resources when the task runs to the end of its time slice or actively releases them; sort tasks by priority and maintain a round-robin queue; switch to the next task when each time slice ends.

[0126] An example of a scenario where cooperative scheduling is applicable: tasks involve atomic operations or persistent memory accesses that cannot be interrupted.

[0127] Algorithm Steps: Step 1: Time Slice Allocation: Allocate a fixed time slice (e.g., 10ms) to each collaborative task. Tasks run until the end of their time slice or actively release resources (e.g., when encountering a synchronization point).

[0128] Step 2: Scheduling Queue Management: Maintain a round-robin queue, sorted by task priority. At the end of each time slice, switch to the next task.

[0129] Step 3: Priority Inheritance: If a low-priority task holds resources required by a high-priority task, temporarily raise its priority to the same level as the high-priority task to avoid deadlock.

[0130] 400. Execute Dynamic Voltage Frequency Adjustment (DVFS) and task merging strategies.

[0131] For example, Dynamic Voltage Frequency Scaling (DVFS) aims to dynamically adjust the GPU core frequency based on the load, thereby reducing idle power consumption.

[0132] Algorithm steps: Step 1: Frequency adjustment strategy:

[0133] Define the utilization threshold U high =80%, U low =30%.

[0134] Real-time calculation of SM utilization .

[0135] Target frequency is calculated in real time based on computing unit and video memory resource utilization:

[0136] ;

[0137] Where U represents the utilization rate of computing units and video memory resources. Set the maximum utilization rate for computing units and video memory resources. To set the minimum utilization rate for computing units and video memory resources, The highest frequency at which the GPU core operates under full load ( This typically corresponds to the peak performance state allowed by the hardware. The minimum frequency at which the GPU core operates in power-saving mode ( (For use in low-load scenarios to reduce power consumption).

[0138] Among them, high load ( Full-frequency operation ensures performance;

[0139] Medium load ( When the frequency is smoothly reduced using the square root function, the frequency is reduced.

[0140] Low load ( Switch to the lowest frequency when needed to save energy.

[0141] Step 2: Adjust granularity: Detect utilization rate every 50ms to smooth frequency changes and prevent oscillation.

[0142] Example:

[0143] f max =1.5GHz, .

[0144] .

[0145] For example, task merging optimization aims to reduce kernel startup overhead and increase computational density.

[0146] Algorithm steps:

[0147] Step 1: Task merging conditions: Multiple tasks have the same kernel function (e.g., matrix multiplication). Input data can be processed in batches (e.g., tensor concatenation).

[0148] Step 2: Merge Execution Process: Data Preprocessing: Concatenate multiple input tensors into a single high-dimensional tensor. Kernel Startup: Call the batch execution kernel, setting the extended grid and block dimensions. Result Splitting: Split the output tensor according to the original task and return the results separately.

[0149] Example:

[0150] Original task: 10 matrix multiplication tasks, each computation .

[0151] After the merger: spliced ​​as Similarly, handle This calls the batch matrix multiplication kernel once.

[0152] Therefore, combining DVFS with a task merging strategy reduces energy consumption.

[0153] As described above, this embodiment of the application divides the computing units and video memory resources of the GPU graphics processor into multiple dynamically adjustable partitions according to the real-time task requirements; calculates the priority weight of each task; combines preemptive scheduling and cooperative scheduling to preempt resources for the first priority task and perform time-sharing multiplexing for non-preemptive tasks; executes dynamic voltage and frequency adjustment (DVFS) and task merging strategies; through dynamic resource partitioning, dynamic priority evaluation, hybrid scheduling strategies and energy efficiency optimization algorithms, the utilization rate and energy efficiency ratio of GPU resources in multi-task scenarios are significantly improved, while energy consumption is reduced by combining DVFS and task merging strategies.

[0154] Based on the above embodiments, the method of this application embodiment can be further specified as follows: It also includes:

[0155] Real-time data collection of GPU computing unit and memory resource utilization, memory usage, temperature, and power consumption; triggering resource reallocation or frequency adjustment based on monitoring data.

[0156] For example, exception handling and fault tolerance mechanisms: Resource allocation failure handling: If the task requirements exceed the total GPU resources, a task rejection notification is triggered, and the user is advised to adjust the resource requirements; Deadlock detection:

[0157] Monitor task waiting time; if it exceeds a threshold (e.g., 1 second), forcibly release occupied resources and restart the task; Memory leak recovery: periodically scan for unreleased memory blocks; if the associated task has been terminated, forcibly recover the memory and record the log.

[0158] Based on the above embodiments, the method of this application embodiment can be further specified as follows: it further includes: the generation of the scheduling strategy is based on a reinforcement learning model: the model input is a task feature vector and a GPU state vector; the model output is a resource allocation scheme and a scheduling order; the model optimizes the scheduling objective through a reward function, including reducing task latency and energy consumption.

[0159] Based on the above embodiments, the method of this application embodiment can be further specified as follows: the isolation of the video memory resources is achieved by creating a video memory snapshot for the preempted task and marking it as a read-only copy; when a new task writes to the video memory, a copy-on-write mechanism is triggered to generate an independent data copy.

[0160] Based on the above, through simulator and real hardware testing, compared with traditional scheduling methods, the embodiments of this application can achieve the following: 1. Improved resource utilization: Through dynamic partitioning, SM utilization is increased from an average of 65% to over 85%. 2. Reduced task latency: The average response time of high-priority tasks is reduced by 35% to 50%. 3. Optimized energy efficiency: Overall energy consumption is reduced by 15% to 25% under the same load.

[0161] Example 1: Hybrid Deep Learning Training and Inference Scenario: Task Configuration: Task A: Real-time Inference (High priority, requires 2 SMs, 1GB GPU memory). Task B: Offline Training (Low priority, requires 6 SMs, 4GB GPU memory).

[0162] Scheduling Process: Initial Allocation: B occupies 6 SMs, A occupies 2 SMs. When a new inference task A' arrives, the scheduler preempts 2 SMs from B and allocates them to A'. A 1GB copy of the video memory is allocated to A' via a Copy-on-Write (COW) mechanism.

[0163] Effects: Inference task latency was reduced by 40%, while training task completion time increased by only 15%.

[0164] Example 2: Energy Efficiency Optimization Experiment: Test platform: NVIDIA A100 GPU. The energy efficiency optimization algorithm of this application is compared with traditional scheduling. Please refer to the results. Figure 2 Compared with the performance indicators of traditional scheduling methods, the performance of the embodiments of this application is significantly improved.

[0165] The steps described above are not strictly performed in the order of their numbers; they should be understood as a whole.

[0166] Secondly, based on the above embodiments, this application also provides a GPU computing power scheduling device, referring to... Figure 3 The GPU computing power scheduling device provided in this embodiment specifically includes: a partitioning module 301, a weight calculation module 302, a scheduling operation module 303, and a strategy execution module 304.

[0167] The partitioning module 301 is used to divide the GPU graphics processor's computing units and video memory resources into multiple dynamically adjustable partitions according to real-time task requirements; the weight calculation module 302 is used to calculate the priority weight of each task; the scheduling operation module 303 is used to combine preemptive scheduling and cooperative scheduling to preempt resources for the first priority task and to perform time-sharing multiplexing for non-preemptive tasks; and the policy execution module 304 is used to execute dynamic voltage frequency adjustment (DVFS) and task merging strategies.

[0168] The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes:

[0169] When a preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and awaits execution. A fixed time slice is allocated to each collaborative task, and the scheduling queue is managed. If a second priority task holds the resources required by the first priority task, the priority of the second priority task is increased to the same level as the first priority task within a set time period.

[0170] As described above, this embodiment of the application divides the computing units and video memory resources of the GPU graphics processor into multiple dynamically adjustable partitions according to the real-time task requirements; calculates the priority weight of each task; combines preemptive scheduling and cooperative scheduling to preempt resources for the first priority task and perform time-sharing multiplexing for non-preemptive tasks; executes dynamic voltage and frequency adjustment (DVFS) and task merging strategies; through dynamic resource partitioning, dynamic priority evaluation, hybrid scheduling strategies and energy efficiency optimization algorithms, the utilization rate and energy efficiency ratio of GPU resources in multi-task scenarios are significantly improved, while energy consumption is reduced by combining DVFS and task merging strategies.

[0171] Thirdly, embodiments of this application also provide an electronic device that can integrate a GPU computing power scheduling device with a user-mode polling mechanism provided in embodiments of this application. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. (Reference) Figure 4 The electronic device includes: an input device 43, an output device 44, a memory 42, and one or more processors 41; the memory 42 is used to store one or more programs; when the one or more programs are executed by the one or more processors 41, the one or more processors 41 implement the GPU computing power scheduling method with user-mode polling mechanism as provided in the above embodiments. The input device 43, output device 44, memory 42, and processors 41 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0172] The processor 41 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 42, which is to implement the GPU computing power scheduling method of the user-mode polling mechanism described above.

[0173] The electronic device provided above can be used to execute the GPU computing power scheduling method with user-mode polling mechanism provided in the above embodiments, and has corresponding functions and beneficial effects.

[0174] Fourthly, embodiments of this application also provide a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the GPU computing power scheduling method as described above, and can achieve the same beneficial effects.

[0175] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the GPU computing power scheduling method described above, but can also execute related operations in the GPU computing power scheduling method provided in any embodiment of this application.

[0176] Fifthly, embodiments of this application also provide a computer program product. The methods described in the various embodiments of this application can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the various embodiments of this application are executed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, core network equipment, OAM (Open Application Model), or other programmable devices.

[0177] The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; or an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0178] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0179] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0180] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0181] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0182] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0183] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A GPU computing power scheduling method, characterized in that, The method includes: Based on real-time task requirements, the GPU's computing units and memory resources are divided into multiple dynamically adjustable partitions. Calculate the priority weight for each task; By combining preemptive scheduling and cooperative scheduling, resources are preempted for the highest priority tasks, and non-preemptive tasks are reused in a time-sharing manner. Implement dynamic voltage and frequency adjustment and task merging strategies; The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes: When the preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and waits to be executed. For tasks involving atomic operations or persistent memory access, a cooperative scheduling approach is used, allocating computing units and video memory resources in a time-slice round-robin fashion. The combination of preemptive and cooperative scheduling, which preempts resources for first-priority tasks and reuses non-preemptive tasks in a time-sharing manner, specifically includes: When the first priority task arrives, the computing unit and video memory resources occupied by the second priority task are acquired, and the video memory data is isolated through the copy-on-write mechanism; wherein, the priority of the first priority task is higher than the priority of the second priority task; Allocate a fixed time slice to each collaborative task that is not preemptive, and manage the scheduling queue; If a second priority task holds the same resources as a first priority task, the priority of the second priority task will be raised to the same level as the first priority task within a set time period. The process of allocating fixed time slices to each cooperative task in a non-preemptive task and managing the scheduling queue includes: Allocate a fixed time slice to each cooperative task that is not preemptive, and release resources when the task runs to the end of the time slice or actively releases them. Sort tasks by priority and maintain a round-robin queue; At the end of each time slice, switch to the next task.

2. The GPU computing power scheduling method according to claim 1, characterized in that, The method of dividing the GPU's computing units and video memory resources into multiple dynamically adjustable partitions based on real-time task requirements includes: Based on priority tasks, a greedy algorithm is used to allocate GPU computing units; A buddy system is used to dynamically allocate video memory resources, resulting in multiple dynamically adjustable partitions.

3. The GPU computing power scheduling method according to claim 1, characterized in that, The calculation of the priority weight for each task includes: The formula for task priority evaluation is: ; in, , , Let be the weight coefficient, and satisfy... The default value is , , , For task t i The urgency of the deadline For task t i resource requirements, For task t i User priority.

4. The GPU computing power scheduling method according to claim 1, characterized in that, The implementation of the dynamic voltage frequency adjustment and task merging strategy includes: Target frequency is calculated in real time based on computing unit and video memory resource utilization: ; Where U represents the utilization rate of computing units and video memory resources. Set the maximum utilization rate for computing units and video memory resources. To set the minimum utilization rate for computing units and video memory resources, This is the highest frequency at which the GPU core operates under full load. This is the minimum frequency at which the GPU core operates in power-saving mode; Multiple computationally intensive small tasks are merged into a single kernel for startup.

5. The GPU computing power scheduling method according to claim 1, characterized in that, Also includes: Real-time acquisition of GPU computing unit and memory resource utilization, memory usage, temperature and power consumption data; Resource reallocation or frequency adjustment is triggered based on monitoring data.

6. A GPU computing power scheduling device, characterized in that, The device includes: The partitioning module is used to divide the GPU's computing units and video memory resources into multiple dynamically adjustable partitions according to real-time task requirements. The weight calculation module is used to calculate the priority weight of each task; The scheduling operation module is used to combine preemptive scheduling and cooperative scheduling to preempt resources for first-priority tasks and to reuse non-preemptive tasks in a time-sharing manner. The strategy execution module is used to execute dynamic voltage frequency adjustment and task merging strategies; The method of combining preemptive and cooperative scheduling to preempt resources for first-priority tasks and time-sharing reuse for non-preemptive tasks includes: When the preemption condition is triggered, resources are preempted from the first priority task, and the preempted task is added to the waiting queue and waits to be executed. For tasks involving atomic operations or persistent memory access, a cooperative scheduling approach is used, allocating computing units and video memory resources in a time-slice round-robin fashion. The scheduling operation module is specifically used for: When the first priority task arrives, the computing unit and video memory resources occupied by the second priority task are acquired, and the video memory data is isolated through the copy-on-write mechanism; wherein, the priority of the first priority task is higher than the priority of the second priority task; Allocate a fixed time slice to each collaborative task that is not preemptive, and manage the scheduling queue; If a second priority task holds the same resources as a first priority task, the priority of the second priority task will be raised to the same level as the first priority task within a set time period. The scheduling operation module is further used for: Allocate a fixed time slice to each cooperative task that is not preemptive, and release resources when the task runs to the end of the time slice or actively releases them. Sort tasks by priority and maintain a round-robin queue; At the end of each time slice, switch to the next task.

7. An electronic device, characterized in that, include: The processor, memory, and bus are provided, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the GPU computing power scheduling method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by the server, implements the GPU computing power scheduling method as described in any one of claims 1-5.

9. A computer program product, characterized in that, The computer program product includes instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • GPU real-time task computing power dynamic allocation method and device

    CN116225709A

  • Multi-model time division multiplexing and parallel loading reasoning service method and system

    CN120218228A