WO2021098182A1 - Resource management method and apparatus, electronic device and storage medium - Google Patents
Resource management method and apparatus, electronic device and storage medium Download PDFInfo
- Publication number
- WO2021098182A1 WO2021098182A1 PCT/CN2020/093491 CN2020093491W WO2021098182A1 WO 2021098182 A1 WO2021098182 A1 WO 2021098182A1 CN 2020093491 W CN2020093491 W CN 2020093491W WO 2021098182 A1 WO2021098182 A1 WO 2021098182A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- gpu
- physical
- target virtual
- virtual gpu
- memory capacity
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5066—Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Definitions
- This application relates to the field of computer technology, in particular to a resource management method and device, electronic equipment and storage medium.
- GPUs graphics processing units
- a large number of small-scale and light-load computing tasks make GPU resources face the challenges of low computing load and high frequency of use.
- a large number of small tasks increase the power consumption of the GPU cluster and reduce the overall resource utilization.
- each physical GPU resource is divided into multiple fine-grained virtual GPU computing resources, so that small tasks can be directly processed using the virtual GPU to improve the parallelism of applications and the resource utilization efficiency of GPU clusters.
- the embodiments of the present application provide a resource management and allocation method and device, electronic equipment, and storage medium.
- the first aspect of the embodiments of the present application provides a resource management allocation method, including: reading a configuration file, the configuration file including the virtual image processing unit GPU configuration parameters of the guest device; based on the configuration file, generating the guest device At least one available virtual GPU; in response to receiving a task to be processed by a target user, a physical GPU is allocated to a target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- the allocating a physical GPU to the target virtual GPU corresponding to the task to be processed includes: setting the target virtual GPU to the target virtual GPU based on the memory capacity required by the target virtual GPU and a resource state table.
- the GPU allocates physical GPUs, where the resource state table includes current state information of each of the multiple physical GPUs.
- the current state information of the physical GPU includes: the video memory capacity of the physical GPU, user information of each virtual GPU corresponding to the video memory already occupied by the physical GPU, and The video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- the allocating a physical GPU to the target virtual GPU based on the required video memory capacity and the resource state table of the target virtual GPU includes: based on the required video memory of the target virtual GPU The capacity and the resource state table allocate physical GPUs to the target virtual GPU, so that the video memory of the multiple physical GPUs is used to a minimum.
- the allocating a physical GPU to the target virtual GPU based on the required video memory capacity and the resource state table of the target virtual GPU includes: based on the resource state table, according to multiple physical The order of GPU arrangement is to determine the remaining video memory capacity of each physical GPU in turn until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU; the remaining video memory capacity meets the required video memory capacity of the target virtual GPU
- the physical GPU determines the physical GPU allocated to the target virtual GPU.
- the method further includes: when it is determined that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the required video memory capacity of the target virtual GPU , It is determined that the virtual GPU has no available physical resources.
- the allocating a physical GPU to the target virtual GPU based on the display memory capacity and resource state table of the target virtual GPU includes: based on the required display memory capacity of the target virtual GPU and A resource state table, which allocates physical GPUs to the target virtual GPU, so that at least one task of the target user is allocated to the multiple physical GPUs as evenly as possible, wherein the at least one task includes the to-be-processed task.
- the allocating a physical GPU to the target virtual GPU based on the memory capacity and resource state table of the target virtual GPU includes: determining the target user based on the resource state table The number of tasks currently allocated by each physical GPU in the plurality of physical GPUs, and the remaining video memory capacity of each physical GPU; the number of tasks is minimized and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU
- the physical GPU determines the physical GPU allocated to the target virtual GPU.
- the method further includes: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is multiple, The foremost physical GPU among the multiple physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the method further includes: updating the resource state table based on the physical GPU allocated to the target virtual GPU; or, in the case that the task processing state changes, based on the The resource status table is updated with the change of the task processing status.
- an embodiment of the present application provides a resource management allocation method applied to a guest device, including: reading a configuration file of a host, where the configuration file includes virtual GPU configuration parameters of the guest device; based on the A configuration file to generate at least one available virtual GPU of the guest device; in the case of receiving a task to be processed by a target user, send a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed, wherein the The resource allocation request is used to request the host to allocate a physical GPU to the target virtual GPU, and the at least one available virtual GPU includes the target virtual GPU.
- the method before the target virtual GPU corresponding to the task to be processed sends a resource allocation request to the host, the method further includes: determining the guest device based on the first resource status table At least one of the available virtual GPUs in the idle state, wherein the first resource state table includes current state information of each of the multiple physical GPUs; determining all the virtual GPUs in the idle state from the virtual GPUs in the idle state.
- the target virtual GPU before the target virtual GPU corresponding to the task to be processed sends a resource allocation request to the host, the method further includes: determining the guest device based on the first resource status table At least one of the available virtual GPUs in the idle state, wherein the first resource state table includes current state information of each of the multiple physical GPUs; determining all the virtual GPUs in the idle state from the virtual GPUs in the idle state.
- the method further includes: receiving a first update instruction regarding the first resource status table from the host, where the first update instruction is detected on the host Sent when the task processing state of the physical GPU changes; based on the first update instruction, the first resource state table is updated.
- the at least one physical GPU includes a first physical GPU with a newly added task
- the first update instruction carries at least one of the following information: The user information corresponding to the newly added task, the information of the first physical GPU, the video memory capacity of the virtual GPU corresponding to the newly added task; and/or the at least one physical GPU includes the second with the newly completed task
- the first update instruction carries at least one of the following: user information corresponding to the newly completed task, and information of the second physical GPU.
- the method further includes: scheduling the virtual GPU to execute the task to be processed; and receiving a processing result of the task to be processed from the host.
- an embodiment of the present application provides a resource management allocation method, applied to a host, including: receiving a resource allocation request from a guest device, the resource allocation request carrying information of the task to be processed and information of the target virtual GPU; The information of the target virtual GPU allocates a target physical GPU to the target virtual GPU.
- the allocating a target physical GPU to the target virtual GPU based on the information of the target virtual GPU includes: setting the target physical GPU to the target virtual GPU based on the required video memory capacity of the target virtual GPU.
- Virtual GPU allocates physical GPU.
- the allocating a physical GPU to the target virtual GPU based on the video memory capacity of the target virtual GPU includes: based on the required video memory capacity of the target virtual GPU, a resource allocation strategy, and a second The second resource state table allocates physical GPUs to the target virtual GPU, where the second resource state table includes current state information of each of the multiple physical GPUs.
- the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table includes: based on the second The resource state table, according to the arrangement order of the multiple physical GPUs, sequentially determines the remaining video memory capacity of each physical GPU until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU; and the remaining video memory capacity meets all requirements.
- the physical GPU of the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the virtual GPU is determined No physical resources are available.
- the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table includes: based on the second The resource status table determines the number of tasks currently allocated by each physical GPU of the multiple physical GPUs by the target user, and the remaining video memory capacity of each physical GPU, where the target user is a user corresponding to the target virtual GPU; The physical GPU with the smallest number of tasks and the remaining video memory meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU of the target virtual GPU.
- the method further includes: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is multiple, The foremost physical GPU among the physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the method further includes: updating the second resource state table based on the physical GPU allocated to the target virtual GPU; or, when the task processing state changes, The second resource status table is updated based on the change in the task processing status.
- the method further includes: performing task scheduling based on the task queue of each physical GPU in the plurality of physical GPUs.
- an embodiment of the present application provides a resource management system, including: a host and a guest device, wherein a plurality of physical GPUs are provided on the host, the guest device includes a virtual machine or a container; the guest device uses Yu: Read a configuration file, the configuration file including the virtual image processing unit GPU configuration parameters of the guest device; generate at least one available virtual GPU of the guest device based on the configuration file;
- a resource allocation request is sent to the host based on the target virtual GPU corresponding to the task to be processed, where the resource allocation request is used to request the host to allocate a physical GPU to the target virtual GPU, and
- the at least one available virtual GPU includes the target virtual GPU; the host is configured to: receive a resource allocation request from the guest device, the resource allocation request carrying information about the task to be processed and the target virtual GPU ⁇ ; Based on the information of the target virtual GPU, assign a target physical GPU to the target virtual GPU.
- an embodiment of the present application provides a resource management device, including a communication unit and a processing unit, wherein the processing unit is configured to: obtain a configuration file through the communication unit; read the configuration file, the configuration The file includes the virtual image processing unit GPU configuration parameters of the guest device; based on the configuration file, at least one available virtual GPU of the guest device is generated; and in response to receiving the task to be processed by the target user, corresponding to the task to be processed A physical GPU is allocated to the target virtual GPU of the target virtual GPU, and the at least one available virtual GPU includes the target virtual GPU.
- an embodiment of the present application provides a resource management device, including a communication unit and a processing unit, wherein the processing unit is configured to: obtain a host configuration file through the communication unit; read the host configuration file, wherein The configuration file includes virtual GPU configuration parameters of the guest device; based on the configuration file, at least one available virtual GPU of the guest device is generated; and in the case of receiving a task to be processed by the target user, through the communication
- the unit sends a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed, wherein the resource allocation request is used to request the host to allocate a physical GPU to the target virtual GPU, and the at least one available virtual GPU
- the GPU includes the target virtual GPU.
- an embodiment of the present application provides a resource management device, including a communication unit and a processing unit, wherein the processing unit is configured to: receive a resource allocation request from a guest device through the communication unit, the resource allocation request Carry the information of the task to be processed and the information of the target virtual GPU; and based on the information of the target virtual GPU, allocate a target physical GPU to the target virtual GPU.
- an embodiment of the present application provides a resource management system, including a host and a guest device, wherein the host is provided with multiple physical GPUs; the guest device is a device of any one of the sixth aspect of the embodiments of the present application Device; the host is a device according to any one of the seventh aspects of the embodiments of this application.
- an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store a computer program, and the computer program is configured to be executed by the above-mentioned processor so that the processor executes the present invention. Any method described in the first aspect, the second aspect, or the third aspect of the application embodiment.
- an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium is used to store a computer program, wherein the above-mentioned computer program enables a computer to execute operations as described in the first aspect and the first aspect of the embodiments of the present application. Any method described in the second or third aspect.
- an embodiment of the present application provides a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to execute operations as described in this application.
- the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to execute operations as described in this application.
- Embodiments any one of the methods described in the first aspect, the second aspect, or the third aspect.
- the computer program product may be a software installation package.
- the embodiment of the application first reads the configuration file, where the configuration file includes the configuration parameters of the virtual GPU of the guest device, and then based on the configuration file, generates at least one available virtual GPU of the guest device, and after receiving the target customer
- a physical GPU is allocated to a target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance, but after the virtual GPU receives the task to be processed, the virtual GPU is dynamically assigned the corresponding physical GPU, which can be flexibly based on the current task
- the characteristics of the physical GPU resources are managed and allocated to improve the resource utilization of the physical GPU and improve the overall performance of the system.
- Fig. 1 is a schematic diagram of a resource management system provided by an embodiment of the present application.
- Fig. 2 is a schematic flowchart of a resource management and allocation method disclosed in an embodiment of the present application.
- FIG. 3 is an architecture diagram of a minimum resource management allocation strategy provided by an embodiment of the present application.
- Fig. 4 is a structural diagram of a load balancing distribution strategy provided by an embodiment of the present application.
- Fig. 5 is a schematic flowchart of a method for resource management and allocation disclosed in another embodiment of the present application.
- Fig. 6 is a schematic flowchart of a method for resource management and allocation disclosed in another embodiment of the present application.
- FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of an electronic device provided by another embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
- FIG. 10 is a block diagram of the functional unit composition of a resource management device involved in an embodiment of the present application.
- Fig. 11 is a block diagram of functional units of a resource management device involved in another embodiment of the present application.
- Fig. 12 is a block diagram of functional units of a resource management device involved in another embodiment of the present application.
- the resource management and allocation device involved in the embodiments of the present application is a device that can perform resource management and allocation, and may be an electronic device.
- the above-mentioned electronic device includes a terminal device.
- the above-mentioned terminal device includes, but is not limited to, a touch-sensitive surface ( For example, touch screen displays and/or touch pads) mobile phones, laptop computers or other portable devices such as tablet computers.
- a touch-sensitive surface For example, touch screen displays and/or touch pads
- the device is not a portable communication device, but a desktop computer, server, etc. having a touch-sensitive surface (eg, touch screen display and/or touch pad).
- Fig. 1 is a schematic diagram of a resource management system provided by an embodiment of the application.
- the GPU virtualization solution involves a guest device (Guest) 101 and a host (Host) 102.
- the host 102 refers to a physical machine node of a device with a physical GPU (pGPU) 140.
- the user can directly perform GPU tasks on the host.
- the host also contains a service daemon, which is responsible for starting the physical GPU and parsing and forwarding data with guest devices, etc. Communication operation.
- the guest device 101 refers to a virtual machine or container that can use a virtualized GPU.
- the guest device 101 does not have any GPU device and cannot directly perform GPU tasks.
- the guest device 101 contains a process for GPU virtualization, which is responsible for the dynamic linking of the encapsulated GPU
- the library and data forwarding enable tasks on the guest device 101 to transparently use the physical GPU of the host to perform operations.
- the guest's virtual GPU (vGPU) resource management strategy can be selected as follows: the guest's virtual GPU resource management strategy is divided into two stages: virtual display according to configuration options and actual allocation according to task start. Among them, Guest can be a virtual machine. As shown in Figure 1, the main allocation process is as follows: First, start the virtual machine (VM) of the guest device, where there may be multiple virtual machines, such as 110-1, 110-n, and so on.
- VM virtual machine
- the virtual GPU related parameters on the current VM including the number of virtual GPUs, the video memory capacity of each virtual GPU, the use time of each virtual GPU, the size of each virtual GPU time slice, etc.;
- a virtual virtual GPU image 122 is generated on the virtual GPU guest device of the VM.
- the virtual GPU is not mapped with the physical GPU, and only the virtual GPU information is allocated to the user to observe at the software level; when the user on the VM starts to use
- the virtual machine sends a request to initialize GPU information.
- the VM establishes a connection with the Host, and establishes the actual association between the virtual GPU 124 and the physical GPU 140 through the virtual GPU-physical GPU resource allocation strategy 130.
- one virtual GPU 124 may be associated with one physical GPU, or may be associated with multiple physical GPUs.
- Host 102 returns the information of the physical GPU 140 to the VM, such as the address ID of the GPU, the device model of the physical GPU, the remaining video memory capacity of the physical GPU, the start time of applying for the use of the physical GPU, and other parameters.
- the virtual GPU updates the above information and follows the configuration
- the parameter calls the GPU virtualization process to forward the data of task 123 to the Host.
- the host's service daemon starts the associated physical GPU and processes task 123 according to the forwarded data, and sends the task processing result back to the VM after the task processing is completed. It should be noted that although the user on the VM looks like the task 123 is completed on the virtual GPU 124 on the VM, in fact, the task 123 is completed on the physical GPU 140 of the host.
- Guest and Host may be set on the same device; for example, the physical GPU on the host and the guest device installed on the host may also be set on different devices. For example, guest devices installed on user equipment and various physical GPU node devices installed on the network.
- FIG. 2 is a schematic flowchart of a resource management and allocation method disclosed in an embodiment of the present application. As shown in FIG. 2, the resource management and allocation method includes the following steps.
- 201 Read a configuration file, where the configuration file includes virtual GPU configuration parameters of the guest device.
- the configuration file includes virtual GPU-related parameters on the current guest device.
- the virtual GPU-related parameters may include, but are not limited to, the number of virtual GPUs, the memory capacity of each virtual GPU, the use time of each virtual GPU, and each virtual GPU. One or more of GPU time slice size, etc.
- the configuration file may be system default, or may be generated according to user requirements.
- the guest device may generate at least one available virtual GPU of the guest device based on the configuration file.
- the above virtual GPU is a software level used to present the viewing to the user. For example, after generating at least one of the above-mentioned available virtual GPUs, the user can view the number of virtual GPUs on the guest device through the user device, as well as the video memory capacity of each virtual GPU, the duration of each virtual GPU, and each Parameters such as virtual GPU time slice size. At this time, the virtual GPU is not mapped with the physical GPU.
- the guest device after the guest device receives the task to be processed, the guest device allocates a target virtual GPU for the task to be processed to process the task to be processed. Then, a physical GPU is allocated to the target virtual GPU according to the specific information of the target virtual GPU, that is, a mapping relationship between the virtual GPU and the physical GPU is established. After the physical GPU is allocated to the target virtual GPU, the task to be processed is processed in the physical GPU allocated by the target virtual GPU, and the processing result is fed back to the guest device. That is, the above-mentioned tasks to be processed are processed in the physical GPU allocated by the host, and the processing result is fed back to the guest device.
- the embodiment of the application reads a configuration file, where the configuration file includes the parameters of the virtual GPU of the guest device, and the guest device includes at least one virtual GPU;
- the target virtual GPU corresponding to the task is allocated a physical GPU, and the at least one available virtual GPU includes the target virtual GPU.
- the virtual GPU and the physical GPU do not establish a mapping relationship before receiving the task. After the task is received, the mapping relationship may be established between the virtual GPU and the physical graphics virtual unit. Furthermore, it is possible to flexibly manage and allocate GPU resources through different resource allocation strategies, so as to improve the use efficiency of physical GPUs.
- the allocating a physical GPU to the target virtual GPU corresponding to the task to be processed includes: based on the required video memory capacity of the target virtual GPU and a resource state table, assigning a physical GPU to the target virtual GPU The GPU allocates physical GPUs, where the resource state table includes current state information of each of the multiple physical GPUs in the host.
- the current state information includes: among the above-mentioned multiple physical GPUs, the video memory capacity of each physical GPU, the user information of each virtual GPU in each physical GPU corresponding to the video memory already occupied by the physical GPU, and the user information of each virtual GPU in each physical GPU.
- the video memory capacity of each physical GPU, the user ID of each virtual GPU in each physical GPU corresponding to the video memory already occupied by the physical GPU Information such as the video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- the foregoing current state information may further include a task identifier of each virtual GPU in each physical GPU corresponding to the video memory that the physical GPU has already occupied.
- Table 1 is a specific implementation manner of a resource status table provided in an embodiment of the application.
- pGPU stands for physical GPU
- vGPU stands for virtual GPU
- ID stands for address or identification.
- a physical GPU that satisfies the conditions for executing the task to be processed can be determined from the resource state table according to the memory capacity of the target virtual GPU as the target virtual GPU. For example, a physical GPU whose remaining video memory is greater than the video memory of the target virtual GPU may be determined as the physical GPU allocated by the target virtual GPU.
- the allocating a physical GPU to the target virtual GPU based on the required video memory capacity and resource state table of the target virtual GPU may specifically include: based on the video memory capacity, resource state table, and resource allocation of the target virtual GPU The strategy allocates physical GPUs to the target virtual GPU.
- the aforementioned resource allocation strategy refers to a mapping rule between the virtual GPU and the physical GPU of the resource formulated to achieve a certain effect.
- a minimum resource allocation strategy formulated in order to achieve the least use of physical GPUs and another example, a load balancing allocation strategy formulated in order to make multiple tasks of the same user evenly distributed among the physical GPUs.
- the resource allocation strategy may be located at the host, and a partial mapping relationship of the resource allocation strategy is stored in the guest device.
- the allocating a physical GPU to the target virtual GPU based on the target virtual GPU's video memory capacity, resource state table, and resource allocation strategy includes: based on the resource state table, according to multiple The sequence of physical GPUs is to determine the remaining video memory capacity of each physical GPU in turn until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU; the remaining video memory capacity meets the required video memory capacity of the target virtual GPU The physical GPU of determines the physical GPU allocated to the target virtual GPU.
- the resource allocation strategy in this allocation method of virtual GPU and physical GPU may be referred to as the least resource allocation strategy.
- the arrangement order of the multiple physical GPUs can be arranged in the order of the ID numbers of the physical GPUs, or the arrangement order of the multiple physical GPUs in the resource state table, such as pGPU1-pGPUn in Table 1, and in Table 1.
- the arrangement order of the physical GPUs can be arranged according to the order of the ID numbers of the physical GPUs, or according to the location information of the physical GPUs in the host, or according to the time when the physical GPUs are added to the host.
- the first physical GPU is determined as the physical GPU allocated by the target virtual GPU; otherwise, the second The remaining video memory capacity of a physical GPU, and then determine whether the remaining video memory capacity of the second physical GPU is greater than or equal to the required video memory capacity of the target virtual GPU, if it is greater than or equal to the required video memory capacity of the target virtual GPU, the second physical GPU
- the GPU determines the physical GPU allocated to the target virtual GPU; otherwise, it continues to obtain the remaining video memory capacity of the next physical GPU to perform the same judgment operation.
- FIG. 3 is a structural diagram of a minimum resource management allocation strategy provided by an embodiment of the application.
- the shaded rectangle with a label indicates the task to be processed
- the label in the rectangle indicates the order in which the tasks are generated
- VPT indicates the resource state table
- pGPU indicates the physical GPU
- vGPU indicates the virtual GPU. From the architecture diagram, it can be seen that the tasks are generated according to the The order of precedence is assigned to the physical GPUs arranged in front.
- the physical GPUs arranged in the front are preferentially allocated to the target virtual GPUs, so as to maximize the utilization of each GPU to save GPU resources.
- the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, a resource state table, and a resource allocation strategy includes: determining all the physical GPUs based on the resource state table.
- the number of tasks currently allocated by each physical GPU of the target user among multiple physical GPUs and the remaining video memory of each physical GPU, the user ID is the identification of the target user of the target virtual GPU; the number of tasks is minimized and
- the physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the minimum number of tasks refers to the minimum number of tasks that the target user runs on the physical GPU, rather than the minimum number of all tasks running on the physical GPU.
- the resource allocation strategy in this allocation method of virtual GPU and physical GPU is referred to as a load balancing allocation strategy.
- the number of tasks of the target user corresponding to the video memory occupied by each physical GPU in the multiple physical GPUs can be determined, so as to count the tasks of the target user in the above-mentioned multiple physical GPUs.
- the physical GPU with the least number of tasks and the remaining video memory meeting the required video memory capacity of the target virtual GPU is then determined as the physical GPU allocated by the target virtual GPU.
- the tasks of the target users mentioned above can be evenly distributed to multiple physical GPUs, so as to reduce the accumulation of multiple tasks of the same user to execute on the same physical GPU, resulting in a single user multi-task queuing phenomenon, thereby increasing the user's tasks Implementation efficiency.
- the number of physical GPUs with the least number of tasks and remaining video memory meeting the required video memory capacity of the target virtual GPU is multiple, the number of tasks is the least and the remaining video memory capacity meeting the target
- the physical GPU arranged at the forefront among the physical GPUs with the required video memory capacity of the virtual GPU is determined as the physical GPU of the target virtual GPU.
- the arrangement order of the multiple physical GPUs may be arranged in the order of the ID numbers of the physical GPUs, or may be the arrangement order of the multiple physical GPUs in the aforementioned resource state table.
- FIG. 4 is a structural diagram of a load balancing distribution strategy provided by another embodiment of the application.
- the shaded rectangle with a label indicates the task to be processed
- the label in the rectangle indicates the order in which the task is generated
- VPT indicates the resource status table
- pGPU indicates the physical GPU
- vGPU indicates the virtual GPU. From the architecture diagram, it can be seen that the same user ID Tasks are evenly distributed to each physical GPU.
- the method further includes: updating the resource state table based on the physical GPU allocated to the target virtual GPU.
- the physical GPU of the target virtual GPU After the physical GPU of the target virtual GPU is determined, information such as the physical GPU-ID of the target virtual GPU, the ID of the target virtual GPU, the user ID of the target virtual GPU, and the memory capacity of the target virtual GPU are passed. Update the above resource status table.
- the resource state table is updated based on the tasks that have been executed and completed.
- the information of the physical GPU that has executed the task in the resource state table can be updated by using the physical GPU-ID of the executed task and the ID of the virtual GPU corresponding to the executed task.
- FIG. 5 is a schematic flowchart of a resource management and allocation method disclosed in another embodiment of the present application, which is applied to a guest device. As shown in FIG. 5, the resource management and allocation method includes the following steps.
- 501 Read a configuration file of the host, where the configuration file includes virtual GPU configuration parameters of the guest device.
- steps 501 and 502 can refer to steps 201 and 202 in FIG. 2, which will not be repeated here.
- the aforementioned guest device may correspond to the Guest in FIG. 1, and the aforementioned host may correspond to the Host in FIG. 1.
- the guest device may be a virtual machine, and the virtual machine includes at least one virtual GPU.
- the virtual GPU in the virtual machine does not process the task to be processed, the virtual GPU in the virtual machine does not have a physical GPU corresponding to it.
- the virtual machine After the virtual machine receives the task to be processed, the virtual machine allocates a target virtual GPU corresponding to the task to be processed, and then sends resources to the host according to the information of the allocated target virtual GPU, such as the memory capacity of the target virtual GPU An allocation request to request the host to allocate a physical GPU to the target virtual GPU.
- the resource allocation request may carry the ID of the target virtual GPU and the video memory capacity, and may also carry the user ID of the target virtual GPU.
- the guest device may also be a container, and the container includes at least one virtual GPU.
- the virtual GPU in the container does not process the task to be processed
- the virtual GPU in the container does not have a physical GPU corresponding to it.
- the container allocates a target virtual GPU corresponding to the task to be processed, and then sends a resource allocation request to the host according to the information of the allocated target virtual GPU, such as the memory capacity of the target virtual GPU To request the host to allocate a physical GPU to the target virtual GPU.
- the resource allocation request may carry the ID of the target virtual GPU and the video memory capacity, and may also carry the user ID of the target virtual GPU.
- the embodiment of the application reads a configuration file, where the configuration file includes the parameters of the virtual GPU of the guest device, and the guest device includes at least one virtual GPU; in the case of receiving a task to be processed, based on the to-be-processed task
- the target virtual GPU corresponding to the task sends a resource allocation request to the host.
- the virtual GPU and the physical GPU do not establish a mapping relationship before the task is received. After the task is received, the mapping relationship between the virtual GPU and the physical GPU is dynamically established through a resource allocation strategy. Therefore, the mapping relationship between the virtual GPU and the physical GPU can be flexibly established to improve the use efficiency of the physical GPU.
- the method further includes: based on the number of virtual GPUs in the guest device and the first The resource status table determines the number of unused virtual GPUs of the guest device, and the first resource status table includes current usage status information of each physical GPU; in the case that the number of unused virtual GPUs is greater than zero , Determining the target virtual GPU from the unused virtual GPUs.
- the information contained in the above-mentioned first resource state table is consistent with the information contained in the resource state table in FIG. 2, and will not be repeated here.
- the method further includes: receiving a first update instruction regarding the first resource state table, the first update instruction being sent by the host when a change in the task processing state of the physical GPU is detected ⁇ ; Based on the first update instruction, update the first resource status table.
- a change in the task processing state may be that a new task is added to the physical GPU or a task is completed.
- the first update instruction carries at least one of the following information: user information corresponding to the newly added task of the first physical GPU, The information of the first physical GPU, the video memory capacity of the virtual GPU of the newly added task; in the case that the host detects that there is a newly completed task in the video memory of the physical GPU, the first update instruction carries the following information At least one item of: user information corresponding to the newly completed task, and information of the second physical GPU corresponding to the newly completed task.
- the first physical GPU is a GPU newly added to a task
- the second physical GPU is a GPU corresponding to a newly completed task.
- the user information may be the ID of the user
- the information of the physical GPU may be the ID of the physical GPU.
- the method further includes: scheduling the virtual GPU to execute the task to be processed; and receiving a processing result of the task to be processed from the host.
- FIG. 6 is a schematic flowchart of a resource management allocation method disclosed in another embodiment of the present application, which is applied to a host. As shown in FIG. 6, the resource management allocation method includes the following steps.
- 601 Receive a resource allocation request from a guest device, where the resource allocation request carries information about a task to be processed and information about a target virtual GPU, where the target virtual GPU is a virtual GPU included in the guest device.
- the aforementioned guest device may correspond to the Guest in FIG. 1, and the aforementioned host may correspond to the Host in FIG. 1.
- the aforementioned guest device includes at least one virtual GPU.
- the virtual GPU in the guest device does not process the task to be processed, the virtual GPU in the guest device does not have a physical GPU corresponding to it.
- the foregoing information of the target virtual GPU may include, but is not limited to, the memory capacity of the target virtual GPU and the user ID of the target virtual GPU.
- the allocating a target physical GPU to the target virtual GPU based on the information of the target virtual GPU includes: allocating a physical GPU to the target virtual GPU based on the display memory capacity of the target virtual GPU.
- the target physical GPU is used to process the task to be processed according to the information of the task to be processed.
- the allocating a physical GPU to the target virtual GPU based on the video memory capacity of the target virtual GPU includes: based on the required video memory capacity of the target virtual GPU, a resource allocation strategy, and a second resource state table as the The target virtual GPU allocates physical GPUs, where the second resource state table includes current state information of each of the multiple physical GPUs.
- the above-mentioned specific implementation process of allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table can refer to the "based on The required video memory capacity of the target virtual GPU and the resource state table allocate operations corresponding to the “physical GPU” for the target virtual GPU.
- the operation of determining the number of tasks currently allocated by the target user to each physical GPU in the multiple physical GPUs can be understood as determining the number of tasks currently allocated by the target user to each physical GPU in the multiple physical GPUs
- the target user is the user corresponding to the target virtual GPU.
- the "second resource state table” in the embodiment of the present application corresponds to the "allocation of physical GPUs to the target virtual GPU based on the required video memory capacity and resource state table of the target virtual GPU” in FIG. 2 above.
- Resource Status Table In one example, the second resource status table is the same as the first resource status table.
- the guest device copies the resource status table on the host to the local, and the host maintains the second resource status table, and the second resource status table is displayed in the second resource status table.
- the guest device is notified to update the first resource status table synchronously. For example, the guest device may be notified to update the first resource status table through the first update instruction.
- the method further includes: updating the second resource state table based on the physical GPU allocated to the target virtual GPU; or, in the case that the task processing state changes, based on The change in the task processing status updates the second resource status table.
- the second resource state table is updated, including at least one of the following: user information corresponding to the newly added task of the allocated physical GPU, and information about the allocated physical GPU , The video memory capacity of the virtual GPU corresponding to the newly added task.
- the second resource state table is updated based on the change in the task processing state, including at least one of the following: user information corresponding to the newly completed task, and information about the physical GPU that completed the task .
- the information of the physical GPU includes the ID of the physical GPU, and the user information includes the user ID.
- the method may further include: performing task scheduling based on the task queue of each of the multiple physical GPUs .
- the task queue refers to tasks included in the video memory occupied by the physical GPU.
- the embodiment of the present application first receives a resource allocation request from a guest device.
- the resource allocation request carries information about the task to be processed and a target virtual GPU.
- the target virtual GPU is a virtual GPU included in the guest device in the guest device, and then based on all the information.
- the information and resource management strategy of the target virtual GPU allocates a target physical GPU to the target virtual GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance, but after the virtual GPU receives the task, the virtual GPU is dynamically allocated the corresponding physical GPU, which can be flexibly allocated through different resources Strategies to manage and allocate GPU resources to improve the resource utilization of the physical GPU and improve the overall performance of the system.
- FIG. 7 is a schematic structural diagram of an electronic device 700 provided by an embodiment of the present application.
- the electronic device 700 includes a processor 710, a memory 720, and a communication device. Interface 730 and physical GPU 740.
- the one or more programs 721 are stored in the aforementioned memory 720 and are configured to be executed by the aforementioned processor 710, and the one or more programs 721 include instructions for executing the following steps.
- a configuration file including the GPU configuration parameters of the guest device; and based on the configuration file, generate at least one available virtual GPU of the guest device;
- the target virtual GPU corresponding to the task to be processed is allocated a physical GPU, and the at least one available virtual GPU includes the target virtual GPU.
- the embodiment of the application reads a configuration file, where the configuration file includes configuration parameters of the virtual GPU of the guest device; and based on the configuration file, generates at least one available virtual GPU of the guest device;
- a physical GPU is allocated to a target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance, but after the virtual GPU receives the task to be processed, the virtual GPU is dynamically assigned the corresponding physical GPU, which can be flexibly based on the current task
- the characteristics of GPU resources are allocated to improve the resource utilization of the physical GPU and improve the overall performance of the GPU system.
- the target virtual GPU corresponding to the task to be processed is allocated a physical GPU, and the instructions in the program are specifically used to perform the following operations: based on the video memory required by the target virtual GPU
- the capacity and resource state table allocates physical GPUs to the target virtual GPU, where the resource state table includes current state information of each of the multiple physical GPUs.
- the current state information of the physical GPU includes: the video memory capacity of the physical GPU, user information of each virtual GPU corresponding to the video memory already occupied by the physical GPU, and The video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- the target virtual GPU is allocated a physical GPU based on the required video memory capacity and the resource state table of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations : Based on the required video memory capacity and resource state table of the target virtual GPU, a physical GPU is allocated to the target virtual GPU, so that the video memory of the multiple physical GPUs is used at a minimum.
- the target virtual GPU is allocated a physical GPU based on the required video memory capacity and resource state table of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations: Based on the resource state table, the remaining video memory capacity of each physical GPU is sequentially determined according to the order of the multiple physical GPUs, until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU; and the remaining video memory capacity is satisfied The physical GPU of the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the instructions in the program are further used to perform the following operations: after determining that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the requirements of the target virtual GPU In the case of the required video memory capacity, it is determined that the virtual GPU has no available physical resources.
- the target virtual GPU is allocated a physical GPU based on the memory capacity and resource state table of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations:
- the required video memory capacity and resource state table of the target virtual GPU, and physical GPUs are allocated to the target virtual GPU, so that at least one task of the target user is allocated to the multiple physical GPUs as evenly as possible, wherein ,
- the at least one task includes the task to be processed.
- the target virtual GPU is allocated a physical GPU based on the memory capacity and resource state table of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations:
- the resource status table determines the number of tasks currently allocated by each physical GPU of the multiple physical GPUs by the target user and the remaining video memory capacity of each physical GPU; and minimizes the number of tasks and the remaining video memory capacity satisfies
- the physical GPU of the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the instructions in the program are further used to perform the following operations: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is In the case of multiple, the physical GPU arranged at the forefront among the multiple physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU GPU.
- the instructions in the program are also used to perform the following operations: update the resource state table based on the physical GPU allocated to the target virtual GPU; or, occur in the task processing state In the case of a change, the resource state table is updated based on the change in the task processing state.
- FIG. 8 is a schematic structural diagram of an electronic device 800 provided by another embodiment of the present application, and the electronic device 800 may be a visitor device.
- the electronic device 800 includes a processor 810, a memory 820, and a communication interface 830.
- the one or more programs 821 are stored in the aforementioned memory 820 and are configured to be executed by the aforementioned processor 810, and the one or more programs 821 include instructions for executing the following steps.
- the configuration file includes virtual GPU configuration parameters of the guest device; generate at least one available virtual GPU of the guest device based on the configuration file;
- a resource allocation request is sent to the host based on the target virtual GPU corresponding to the task to be processed, where the resource allocation request is used to request the host to allocate a physical GPU to the target virtual GPU, and the at least One available virtual GPU includes the target virtual GPU.
- the embodiment of the application reads a configuration file, where the configuration file includes the parameters of the virtual GPU of the guest device; based on the configuration file, generates at least one available virtual GPU of the guest device; In this case, a resource allocation request is sent to the host based on the target virtual GPU corresponding to the task to be processed.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance. Instead, after the virtual GPU receives the task, it dynamically sends a resource allocation request to the host to improve the resource utilization of the physical GPU, and Improve the overall performance of the GPU system.
- the instructions in the program are further used to perform the following operations: based on the first resource state Table, to determine the virtual GPU in the idle state among the at least one available virtual GPU of the guest device, wherein the first resource state table includes current state information of each of the multiple physical GPUs;
- the target virtual GPU is determined from the virtual GPUs in the idle state.
- the instructions in the program are further used to perform the following operations: receiving a first update instruction on the first resource state table from the host, the first update instruction It is sent when the host detects that the task processing state of the physical GPU has changed; based on the first update instruction, the first resource state table is updated.
- the at least one physical GPU includes a first physical GPU with a newly added task
- the first update instruction carries at least one of the following information: a newly added task of the first physical GPU Corresponding user information, information of the first physical GPU, the video memory capacity of the virtual GPU corresponding to the newly added task; and/or at least one physical GPU includes a second physical GPU with a newly completed task, the first An update instruction carries at least one of the following: user information corresponding to the newly completed task, and information of the second physical GPU.
- the instructions in the program are further used to perform the following operations: scheduling the virtual GPU to execute the to-be-processed task; and receiving the processing result of the to-be-processed task from the host.
- FIG. 9 is a schematic structural diagram of an electronic device 900 according to another embodiment of the present application, and the electronic device 900 may be a host.
- the electronic device 900 includes a processor 910, a memory 920, a communication interface 930, and a physical GPU 940.
- the one or more programs 921 are stored in the aforementioned memory 920 and are configured to be executed by the aforementioned processor 910, and the one or more programs 921 include instructions for executing the following steps.
- the resource allocation request carrying information of the task to be processed and information of a target virtual GPU; and based on the information of the target virtual GPU, a target physical GPU is allocated to the target virtual GPU.
- This embodiment of the application receives a resource allocation request from a guest device, the resource allocation request carries information about the task to be processed and information about a target virtual GPU; and based on the information about the target virtual GPU, allocates a target physical to the target virtual GPU GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance. Instead, after receiving the resource allocation request from the guest device, the virtual GPU is dynamically allocated the corresponding physical GPU, which can be flexibly based on the current The characteristics of the task are used to allocate GPU resources to improve the resource utilization of the GPU and improve the overall performance of the GPU system.
- the target virtual GPU is assigned a target physical GPU based on the information of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations: based on the target virtual GPU
- the required video memory capacity of the GPU allocates physical GPUs to the target virtual GPU.
- the physical GPU is allocated to the target virtual GPU based on the memory capacity of the target virtual GPU, and the instructions in the program are specifically used to perform the following operations: based on the target virtual GPU
- the required video memory capacity, the resource allocation strategy, and the second resource state table allocate physical GPUs to the target virtual GPU, where the second resource state table includes current state information of each of the multiple physical GPUs .
- the physical GPU is allocated to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table, and the instructions in the program are specifically Used to perform the following operations: based on the second resource state table, according to the arrangement order of the multiple physical GPUs, sequentially determine the remaining video memory capacity of each physical GPU until the determined remaining video memory capacity satisfies the target virtual GPU Required video memory capacity; a physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- the instructions in the program are also used to perform the following operations, when determining that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the requirements of the target virtual GPU In the case of the required video memory capacity, it is determined that the virtual GPU has no available physical resources.
- the program in the program is specifically used to perform the following operations: based on the second resource state table, determine the number of tasks that the target user currently has allocated to each physical GPU among the multiple physical GPUs, and the remaining video memory capacity of each physical GPU, where all The target user is a user corresponding to the target virtual GPU; the physical GPU with the least number of tasks and remaining video memory meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU of the target virtual GPU.
- the instructions in the program are further used to perform the following operations: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is In the case of multiple, the physical GPU that is arranged at the forefront among the physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- the instructions in the program are further used to perform the following operations: update the second resource state table based on the physical GPU allocated to the target virtual GPU; or, in task processing When the status changes, the second resource status table is updated based on the change in the task processing status.
- the instructions in the program are further used to perform the following operations: perform task scheduling based on the task queue of each physical GPU among the multiple physical GPUs.
- FIG. 10 is a block diagram of the functional unit composition of the resource management device 1000 involved in an embodiment of the present application.
- the resource management apparatus 1000 is applied to an electronic device, and the electronic device includes a processing unit 1010 and a communication unit 1020.
- the processing unit 1010 is configured to: obtain a configuration file through the communication unit 1020; read a configuration file, the configuration file including the GPU configuration parameters of the guest device; based on the configuration file, generate at least one available for the guest device A virtual GPU; and in response to receiving a task to be processed by a target user, a physical GPU is allocated to a target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- the embodiment of the application reads a configuration file, where the configuration file includes the parameters of the virtual GPU of the guest device; based on the configuration file, generates at least one available virtual GPU of the guest device; In this case, a physical GPU is allocated to the target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance, but after the virtual GPU receives the task to be processed, the virtual GPU is dynamically assigned the corresponding physical GPU, which can be flexibly based on the current task
- the characteristics of the GPU resources are allocated to improve the resource utilization of the GPU and improve the overall performance of the GPU system.
- the processing unit 1010 is specifically configured to: based on the video memory capacity required by the target virtual GPU And a resource state table that allocates physical GPUs to the target virtual GPU, wherein the resource state table includes current state information of each physical GPU in the multiple physical GPUs.
- the current state information of each physical GPU includes: the video memory capacity of the physical GPU, the user information of each virtual GPU corresponding to the video memory already occupied by the physical GPU, and the The video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- the processing unit 1010 is specifically configured to: Based on the required video memory capacity and resource state table of the target virtual GPU, a physical GPU is allocated to the target virtual GPU, so that the video memory of the multiple physical GPUs is used to a minimum.
- the processing unit 1010 is specifically configured to:
- the resource state table determines the remaining video memory capacity of each physical GPU in sequence according to the arrangement order of the multiple physical GPUs, until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU; and the remaining video memory capacity meets all requirements.
- the physical GPU of the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the processing unit 1010 is further configured to: determine that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the required video memory capacity of the target virtual GPU In the case of, it is determined that the virtual GPU has no available physical resources.
- the processing unit 1010 is specifically configured to: The required video memory capacity and resource status table of the target virtual GPU, and physical GPUs are allocated to the target virtual GPU, so that at least one task of the target user is allocated to the multiple physical GPUs as evenly as possible, wherein, The at least one task includes the pending task.
- the processing unit 1010 is specifically configured to:
- the resource status table determines the number of tasks currently allocated by each physical GPU of the multiple physical GPUs by the target user, and the remaining video memory capacity of each physical GPU; and minimizes the number of tasks and the remaining video memory capacity satisfies all
- the physical GPU of the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated to the target virtual GPU.
- the processing unit 1010 is further configured to: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, there are multiple physical GPUs. Next, the foremost physical GPU among the multiple physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- the processing unit 1010 is further configured to: update the resource state table based on the physical GPU allocated to the target virtual GPU; or, when the task processing state changes , Updating the resource status table based on the change of the task processing status.
- FIG. 11 is a block diagram of the functional unit composition of a resource management device 1100 involved in another embodiment of the present application.
- the resource management apparatus 1100 is applied to an electronic device, and the electronic device includes a processing unit 1110 and a communication unit 1120.
- the processing unit 1110 is configured to: obtain a host configuration file through the communication unit 1120; read the host configuration file, where the configuration file includes virtual GPU configuration parameters of the guest device; based on the configuration file, Generate at least one available virtual GPU of the guest device; and in the case of receiving a task to be processed by a target user, send a resource allocation to the host through the communication unit 1120 based on the target virtual GPU corresponding to the task to be processed A request, wherein the resource allocation request is used to request the host to allocate a physical GPU to the target virtual GPU, and the at least one available virtual GPU includes the target virtual GPU.
- the embodiment of the application reads a configuration file, where the configuration file includes the parameters of the virtual GPU of the guest device; based on the configuration file, generates at least one available virtual GPU of the guest device; In this case, the communication unit sends a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance. Instead, after the virtual GPU receives the task, it sends a resource allocation request to the host to improve the resource utilization of the physical GPU and increase the GPU. The overall performance of the system.
- the processing unit 1110 is further configured to: determine the resource allocation request based on the first resource state table.
- the processing unit 1110 is further configured to: receive a first update instruction about the first resource state table from the host, where the first update instruction is in the Sent when the host detects that the task processing state of the physical GPU has changed; based on the first update instruction, the first resource state table is updated.
- the first update instruction carries at least one of the following information: user information corresponding to the newly added task of the first physical GPU, information of the first physical GPU, and The video memory capacity of the virtual GPU corresponding to the newly added task, the user information corresponding to the completed task, and the information of the second physical GPU corresponding to the completed task, where the first physical GPU is the newly added task GPU, the second physical GPU is a GPU that completes a task.
- the processing unit 1110 is further configured to: schedule the virtual GPU to execute the task to be processed; and receive a processing result of the task to be processed from the host.
- FIG. 12 is a block diagram of functional units of a resource management device 1200 involved in another embodiment of the present application.
- the resource management apparatus 1200 is applied to an electronic device.
- the electronic device includes a processing unit 1210 and a communication unit 1220.
- the processing unit 1210 is configured to receive a resource allocation request from a guest device through the communication unit 1220.
- the resource allocation request carries information of the task to be processed and information of the target virtual GPU; and based on the information of the target virtual GPU, a target physical GPU is allocated to the target virtual GPU.
- This embodiment of the application receives a resource allocation request from a guest device, the resource allocation request carries information about the task to be processed and information about a target virtual GPU; and based on the information about the target virtual GPU, allocates a target physical to the target virtual GPU GPU.
- a fixed mapping relationship is not established for the virtual GPU and the physical GPU in advance, but after receiving the resource allocation request from the guest device, the virtual GPU is dynamically allocated the corresponding physical GPU, which can be flexibly based on the current task
- the characteristics of GPU resources are allocated to improve the resource utilization of the physical GPU and improve the overall performance of the GPU system.
- the processing unit 1210 is specifically configured to: based on the target virtual GPU The required video memory capacity is allocated to the target virtual GPU with physical GPUs.
- the processing unit 1210 is specifically configured to: The required video memory capacity, the resource allocation strategy, and the second resource state table allocate physical GPUs to the target virtual GPU, where the second resource state table includes current state information of each of the multiple physical GPUs.
- the processing unit 1210 is specifically configured to: based on the second resource state table, determine the remaining video memory capacity of each physical GPU in sequence according to the arrangement order of the multiple physical GPUs, until the determined remaining video memory capacity meets the requirements of the target virtual GPU.
- the processing unit 1210 is further configured to determine that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the required video memory capacity of the target virtual GPU In the case of, it is determined that the virtual GPU has no available physical resources.
- the processing unit 1210 is specifically configured to: based on the second resource state table, determine the number of tasks that the target user currently has allocated to each physical GPU among the multiple physical GPUs, and the remaining video memory capacity of each physical GPU, where the target user Is a user corresponding to the target virtual GPU; the physical GPU with the least number of tasks and remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU of the target virtual GPU.
- the processing unit 1210 is further configured to: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, there are multiple physical GPUs. Next, the physical GPU arranged at the forefront among the physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- the processing unit 1210 is further configured to: update the second resource state table based on the physical GPU allocated to the target virtual GPU; or, when the task processing state changes In this case, the second resource status table is updated based on the change in the task processing status.
- the processing unit 1210 is further configured to perform task scheduling based on the task queue of each physical GPU in the multiple physical GPUs.
- the embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for use in the computer, and the computer program causes a computer to execute part or all of the steps of any method as described in the above method embodiment, and the above computer includes Electronic equipment.
- the embodiments of the present application also provide a computer program product.
- the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program.
- the above-mentioned computer program is operable to cause a computer to execute any of the methods described in the above-mentioned method embodiments. Part or all of the steps of the method.
- the computer program product may be a software installation package, and the above-mentioned computer includes electronic equipment.
- the disclosed device may be implemented in other ways.
- the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
- the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
- the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
- a number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
- the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
- the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory, random access memory, magnetic or optical disk, etc.
Abstract
Description
Claims (51)
- 一种资源管理方法,其特征在于,所述方法包括:A resource management method, characterized in that the method includes:读取配置文件,所述配置文件包括访客设备的虚拟图像处理单元GPU配置参数;Reading a configuration file, the configuration file including virtual image processing unit GPU configuration parameters of the guest device;基于所述配置文件,生成所述访客设备的至少一个可用虚拟GPU;Generating at least one available virtual GPU of the guest device based on the configuration file;响应于接收到目标用户的待处理任务,为所述待处理任务对应的目标虚拟GPU分配物理GPU,所述至少一个可用虚拟GPU包括所述目标虚拟GPU。In response to receiving the task to be processed by the target user, a physical GPU is allocated to the target virtual GPU corresponding to the task to be processed, and the at least one available virtual GPU includes the target virtual GPU.
- 根据权利要求1所述的方法,其特征在于,所述为所述待处理任务对应的目标虚拟GPU分配物理GPU,包括:The method according to claim 1, wherein the allocating a physical GPU to the target virtual GPU corresponding to the task to be processed comprises:基于所述目标虚拟GPU所需的显存容量以及资源状态表,为所述目标虚拟GPU分配物理GPU,其中,所述资源状态表包括多个物理GPU中每个物理GPU的当前状态信息。Based on the video memory capacity required by the target virtual GPU and a resource state table, physical GPUs are allocated to the target virtual GPU, where the resource state table includes current state information of each of the multiple physical GPUs.
- 根据权利要求2所述的方法,其特征在于,所述物理GPU的当前状态信息包括:The method according to claim 2, wherein the current state information of the physical GPU comprises:所述物理GPU的显存容量、与所述物理GPU已经被占用的显存对应的每个虚拟GPU的用户信息、与所述物理GPU已经被占用的显存对应的每个虚拟GPU的显存容量。The video memory capacity of the physical GPU, the user information of each virtual GPU corresponding to the video memory already occupied by the physical GPU, and the video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- 根据权利要求2或3所述的方法,其特征在于,所述基于所述目标虚拟GPU的所需显存容量以及资源状态表,为所述目标虚拟GPU分配物理GPU,包括:The method according to claim 2 or 3, wherein the allocating a physical GPU to the target virtual GPU based on the required video memory capacity and a resource state table of the target virtual GPU comprises:基于所述目标虚拟GPU的所需显存容量和所述资源状态表,为所述目标虚拟GPU分配物理GPU,以使得所述多个物理GPU的显存被使用最少。Based on the required video memory capacity of the target virtual GPU and the resource state table, a physical GPU is allocated to the target virtual GPU, so that the video memory of the multiple physical GPUs is used to a minimum.
- 根据权利要求2至4中任一项所述的方法,其特征在于,所述基于所述目标虚拟GPU所需显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU,包括:The method according to any one of claims 2 to 4, wherein the allocating a physical GPU to the target virtual GPU based on a required video memory capacity and a resource state table of the target virtual GPU comprises:基于所述资源状态表,按照多个物理GPU的排列顺序,依次确定每个物理GPU的剩余显存容量,直到确定的剩余显存容量满足所述目标虚拟GPU的所需显存容量;Based on the resource state table, sequentially determining the remaining video memory capacity of each physical GPU according to the arrangement order of the multiple physical GPUs, until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU;将剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。A physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, wherein the method further comprises:在确定所述多个物理GPU中排在最后的物理GPU的剩余显存容量不满足所述目标虚拟GPU的所需显存容量的情况下,确定所述虚拟GPU无可用物理资源。In a case where it is determined that the remaining video memory capacity of the last physical GPU among the multiple physical GPUs does not meet the required video memory capacity of the target virtual GPU, it is determined that the virtual GPU has no available physical resources.
- 根据权利要求2或3所述的方法,其特征在于,所述基于所述目标虚拟GPU的显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU,包括:The method according to claim 2 or 3, wherein the allocating a physical GPU to the target virtual GPU based on the memory capacity and resource state table of the target virtual GPU comprises:基于所述目标虚拟GPU的所需显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU,以使得所述目标用户的至少一个任务被尽可能均匀地分配给所述多个物理GPU,其中,所述至少一个任务包括所述待处理任务。Allocating a physical GPU to the target virtual GPU based on the required video memory capacity and the resource state table of the target virtual GPU, so that at least one task of the target user is allocated to the multiple physical GPUs as evenly as possible, Wherein, the at least one task includes the task to be processed.
- 根据权利要求2、3或7所述的方法,其特征在于,所述基于所述目标虚拟GPU的显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU,包括:The method according to claim 2, 3, or 7, wherein the allocating a physical GPU to the target virtual GPU based on the memory capacity and resource state table of the target virtual GPU comprises:基于所述资源状态表,确定所述目标用户当前在所述多个物理GPU中每个物理GPU分配的任务数量,以及每个物理GPU的剩余显存容量;Based on the resource state table, determine the number of tasks currently allocated by each physical GPU of the multiple physical GPUs by the target user, and the remaining video memory capacity of each physical GPU;将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。The physical GPU with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:在所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU的数 量为多个的情况下,将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的多个物理GPU中排列在最前面的物理GPU确定为所述目标虚拟GPU分配的物理GPU。When the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is multiple, the number of tasks is the least and the remaining video memory capacity meets the target virtual GPU. The physical GPU arranged at the forefront among the multiple physical GPUs with the required video memory capacity determines the physical GPU allocated to the target virtual GPU.
- 根据权利要求2-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2-9, wherein the method further comprises:基于为所述目标虚拟GPU所分配的物理GPU,更新所述资源状态表;或者,Update the resource state table based on the physical GPU allocated to the target virtual GPU; or,在任务处理状态发生变化的情况下,基于所述任务处理状态的变化更新所述资源状态表。In the case of a change in the task processing state, the resource state table is updated based on the change in the task processing state.
- 一种资源管理方法,应用于访客设备,其特征在于,所述方法包括:A resource management method applied to a guest device, characterized in that the method includes:读取主机的配置文件,其中,所述配置文件包括所述访客设备的虚拟GPU配置参数;Reading a configuration file of the host, where the configuration file includes virtual GPU configuration parameters of the guest device;基于所述配置文件,生成所述访客设备的至少一个可用虚拟GPU;Generating at least one available virtual GPU of the guest device based on the configuration file;在接收到目标用户的待处理任务的情况下,基于所述待处理任务对应的目标虚拟GPU向主机发送资源分配请求,其中,所述资源分配请求用于请求所述主机为所述目标虚拟GPU分配物理GPU,所述至少一个可用虚拟GPU包括所述目标虚拟GPU。In the case of receiving the task to be processed by the target user, send a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed, wherein the resource allocation request is used to request the host to be the target virtual GPU Allocate physical GPUs, and the at least one available virtual GPU includes the target virtual GPU.
- 根据权利要求11所述的方法,其特征在于,在所述基于所述待处理任务对应的目标虚拟GPU向主机发送资源分配请求之前,所述方法还包括:The method according to claim 11, characterized in that, before the sending a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed, the method further comprises:基于资源状态表,确定所述访客设备的至少一个可用虚拟GPU中处于空闲状态的虚拟GPU,其中,所述资源状态表包括多个物理GPU中每个物理GPU的当前状态信息;Determine a virtual GPU in an idle state among at least one available virtual GPU of the guest device based on a resource state table, wherein the resource state table includes current state information of each of the multiple physical GPUs;从所述处于空闲状态的虚拟GPU中确定所述目标虚拟GPU。The target virtual GPU is determined from the virtual GPUs in the idle state.
- 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, wherein the method further comprises:接收来自于所述主机的对所述第一资源状态表的第一更新指令,所述第一更新指令是在所述主机检测到至少一个物理GPU的任务处理状态发生变化的情况下发送的;Receiving a first update instruction for the first resource state table from the host, the first update instruction being sent when the host detects that the task processing state of at least one physical GPU has changed;基于所述第一更新指令,更新所述第一资源状态表。Based on the first update instruction, the first resource status table is updated.
- 根据权利要求13所述的方法,其特征在于,The method of claim 13, wherein:所述至少一个物理GPU包括具有新加入的任务的第一物理GPU,所述第一更新指令携带下列信息中的至少一项:所述第一物理GPU的新加入的任务对应的用户信息、所述第一物理GPU的信息,所述新加入的任务对应的虚拟GPU的显存容量;和/或The at least one physical GPU includes a first physical GPU with a newly added task, and the first update instruction carries at least one of the following information: user information corresponding to the newly added task of the first physical GPU, and The information of the first physical GPU, the video memory capacity of the virtual GPU corresponding to the newly added task; and/or所述至少一个物理GPU包括具有新完成的任务的第二物理GPU,所述第一更新指令携带下列中的至少一项:所述新完成的任务对应的用户信息,以及所述第二物理GPU的信息。The at least one physical GPU includes a second physical GPU with a newly completed task, and the first update instruction carries at least one of the following: user information corresponding to the newly completed task, and the second physical GPU Information.
- 根据权利要求11-14任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 11-14, wherein the method further comprises:调度所述虚拟GPU执行所述待处理任务;Scheduling the virtual GPU to execute the task to be processed;接收来自所述主机的所述待处理任务的处理结果。Receiving the processing result of the to-be-processed task from the host.
- 一种资源管理方法,应用于主机,其特征在于,所述方法包括:A resource management method applied to a host, characterized in that the method includes:接收来自访客设备的资源分配请求,所述资源分配请求携带待处理任务的信息以及目标虚拟GPU的信息;Receiving a resource allocation request from the guest device, the resource allocation request carrying information of the task to be processed and information of the target virtual GPU;基于所述目标虚拟GPU的信息,为所述目标虚拟GPU分配目标物理GPU。Based on the information of the target virtual GPU, a target physical GPU is allocated to the target virtual GPU.
- 根据权利要求16所述的方法,其特征在于,所述基于所述目标虚拟GPU的信息,为所述目标虚拟GPU分配目标物理GPU,包括:The method according to claim 16, wherein the allocating a target physical GPU to the target virtual GPU based on the information of the target virtual GPU comprises:基于所述目标虚拟GPU的所需显存容量,为所述目标虚拟GPU分配物理GPU。Based on the required video memory capacity of the target virtual GPU, a physical GPU is allocated to the target virtual GPU.
- 根据权利要求17所述的方法,其特征在于,所述基于所述目标虚拟GPU的显存容量为所述目标虚拟GPU分配物理GPU,包括:The method according to claim 17, wherein the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU comprises:基于所述目标虚拟GPU的所需显存容量、资源分配策略以及资源状态表为所述目标虚拟GPU分配物理GPU,其中,所述资源状态表包括多个物理GPU中每个物理GPU的当前状态信息。Allocate physical GPUs to the target virtual GPU based on the required video memory capacity, resource allocation strategy, and resource state table of the target virtual GPU, where the resource state table includes current state information of each of the multiple physical GPUs .
- 根据权利要求18所述的方法,其特征在于,所述基于所述目标虚拟GPU的显存容量、所述资源分配策略以及资源状态表为所述目标虚拟GPU分配物理GPU,包括:The method according to claim 18, wherein the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the resource state table comprises:基于所述第二资源状态表,按照所述多个物理GPU的排列顺序,依次确定每个物理GPU的剩余显存容量,直到确定的剩余显存容量满足所述目标虚拟GPU的所需显存容量;Based on the second resource state table, sequentially determining the remaining video memory capacity of each physical GPU according to the arrangement order of the multiple physical GPUs until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU;将剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。A physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要19所述的方法,其特征在于,在确定所述多个物理GPU中排在最后的物理GPU的剩余显存容量不满足所述目标虚拟GPU的所需显存容量的情况下,确定所述虚拟GPU无可用物理资源。The method according to claim 19, wherein when it is determined that the remaining video memory capacity of the last physical GPU among the plurality of physical GPUs does not meet the required video memory capacity of the target virtual GPU, determining all The virtual GPU has no available physical resources.
- 根据权利要求18所述的方法,其特征在于,所述基于所述目标虚拟GPU的显存容量、所述资源分配策略以及第二资源状态表为所述目标虚拟GPU分配物理GPU,包括:The method of claim 18, wherein the allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and a second resource state table comprises:基于所述第二资源状态表,确定目标用户当前在多个物理GPU中每个物理GPU已经分配的任务数量,以及每个物理GPU的剩余显存容量,其中,所述目标用户为所述目标虚拟GPU对应的用户;Based on the second resource state table, determine the number of tasks that the target user currently has allocated to each physical GPU among the multiple physical GPUs, and the remaining video memory capacity of each physical GPU, where the target user is the target virtual The user corresponding to the GPU;将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU的物理GPU。The physical GPU with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU of the target virtual GPU.
- 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method according to claim 21, wherein the method further comprises:在所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU的数量为多个的情况下,将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU中排列在最前面的物理GPU确定为所述目标虚拟GPU分配的物理GPU。When the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is multiple, the number of tasks is the least and the remaining video memory capacity meets the target virtual GPU. The physical GPU arranged at the forefront among the physical GPUs with the required video memory capacity determines the physical GPU allocated to the target virtual GPU.
- 根据权利要求16-22任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 16-22, wherein the method further comprises:基于为所述目标虚拟GPU所分配的物理GPU,更新所述第二资源状态表;或者,Update the second resource state table based on the physical GPU allocated to the target virtual GPU; or,在任务处理状态发生变化的情况下,基于所述任务处理状态的变化更新所述第二资源状态表。In the case of a change in the task processing state, the second resource state table is updated based on the change in the task processing state.
- 根据权利要求16-23任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 16-23, wherein the method further comprises:基于多个物理GPU中每个物理GPU的任务队列,进行任务调度。Task scheduling is performed based on the task queue of each physical GPU among multiple physical GPUs.
- 一种资源管理装置,其特征在于,包括通信单元和处理单元,其中,A resource management device, which is characterized by comprising a communication unit and a processing unit, wherein:所述处理单元用于:The processing unit is used for:通过所述通信单元获取配置文件;Obtaining a configuration file through the communication unit;读取所述配置文件,所述配置文件包括访客设备的虚拟图像处理单元GPU配置参数;Reading the configuration file, where the configuration file includes GPU configuration parameters of the virtual image processing unit of the guest device;基于所述配置文件,生成所述访客设备的至少一个可用虚拟GPU;Generating at least one available virtual GPU of the guest device based on the configuration file;以及响应于接收到目标用户的待处理任务,为所述待处理任务对应的目标虚拟GPU分配物理GPU,所述至少一个可用虚拟GPU包括所述目标虚拟GPU。And in response to receiving the to-be-processed task of the target user, a physical GPU is allocated to the target virtual GPU corresponding to the to-be-processed task, and the at least one available virtual GPU includes the target virtual GPU.
- 根据权利要求25所述的装置,其特征在于,在所述为所述待处理任务对应的目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The apparatus according to claim 25, wherein, in the case where a physical GPU is allocated to the target virtual GPU corresponding to the task to be processed, the processing unit is specifically configured to:基于所述目标虚拟GPU所需的显存容量以及资源状态表,为所述目标虚拟GPU分配物理GPU,其中,所述资源状态表包括多个物理GPU中每个物理GPU的当前状态信息。Based on the video memory capacity required by the target virtual GPU and a resource state table, physical GPUs are allocated to the target virtual GPU, where the resource state table includes current state information of each of the multiple physical GPUs.
- 根据权利要求26所述的装置,其特征在于,所述物理GPU的当前状态信息包括:The device of claim 26, wherein the current state information of the physical GPU comprises:所述物理GPU的显存容量、与所述物理GPU已经被占用的显存对应的每个虚拟GPU的用户信息、与所述物理GPU已经被占用的显存对应的每个虚拟GPU的显存容量。The video memory capacity of the physical GPU, the user information of each virtual GPU corresponding to the video memory already occupied by the physical GPU, and the video memory capacity of each virtual GPU corresponding to the video memory already occupied by the physical GPU.
- 根据权利要求26或27所述的装置,其特征在于,在所述基于所述目标虚拟GPU的所需显存容量以及资源状态表,为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 26 or 27, wherein, in the case where a physical GPU is allocated to the target virtual GPU based on the required video memory capacity and the resource state table of the target virtual GPU, the processing unit Specifically used for:基于所述目标虚拟GPU的所需显存容量和所述资源状态表,为所述目标虚拟GPU分配物理GPU,以使得所述多个物理GPU的显存被使用最少。Based on the required video memory capacity of the target virtual GPU and the resource state table, a physical GPU is allocated to the target virtual GPU, so that the video memory of the multiple physical GPUs is used to a minimum.
- 根据权利要求26至28中任一项所述的装置,其特征在于,在所述基于所述目标虚拟GPU所需显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to any one of claims 26 to 28, wherein, in the case of assigning a physical GPU to the target virtual GPU based on the required video memory capacity and resource state table of the target virtual GPU, The processing unit is specifically used for:基于所述资源状态表,按照多个物理GPU的排列顺序,依次确定每个物理GPU的剩余显存容量,直到确定的剩余显存容量满足所述目标虚拟GPU的所需显存容量;Based on the resource state table, sequentially determining the remaining video memory capacity of each physical GPU according to the arrangement order of the multiple physical GPUs, until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU;将剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。A physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要求29所述的装置,其特征在于,所述处理单元还用于:The device according to claim 29, wherein the processing unit is further configured to:在确定所述多个物理GPU中排在最后的物理GPU的剩余显存容量不满足所述目标虚拟GPU的所需显存容量的情况下,确定所述虚拟GPU无可用物理资源。In a case where it is determined that the remaining video memory capacity of the last physical GPU among the multiple physical GPUs does not meet the required video memory capacity of the target virtual GPU, it is determined that the virtual GPU has no available physical resources.
- 根据权利要求26或27所述的装置,其特征在于,在所述基于所述目标虚拟GPU的显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 26 or 27, wherein, in the case where a physical GPU is allocated to the target virtual GPU based on the display memory capacity and resource state table of the target virtual GPU, the processing unit specifically uses in:基于所述目标虚拟GPU的所需显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU,以使得所述目标用户的至少一个任务被尽可能均匀地分配给所述多个物理GPU,其中,所述至少一个任务包括所述待处理任务。Allocating a physical GPU to the target virtual GPU based on the required video memory capacity and the resource state table of the target virtual GPU, so that at least one task of the target user is allocated to the multiple physical GPUs as evenly as possible, Wherein, the at least one task includes the task to be processed.
- 根据权利要求26、27或31所述的装置,其特征在于,在所述基于所述目标虚拟GPU的显存容量和资源状态表,为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 26, 27, or 31, wherein, in the case where a physical GPU is allocated to the target virtual GPU based on the display memory capacity and resource state table of the target virtual GPU, the processing unit Specifically used for:基于所述资源状态表,确定所述目标用户当前在所述多个物理GPU中每个物理GPU分配的任务数量,以及每个物理GPU的剩余显存容量;Based on the resource state table, determine the number of tasks currently allocated by each physical GPU of the multiple physical GPUs by the target user, and the remaining video memory capacity of each physical GPU;将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。The physical GPU with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要求32所述的装置,其特征在于,所述处理单元还用于:The device according to claim 32, wherein the processing unit is further configured to:在所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU的数量为多个的情况下,将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的多个物理GPU中排列在最前面的物理GPU确定为所述目标虚拟GPU分配的物理GPU。In the case that there are multiple physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU, the number of tasks is the least and the remaining video memory capacity meeting the target virtual GPU's The physical GPU arranged at the forefront among the multiple physical GPUs with the required video memory capacity determines the physical GPU allocated to the target virtual GPU.
- 根据权利要求26-33任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 26-33, wherein the processing unit is further configured to:基于为所述目标虚拟GPU所分配的物理GPU,更新所述资源状态表;或者,Update the resource state table based on the physical GPU allocated to the target virtual GPU; or,在任务处理状态发生变化的情况下,基于所述任务处理状态的变化更新所述资源状态表。In the case of a change in the task processing state, the resource state table is updated based on the change in the task processing state.
- 一种资源管理装置,其特征在于,包括通信单元和处理单元,其中,A resource management device, which is characterized by comprising a communication unit and a processing unit, wherein:所述处理单元用于:The processing unit is used for:通过所述通信单元获取主机配置文件;Obtaining a host configuration file through the communication unit;读取所述主机配置文件,其中,所述配置文件包括访客设备的虚拟GPU配置参数;Reading the host configuration file, where the configuration file includes virtual GPU configuration parameters of the guest device;基于所述配置文件,生成所述访客设备的至少一个可用虚拟GPU;Generating at least one available virtual GPU of the guest device based on the configuration file;以及在接收到目标用户的待处理任务的情况下,通过所述通信单元基于所述待处理任务对应的目标虚拟GPU向所述主机发送资源分配请求,其中,所述资源分配请求用于请求所述主机为所述目标虚拟GPU分配物理GPU,所述至少一个可用虚拟GPU包括所述目标虚拟GPU。And in the case of receiving the task to be processed by the target user, the communication unit sends a resource allocation request to the host based on the target virtual GPU corresponding to the task to be processed, wherein the resource allocation request is used to request all The host allocates a physical GPU to the target virtual GPU, and the at least one available virtual GPU includes the target virtual GPU.
- 根据权利要求35所述的装置,其特征在于,在所述基于所述待处理任务对应的目标虚拟 GPU向主机发送资源分配请求之前,所述处理单元还用于:The apparatus according to claim 35, wherein before the target virtual GPU corresponding to the task to be processed sends a resource allocation request to the host, the processing unit is further configured to:基于第一资源状态表,确定所述访客设备的至少一个可用虚拟GPU中处于空闲状态的虚拟GPU,其中,所述第一资源状态表包括多个物理GPU中每个物理GPU的当前状态信息;Determine a virtual GPU in an idle state among at least one available virtual GPU of the guest device based on a first resource state table, where the first resource state table includes current state information of each of the multiple physical GPUs;从所述处于空闲状态的虚拟GPU中确定所述目标虚拟GPU。The target virtual GPU is determined from the virtual GPUs in the idle state.
- 根据权利要求36所述的装置,其特征在于,所述处理单元还用于:The device according to claim 36, wherein the processing unit is further configured to:接收来自于所述主机的关于所述第一资源状态表的第一更新指令,所述第一更新指令是在所述主机检测到物理GPU的任务处理状态发生变化的情况下发送的;Receiving a first update instruction regarding the first resource state table from the host, the first update instruction being sent when the host detects a change in the task processing state of a physical GPU;基于所述第一更新指令,更新所述第一资源状态表。Based on the first update instruction, the first resource status table is updated.
- 根据权利要求37所述的装置,其特征在于,所述至少一个物理GPU包括具有新加入的任务的第一物理GPU,所述第一更新指令携带下列信息中的至少一项:所述第一物理GPU的新加入的任务对应的用户信息、所述第一物理GPU的信息,所述新加入的任务对应的虚拟GPU的显存容量;和/或The device according to claim 37, wherein the at least one physical GPU comprises a first physical GPU with a newly added task, and the first update instruction carries at least one of the following information: the first The user information corresponding to the newly added task of the physical GPU, the information of the first physical GPU, the video memory capacity of the virtual GPU corresponding to the newly added task; and/or所述至少一个物理GPU包括具有新完成的任务的第二物理GPU,所述第一更新指令携带下列中的至少一项:所述新完成的任务对应的用户信息,以及所述第二物理GPU的信息。The at least one physical GPU includes a second physical GPU with a newly completed task, and the first update instruction carries at least one of the following: user information corresponding to the newly completed task, and the second physical GPU Information.
- 根据权利要求35-38任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 35-38, wherein the processing unit is further configured to:调度所述虚拟GPU执行所述待处理任务;Scheduling the virtual GPU to execute the task to be processed;接收来自所述主机的所述待处理任务的处理结果。Receiving the processing result of the to-be-processed task from the host.
- 一种资源管理装置,其特征在于,包括通信单元和处理单元,其中,A resource management device, which is characterized by comprising a communication unit and a processing unit, wherein:所述处理单元用于:The processing unit is used for:通过所述通信单元接收来自访客设备的资源分配请求,所述资源分配请求携带待处理任务的信息以及目标虚拟GPU的信息;Receiving, through the communication unit, a resource allocation request from the guest device, the resource allocation request carrying information of the task to be processed and information of the target virtual GPU;以及基于所述目标虚拟GPU的信息,为所述目标虚拟GPU分配目标物理GPU。And based on the information of the target virtual GPU, a target physical GPU is allocated to the target virtual GPU.
- 根据权利要求40所述的装置,其特征在于,在所述基于所述目标虚拟GPU的信息,为所述目标虚拟GPU分配目标物理GPU情况下,所述处理单元具体用于:The apparatus according to claim 40, wherein, in the case where a target physical GPU is allocated to the target virtual GPU based on the information of the target virtual GPU, the processing unit is specifically configured to:基于所述目标虚拟GPU的所需显存容量,为所述目标虚拟GPU分配物理GPU。Based on the required video memory capacity of the target virtual GPU, a physical GPU is allocated to the target virtual GPU.
- 根据权利要求41所述的装置,其特征在于,在所述基于所述目标虚拟GPU的显存容量为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 41, wherein, in the case of allocating a physical GPU to the target virtual GPU based on the memory capacity of the target virtual GPU, the processing unit is specifically configured to:基于所述目标虚拟GPU的所需显存容量、资源分配策略以及第二资源状态表为所述目标虚拟GPU分配物理GPU,其中,所述第二资源状态表包括多个物理GPU中每个物理GPU的当前状态信息。Allocate physical GPUs to the target virtual GPU based on the required video memory capacity, resource allocation strategy, and a second resource state table of the target virtual GPU, where the second resource state table includes each of the multiple physical GPUs The current status information of.
- 根据权利要求42所述的装置,其特征在于,在所述基于所述目标虚拟GPU的显存容量、所述资源分配策略以及第二资源状态表为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 42, wherein in the case where the target virtual GPU is allocated a physical GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table, The processing unit is specifically used for:基于所述第二资源状态表,按照所述多个物理GPU的排列顺序,依次确定每个物理GPU的剩余显存容量,直到确定的剩余显存容量满足所述目标虚拟GPU的所需显存容量;Based on the second resource state table, sequentially determining the remaining video memory capacity of each physical GPU according to the arrangement order of the multiple physical GPUs until the determined remaining video memory capacity meets the required video memory capacity of the target virtual GPU;将剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU分配的物理GPU。A physical GPU whose remaining video memory capacity meets the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要43所述的装置,其特征在于,所述处理单元还用于,在确定所述多个物理GPU中排在最后的物理GPU的剩余显存容量不满足所述目标虚拟GPU的所需显存容量的情况下,确定所述虚拟GPU无可用物理资源。The device according to claim 43, wherein the processing unit is further configured to determine that the remaining video memory capacity of the physical GPU ranked last among the multiple physical GPUs does not meet the requirements of the target virtual GPU In the case of video memory capacity, it is determined that the virtual GPU has no available physical resources.
- 根据权利要求42所述的装置,其特征在于,在所述基于所述目标虚拟GPU的显存容量、所述资源分配策略以及第二资源状态表为所述目标虚拟GPU分配物理GPU情况下,所述处理单元具体用于:The device according to claim 42, wherein in the case where the target virtual GPU is allocated a physical GPU based on the memory capacity of the target virtual GPU, the resource allocation strategy, and the second resource state table, The processing unit is specifically used for:基于所述第二资源状态表,确定目标用户当前在多个物理GPU中每个物理GPU已经分配的任务数量,以及每个物理GPU的剩余显存容量,其中,所述目标用户为所述目标虚拟GPU对应的用户;Based on the second resource state table, determine the number of tasks that the target user currently has allocated to each physical GPU among the multiple physical GPUs, and the remaining video memory capacity of each physical GPU, where the target user is the target virtual The user corresponding to the GPU;将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU确定为所述目标虚拟GPU的物理GPU。The physical GPU with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU of the target virtual GPU.
- 根据权利要求45所述的装置,其特征在于,所述处理单元还用于:在所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU的数量为多个的情况下,将所述任务数量最少且剩余显存容量满足所述目标虚拟GPU的所需显存容量的物理GPU中排列在最前面的物理GPU确定为所述目标虚拟GPU分配的物理GPU。The device according to claim 45, wherein the processing unit is further configured to: when the number of tasks is the smallest and the remaining video memory capacity meets the required video memory capacity of the target virtual GPU, the number of physical GPUs is multiple In the case of, the physical GPU arranged at the forefront among the physical GPUs with the least number of tasks and the remaining video memory capacity meeting the required video memory capacity of the target virtual GPU is determined as the physical GPU allocated by the target virtual GPU.
- 根据权利要求40-46任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 40-46, wherein the processing unit is further configured to:基于为所述目标虚拟GPU所分配的物理GPU,更新所述第二资源状态表;或者,Update the second resource state table based on the physical GPU allocated to the target virtual GPU; or,在任务处理状态发生改变的情况下,基于所述任务处理状态的变化更新所述第二资源状态表。In the case of a change in the task processing state, the second resource state table is updated based on the change in the task processing state.
- 根据权利要求40-47任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 40-47, wherein the processing unit is further configured to:基于多个物理GPU中每个物理GPU的任务队列,进行任务调度。Task scheduling is performed based on the task queue of each physical GPU among multiple physical GPUs.
- 一种资源管理系统,包括:A resource management system, including:主机和访客设备,其中,所述主机上设置有多个物理GPU;Host and guest devices, where multiple physical GPUs are provided on the host;所述访客设备为如权利要求35-39任一项所述装置;The visitor equipment is the device according to any one of claims 35-39;所述主机为如权利要求40-48任一项所述装置。The host is the device according to any one of claims 40-48.
- 一种电子设备,其特征在于,包括处理器以及存储器,所述存储器用于存储计算机程序,所述计算机程序被配置成由所述处理器执行,以使所述处理器执行如权利要求1-10任一项或11-15任一项或16-24任一项所述的方法。An electronic device, characterized by comprising a processor and a memory, the memory is used to store a computer program, the computer program is configured to be executed by the processor, so that the processor executes according to claim 1- The method according to any one of 10 or any one of 11-15 or any one of 16-24.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-10任一项或11-15任一项或16-24任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program causes a computer to execute any one of claims 1-10 or any one of claims 11-15 Or the method described in any one of 16-24.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021537951A JP2022516486A (en) | 2019-11-20 | 2020-05-29 | Resource management methods and equipment, electronic devices, and recording media |
KR1020217020283A KR20210095690A (en) | 2019-11-20 | 2020-05-29 | Resource management method and apparatus, electronic device and recording medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911153197.1A CN112825042A (en) | 2019-11-20 | 2019-11-20 | Resource management method and device, electronic equipment and storage medium |
CN201911153197.1 | 2019-11-20 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021098182A1 true WO2021098182A1 (en) | 2021-05-27 |
Family
ID=75906499
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/093491 WO2021098182A1 (en) | 2019-11-20 | 2020-05-29 | Resource management method and apparatus, electronic device and storage medium |
Country Status (5)
Country | Link |
---|---|
JP (1) | JP2022516486A (en) |
KR (1) | KR20210095690A (en) |
CN (1) | CN112825042A (en) |
TW (1) | TWI748530B (en) |
WO (1) | WO2021098182A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114579319A (en) * | 2022-05-07 | 2022-06-03 | 北京象帝先计算技术有限公司 | Video memory management method, video memory management module, SOC and electronic equipment |
CN115437781A (en) * | 2022-06-30 | 2022-12-06 | 北京九章云极科技有限公司 | GPU resource management method and system |
CN115499388A (en) * | 2022-08-30 | 2022-12-20 | 阿里巴巴(中国)有限公司 | Virtual host resource allocation method, device, equipment and storage medium |
CN116188240A (en) * | 2022-12-28 | 2023-05-30 | 摩尔线程智能科技(北京)有限责任公司 | GPU virtualization method and device for container and electronic equipment |
CN116755843A (en) * | 2023-08-17 | 2023-09-15 | 摩尔线程智能科技(北京)有限责任公司 | Virtual resource creation method and device, electronic equipment, chip and storage medium |
WO2023173954A1 (en) * | 2022-03-15 | 2023-09-21 | 北京有竹居网络技术有限公司 | Data acquisition method and apparatus, storage medium, and electronic device |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115220911A (en) * | 2022-06-17 | 2022-10-21 | 中科驭数(北京)科技有限公司 | Resource management method, device, equipment and medium |
CN115373860B (en) * | 2022-10-26 | 2023-01-10 | 小米汽车科技有限公司 | Scheduling method, device and equipment of GPU (graphics processing Unit) tasks and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819460A (en) * | 2012-08-07 | 2012-12-12 | 清华大学 | Budget power guidance-based high-energy-efficiency GPU (Graphics Processing Unit) cluster system scheduling algorithm |
CN107533463A (en) * | 2015-03-18 | 2018-01-02 | 英特尔公司 | Apparatus and method for the unknowable more GPU processing of software |
US20180293776A1 (en) * | 2017-04-07 | 2018-10-11 | Intel Corporation | Apparatus and method for efficient graphics virtualization |
CN109766179A (en) * | 2017-11-09 | 2019-05-17 | 阿里巴巴集团控股有限公司 | A kind of video memory distribution method and device |
CN110389825A (en) * | 2018-04-20 | 2019-10-29 | 伊姆西Ip控股有限责任公司 | Manage method, equipment and the computer program product of dedicated processes resource |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9727385B2 (en) * | 2011-07-18 | 2017-08-08 | Apple Inc. | Graphical processing unit (GPU) implementing a plurality of virtual GPUs |
CN102725736B (en) * | 2011-12-31 | 2014-03-12 | 华为技术有限公司 | Picture display method and system based on virtualization technology |
JP5839119B2 (en) * | 2012-05-11 | 2016-01-06 | 富士通株式会社 | Information processing apparatus, battery remaining amount notification method, and battery remaining amount notification program |
US20150009222A1 (en) * | 2012-11-28 | 2015-01-08 | Nvidia Corporation | Method and system for cloud based virtualized graphics processing for remote displays |
US9142004B2 (en) * | 2012-12-20 | 2015-09-22 | Vmware, Inc. | Dynamic allocation of physical graphics processing units to virtual machines |
CN107807840B (en) * | 2016-09-09 | 2022-01-25 | 阿里巴巴集团控股有限公司 | Equipment direct connection method and device applied to virtual machine network |
US10176550B1 (en) * | 2017-03-20 | 2019-01-08 | Nutanix, Inc. | GPU resource usage display and dynamic GPU resource allocation in a networked virtualization system |
US10304421B2 (en) * | 2017-04-07 | 2019-05-28 | Intel Corporation | Apparatus and method for remote display and content protection in a virtualized graphics processing environment |
CN108984264B (en) * | 2017-06-02 | 2022-11-15 | 阿里巴巴集团控股有限公司 | Virtual GPU (graphics processing Unit) implementation method, device and system |
US11720408B2 (en) * | 2018-05-08 | 2023-08-08 | Vmware, Inc. | Method and system for assigning a virtual machine in virtual GPU enabled systems |
CN109766183A (en) * | 2018-12-28 | 2019-05-17 | 郑州云海信息技术有限公司 | A kind of method and system of cluster GPU multiplexing and intelligent load |
CN110196753A (en) * | 2019-01-21 | 2019-09-03 | 腾讯科技(北京)有限公司 | Graphics processor GPU vitualization method, apparatus and readable medium based on container |
-
2019
- 2019-11-20 CN CN201911153197.1A patent/CN112825042A/en active Pending
-
2020
- 2020-05-29 WO PCT/CN2020/093491 patent/WO2021098182A1/en active Application Filing
- 2020-05-29 KR KR1020217020283A patent/KR20210095690A/en not_active Application Discontinuation
- 2020-05-29 JP JP2021537951A patent/JP2022516486A/en active Pending
- 2020-06-24 TW TW109121468A patent/TWI748530B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819460A (en) * | 2012-08-07 | 2012-12-12 | 清华大学 | Budget power guidance-based high-energy-efficiency GPU (Graphics Processing Unit) cluster system scheduling algorithm |
CN107533463A (en) * | 2015-03-18 | 2018-01-02 | 英特尔公司 | Apparatus and method for the unknowable more GPU processing of software |
US20180293776A1 (en) * | 2017-04-07 | 2018-10-11 | Intel Corporation | Apparatus and method for efficient graphics virtualization |
CN109766179A (en) * | 2017-11-09 | 2019-05-17 | 阿里巴巴集团控股有限公司 | A kind of video memory distribution method and device |
CN110389825A (en) * | 2018-04-20 | 2019-10-29 | 伊姆西Ip控股有限责任公司 | Manage method, equipment and the computer program product of dedicated processes resource |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023173954A1 (en) * | 2022-03-15 | 2023-09-21 | 北京有竹居网络技术有限公司 | Data acquisition method and apparatus, storage medium, and electronic device |
CN114579319A (en) * | 2022-05-07 | 2022-06-03 | 北京象帝先计算技术有限公司 | Video memory management method, video memory management module, SOC and electronic equipment |
CN114579319B (en) * | 2022-05-07 | 2022-07-19 | 北京象帝先计算技术有限公司 | Video memory management method, video memory management module, SOC and electronic equipment |
CN115437781A (en) * | 2022-06-30 | 2022-12-06 | 北京九章云极科技有限公司 | GPU resource management method and system |
CN115437781B (en) * | 2022-06-30 | 2023-10-31 | 北京九章云极科技有限公司 | GPU resource management method and system |
CN115499388A (en) * | 2022-08-30 | 2022-12-20 | 阿里巴巴(中国)有限公司 | Virtual host resource allocation method, device, equipment and storage medium |
CN115499388B (en) * | 2022-08-30 | 2024-04-12 | 阿里巴巴(中国)有限公司 | Virtual host resource allocation method, device, equipment and storage medium |
CN116188240A (en) * | 2022-12-28 | 2023-05-30 | 摩尔线程智能科技(北京)有限责任公司 | GPU virtualization method and device for container and electronic equipment |
CN116188240B (en) * | 2022-12-28 | 2024-04-05 | 摩尔线程智能科技(北京)有限责任公司 | GPU virtualization method and device for container and electronic equipment |
CN116755843A (en) * | 2023-08-17 | 2023-09-15 | 摩尔线程智能科技(北京)有限责任公司 | Virtual resource creation method and device, electronic equipment, chip and storage medium |
CN116755843B (en) * | 2023-08-17 | 2023-12-19 | 摩尔线程智能科技(北京)有限责任公司 | Virtual resource creation method and device, electronic equipment, chip and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112825042A (en) | 2021-05-21 |
JP2022516486A (en) | 2022-02-28 |
KR20210095690A (en) | 2021-08-02 |
TW202121407A (en) | 2021-06-01 |
TWI748530B (en) | 2021-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021098182A1 (en) | Resource management method and apparatus, electronic device and storage medium | |
US10901802B2 (en) | Method and apparatus for implementing virtual GPU and system | |
TWI479422B (en) | Computer system and graphics processing method therefore | |
US11093297B2 (en) | Workload optimization system | |
JP5510556B2 (en) | Method and system for managing virtual machine storage space and physical hosts | |
TWI696952B (en) | Resource processing method and device | |
US9063783B2 (en) | Coordinating parallel execution of processes using agents | |
US20150371355A1 (en) | Host-Based Heterogeneous Multi-GPU Assignment | |
US20100115510A1 (en) | Virtual graphics device and methods thereof | |
KR20120017411A (en) | Priority-based management of system load level | |
JP2015530660A (en) | Dynamic partitioning technology for physical memory | |
CN112148422A (en) | IO processing method and device | |
EP3748508A1 (en) | Memory management in virtualized computing | |
CN113419846B (en) | Resource allocation method and device, electronic equipment and computer readable storage medium | |
CN109712060B (en) | Cloud desktop display card sharing method and system based on GPU container technology | |
JP2008107966A (en) | Computer system | |
CN114816777A (en) | Command processing device, method, electronic device and computer readable storage medium | |
JP2009181249A (en) | Virtual machine server, virtual machine system, virtual machine distribution method and program for use in the same | |
JP2018190355A (en) | Resource management method | |
WO2023020177A1 (en) | Task scheduling method, game engine, device and storage medium | |
CN113268356B (en) | LINUX system-based multi-GPU board card bounding system, method and medium | |
WO2013021441A1 (en) | Data processing system and data processing method | |
EP4260185A1 (en) | System and method for performing workloads using composed systems | |
WO2023231768A1 (en) | Multi-core processor and related inter-core communication method | |
US11954534B2 (en) | Scheduling in a container orchestration system utilizing hardware topology hints |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2021537951 Country of ref document: JP Kind code of ref document: A |
|
ENP | Entry into the national phase |
Ref document number: 20217020283 Country of ref document: KR Kind code of ref document: A |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20889691 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20889691 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20889691 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.11.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20889691 Country of ref document: EP Kind code of ref document: A1 |