GPU computing power unit scheduling method and GPU computing power unit scheduling device
By detecting virtual machine scheduling requests in the computing power network and traversing multiple scheduling levels to build an alternative set, the multi-GPU scheduling problem is solved, computing efficiency and resource utilization are improved, and network congestion is avoided.
Patent Information
- Application Number
- CN202410064016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-10-18
AI Technical Summary
In the computing power network, a single GPU resource scheduling strategy cannot meet the scheduling needs of multiple GPUs, resulting in low computing efficiency and high resource idle rate.
By detecting the scheduling request initiated by the virtual machine, the task-related information is obtained, and the GPU computing power units are sequentially traversed according to the virtual machine scheduling layer, server scheduling layer and resource pool center scheduling layer, and an alternative set is constructed until the number of GPU computing power units in the set is When the pre-device selection quantity is reached, the calculation task is scheduled to be executed.
It realizes distributed resource scheduling, avoids network congestion caused by excessive computing task requests caused by pure central schedulers in large cluster environments, and improves the computing efficiency and resource utilization of the computing network.
Smart Images

Figure CN118796431A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a scheduling method for a GPU computing unit and a scheduling device for a GPU computing unit. Background Art
[0002] With the continuous development of network technology, computing power network has gradually become an important direction for future network evolution. GPU, as an important computing resource, is increasingly being used in the field of general computing. In computing power network, GPU resources mostly appear in the form of GPU clusters. The resource scheduling strategy of a single GPU cannot meet the GPU resource scheduling requirements in the computing power network environment. Therefore, in the case of multi-GPU scheduling, its scheduling strategy is not mature enough, resulting in low computing efficiency and high resource idle rate of computing power network. Summary of the invention
[0003] The embodiments of the present application provide a scheduling method for a GPU computing unit and a scheduling device for a GPU computing unit, which can solve the problem of multi-GPU scheduling in a computing network environment.
[0004] In a first aspect, an embodiment of the present application provides a scheduling method for a GPU computing unit, the method comprising: in the case of detecting a scheduling request initiated by a first virtual machine, obtaining task-related information of a computing task carried by the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing unit, and a target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that the local registered resources of the target GPU computing unit in the first virtual machine do not meet the target resource requirement; starting from the first virtual machine, traversing the GPU computing units corresponding to each virtual machine included in the GPU scheduling system in turn according to the scheduling hierarchy, adding the currently traversed GPU computing unit to an alternative set until the number of the GPU computing units in the alternative set is greater than or equal to the pre-selected number, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer, and a resource pool center scheduling layer, the virtual machine scheduling layer is scheduled and controlled by the server scheduling layer, and the server scheduling layer is scheduled and controlled by the resource pool center scheduling layer; according to the alternative set, scheduling the first GPU computing unit to perform the computing task, wherein the alternative set includes the first GPU computing unit.
[0005] In a second aspect, an embodiment of the present application provides a scheduling device for a GPU computing power unit, the device comprising: an acquisition module, for, when a scheduling request initiated by a first virtual machine is detected, acquiring task-related information of a computing task carried in the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing power unit, and a target resource requirement, the destination virtual machine being the first virtual machine, and the scheduling request being used to indicate that the locally registered resources of the target GPU computing power unit in the first virtual machine do not meet the target resource requirement; a traversal module, for traversing the GPU computing power unit in sequence according to the scheduling hierarchy starting from the first virtual machine The scheduling system includes a GPU computing power unit corresponding to each virtual machine, and adds the currently traversed GPU computing power unit to the alternative set until the number of the GPU computing power units in the alternative set is greater than or equal to the pre-selected number, wherein the scheduling level includes a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer, the virtual machine scheduling layer is scheduled and controlled by the server scheduling layer, and the server scheduling layer is scheduled and controlled by the resource pool center scheduling layer; a scheduling module is used to schedule a first GPU computing power unit to perform the computing task according to the alternative set, wherein the alternative set includes the first GPU computing power unit.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0009] In an embodiment of the present application, by detecting a scheduling request initiated by a first virtual machine, obtaining task-related information of a computing task carried by the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing power unit, and a target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that the locally registered resources of the target GPU computing power unit in the first virtual machine do not meet the target resource requirement; starting from the first virtual machine, the GPU computing power units corresponding to the virtual machines included in the GPU scheduling system are traversed in sequence according to the scheduling hierarchy, and the currently traversed GPU computing power unit is added to the candidate set until the number of GPU computing power units in the candidate set is greater than or equal to the pre-selected number of devices, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer, and a virtual machine scheduling layer. The server scheduling layer and the resource pool central scheduling layer, the virtual machine scheduling layer is controlled by the server scheduling layer, and the server scheduling layer is controlled by the resource pool central scheduling layer; according to the alternative set, the first GPU computing unit is scheduled to perform the computing task, wherein the alternative set includes the first GPU computing unit, thereby realizing distributed resource scheduling, the virtual machine first schedules the GPU computing resources, and when the local registered resources in the virtual machine are insufficient for processing, the server scheduling layer schedules them, and if they are still insufficient, they are processed by the resource pool central scheduling layer, which can solve the multi-GPU scheduling problem in the computing network environment, and can avoid the problem that in a large cluster environment, a purely central scheduler may cause network congestion due to excessive computing task requests, thereby improving the computing efficiency and resource utilization of the computing network. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a flowchart of a method for scheduling a GPU computing unit provided in an embodiment of the present application;
[0011] Figure 2a It is a structural diagram of a GPU scheduling system provided in an embodiment of the present application;
[0012] Figure 2b It is a structural diagram of a GPU scheduling system provided in an embodiment of the present application;
[0013] Figure 3 It is a flowchart of a method for scheduling a GPU computing unit provided in an embodiment of the present application;
[0014] Figure 4 This is an interactive schematic diagram of a computing power network data transmission provided by an embodiment of the present application;
[0015] Figure 5 It is a schematic diagram of the architecture of a computing power network provided in an embodiment of the present application;
[0016] Figure 6This is a schematic diagram of computing power service status registration provided by an embodiment of the present application;
[0017] Figure 7 It is a flowchart of a method for scheduling a GPU computing unit provided in an embodiment of the present application;
[0018] Figure 8 It is a structural schematic diagram of a scheduling device for a GPU computing unit provided in an embodiment of the present application;
[0019] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] In the following, in combination with the accompanying drawings, a scheduling method for a GPU computing power unit and a scheduling device for a GPU computing power unit provided in an embodiment of the present application are described in detail through specific embodiments and their application scenarios.
[0022] Figure 1 A method for scheduling a GPU computing unit provided by an embodiment of the present application is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:
[0023] S110: When a scheduling request initiated by the first virtual machine is detected, task related information of the computing task carried in the scheduling request is obtained.
[0024] Among them, the task-related information includes the address of the destination virtual machine, the identifier of the target GPU computing power unit and the target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that the local registered resources of the target GPU computing power unit in the first virtual machine do not meet the target resource requirement.
[0025] It is understandable that computing tasks may include deep learning training, scientific computing, password cracking, and other computing tasks performed by GPUs. After receiving the client request forwarded by the entry node, the first virtual machine will parse the task-related information of the computing task from the client request, and determine whether the local registered resources of the target GPU computing unit included meet the target resource requirements of the computing task based on the task-related information. If so, the target GPU computing unit in the first virtual machine will execute the computing task. If not, a scheduling request will be reported, which is used to indicate that the local registered resources cannot meet the target resource requirements, and the GPU scheduling system will instruct the server scheduling layer to schedule the GPU computing unit to meet the target resource requirements.
[0026] S120: Starting from the first virtual machine, traverse the GPU computing units corresponding to each virtual machine in the GPU scheduling system in turn according to the scheduling level, and add the GPU computing units currently traversed to the alternative set until the number of the GPU computing units in the alternative set is greater than or equal to the pre-selected number.
[0027] The scheduling level includes a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer. The virtual machine scheduling layer is controlled by the server scheduling layer, and the server scheduling layer is controlled by the resource pool center scheduling layer.
[0028] It can be understood that the first virtual machine first schedules the GPU computing power unit included in itself. When the local registered resources in the virtual machine are insufficient to process the computing task, the scheduling process is performed in sequence according to the scheduling level, that is, starting from the first virtual machine, the GPU computing power units corresponding to each virtual machine in the GPU scheduling system are traversed in sequence according to the scheduling level, and the currently traversed GPU computing power units are added to the candidate set until the number of GPU computing power units in the candidate set is greater than or equal to the pre-device selection number. In other words, after the traversal of the virtual machine scheduling layer is completed, if the number of GPU computing power units in the candidate set is still less than the pre-device selection number, the server scheduling layer will start the traversal. After the server scheduling layer schedules other virtual machines, if the number of GPU computing power units in the candidate set is still less than the pre-device selection number, the resource pool center scheduling layer will schedule the virtual machines in other servers in the server scheduling layer to start traversal.
[0029] Among them, in one implementation, if Figure 2aAs shown, the GPU scheduling system 200 further includes a computing power control center 210, the resource pool center scheduling layer 220 is controlled by the computing power control center 210, the resource pool center scheduling layer 220 includes at least one server in the server scheduling layer 230, each of the servers includes at least one virtual machine in the virtual machine scheduling layer 240, each of the virtual machines includes at least one of the GPU computing power units, and at least one of the virtual machines includes the first virtual machine. Further, as Figure 2b As shown, the GPU scheduling system 200 also includes an SDN control center 250. It can be understood that the architecture of the GPU scheduling system is a multi-layer scheduling architecture, including a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer, and the resource pool center scheduling layer is connected to the computing power control center, can receive the scheduling control of the computing power control center, and cooperate with the SDN controller, and the GPU computing power unit is registered on the virtual machine. Optionally, the virtual machine is also configured with a virtual machine scheduler and a virtual machine monitor, wherein the virtual machine scheduler is used to schedule the locally registered GPU computing power unit, and the virtual machine monitor is used to monitor the load status of the locally registered GPU computing power unit to generate the corresponding computing power service status, each virtual machine has a corresponding scheduling server, and there is a one-to-many mapping relationship between the scheduling server and the virtual machine. The scheduling server is provided with a scheduler for processing the scheduling request initiated by the virtual machine scheduling layer. Similarly, a resource pool center scheduling layer is also provided on the scheduling server to process the scheduling request initiated by the server scheduling layer.
[0030] S130: Scheduling the first GPU computing unit to execute the computing task according to the candidate set.
[0031] Among them, the alternative set includes the first GPU computing power unit.
[0032] It is understandable that, in order to meet the target resource demand, an alternative set can be constructed based on the target resource demand, and a pre-equipped selected number can be set for the alternative set, that is, the number of GPU computing units in the alternative set is greater than or equal to the pre-equipped selected number. After determining the alternative set, the computing task can be executed by scheduling the first GPU computing unit in the alternative set.
[0033] In an embodiment of the present application, by detecting a scheduling request initiated by a first virtual machine, obtaining task-related information of a computing task carried by the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing power unit, and a target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that the locally registered resources of the target GPU computing power unit in the first virtual machine do not meet the target resource requirement; starting from the first virtual machine, the GPU computing power units corresponding to the virtual machines included in the GPU scheduling system are traversed in sequence according to the scheduling hierarchy, and the currently traversed GPU computing power unit is added to the candidate set until the number of GPU computing power units in the candidate set is greater than or equal to the pre-selected number of devices, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer, and a virtual machine scheduling layer. The server scheduling layer and the resource pool central scheduling layer, the virtual machine scheduling layer is controlled by the server scheduling layer, and the server scheduling layer is controlled by the resource pool central scheduling layer; according to the alternative set, the first GPU computing unit is scheduled to perform the computing task, wherein the alternative set includes the first GPU computing unit, thereby realizing distributed resource scheduling, the virtual machine first schedules the GPU computing resources, and when the local registered resources in the virtual machine are insufficient for processing, the server scheduling layer schedules them, and if they are still insufficient, they are processed by the resource pool central scheduling layer, which can solve the multi-GPU scheduling problem in the computing network environment, and can avoid the problem that in a large cluster environment, a purely central scheduler may cause network congestion due to excessive computing task requests, thereby improving the computing efficiency and resource utilization of the computing network.
[0034] In one implementation, starting from the first virtual machine, traversing the GPU computing units corresponding to each virtual machine included in the GPU scheduling system in turn according to the scheduling level includes: when the traversal of each GPU computing unit in the first virtual machine is completed and the number of the GPU computing units in the candidate set is less than the pre-selected number, judging whether the first server includes the second virtual machine, wherein the first server includes the first virtual machine; when the first server does not include the second virtual machine and the resource pool center scheduling layer includes the second server, traversing the GPU computing units in each virtual machine included in the second server. It can be understood that if the number of the GPU computing units in the candidate set is still less than the pre-selected number after the traversal of each GPU computing unit in the first virtual machine is completed, it is judged whether the first server includes the second virtual machine, if it is included, then continue to traverse and add the GPU computing units in the second virtual machine to the candidate set, if the traversal of each GPU computing unit in the second virtual machine is completed, it still does not meet the pre-selected number, then continue to judge whether the first server includes the third virtual machine, until the traversal of the GPU computing units in all virtual machines in the first server is completed. If the first server does not include the second virtual machine, the resource pool center scheduling layer starts scheduling to determine whether it includes the second server. If it does, it will traverse the GPU computing units in each of the virtual machines included in the second server in turn according to the same traversal rules. In order to better illustrate the implementation method, the embodiment of the present application also provides another flow chart of the scheduling method of the GPU computing unit, such as Figure 3 As shown, the following steps may be included:
[0035] S305: Initialize the setting count i=0 and obtain the pre-selected device quantity x.
[0036] S310: virtual machine scheduling.
[0037] The virtual machine retrieves the locally registered GPU computing units in sequence through the GPU computing unit index and performs load analysis.
[0038] S315: Determine whether the traversal of the GPU computing unit index in the virtual machine is completed.
[0039] If the traversal is completed, the process proceeds to S320 , otherwise the process proceeds to S340 .
[0040] S320: Lock the traversed GPU computing unit.
[0041] S325: Add the locked GPU computing unit to the candidate set.
[0042] S330: Counter i is incremented by 1.
[0043] S335: Determine whether the counter i is less than the pre-selected device quantity x.
[0044] If so, return to S310, otherwise go to S370.
[0045] S340: Server scheduling.
[0046] The server retrieves the virtual machines registered in the server in sequence through the virtual machine index, retrieves the GPU computing units of the virtual machines, and performs load analysis.
[0047] S345: Determine whether the traversal of the virtual machine index in the server is complete.
[0048] If the traversal is completed, the process proceeds to S350 , otherwise the process proceeds to S310 .
[0049] S350: Dispatching by the dispatch center.
[0050] The dispatch center searches for GPU computing units of the servers one by one through the server index and performs load analysis.
[0051] S365: Determine whether the traversal of the server index in the scheduling center is complete.
[0052] If the traversal is completed, the process proceeds to S350 , otherwise the process proceeds to S340 .
[0053] S370: Obtain an alternative set.
[0054] It should be noted that if all the servers in the scheduling center have been traversed, they will continue to return to the scheduling center, which will send scheduling feedback to the computing power control center, and the computing power control center will make decisions related to the computing task based on the feedback.
[0055] In one implementation, obtaining task-related information of the computing task carried by the scheduling request includes: obtaining task-related information of the computing task carried by the scheduling request when the first virtual machine completes parsing the SRv6 data packet sent by the entry node, wherein the SRv6 data packet includes the entry node address, the source address, and the task-related information of the computing task. Figure 4 As shown, an embodiment of the present application provides an interactive schematic diagram of computing power network data transmission.
[0056] S410: The client requests the Service ID service, the source address is the client address, and the destination address is the ServiceID.
[0057] S420: Receive a client request, search the service information routing table, and search for the Service IP of the service node according to the Service ID.
[0058] S430: The ingress node of the cloud private network acts as an SRv6 source node SC to encapsulate SRv6 data, the data source address is the client IP, the destination address is the Service IP, and the encapsulated data is forwarded.
[0059] Among them, SRv6 data includes the inner client IP, the destination address is Service IP, the computing power identifier Service ID and the outer source and destination IPv6 addresses.
[0060] S440: After receiving the data packet, the service node queries the computing service bound to the Service ID, calls the service and returns the result.
[0061] The data source address of the returned data is the Service ID, and the destination address is the client IP. The service node includes the first virtual machine.
[0062] Furthermore, the present application embodiment also provides a schematic diagram of the architecture of a computing power network, such as Figure 5 As shown in the figure, customers access the cloud private network through an intelligent dedicated line. The cloud private network is configured with several edge nodes (i.e., GPU clusters). The edge nodes can be edge data centers deployed in various cities. The cloud private network uses SRv6 technology, and a central node can also be set up on the cloud private network.
[0063] Furthermore, in one implementation, before detecting the scheduling request initiated by the first virtual machine, it also includes: registering the computing service status of each virtual machine in the computing network router, wherein the computing service status includes the address of each virtual machine, the identification of the GPU computing unit and the registered resource information corresponding to the identification of the GPU computing unit. Figure 6 As shown, the router loads the node service status into the message and spreads it to other routers. The router summarizes the locally registered service status and the service status spread by other routers to obtain a service information routing table.
[0064] In the above implementation, SRv6 / G-SRv6 technology is used to build a cloud private network, data packets between network nodes are forwarded using SRv6, and the computing service status of the computing service node on the server side is diffused at the network layer, which can realize computing power orchestration at the network level. In addition, in the prior art, the synchronization of computing service status is achieved through heartbeat signals, but a large number of heartbeat signals will increase the system communication burden and may affect resource scheduling, which can be effectively avoided in this implementation.
[0065] In one implementation, the step of adding the currently traversed GPU computing unit to the candidate set includes: calculating the waiting time of a second GPU computing unit, wherein the second GPU computing unit is the currently traversed GPU computing unit; adding the second GPU computing unit to the candidate set, wherein the second GPU computing unit is marked with the waiting time. That is, each time a GPU computing unit is traversed, the waiting time of the GPU computing unit must be calculated. In this way, when the first GPU computing unit is determined later, the calculation process can be reduced and the traversal is no longer repeated.
[0066] Further, in one implementation, according to the candidate set, scheduling the first GPU computing unit to perform the computing task includes: constructing a selected set, wherein the selected set includes the first GPU computing unit, and the first GPU computing unit includes a preset selected number of the second GPU computing units with the shortest waiting time; obtaining a first number of subtasks included in the computing task; scheduling the first number of the first GPU computing units in the selected set to respectively perform each of the subtasks, wherein the first number is less than the selected number. It can be understood that the second GPU computing units in the candidate set are obtained by traversing according to the target resource requirements, and the waiting times of these second GPU computing units may be different, so they need to be sorted, and the preset selected number of second GPU computing units with the shortest waiting time are selected as the first GPU computing units, and the selected set is constructed by the preset selected number of first GPU computing units. Then the first number of subtasks included in the computing task is obtained, and each subtask is loaded to each first GPU computing unit, and each first GPU computing unit executes it. It should be noted that the first number is less than the selected number.
[0067] Furthermore, the calculation of the waiting time corresponding to the GPU computing unit can be achieved through modeling analysis. First, define G1, G2, G3, .... G n Represents different GPU computing units, G n Represented as a triple: (TS n ,TM n , wl_sum n , W.L. n ), where TS n G is the GPU computing unit n The number of stream processors in TM n G is the GPU computing unit n The size of the memory in WL n G is the GPU computing unit n The loaded task execution queue, when the task execution is completed, the related records will be cancelled; wl_sumn GPU computing unit G n The number of tasks executed on w j ={wsl j , wlm j ,est j}, WL represents a queue, each element of which records the information of the task being executed on the GPU; wsl represents the number of stream processors occupied by the task; wlm represents the size of the GPU memory occupied by the task; est represents the estimated end time of the task; d(VM1,G j ) represents the communication delay between the first virtual machine VM and the jth GPU. When the VM and the GPU belong to the same server, the communication delay is the transmission time of data from the host memory to the GPU memory; when the VM and the GPU belong to different servers, the communication delay is the sum of the communication delay between different servers and the transmission time from the memory to the GPU memory. Then, in one implementation, the local registration resources include storage resources and stream processor resources; the calculation of the waiting time of the second GPU computing unit includes one of the following (1)-(4):
[0068] (1) When the storage resources of the second GPU computing power unit meet the first requirement and the stream processor resources of the target GPU computing power unit meet the second requirement, determine the waiting time of the second GPU computing power unit as the first delay.
[0069] Among them, the first delay is the communication delay between the second GPU computing unit and the first virtual machine, the first requirement is the memory occupation requirement of the subtask corresponding to the second GPU computing unit, and the second requirement is the stream processor usage requirement of the subtask corresponding to the second GPU computing unit.
[0070] It should be noted that the correspondence between each second GPU computing unit and each subtask can be determined through a pre-built mapping table.
[0071] That is, G n The size of the storage resource in is larger than the memory size required by the corresponding subtask, and the available number of stream processor resources is also larger than the number of stream processors required by the corresponding subtask. At this time, the waiting time is VM m With G n The data transmission delay between can be:
[0072] d(VM m ,G n )
[0073] (2) When the storage resources of the second GPU computing power unit meet the first requirement and the stream processor resources of the second GPU computing power unit do not meet the second requirement, determine the waiting time of the second GPU computing power unit as the maximum value of the first delay and the second delay, wherein the second delay is the time for waiting for other computing tasks to release the stream processor resources until the second requirement is met.
[0074] That is, G n The size of the storage resource in the task is larger than the memory size required by the corresponding subtask, but the available number of stream processor resources is smaller than the number of stream processors required by the corresponding subtask. m With G n The data transmission delay d(VM m , G n ), we also need to consider the problem of insufficient number of stream processors, and need to wait for other tasks to release stream processor resources. Define T_SM(T xy , G n ) is released until the subtask T is satisfied xy The time required for the required number of stream processors, T_SM(T xy , G n ) can be done by traversing the task queue WL in sequence n Each task in the task queue WL is found until the i-th task is found, which satisfies the task queue WL n The number of stream processors occupied by the first i tasks plus the computing power unit G n The sum of the number of remaining stream processors is greater than or equal to subtask T xy When the number of stream processors required, get the task queue WL n The estimated end time of the i-th task in i ,T_SM(T xy , G n )=est i -t n , t n is the current time, then the waiting time is:
[0075] max(d(VM m , G n ), T_SM(T xy , G n ))
[0076] (3) when the storage resources of the second GPU computing power unit do not meet the first requirement and the stream processor resources of the second GPU computing power unit meet the second requirement, determining the waiting time of the second GPU computing power unit as the sum of the first delay and the third delay, wherein the third delay is the time for waiting for other computing tasks to release storage resources until the first requirement is met,
[0077] That is, G n The size of the storage resource in the task is smaller than the memory size required by the corresponding subtask, but the available number of stream processor resources is greater than the number of stream processors required by the corresponding subtask. m With G n The data transmission delay d(VM m , G n ), we also need to consider the problem of insufficient storage resources. We need to wait for other tasks to release storage resources, and data transmission needs to wait for storage resources to be released before proceeding. Therefore, we define T_MEN (T xy , G n ) is released until the subtask T is satisfied xy The time required to store the resource, T_MEN(T xy , G n ) is the same as T_SM(T xy , G n ) is similar, so I will not repeat it here. The waiting time is:
[0078] d(VM m , G n )+T_MEN(T xy , G n )
[0079] (4) When the storage resources of the second GPU computing power unit do not meet the first requirement and the stream processor resources of the second GPU computing power unit do not meet the second requirement, determine the waiting time of the second GPU computing power unit to be the maximum value of the first delay, the second delay and the third delay.
[0080] That is, G n The size of the storage resource in the task is smaller than the memory size required by the corresponding subtask, and the available number of stream processor resources is smaller than the number of stream processors required by the corresponding subtask. m With G n The data transmission delay d(VM m , G n ), insufficient number of stream processors and insufficient storage resources, the waiting time is:
[0081] max(d(VMm , G n )+T_MEN(T xy , G n ), T_SM(T xy , G n ))
[0082] In order to better illustrate the above embodiments, the present application also provides another flowchart of a method for scheduling a GPU computing unit. Assume that the virtual machine scheduler detects that a computing task T is initiated in a virtual machine m. x The scheduling process is as follows Figure 7 As shown, the following steps may be included:
[0083] S701: Get task related information and initialize i=0.
[0084] Where i is a counter for counting, set C b is the candidate set, and set C is the selected set.
[0085] S702: virtual machine scheduling.
[0086] The virtual machine retrieves the locally registered GPU computing units in turn through the GPU computing unit index and performs load analysis;
[0087] S703: Determine whether the traversal of the GPU computing unit index in the virtual machine is completed.
[0088] If yes, proceed to S713, if no, proceed to S704.
[0089] S704: Lock the retrieved GPU computing unit.
[0090] S705: Calculate the waiting time corresponding to the GPU computing unit.
[0091] S706: Add the locked GPU computing unit to the candidate set C b .
[0092] S707: Counter i is incremented by 1.
[0093] S708: Determine whether the counter i is less than the upper limit of the number of candidates.
[0094] If so, return to S702, otherwise go to S709.
[0095] S709: Select C from the candidate set b The count with the shortest waiting time Tx GPU computing units are added to the selected set C.
[0096] Among them, count TxFor the computation task T x The number of GPU computing units required.
[0097] S710: Set task T x The subtasks are loaded onto the GPU computing units in the selected set C respectively, and the task information and status are updated in the corresponding GPU index.
[0098] S711: Unlock all GPU computing units in the candidate set.
[0099] S712: Execute computing task T x .
[0100] S713: Server scheduling.
[0101] The server retrieves the virtual machines registered in the server in sequence through the virtual machine index, retrieves the GPU computing units of the virtual machines, and performs load analysis.
[0102] S714: Determine whether the traversal of the virtual machine index in the server is complete.
[0103] If yes, proceed to S715, otherwise proceed to S702.
[0104] S715: Dispatching by the dispatch center.
[0105] The dispatch center searches for GPU computing units of the servers one by one through the server index and performs load analysis.
[0106] S716: Determine whether the traversal of the server index in the scheduling center is complete.
[0107] If yes, proceed to S715, otherwise proceed to S713.
[0108] This embodiment can solve the scheduling problem of multiple GPUs in a computing network environment.
[0109] Figure 8 A schematic diagram of the structure of a scheduling device for a GPU computing unit provided by an embodiment of the present application is shown as follows: Figure 8 As shown, the scheduling device 800 of the GPU computing power unit may include: an acquisition module 810, a traversal module 820 and a scheduling module 830.
[0110] In this embodiment, the acquisition module 810 is used to, when detecting a scheduling request initiated by the first virtual machine, acquire task-related information of the computing task carried by the scheduling request, wherein the task-related information includes the address of the destination virtual machine, the identifier of the target GPU computing unit and the target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that the locally registered resources of the target GPU computing unit in the first virtual machine do not meet the target resource requirement; the traversal module 820 is used to traverse the GPU computing units corresponding to each virtual machine included in the GPU scheduling system in sequence according to the scheduling hierarchy, starting from the first virtual machine, and add the GPU computing unit currently traversed to the candidate set until the number of the GPU computing units in the candidate set is greater than or equal to the pre-selected number, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer, the virtual machine scheduling layer is scheduled and controlled by the server scheduling layer, and the server scheduling layer is scheduled and controlled by the resource pool center scheduling layer; the scheduling module 830 is used to schedule the first GPU computing unit to perform the computing task according to the candidate set, wherein the candidate set includes the first GPU computing unit.
[0111] In one implementation, the GPU scheduling system also includes a computing power control center, the resource pool center scheduling layer is scheduled and controlled by the computing power control center, the resource pool center scheduling layer includes at least one server in the server scheduling layer, each of the servers includes at least one virtual machine in the virtual machine scheduling layer, each of the virtual machines includes at least one of the GPU computing power units, and at least one of the virtual machines includes the first virtual machine.
[0112] In one implementation, starting from the first virtual machine, the GPU computing units corresponding to the virtual machines included in the GPU scheduling system are traversed in sequence according to the scheduling hierarchy, including: when the traversal of each GPU computing unit in the first virtual machine is completed and the number of the GPU computing units in the alternative set is less than the pre-selected number, determining whether the first server includes the second virtual machine, wherein the first server includes the first virtual machine; when the first server does not include the second virtual machine and the resource pool center scheduling layer includes the second server, traversing the GPU computing units in each virtual machine included in the second server.
[0113] In one implementation, task-related information of the computing task carried by the scheduling request is obtained, including: when the first virtual machine completes parsing of the SRv6 data packet sent by the entry node, obtaining task-related information of the computing task carried by the scheduling request, wherein the SRv6 data packet includes the entry node address, the source address and task-related information of the computing task.
[0114] In one implementation, the device also includes a registration module for registering the computing power service status of each of the virtual machines in the computing power network router before detecting a scheduling request initiated by the first virtual machine, wherein the computing power service status includes the address of each of the virtual machines, the identifier of the GPU computing power unit, and the registration resource information corresponding to the identifier of the GPU computing power unit.
[0115] In one implementation, adding the currently traversed GPU computing power unit to the alternative set includes: calculating the waiting time of a second GPU computing power unit, wherein the second GPU computing power unit is the currently traversed GPU computing power unit; adding the second GPU computing power unit to the alternative set, wherein the second GPU computing power unit is marked with the waiting time.
[0116] In one implementation, scheduling the first GPU computing unit to execute the computing task according to the alternative set includes: constructing a selected set, wherein the selected set includes the first GPU computing unit, and the first GPU computing unit includes a preset selected number of the second GPU computing units with the shortest waiting time; obtaining a first number of subtasks included in the computing task; scheduling the first number of the first GPU computing units in the selected set to execute each of the subtasks respectively, wherein the first number is less than the selected number.
[0117] In one implementation, the locally registered resources include storage resources and stream processor resources, and the target resource requirements include the total memory occupancy size and the total number of stream processors used; the calculation of the waiting time of the second GPU computing unit includes one of the following: when the storage resources of the second GPU computing unit meet the first requirement, and the stream processor resources of the target GPU computing unit meet the second requirement, determining the waiting time of the second GPU computing unit as a first delay, wherein the first delay is the communication delay between the second GPU computing unit and the first virtual machine, the first requirement is the memory occupancy requirement of the subtask corresponding to the second GPU computing unit, and the second requirement is the stream processor usage requirement of the subtask corresponding to the second GPU computing unit; when the storage resources of the second GPU computing unit meet the first requirement, and the stream processor resources of the second GPU computing unit meet the second requirement When the second requirement is not met, the waiting time of the second GPU computing power unit is determined to be the maximum value of the first delay and the second delay, wherein the second delay is the time for waiting for other computing tasks to release stream processor resources until the second requirement is met; when the storage resources of the second GPU computing power unit do not meet the first requirement, and the stream processor resources of the second GPU computing power unit meet the second requirement, the waiting time of the second GPU computing power unit is determined to be the sum of the first delay and the third delay, wherein the third delay is the time for waiting for other computing tasks to release storage resources until the first requirement is met; when the storage resources of the second GPU computing power unit do not meet the first requirement, and the stream processor resources of the second GPU computing power unit do not meet the second requirement, the waiting time of the second GPU computing power unit is determined to be the maximum value of the first delay, the second delay and the third delay.
[0118] A scheduling device for a GPU computing unit provided in an embodiment of the present application can implement each process implemented in an embodiment of a scheduling method for a GPU computing unit. To avoid repetition, they will not be described here.
[0119] The scheduling device of the GPU computing unit in the embodiment of the present application can be a device, or a component, an integrated circuit, or a chip in an electronic device. The embodiment of the present application is not specifically limited.
[0120] The scheduling device of the GPU computing unit in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0121] Optional, such as Fig. 9As shown, an embodiment of the present application also provides an electronic device 900, including a processor 910, a memory 920, and a program or instruction stored in the memory 920 and executable on the processor 910. When the program or instruction is executed by the processor 910, each process implemented in the embodiment of the scheduling method for the GPU computing power unit is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0122] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes implemented in the embodiment of the scheduling method for the GPU computing power unit are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0123] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0124] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes implemented in the embodiment of the scheduling method for the GPU computing power unit. To avoid repetition, they are not described here.
[0125] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0126] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0128] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for scheduling a GPU computing unit, characterized in that: include: In the case of detecting a scheduling request initiated by the first virtual machine, obtaining task-related information of the computing task carried by the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing unit, and a target resource requirement, the destination virtual machine is the first virtual machine, and the scheduling request is used to indicate that a locally registered resource of a target GPU computing unit in the first virtual machine does not meet the target resource requirement; Starting from the first virtual machine, the GPU computing units corresponding to the virtual machines included in the GPU scheduling system are traversed in turn according to the scheduling hierarchy, and the GPU computing units currently traversed are added to the candidate set until the number of the GPU computing units in the candidate set is greater than or equal to the pre-selected number of devices, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer, the virtual machine scheduling layer is controlled by the server scheduling layer, and the server scheduling layer is controlled by the resource pool center scheduling layer; According to the alternative set, a first GPU computing unit is scheduled to perform the computing task, wherein the alternative set includes the first GPU computing unit.
2. The method according to claim 1, characterized in that The GPU scheduling system also includes a computing power control center, the resource pool center scheduling layer is subject to the scheduling control of the computing power control center, the resource pool center scheduling layer includes at least one server in the server scheduling layer, each of the servers includes at least one virtual machine in the virtual machine scheduling layer, each of the virtual machines includes at least one of the GPU computing power units, and at least one of the virtual machines includes the first virtual machine.
3. The method according to claim 2, characterized in that Starting from the first virtual machine, traversing the GPU computing units corresponding to the virtual machines included in the GPU scheduling system in sequence according to the scheduling level includes: When the traversal of the GPU computing units in the first virtual machine is completed and the number of the GPU computing units in the candidate set is less than the pre-selected number, determining whether the first server includes the second virtual machine, wherein the first server includes the first virtual machine; When the first server does not include the second virtual machine and the resource pool center scheduling layer includes the second server, the GPU computing units in each of the virtual machines included in the second server are traversed.
4. The method according to claim 1, characterized in that Obtaining task-related information of the computing task carried in the scheduling request, including: When the first virtual machine completes parsing the SRv6 data packet sent by the entry node, task-related information of the computing task carried by the scheduling request is obtained, wherein the SRv6 data packet includes the entry node address, the source address and task-related information of the computing task.
5. The method according to claim 1, characterized in that Before detecting the scheduling request initiated by the first virtual machine, the method further includes: The computing power service status of each of the virtual machines is registered in the computing power network router, wherein the computing power service status includes the address of each of the virtual machines, the identifier of the GPU computing power unit and the registration resource information corresponding to the identifier of the GPU computing power unit.
6. The method according to claim 1, characterized in that The step of adding the GPU computing unit currently being traversed to the candidate set includes: Calculate the waiting time of a second GPU computing unit, where the second GPU computing unit is the GPU computing unit currently traversed; Add the second GPU computing unit to the candidate set, wherein the second GPU computing unit is marked with the waiting time.
7. The method according to claim 6, characterized in that Scheduling the first GPU computing unit to perform the computing task according to the candidate set includes: Constructing a selected set, wherein the selected set includes the first GPU computing unit, and the first GPU computing unit includes a preset selected number of the second GPU computing units with the shortest waiting time; Obtaining a first number of subtasks included in the computing task; The first number of the first GPU computing units in the selected set are scheduled to respectively execute each of the subtasks, wherein the first number is less than the selected number.
8. The method according to claim 7, characterized in that The local registration resources include storage resources and stream processor resources; The step of calculating the waiting time of the second GPU computing unit includes one of the following: When the storage resources of the second GPU computing unit meet the first requirement and the stream processor resources of the target GPU computing unit meet the second requirement, determine the waiting time of the second GPU computing unit as a first delay, wherein the first delay is a communication delay between the second GPU computing unit and the first virtual machine, the first requirement is a memory occupancy requirement of a subtask corresponding to the second GPU computing unit, and the second requirement is a stream processor usage requirement of a subtask corresponding to the second GPU computing unit; When the storage resources of the second GPU computing power unit meet the first requirement and the stream processor resources of the second GPU computing power unit do not meet the second requirement, determine that the waiting time of the second GPU computing power unit is the maximum value of the first delay and the second delay, wherein the second delay is the time for waiting for other computing tasks to release the stream processor resources until the second requirement is met; When the storage resources of the second GPU computing power unit do not meet the first requirement, and the stream processor resources of the second GPU computing power unit meet the second requirement, determine the waiting time of the second GPU computing power unit as the sum of the first delay and the third delay, wherein the third delay is the time for waiting for other computing tasks to release storage resources until the first requirement is met; When the storage resources of the second GPU computing power unit do not meet the first requirement and the stream processor resources of the second GPU computing power unit do not meet the second requirement, the waiting time of the second GPU computing power unit is determined to be the maximum value of the first delay, the second delay and the third delay.
9. A scheduling device for a GPU computing unit, characterized in that: include: an acquisition module, configured to, upon detecting a scheduling request initiated by a first virtual machine, acquire task-related information of a computing task carried in the scheduling request, wherein the task-related information includes an address of a destination virtual machine, an identifier of a target GPU computing unit, and a target resource requirement, the destination virtual machine being the first virtual machine, and the scheduling request being used to indicate that a locally registered resource of a target GPU computing unit in the first virtual machine does not meet the target resource requirement; A traversal module, configured to traverse the GPU computing units corresponding to the virtual machines included in the GPU scheduling system in sequence, starting from the first virtual machine, according to the scheduling hierarchy, and add the GPU computing units currently traversed to the candidate set until the number of the GPU computing units in the candidate set is greater than or equal to the pre-selected number of devices, wherein the scheduling hierarchy includes a virtual machine scheduling layer, a server scheduling layer and a resource pool center scheduling layer, the virtual machine scheduling layer is subject to scheduling control by the server scheduling layer, and the server scheduling layer is subject to scheduling control by the resource pool center scheduling layer; A scheduling module is used to schedule the first GPU computing unit to perform the computing task according to the alternative set, wherein the alternative set includes the first GPU computing unit.
10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the scheduling method of the GPU computing unit as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Information processing method and device, equipment and storage medium
CN120508396A
