Virtual interface allocation method and device and related equipment
By virtualizing physical GPUs and network cards in GPU servers, and allocating optimal virtual interfaces to AI containers based on hardware topology and bandwidth utilization, the problem of traditional network architectures being unable to meet high bandwidth and low latency requirements is solved, thereby improving AI training efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-28
AI Technical Summary
Existing traditional network architectures cannot effectively meet the high bandwidth and low latency data transmission requirements during AI training, resulting in excessively long training times and low efficiency, which cannot meet the needs of further development and application of AI technology.
By virtualizing physical GPUs and network cards in GPU servers, the optimal virtual interface is allocated to AI containers based on hardware topology and bandwidth utilization, thereby optimizing communication paths and improving communication efficiency.
It achieves optimal GPU communication bandwidth and latency performance in high-performance multi-GPU and multi-NIC scenarios, improving the training and inference efficiency of AI business containers.
Smart Images

Figure CN121935013A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtualization technology, and in particular to a virtual interface allocation method, apparatus and related equipment. Background Technology
[0002] In recent years, the field of artificial intelligence (AI) has made groundbreaking progress. Technologies such as deep learning and reinforcement learning have been widely applied in many fields, including image recognition, natural language processing, and autonomous driving. These AI applications typically require processing large-scale data and performing complex computational tasks, which places extremely high demands on computing resources and network performance. During AI training, large amounts of training data need to be frequently transferred between different computing nodes. For example, in distributed deep learning training, multiple GPU nodes need to synchronize gradient information in real time. Traditional network architectures often show significant shortcomings when faced with such high-bandwidth, low-latency data transmission requirements, resulting in excessively long training times, low efficiency, and seriously hindering the further development and application of AI technology. Summary of the Invention
[0003] This application provides a virtual interface allocation method, apparatus, and related equipment.
[0004] In a first aspect, this application provides a virtual interface allocation method applied to a GPU server, wherein the GPU server includes multiple physical GPUs and a physical network interface card (NIC) corresponding one-to-one with each physical GPU, and each physical NIC can be virtualized into multiple Virtual Function (VF) interfaces; the method includes: Create a target container based on the received container creation request, and allocate a corresponding vGPU to the target container; Obtain the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; Based on the hardware topology between the physical GPUs, physical network cards, and CPUs within the GPU server, as well as the bandwidth utilization of each physical network card, a target VF interface is allocated to the target container.
[0005] Optionally, the GPU server includes a Kubelet component, an ai-net-agent component, and an ai-cni component; the steps of creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container include: The Kubelet component receives the container creation request and requests vGPU resources for the target container from the GPU Device Plugin.
[0006] Optionally, the step of obtaining the resource information of the vGPU corresponding to the target container includes: The Kubelet component forwards the container network creation request of the target container to the ai-net-agent through the ai-cni component, so that the ai-net-agent can obtain the resource information of the vGPU allocated to the target container.
[0007] Optionally, the step of allocating a target VF interface to the target container based on the hardware topology between the physical GPUs, physical network cards, and CPUs within the GPU server, as well as the bandwidth utilization of each physical network card, includes: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine from each physical network the target physical network card whose bandwidth utilization meets the preset requirements and whose hardware topology distance to the target physical GPU is the closest. Assign a target VF interface to the target container from among the multiple VF interfaces virtualized by the target physical network card.
[0008] Secondly, this application provides a virtual interface allocation device applied to a GPU server, wherein the GPU server includes multiple physical GPUs and a physical network interface card (NIC) corresponding one-to-one with each physical GPU, and each physical NIC can be virtualized into multiple Virtual Function (VF) interfaces; the device includes: A creation unit is used to create a target container based on a received container creation request and to allocate a corresponding vGPU to the target container; An acquisition unit is used to acquire the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; The allocation unit is used to allocate a target VF interface to the target container based on the hardware topology between each physical GPU, each physical network card, and each CPU in the GPU server, as well as the bandwidth utilization of each physical network card.
[0009] Optionally, when creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container, the creation unit is specifically used for: Receive the container creation request and request vGPU resources for the target container from the GPU Device Plugin.
[0010] Optionally, when obtaining the resource information of the vGPU corresponding to the target container, the obtaining unit is specifically used for: The AI-CNI component forwards the container network creation request of the target container to the AI-NET-Agent, so that the AI-NET-Agent can obtain the resource information of the vGPU allocated to the target container.
[0011] Optionally, when allocating a target VF interface to the target container based on the hardware topology between the physical GPUs, physical network cards, and CPUs within the GPU server, and the bandwidth utilization of each physical network card, the allocation unit is specifically used for: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine from each physical network the target physical network card whose bandwidth utilization meets the preset requirements and whose hardware topology distance to the target physical GPU is the closest. Assign a target VF interface to the target container from among the multiple VF interfaces virtualized by the target physical network card.
[0012] Thirdly, embodiments of this application provide a virtual interface allocation device, which includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the first aspects above, according to the obtained program instructions.
[0013] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the steps of the method as described in any of the first aspects above.
[0014] In summary, the virtual interface allocation method provided in this application is applied to a GPU server, which includes multiple physical GPUs and physical network interface cards (NICs) corresponding to each physical GPU. Each NIC can be virtualized into multiple Virtual Function (VF) interfaces. The method includes: creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container; obtaining resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; and allocating a target VF interface to the target container according to the hardware topology between each physical GPU, each physical NIC, and each CPU in the GPU server, as well as the bandwidth utilization of each physical NIC.
[0015] The virtual interface allocation method provided in this application can select the RoCE VF interface with the best network performance (shortest communication distance among interfaces with bandwidth resources that meet preset requirements) for an AI container, based on the physical GPU to which the vGPU allocated to the container belongs and the NUMA topology of the GPU server. This breaks the limitation that a physical GPU can only use one corresponding physical interface resource. It ensures optimal GPU communication bandwidth and latency performance for AI containers in high-performance multi-GPU, multi-NIC scenarios, improving the training and push efficiency of AI service containers. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.
[0017] Figure 1 A detailed flowchart of a virtual interface allocation method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a virtual interface allocation device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the hardware architecture of a virtual interface allocation device provided in an embodiment of this application. Detailed Implementation
[0018] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.
[0019] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."
[0020] Currently, open-source Kubernetes containers only provide basic functionality for high-performance AI training and push scenarios: 1. A GPU DevicePlugin is deployed on the GPU node to allocate vGPU resources to the AI container and meet the vGPU requirements of the AI container; 2. The GPU node is equipped with an SRIOV DevicePlugin, which is used to randomly allocate virtual RoCESRIOV VF interface resources to the AI container.
[0021] However, the native Kubernetes AI high-performance scenario solution cannot meet the basic communication requirements of AI services in medium to large-scale scenarios (high-performance servers with multiple GPUs and multiple network cards), and has the following shortcomings: Long communication path, poor bandwidth and latency: The virtual RoCE network card is controlled by the open-source SRIOV Device Plugin. The allocation logic does not take into account the NUMA topology of the GPU / NIC, nor does it take into account the physical interface load. Instead, it randomly allocates VF interfaces from multiple physical interfaces, which may result in a long PCIe communication distance between the container GPU and the RoCE network card. It may need to cross multiple PCIe Bridges or even cross CPUs, reducing GPU communication bandwidth and latency.
[0022] This application proposes a method to virtualize a GPU into multiple vGPUs and a physical network interface card (NIC) into multiple VFs during the creation of an AI container. By obtaining the vGPU resources allocated to the AI container by the GPU DevicePlugin, and based on the NUMA topology relationship between GPU / NIC / CPU / PCIe, the method allocates the VF virtual interface resources with the optimal NUMA topology path to the AI container, thereby improving communication efficiency.
[0023] For example, see Figure 1 The diagram shown is a detailed flowchart of a virtual interface allocation method provided in an embodiment of this application. This method is applied to a GPU server, which includes multiple physical GPUs and a physical network interface card (NIC) corresponding to each physical GPU. Each NIC can be virtualized into multiple Virtual Function (VF) interfaces. The method includes the following steps: Step 100: Create the target container based on the received container creation request, and allocate the corresponding vGPU to the target container.
[0024] In this embodiment, network communication between GPU servers via Leaf-Spine networking is used as an example. The GPU servers are connected to access devices (Leaf devices) in the Leaf-Spine network. The SDN controller then configures each network device in the Leaf-Spine network. Specifically, in this embodiment, before executing step 100, during network initialization, the ai-sdn-controller component (a newly added functional component on the SDN controller) adds RoCE switches and learns the physical network topology of the switches (Spine devices, Leaf devices) and servers (GPU servers).
[0025] The ai-sdn-controller component configures an independent Layer 3 network IP address for each interface of the Leaf / Spine switch and configures Leaf / Spine to learn routes via eBGP.
[0026] In this application implementation, each physical network card (physical interface) of the GPU server is connected to each physical interface of the Leaf device.
[0027] In this embodiment, each GPU server is deployed with Kubernetes, meaning the GPU server includes functional components such as Kubelet, ai-net-agent, and ai-cni. Therefore, when creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container, a preferred implementation is as follows: The Kubelet component receives the container creation request and requests vGPU resources for the target container from the GPU Device Plugin (a functional component for allocating GPUs).
[0028] In practical applications, when an AI user creates an AI container as needed, the Kubelet component receives the container creation request and applies for vGPU resources from the GPU Device Plugin. The resource information of the vGPU obtained includes at least the physical GPU information to which the vGPU belongs, and may also include the size, identifier, and other information of the vGPU obtained.
[0029] Step 110: Obtain the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs.
[0030] In this embodiment of the application, when obtaining the resource information of the vGPU corresponding to the target container, a preferred implementation is as follows: The Kubelet component forwards the container network creation request of the target container to the ai-net-agent through the ai-cni component, so that the ai-net-agent can obtain the resource information of the vGPU allocated to the target container.
[0031] In practical applications, the Kubelet component notifies the ai-cni component to request the creation of an AI container network. The ai-cni component forwards the request to the ai-net-agent component, which then obtains the resource information of the vGPU requested for the container based on the pre-established GRPC Server connection to the GPU DevicePlugin.
[0032] Step 120: Based on the hardware topology between each physical GPU, each physical network card, and each CPU in the GPU server, and the bandwidth utilization of each physical network card, allocate a target VF interface to the target container.
[0033] In this embodiment of the application, when allocating a target VF interface to the target container based on the hardware topology relationships between the physical GPUs, physical network cards, and CPUs within the GPU server, as well as the bandwidth utilization of each physical network card, a preferred implementation is as follows: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine the target physical network card from each physical network that meets the preset requirements for bandwidth utilization and has the closest hardware topology distance to the target physical GPU; allocate a target VF interface to the target container from multiple VF interfaces virtualized by the target physical network card.
[0034] In other words, in this embodiment of the application, the GPU server pre-maintains the GPU / NIC / CPU / PCIE topology (NUMA topology), that is, it maintains the hardware topology between each physical GPU, each physical network card, and each CPU on the local GPU server. In this way, when allocating a virtual interface to the target container, a virtual interface can be allocated from the virtual interfaces virtualized by the target physical network card that is closest to the physical GPU to which the vGPU to which the target container belongs, and the hardware topology between each physical GPU, each physical interface, and each CPU, based on the physical GPU to which the vGPU to which the target container belongs, and the physical network card whose available bandwidth meets the preset requirements.
[0035] For example, suppose the NUMA topology within the GPU server is as follows: Physical GPU 1 is directly connected to Physical NIC 1, Physical GPU 2 is directly connected to Physical NIC 2, ..., Physical GPU 4 is directly connected to Physical NIC 4; Physical GPU 1 and Physical GPU 2 are connected to CPU 1; Physical GPU 3 and GPU 4 are connected to CPU 2; and CPU 1 is connected to CPU 2. Then, suppose the physical GPU to which the vGPU allocated to the target container belongs is Physical GPU 1, Physical GPU 2 is a neighboring GPU of Physical GPU 1, and Physical GPU 3 and Physical GPU 4 are distant GPUs of Physical GPU 1. When allocating a virtual interface to the target container, Physical NIC 1 is the physical GPU. For a directly connected network interface card (NIC) 1, the system prioritizes whether NIC 1 meets the preset bandwidth requirements. If NIC 1 does, it is determined to be the closest NIC that meets the preset bandwidth requirements, and a target VF interface is allocated to the target container from the virtual function (VF) interface virtualized by NIC 1. If NIC 1 does not meet the requirements, the system considers whether NIC 2 meets the preset bandwidth requirements. If NIC 2 does, it is determined to be the closest NIC that meets the preset bandwidth requirements, and a target VF interface is allocated to the target container from the virtual function (VF) interface virtualized by NIC 2.
[0036] Furthermore, in this embodiment, the GPU server uses the hostname to obtain the network segment information of the interface of the Leaf device connected to the target physical interface from the SDN controller. For example, the target GPU to which the vGPU allocated to the target container belongs, and the target GPU corresponds to the target physical interface. Assuming the target physical interface is connected to interface 1 of Leaf 1, the GPU server needs to obtain the network segment of interface 1 of Leaf 1 from the SDN controller. In practical applications, the SDN controller maintains the network topology relationship between the network and the GPU server. Therefore, the SDN controller can determine which port of the GPU server corresponding to the hostname is connected to which port of the Leaf device based on the hostname and the locally maintained network topology relationship.
[0037] For example, configuring the network configuration of the VF interface allocated to the target container on the GPU server involves finding the network topology between the physical interface to which the VF interface belongs and the Leaf devices in the network (Leaf-Spine network), determining the connection relationship between the physical interface and the devices in the network, thereby determining the physical interface of the connected Leaf device, and configuring an IP address for the VF interface. For example, if the VF belongs to physical interface 1, and physical interface 1 is connected to physical interface a of the Leaf device, then an available IP address in the network segment where physical interface a is located is assigned to the VF.
[0038] Furthermore, the ai-cni component of the GPU server adds the VF interface allocated to the target container to the network namespace of the target container, and then configures the routing table in the VF interface.
[0039] Based on the same inventive concept as the above-described embodiments, see, for example, the following: Figure 2 The diagram shown is a structural schematic of a virtual interface allocation device provided in an embodiment of this application. This device is applied to a GPU server, which includes multiple physical GPUs and a physical network interface card (NIC) corresponding to each physical GPU. Each NIC can be virtualized into multiple Virtual Function (VF) interfaces. The device includes: Creation unit 20 is used to create a target container based on the received container creation request and allocate a corresponding vGPU to the target container; The acquisition unit 21 is used to acquire the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; The allocation unit 22 is used to allocate a target VF interface to the target container based on the hardware topology relationship between each physical GPU, each physical network card, and each CPU in the GPU server, as well as the bandwidth utilization of each physical network card.
[0040] Optionally, when creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container, the creation unit 20 is specifically used for: Receive the container creation request and request vGPU resources for the target container from the GPU Device Plugin.
[0041] Optionally, when obtaining the resource information of the vGPU corresponding to the target container, the obtaining unit 21 is specifically used for: The AI-CNI component forwards the container network creation request of the target container to the AI-NET-Agent, so that the AI-NET-Agent can obtain the resource information of the vGPU allocated to the target container.
[0042] Optionally, when allocating a target VF interface to the target container based on the hardware topology between the physical GPUs, physical network cards, and CPUs within the GPU server, and the bandwidth utilization of each physical network card, the allocation unit 22 is specifically used for: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine from each physical network the target physical network card whose bandwidth utilization meets the preset requirements and whose hardware topology distance to the target physical GPU is the closest. Assign a target VF interface to the target container from among the multiple VF interfaces virtualized by the target physical network card.
[0043] These units can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when one of these units is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these units can be integrated together to form a system-on-a-chip (SOC).
[0044] Furthermore, regarding the virtual interface allocation device provided in this application embodiment, from a hardware perspective, the hardware architecture schematic diagram of the virtual interface allocation device can be found in [reference needed]. Figure 3 As shown, the virtual interface allocation device may include: a memory 30 and a processor 31. The memory 30 is used to store program instructions; the processor 31 calls the program instructions stored in the memory 30 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar, and will not be described again here.
[0045] Optionally, this application also provides a GPU server device, including at least one processing element (or chip) for performing the above method embodiments.
[0046] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments.
[0047] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0048] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0049] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0050] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0051] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0052] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0053] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0054] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A virtual interface allocation method, characterized in that, The method is applied to a GPU server, which includes multiple physical GPUs and a physical network interface card (NIC) corresponding to each physical GPU, wherein each NIC can be virtualized into multiple Virtual Function (VF) interfaces; the method includes: Create a target container based on the received container creation request, and allocate a corresponding vGPU to the target container; Obtain the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; Based on the hardware topology between the physical GPUs, physical network cards, and CPUs within the GPU server, as well as the bandwidth utilization of each physical network card, a target VF interface is allocated to the target container.
2. The method as described in claim 1, characterized in that, The GPU server includes a Kubelet component, an ai-net-agent component, and an ai-cni component; the steps of creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container include: The Kubelet component receives the container creation request and requests vGPU resources for the target container from the GPU Device Plugin.
3. The method as described in claim 2, characterized in that, The steps for obtaining the resource information of the vGPU corresponding to the target container include: The Kubelet component forwards the container network creation request of the target container to the ai-net-agent through the ai-cni component, so that the ai-net-agent can obtain the resource information of the vGPU allocated to the target container.
4. The method according to any one of claims 1-3, characterized in that, Based on the hardware topology relationships between the physical GPUs, physical network cards, and CPUs within the GPU server, and the bandwidth utilization of each physical network card, the steps for allocating a target VF interface to the target container include: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine from each physical network the target physical network card whose bandwidth utilization meets the preset requirements and whose hardware topology distance to the target physical GPU is the closest. Assign a target VF interface to the target container from among the multiple VF interfaces virtualized by the target physical network card.
5. A virtual interface allocation device, characterized in that, Applied to a GPU server, the GPU server includes multiple physical GPUs and a physical network interface card (NIC) corresponding to each physical GPU, each physical NIC being virtualized into multiple Virtual Function (VF) interfaces; the device includes: A creation unit is used to create a target container based on a received container creation request and to allocate a corresponding vGPU to the target container; An acquisition unit is used to acquire the resource information of the vGPU corresponding to the target container, wherein the resource information of the vGPU includes at least the target physical GPU to which the vGPU corresponding to the target container belongs; The allocation unit is used to allocate a target VF interface to the target container based on the hardware topology between each physical GPU, each physical network card, and each CPU in the GPU server, as well as the bandwidth utilization of each physical network card.
6. The apparatus as claimed in claim 5, characterized in that, When creating a target container based on a received container creation request and allocating a corresponding vGPU to the target container, the creation unit is specifically used for: Receive the container creation request and request vGPU resources for the target container from the GPU Device Plugin.
7. The apparatus as claimed in claim 6, characterized in that, When obtaining the resource information of the vGPU corresponding to the target container, the obtaining unit is specifically used for: The AI-CNI component forwards the container network creation request of the target container to the AI-NET-Agent, so that the AI-NET-Agent can obtain the resource information of the vGPU allocated to the target container.
8. The apparatus according to any one of claims 5-7, characterized in that, Based on the hardware topology relationships between the physical GPUs, physical network cards, and CPUs within the GPU server, and the bandwidth utilization of each physical network card, when allocating a target VF interface to the target container, the allocation unit is specifically used for: Based on the target physical GPU to which the vGPU corresponding to the target container belongs, determine from each physical network the target physical network card whose bandwidth utilization meets the preset requirements and whose hardware topology distance to the target physical GPU is the closest. Assign a target VF interface to the target container from among the multiple VF interfaces virtualized by the target physical network card.
9. A virtual interface allocation device, characterized in that, The virtual interface allocation device includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of claims 1-4 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method as described in any one of claims 1-4.