WO2022041507A1 - Procédé et système de rendu 3d - Google Patents

Procédé et système de rendu 3d Download PDF

Info

Publication number
WO2022041507A1
WO2022041507A1 PCT/CN2020/130407 CN2020130407W WO2022041507A1 WO 2022041507 A1 WO2022041507 A1 WO 2022041507A1 CN 2020130407 W CN2020130407 W CN 2020130407W WO 2022041507 A1 WO2022041507 A1 WO 2022041507A1
Authority
WO
WIPO (PCT)
Prior art keywords
gpu
rendering
virtual
application
target
Prior art date
Application number
PCT/CN2020/130407
Other languages
English (en)
Chinese (zh)
Inventor
刘威
卢涛
Original Assignee
西安万像电子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安万像电子科技有限公司 filed Critical 西安万像电子科技有限公司
Publication of WO2022041507A1 publication Critical patent/WO2022041507A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Definitions

  • the present application relates to the technical field of virtual cloud desktops, and in particular, to a 3D rendering method and system.
  • the first is to install multiple physical GPU (Graphics Processing Unit, graphics processor) graphics cards in the cloud host, and use Passthrough technology to map a single physical GPU graphics card to each customer's virtual machine as the virtual machine's physical graphics card
  • the schematic diagram of the principle can be seen in Figure 1.
  • the virtual machine realizes the rendering of 3D instructions through Passthrough to the physical graphics card of the virtual machine.
  • the second is to install a single physical GPU graphics card in the cloud host, and use vGPU (virtual GPU) technology to virtualize a single physical GPU graphics card into multiple vGPU graphics cards, and map these multiple vGPUs one by one to the guest's virtual machine as The virtual graphics card is used, and its schematic diagram can be seen in Figure 2.
  • the virtual machine realizes the rendering of 3D instructions through the vGPU graphics card.
  • the third is the virtual machine virtual graphics card scheme.
  • Each virtual machine sends a rendering request to the host through its own virtual GPU graphics card, and the host uses the physical GPU graphics card to complete the real rendering.
  • the schematic diagram can be seen in Figure 3.
  • the first solution is simple to implement, but each virtual machine must bind the GPU hardware and use it exclusively when it is started, and the GPU may not be used at all in actual operation, resulting in GPU resources. waste.
  • the technical implementation of the second solution is relatively complex, requiring GPU hardware support, and this function is generally limited to specific models of GPUs from some specific manufacturers, which is expensive and expensive to use.
  • the third solution is the most flexible. The virtual machine does not need to be bound to a fixed GPU hardware during startup and operation, and the host does not need to select a specific type of GPU hardware from a specific manufacturer. It is also optimal from cost considerations. Therefore, the third solution The scheme has been widely used.
  • each 3D application needs to use the virtual GPU exclusively, and inside the virtual GPU, all resources are public , each 3D application initiates a rendering request to the virtual GPU through its own rendering context, and the virtual GPU responds to the rendering request of different applications by identifying different rendering contexts.
  • the virtual GPU needs to frequently perform operations such as rendering context switching, synchronization, and queuing, thereby affecting the performance of the system.
  • the embodiments of the present application provide a 3D rendering method and system, which can solve the problem that the virtual GPU needs to frequently perform operations such as rendering context switching, synchronization, and queuing when multiple 3D rendering tasks access the same common resource, which affects system performance.
  • the technical solution is as follows:
  • a 3D rendering method comprising:
  • the virtual machine obtains a 3D rendering instruction sent by at least one 3D application
  • the virtual machine sends each 3D rendering instruction to a virtual graphics processor GPU corresponding to the 3D application, wherein each 3D application corresponds to an independent virtual GPU;
  • the virtual GPU parses the received 3D rendering instruction, obtains intermediate representation IR data, and sends the IR data to the host;
  • the host computer generates a target rendering instruction according to the IR data, and sends the target rendering instruction to the target physical GPU, so that the target physical GPU executes the target rendering instruction.
  • an independent virtual GPU is set for each 3D application, the virtual machine can send the 3D rendering instruction sent by each 3D application to the virtual GPU uniquely corresponding to the 3D application, and the virtual GPU can receive the The received 3D rendering instruction is parsed, and the obtained IR data is sent to the host.
  • the host generates a target rendering instruction according to the IR data, and sends the target rendering instruction to the target physical GPU, so that the target physical GPU can execute the target rendering. instruction.
  • one virtual GPU is only responsible for managing the rendering context of one 3D application, thereby avoiding the problem that the virtual GPU needs to frequently perform context switching, synchronization, queuing, etc. to affect performance due to the management of multiple rendering contexts by one virtual GPU.
  • the virtual machine sending each 3D rendering instruction to the virtual graphics processor GPU corresponding to the 3D application includes:
  • the virtual machine determines whether a corresponding virtual GPU is created for the 3D application
  • the 3D rendering instruction is sent to the virtual GPU corresponding to the 3D application.
  • the method further includes:
  • the virtual machine after the virtual machine obtains the 3D rendering instruction sent by the 3D application, it first determines whether a corresponding virtual GPU has been created for the 3D application, and if so, sends the 3D rendering instruction to the 3D application.
  • the virtual GPU corresponding to the application if not created, first create the corresponding virtual GPU for the 3D application, and then send the 3D rendering instruction to the virtual GPU corresponding to the 3D application. It is guaranteed that each 3D application has an independent virtual GPU.
  • the method before the sending the target rendering instruction to the target physical GPU, the method further includes:
  • the host computer selects a target physical GPU from at least one physical GPU according to a preset rule.
  • the host computer selects a target physical GPU from at least one physical GPU according to a preset rule, including:
  • the host selects the physical GPU with the lowest utilization rate as the target physical GPU from at least one physical GPU managed by the host.
  • the host can select the physical GPU with the lowest utilization rate from at least one physical GPU managed by it as the target physical GPU, and then send the target rendering instruction to the target physical GPU, so that the target physical GPU can The GPU executes the target rendering instruction.
  • 3D applications can be distinguished as the smallest particles, and the rendering instructions of each 3D can be distributed to different physical GPU hardware, thus avoiding that one virtual machine only corresponds to one physical GPU, and the virtual machine runs multiple 3D applications at the same time.
  • the problem caused by the virtual machine corresponding to the physical GPU is overburdened.
  • a 3D rendering system includes a virtual machine, a host machine, at least one virtual graphics processing unit (GPU), and at least one physical GPU, and at least one physical GPU runs on the virtual machine.
  • 3D applications each 3D application corresponds to an independent virtual GPU, and the host machine includes at least one physical GPU;
  • the virtual machine is configured to obtain a 3D rendering instruction sent by at least one 3D application, and send each 3D rendering instruction to a virtual GPU corresponding to the 3D application;
  • the virtual GPU is used to parse the received 3D rendering instruction, obtain intermediate representation IR data, and send the IR data to the host;
  • the host machine is used to generate a target rendering instruction according to the IR data, and send the target rendering instruction to the target physical GPU;
  • the physical GPU is used to execute the received target rendering instruction.
  • the 3D rendering system includes a virtual machine, a host machine, at least one virtual GPU, and at least one physical GPU. At least one 3D application runs on the virtual machine, each 3D application corresponds to an independent virtual GPU, and the host machine Include at least one physical GPU.
  • the system sets up an independent virtual GPU for each 3D application.
  • the virtual machine can send the 3D rendering instructions sent by each 3D application to the unique virtual GPU corresponding to the 3D application, and the virtual GPU parses the received 3D rendering instructions. , and send the obtained IR data to the host, the host generates a target rendering instruction according to the IR data, and sends the target rendering instruction to the target physical GPU, so that the target physical GPU executes the target rendering instruction.
  • one virtual GPU is only responsible for managing the rendering context of one 3D application, thereby avoiding the problem that the virtual GPU needs to frequently perform context switching, synchronization, queuing, etc. to affect performance due to the management of multiple rendering contexts by one virtual GPU.
  • the virtual machine is specifically configured to acquire a 3D rendering instruction sent by at least one 3D application, determine whether a corresponding virtual GPU has been created for the 3D application, and if so, send the 3D rendering instruction Create a virtual GPU corresponding to the 3D application; if not, create a corresponding virtual GPU for the 3D application, and then send the 3D rendering instruction to the virtual GPU corresponding to the 3D application.
  • the virtual machine determines whether a corresponding virtual GPU has been created for the 3D application.
  • the 3D rendering instruction is sent to the virtual GPU corresponding to the 3D application, which can ensure that each 3D application has an independent virtual GPU.
  • the host is specifically configured to select a physical GPU from the at least one physical GPU according to a preset rule, obtain a target physical GPU, and send the target rendering instruction to the target physical GPU .
  • the host is specifically configured to select a physical GPU with the lowest utilization rate from the at least one physical GPU as a target physical GPU.
  • the rendering instructions of multiple 3D applications of the same virtual machine can be distinguished by taking the 3D application as the smallest particle, and the rendering instructions of each 3D application can be distributed to different physical GPU hardware, which can prevent the virtual machine from running multiple 3D applications at the same time.
  • the virtual machine's corresponding physical GPU is overburdened during rendering tasks for 3D applications.
  • the virtual GPU includes a front-end driver and a back-end driver
  • the front-end driver runs on the virtual machine, and is used to parse the received 3D rendering instruction, obtain intermediate representation IR data, and send the IR data to the back-end driver;
  • the back-end driver runs on the host, and is used for sending the IR data to the host.
  • Fig. 2 is a schematic diagram of performing 3D rendering by virtualizing hardware GPU in the prior art
  • Fig. 3 is a schematic diagram of performing 3D rendering through the solution of virtual machine virtual graphics card in the prior art
  • FIG. 4 is a schematic structural diagram of a 3D rendering system provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a 3D rendering method provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a specific 3D rendering system provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another 3D rendering system provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of a specific 3D rendering method provided by an embodiment of the present application.
  • the 3D application running on the virtual machine is used as the minimum rendering particle, and an independent virtual GPU is set for each 3D application, and the virtual GPU can issue the rendering instructions of the 3D application to the selected physical object. GPU to execute.
  • the 3D rendering system 40 may include a virtual machine 401, a host machine 402, at least one virtual GPU 403 and at least one physical GPU 4021, wherein the host machine 402 includes At least one physical GPU 4021, such as M (M is an integer greater than or equal to 1) physical GPUs 4021; at least one 3D application runs on the virtual machine 401, and each 3D application corresponds to an independent virtual GPU, as shown in FIG. 4 for example
  • M is an integer greater than or equal to 1
  • N is an integer greater than or equal to 1
  • 3D application 1 corresponds to virtual GPU1
  • 3D application 2 corresponds to virtual GPU2, ... 3D application N Corresponds to virtual GPU N.
  • the virtual machine 401 is configured to acquire a 3D rendering instruction sent by at least one 3D application, and send each 3D rendering instruction to a virtual GPU corresponding to the 3D application.
  • the virtual machine 401 can obtain the 3D rendering instructions sent by 3D application 1, 3D application 2...
  • the 3D rendering instruction sent by the 3D application N is sent to the virtual GPU2, ..., and so on, the 3D rendering instruction sent by the 3D application N is sent to the virtual GPUN.
  • the virtual GPU 403 is used to parse the received 3D rendering instruction, obtain IR (Intermediate Representation, intermediate representation) data, and send the IR data to the host machine 402.
  • IR Intermediate Representation, intermediate representation
  • the host 402 is configured to generate a target rendering instruction according to the IR data, and send the target rendering instruction to the target physical GPU; the physical GPU is configured to execute the received target rendering instruction.
  • the virtual GPU1 receives the 3D rendering instruction of the 3D application 1 sent by the virtual machine 401, then parses the 3D rendering instruction to obtain IR data, and then sends the IR data to the host machine 402, and the host machine 402 Generate a target rendering instruction according to the IR data, and send the target rendering instruction to the target physical GPU, for example, to the physical GPU1, and the physical GPU1 executes the target rendering instruction.
  • the virtual machine 401 is specifically configured to obtain a 3D rendering instruction sent by at least one 3D application, determine whether a corresponding virtual GPU has been created for the 3D application, and if so, send the 3D rendering instruction of the 3D application.
  • a virtual GPU corresponding to the 3D application is created; if not, a corresponding virtual GPU is created for the 3D application, and then the 3D rendering instruction of the 3D application is sent to the created virtual GPU corresponding to the 3D application.
  • the host 402 is specifically configured to select a physical GPU from at least one physical GPU according to a preset rule, obtain a target physical GPU, and send a target rendering instruction to the target physical GPU.
  • the host 402 may select a physical GPU with the lowest utilization rate as the target physical GPU from at least one physical GPU managed by the host machine 402 .
  • virtual GPU 403 may include front-end drivers and back-end drivers.
  • the front-end driver runs on the virtual machine 401 to parse the received 3D rendering instructions, obtain IR data, and send the IR data to the back-end driver; the back-end driver runs on the host machine 402 and uses to send the received IR data to the host computer 402 .
  • the 3D rendering system includes a virtual machine, a host machine, at least one virtual GPU, and at least one physical GPU. At least one 3D application runs on the virtual machine, each 3D application corresponds to an independent virtual GPU, and the host machine Include at least one physical GPU.
  • the system takes the 3D application of the virtual machine as the minimum rendering particle, and sets up an independent virtual GPU for each 3D application.
  • the virtual machine can send the 3D rendering instructions sent by each 3D application to the unique virtual GPU corresponding to the 3D application.
  • the virtual GPU parses the received 3D rendering instruction, and sends the obtained IR data to the host.
  • the host generates a target rendering instruction according to the IR data, and sends the target rendering instruction to the target physical GPU, so that the target physical GPU can Execute the target rendering instruction.
  • one virtual GPU is only responsible for managing the rendering context of one 3D application, thereby avoiding the problem that the virtual GPU needs to frequently perform context switching, synchronization, queuing, etc. to affect performance due to the management of multiple rendering contexts by one virtual GPU.
  • the virtual GPU can issue the 3D rendering instructions of the 3D application to the selected physical GPU, and the selected physical GPU performs the rendering process, and can select the appropriate physical GPU for each 3D application, no longer a virtual machine. It can only correspond to one physical GPU, thereby avoiding the problem that the physical GPU corresponding to the virtual machine is overburdened when the virtual machine runs 3D rendering of multiple 3D applications at the same time.
  • an embodiment of the present application further provides a 3D rendering method, which can be at least applied to the 3D rendering system of the above embodiment corresponding to FIG. 4 .
  • the method may include the following steps:
  • Step 501 Obtain a 3D rendering instruction sent by at least one 3D application.
  • At least one 3D application may run on the virtual machine, and when the 3D application initiates a 3D rendering instruction, the virtual machine obtains the 3D rendering instruction sent by the at least one 3D application.
  • Step 502 Send each 3D rendering instruction to the virtual GPU corresponding to the 3D application.
  • the virtual machine After acquiring the 3D rendering instruction sent by at least one 3D application, the virtual machine sends each 3D rendering instruction to a virtual GPU corresponding to the 3D application, wherein each 3D application corresponds to an independent virtual GPU.
  • 3D applications running on the virtual machine, namely 3D application 1, 3D application 2 and 3D application 3, and the three 3D applications are in one-to-one correspondence with virtual GPU1, virtual GPU2 and virtual GPU3.
  • These three 3D applications respectively initiate 3D rendering instructions at runtime, and the virtual machine sends the 3D rendering instructions initiated by 3D application 1 to virtual GPU1, and the 3D rendering instructions initiated by 3D application 2 to virtual GPU2, and the 3D application 3
  • the 3D rendering command initiated by 3 is sent to the virtual GPU3.
  • Step 503 Parse the 3D rendering instruction to obtain IR data.
  • the 3D rendering instruction is parsed to obtain IR data, and the IR data is sent to the host computer.
  • the 3D rendering instruction is parsed to obtain IR data, and the IR data is sent to the host computer.
  • Step 504 Generate a target rendering instruction according to the IR data.
  • the host computer After receiving the IR data sent by the virtual GPU, the host computer generates a target rendering instruction according to the IR data. In this way, the IR data can be restored to the data format supported by the host, and the target rendering instruction can be obtained.
  • Step 505 Send the target rendering instruction to the target physical GPU.
  • the host computer After the host computer generates the target rendering instruction according to the IR data, it sends the target rendering instruction to the target physical GPU, so that the target physical GPU executes the target rendering instruction.
  • the host can manage at least one physical GPU, and after generating the target rendering instruction according to the IR data, the host can select the target physical GPU from the at least one physical GPU according to a preset rule.
  • the target physical GPU can be selected from the at least one physical GPU.
  • the physical GPU with the lowest utilization rate is selected as the target physical GPU.
  • each 3D application running on a virtual machine corresponds to an independent virtual GPU, the virtual machine obtains a 3D rendering instruction sent by at least one 3D application, and sends each 3D rendering instruction to a The virtual GPU corresponding to the 3D application; the virtual GPU parses the received 3D rendering instruction, obtains IR data, and sends the IR data to the host; the host generates a target rendering instruction according to the IR data, and renders the target Instructions are sent to the target physical GPU so that the target physical GPU executes the received target rendering instructions.
  • a virtual GPU Since a virtual GPU is only responsible for managing the rendering context of one 3D application, rather than managing multiple rendering contexts, it can avoid the problem that the virtual GPU needs to perform context switching, synchronization, queuing and other operations frequently and affect the system performance, and improves the 3D performance. Rendering system performance.
  • the 3D rendering system 40 includes a virtual machine 401 , a host machine 402 , and at least one virtual machine. GPU 403 and at least one physical GPU 4021.
  • at least one 3D application runs on the virtual machine 401, and each 3D application corresponds to an independent virtual GPU 403.
  • N N is an integer greater than or equal to 1
  • 3D applications are shown: 3D application 1, 3D application 2, ..., 3D application N; 3D application 1 corresponds to virtual GPU1, and 3D application 2 corresponds to virtual GPU 1.
  • GPU2, ..., 3D application N corresponds to virtual GPUN.
  • the host machine 402 may be a server, on which the virtual machine 401 may run, and may be responsible for managing the physical GPU 4021.
  • the virtual machine 401 may include a 3D rendering portal module 4011, and at least one 3D application running on the virtual machine 401 is connected in communication with the 3D rendering portal module 4011.
  • the host 402 may include a 3D rendering intermediate instruction module 4022 , a GPU distribution module 4023 and at least one physical GPU 4021 .
  • the 3D rendering instruction may be a call of an OpenGL (Open Graphics Library) API (Application Programming Interface), then It will be captured by the 3D rendering entry module 4011 of the virtual machine 401 .
  • the capture mode of the 3D rendering entry module 4011 may be presented in the form of a dynamic library of 3D API functions. For example, if the virtual machine 401 runs a Linux system, the capture method of the 3D rendering entry module 4011 can be to replace the libGL.so dynamic library on the Linux system. In this way, all 3D applications developed based on OpenGL API load the libGL.so dynamic library What is actually loaded is the 3D rendering entry module 4011.
  • the 3D rendering entry module 4011 can first determine whether a corresponding virtual GPU has been created for the 3D application, and if so, continue the rendering process, The 3D rendering instruction of the 3D application is sent to the virtual GPU corresponding to the 3D application; otherwise, a new virtual GPU is created for it, and then the 3D rendering instruction of each 3D application is sent to the virtual GPU corresponding to the 3D application.
  • 3D application 1 and 3D application 2 respectively initiate 3D rendering instructions, and the 3D rendering instructions are captured by the 3D rendering entry module 4011.
  • the 3D rendering entry module 4011 determines that it is already 3D application 1.
  • the 3D rendering instruction initiated by the 3D application 1 is sent to the virtual GPU1; the 3D rendering entry module 4011 also determines that the corresponding virtual GPU has not been created for the 3D application 2, and then creates the corresponding virtual GPU for the 3D application 2 first. virtual GPU2, and then send the 3D rendering instruction initiated by 3D application 2 to virtual GPU2.
  • the virtual GPU 403 is a virtual device connected to and running on the virtual machine and the host machine, which may include a front-end driver 4031 and a back-end driver 4032, the front-end driver 4031 runs on the virtual machine 401, and the back-end driver 4032 runs on the host machine 403 superior.
  • the front-end driver 4031 can parse the received 3D rendering instruction, obtain IR data, and send the IR data to the back-end driver 4032; after the back-end driver 4032 receives the IR data sent by the front-end driver 4031, it sends the IR data To the host computer 402 , specifically, it may be the 3D rendering intermediate instruction module 4022 sent to the host computer 402 .
  • the 3D rendering intermediate instruction module 4022 sent to the host computer 402 .
  • the 3D rendering intermediate instruction module 4022 of the host machine 402 can create a corresponding rendering context for each virtual GPU 403, and is responsible for parsing the IR data received from the front-end driver 4031 of the virtual GPU 403 to the target rendering supported by the local physical GPU 4021 instruction, the target rendering instruction can be a 3D API call, such as a Vulkan API call, where Vulkan is a cross-platform 2D and 3D drawing application program interface.
  • the GPU distribution module 4023 is responsible for managing the physical GPU 4021.
  • a suitable physical GPU 4021 can be selected for rendering the target rendering instruction.
  • the strategy for selecting a physical GPU may take the utilization rate of the physical GPU as a reference, and preferentially select a relatively idle physical GPU as the target physical GPU, that is, select the physical GPU with the lowest utilization rate as the target physical GPU. In this way, the rendering of the same rendering context, that is, the rendering of the same 3D application, can be executed on the same physical GPU.
  • the 3D rendering system provided by the embodiments of the present application can take the 3D application running on the virtual machine as the smallest rendering particle, and create a dedicated virtual GPU graphics card for each 3D application, that is, set an independent virtual GPU for each 3D application , the virtual GPU can deliver the rendering instruction of the 3D application to the selected target physical GPU for execution.
  • the rendering instructions of multiple 3D applications of the same virtual machine can be distinguished by taking the 3D application as the smallest particle, and the rendering instructions of each 3D application can be distributed to different physical GPU hardware, thus avoiding that one virtual machine corresponds to only one
  • the physical GPU and the virtual machine running multiple rendering 3D applications at the same time cause the virtual machine's corresponding physical GPU to be overburdened; moreover, in this solution, one virtual GPU is only responsible for managing the rendering context of one 3D application, which can avoid Because one virtual GPU manages multiple rendering contexts, the virtual GPU needs to frequently perform context switching, synchronization, queuing and other issues affecting performance, which improves the rendering performance of the system.
  • one host machine may also correspond to multiple virtual machines.
  • one host machine may correspond to two virtual machines.
  • the two virtual machines can respectively run at least one 3D application, and for each virtual machine, each 3D application running on the virtual machine corresponds to an independent virtual GPU.
  • the host can manage the 3D rendering instructions from the two virtual machines at the same time, and select the target physical GPU for each 3D rendering instruction.
  • the embodiment of the present application further provides a specific 3D rendering method, which can be at least applied to the 3D rendering system of the above embodiment corresponding to FIG. 6 .
  • the method may include the following steps:
  • Step 801 Obtain a 3D rendering instruction sent by at least one 3D application.
  • At least one 3D application can run on the virtual machine 401.
  • the 3D application on the virtual machine initiates a 3D rendering instruction, for example, when a 3D API call is initiated, the 3D rendering entry module 4011 on the virtual machine will capture the 3D rendering instruction.
  • Step 802 Determine whether a corresponding virtual GPU is created for the 3D application.
  • the 3D rendering entry module 4011 determines whether a corresponding virtual GPU node, that is, a virtual GPU graphics card, has been created for the 3D application. If it has been created, execute step 804, otherwise execute step 803 .
  • Step 803 Create a corresponding virtual GPU for the 3D application.
  • step 804 is executed.
  • Step 804 Send the 3D rendering instruction to the virtual GPU corresponding to the 3D application.
  • the 3D rendering entry module 4011 determines that after creating a corresponding virtual GPU for the 3D application, or after creating a new virtual GPU for the 3D application, the 3D rendering instruction is sent to the virtual GPU corresponding to the 3D application.
  • the virtual GPU is a virtual device connected to and running on the virtual machine and the host, which may include a front-end driver and a back-end driver.
  • the front-end driver runs on the virtual machine 401 and the back-end driver runs on the host 403 .
  • the 3D rendering entry module 4011 can send the 3D rendering instruction to the front-end driver of the virtual GPU corresponding to the 3D application.
  • 3D application 1 and 3D application 2 running on the virtual machine 401 respectively initiate a 3D rendering instruction, and after capturing the 3D rendering instruction, the 3D rendering entry module 4011 determines whether the corresponding 3D application 1 and 3D application 2 have been created respectively.
  • Virtual GPU assuming that virtual GPU1 has been created for 3D application 1, but not for 3D application 2, the 3D rendering entry module 4011 will send the 3D rendering command initiated by 3D application 1 to the front-end driver of virtual GPU1, and will After creating the virtual GPU2 for the 3D application 2, the 3D rendering instruction initiated by the 3D application 2 is sent to the front-end driver of the virtual GPU2.
  • Step 805 Parse the 3D rendering instruction to obtain IR data.
  • the 3D rendering instruction is parsed to obtain IR data, and the IR data is sent to the host.
  • the 3D rendering instruction is parsed to obtain IR data, and the IR data is sent to the host.
  • the front-end driver of the virtual GPU parses the 3D rendering instruction sent by the 3D rendering entry module 4011, generates IR data, and then sends the IR data to the back-end driver of the virtual GPU; the back-end driver of the virtual GPU then interprets the IR data.
  • the IR data is sent to the 3D rendering intermediate instruction module 4022 of the host computer 402 .
  • Step 806 Generate a target rendering instruction according to the IR data.
  • the 3D rendering intermediate instruction module 4022 of the host computer 402 After the 3D rendering intermediate instruction module 4022 of the host computer 402 receives the IR data sent by the virtual GPU, it generates a target rendering instruction according to the IR data.
  • the target rendering instruction can be generated by parsing the IR data, so that the IR data can be restored to the host computer. 402 Supported data format, get the target rendering instruction.
  • the 3D rendering intermediate instruction module 4022 sends the target rendering instruction to the GPU distribution module 4023 .
  • Step 807 Select a target physical GPU.
  • the GPU distribution module 4023 After the GPU distribution module 4023 receives the target rendering instruction sent by the 3D rendering intermediate instruction module 4022, it can select a target physical GPU from at least one physical GPU managed by it according to a preset rule. Specifically, the GPU distribution module 4023 may select the physical GPU with the lowest GPU utilization rate as the target physical GPU according to the utilization rate of each physical GPU managed by the host machine 402 .
  • Step 808 Send the target rendering instruction to the target physical GPU.
  • the GPU distribution module 4023 selects the target physical GPU, it sends the target rendering instruction to the selected target physical GPU.
  • Step 809 Execute the target rendering instruction.
  • the target physical GPU After the target physical GPU receives the target rendering instruction, it executes the target rendering instruction.
  • different 3D applications of the same virtual machine can be distributed to different physical GPUs; different 3D applications of different virtual machines can be distributed to the same physical GPU.
  • the selection strategy for distributing the physical GPUs may be to preferentially select the physical GPUs in an idle state, which can solve the problem of uneven busyness and idleness of multiple physical GPUs in the host.
  • the 3D rendering entry module captures the 3D rendering instruction, and determines whether a corresponding virtual GPU has been created for the 3D application, and if so, Then send the 3D rendering instruction to the virtual GPU corresponding to the 3D application; if not, create a corresponding virtual GPU for the 3D application, and then send the 3D rendering instruction to the virtual GPU corresponding to the 3D application; the virtual GPU parses the 3D rendering instruction Obtain IR data and send the IR data to the 3D rendering intermediate instruction module of the host; the 3D rendering intermediate instruction module generates a target rendering instruction according to the IR data, and sends the target rendering instruction to the GPU distribution module; the GPU distribution module selects The physical GPU with the lowest utilization is the target physical GPU, and the target rendering instruction is sent to the target physical GPU, so that the target physical GPU executes the target rendering instruction.
  • the embodiments of the present application further provide a computer-readable storage medium
  • the non-transitory computer-readable storage medium may be a read-only memory (English) : Read Only Memory, ROM), random access memory (English: Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk and optical data storage devices, etc.
  • the storage medium stores computer instructions for executing the 3D rendering methods described in the embodiments corresponding to FIG. 5 and FIG. 8 , and details are not described herein again.

Abstract

L'invention concerne un procédé et un système de rendu 3D, qui se rapportent au domaine d'une technologie de bureau virtuel en nuage, et peuvent résoudre le problème qui fait que les performances du système sont affectées en raison du fait qu'un GPU virtuel a besoin d'effectuer fréquemment des opérations comme la commutation, la synchronisation et la mise en file d'attente de contextes de rendu lorsqu'une pluralité de tâches de rendu 3D accède à la même ressource publique. La solution technique spécifique comporte les étapes suivantes: une machine virtuelle (401) acquiert des instructions de rendu 3D émises par au moins une application 3D, et envoie chaque instruction de rendu 3D à un GPU virtuel (403) correspondant à l'application 3D, chaque application 3D correspondant à un seul GPU virtuel (403) indépendant; les GPU virtuels (403) analyse les instructions de rendu 3D reçues pour obtenir des données d'IR, et envoie les données d'IR à un ordinateur hôte (402); et l'ordinateur hôte (402) génère une instruction de rendu cible d'après les données d'IR, et envoie l'instruction de rendu cible à un GPU physique (4021) cible, de telle sorte que le GPU physique (4021) cible exécute l'instruction de rendu cible. La présente invention est utilisée pour le rendu 3D.
PCT/CN2020/130407 2020-08-28 2020-11-20 Procédé et système de rendu 3d WO2022041507A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010885789.9 2020-08-28
CN202010885789.9A CN112102457A (zh) 2020-08-28 2020-08-28 3d渲染方法及系统

Publications (1)

Publication Number Publication Date
WO2022041507A1 true WO2022041507A1 (fr) 2022-03-03

Family

ID=73758303

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/130407 WO2022041507A1 (fr) 2020-08-28 2020-11-20 Procédé et système de rendu 3d

Country Status (2)

Country Link
CN (1) CN112102457A (fr)
WO (1) WO2022041507A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991505B (zh) * 2021-04-16 2022-02-18 辽宁向日葵教育科技有限公司 一种线上3d渲染方法
CN113240571A (zh) * 2021-05-07 2021-08-10 西安万像电子科技有限公司 图像处理系统、方法
CN113485773A (zh) * 2021-06-24 2021-10-08 锐捷网络(苏州)有限公司 数据处理方法、装置及系统
CN115686758B (zh) * 2023-01-03 2023-03-21 麒麟软件有限公司 一种基于帧统计的VirtIO-GPU性能可控方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819460A (zh) * 2012-08-07 2012-12-12 清华大学 一种基于预算功率指导的高能效gpu集群系统调度算法
CN103631634A (zh) * 2012-08-24 2014-03-12 中国电信股份有限公司 实现图形处理器虚拟化的方法与装置
US20180373546A1 (en) * 2017-06-22 2018-12-27 Vmware, Inc. Hybrid software and gpu encoding for ui remoting
CN111488196A (zh) * 2020-04-13 2020-08-04 西安万像电子科技有限公司 渲染方法及装置、存储介质、处理器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819460A (zh) * 2012-08-07 2012-12-12 清华大学 一种基于预算功率指导的高能效gpu集群系统调度算法
CN103631634A (zh) * 2012-08-24 2014-03-12 中国电信股份有限公司 实现图形处理器虚拟化的方法与装置
US20180373546A1 (en) * 2017-06-22 2018-12-27 Vmware, Inc. Hybrid software and gpu encoding for ui remoting
CN111488196A (zh) * 2020-04-13 2020-08-04 西安万像电子科技有限公司 渲染方法及装置、存储介质、处理器

Also Published As

Publication number Publication date
CN112102457A (zh) 2020-12-18

Similar Documents

Publication Publication Date Title
WO2022041507A1 (fr) Procédé et système de rendu 3d
CN111488196B (zh) 渲染方法及装置、存储介质、处理器
JP5902175B2 (ja) Gpu利用可能仮想マシンの負荷分散技法
JP4921384B2 (ja) メモリを1台のバーチャル・マシンからもう一方へダイナミックに再割り当てする方法、装置及びシステム
US20120054740A1 (en) Techniques For Selectively Enabling Or Disabling Virtual Devices In Virtual Environments
CN110192182B (zh) 动态和专用的虚拟化图形处理
US9798565B2 (en) Data processing system and method having an operating system that communicates with an accelerator independently of a hypervisor
US8872835B2 (en) Prevention of DoS attack by a rogue graphics application
WO2021008183A1 (fr) Procédé et appareil de transmission de données, et serveur
JP2006190281A (ja) グラフィックサブシステムを仮想化するシステムおよび方法
CN102495769A (zh) 动态虚拟设备故障恢复
KR20210095690A (ko) 리소스 관리 방법과 장치, 전자 디바이스 및 기록 매체
US9104452B2 (en) Hybrid remote sessions
CN113312142A (zh) 虚拟化处理系统、方法、装置及设备
CN110659103A (zh) 资源分配方法及装置
WO2021008185A1 (fr) Procédé et appareil de transmission de données, et serveur
CN112000439A (zh) 一种实现云原生应用管理虚拟机的方法
CN115526770A (zh) 用于虚拟化图形处理的缩放
CN106991057B (zh) 一种共享显卡虚拟化中内存的调用方法及虚拟化平台
KR102001641B1 (ko) 가상화 환경에서의 gpu 자원 관리 방법 및 장치
CN112506646A (zh) 显存分配的方法及装置
US20150381766A1 (en) Application transfer system, application transfer method, terminal, and program
CN107766122B (zh) 一种宿主机的可用内存空间设置方法和装置
CN109271179B (zh) 虚拟机应用程序管理方法、装置、设备及可读存储介质
CN115546008B (zh) 一种gpu虚拟化管理系统和方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20951175

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: 20951175

Country of ref document: EP

Kind code of ref document: A1