Rendering task allocation method and device, equipment and storage medium

By dynamically allocating rendering tasks based on the rendering performance of the primary and secondary graphics cards, the problem of excessively long copying time between graphics cards in multi-card rendering is solved, and efficient processing of rendering tasks is achieved.

CN120929249APending Publication Date: 2025-11-11XIAN XINTONG SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510959544.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In multi-GPU rendering technology, the differences in performance between graphics cards and the cost differences in rendering task requirements lead to excessively long data copying time between graphics cards, which reduces the processing efficiency of rendering tasks.

Method used

Based on the rendering performance of the main graphics card and each secondary graphics card, rendering tasks are dynamically allocated to avoid the main graphics card copying too many tasks to the secondary graphics cards, thus balancing the graphics card load and enabling the main and secondary graphics cards to process rendering tasks in parallel.

Benefits of technology

It improves the processing efficiency of rendering tasks, avoids excessive copying time between graphics cards, and optimizes the overall processing time of rendering tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929249A_ABST
    Figure CN120929249A_ABST
Patent Text Reader

Abstract

The invention provides a rendering task allocation method and device, equipment and a storage medium, and relates to the technical field of resource scheduling. The rendering task distribution method comprises the following steps: acquiring a current rendering task; and under the condition that the rendering cost corresponding to the current rendering task meets a multi-card rendering condition, distributing the current rendering task to the main display card and at least one auxiliary display card for processing based on the rendering performance of the main display card and each auxiliary display card. Through the embodiment of the invention, the effective optimization of the rendering task processing efficiency can be ensured, and the processing efficiency of the rendering task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of resource scheduling technology, and in particular to a rendering task allocation method, apparatus, device and storage medium. Background Technology

[0002] With the surge in demand for high-precision graphics rendering in industries such as film, gaming, and virtual reality, single graphics cards face computational bottlenecks when rendering ultra-high-definition images, complex lighting effects, or large-scale scenes in real time. Multi-GPU rendering technology has emerged to address this issue, significantly improving rendering efficiency by having multiple graphics cards work in parallel to share the computational load.

[0003] Multi-GPU rendering methods mainly include Alternate Frame Rendering (AFR) and Split Frame Rendering (SFR). SFR divides a single frame into multiple regions, with each GPU rendering different parts of the same frame in parallel, and then merging them for output, thereby reducing latency and improving frame rate stability.

[0004] In SFR mode, the rendering area of ​​each graphics card is distributed more evenly. However, due to the performance differences of each graphics card and the differences in the cost requirements of rendering tasks, the time spent copying data between graphics cards may be longer than the time optimized by multi-card rendering, thereby reducing the processing efficiency of rendering tasks. Summary of the Invention

[0005] This disclosure provides a rendering task allocation method, apparatus, device, and storage medium; which can improve the processing efficiency of rendering tasks to a certain extent.

[0006] The technical solution disclosed herein is implemented as follows: Firstly, this disclosure provides a method for allocating rendering tasks, including: Get the current rendering task; If the rendering cost corresponding to the current rendering task meets the multi-GPU rendering conditions, the current rendering task is allocated to the main GPU and at least one of the secondary GPUs for processing based on the rendering performance of the main GPU and each of the secondary GPUs; the rendering cost is the cost required to process the rendering task by the main GPU or each of the secondary GPUs.

[0007] Secondly, this disclosure provides a rendering task allocation apparatus, comprising: The task acquisition module is used to acquire the current rendering task; The task allocation module is used to allocate the current rendering task to the main graphics card and at least one of the secondary graphics cards for processing, based on the rendering performance of the main graphics card and each secondary graphics card, provided that the rendering cost corresponding to the current rendering task meets the multi-GPU rendering conditions; the rendering cost is the cost required by the main graphics card or each of the secondary graphics cards to process the rendering task.

[0008] Thirdly, this disclosure provides a computer device, including: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the rendering task allocation method as described in the first aspect above.

[0009] Fourthly, this disclosure provides a computer storage medium storing executable instructions for implementing the rendering task allocation method as described in the first aspect above when executed by a processor.

[0010] This disclosure provides a rendering task allocation method. When allocating rendering tasks between graphics cards, the current rendering task is obtained. If the rendering cost of the current rendering task meets the conditions for multi-GPU rendering, the current rendering task is allocated to the primary graphics card and at least one secondary graphics card for processing based on the rendering performance of the primary graphics card and each secondary graphics card. Compared to distributing rendering tasks more evenly among the graphics cards, this embodiment allocates rendering tasks based on the rendering performance of the primary graphics card and each secondary graphics card. On the one hand, this avoids the situation where the primary graphics card copies too many rendering tasks to the secondary graphics cards, resulting in the time spent copying rendering tasks and merging rendering results between graphics cards exceeding the time optimized for multi-GPU rendering, thus ensuring effective optimization of rendering task processing efficiency. On the other hand, by balancing the load between the primary and secondary graphics cards based on their rendering performance, it avoids the situation where the processing time of a rendering task is prolonged due to the longer rendering time of individual graphics cards, thereby improving the processing efficiency of the rendering task. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.

[0012] Figure 1 A schematic diagram of the implementation process of a rendering task allocation method provided in this embodiment of the present disclosure. Figure 1 .

[0013] Figure 2This is a schematic diagram of the structure of a rendering task allocation system provided in an embodiment of the present disclosure.

[0014] Figure 3 This is a schematic diagram of the allocation area for a rendering task allocation method provided in an embodiment of this disclosure.

[0015] Figure 4 A schematic diagram of the implementation process of a rendering task allocation method provided in this embodiment of the present disclosure. Figure 2 .

[0016] Figure 5 This is a schematic diagram of a rendering task allocation device provided in an embodiment of the present disclosure.

[0017] Figure 6 A schematic diagram of the hardware entity of a computer device provided in an embodiment of this disclosure. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions in the embodiments of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art should fall within the protection scope of this disclosure.

[0019] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0020] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0021] Furthermore, in the embodiments of this disclosure, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0022] To facilitate understanding of the technical solutions of the embodiments of this disclosure, the related technologies of the embodiments of this disclosure are described below. The following related technologies are optional solutions and can be combined with the technical solutions of the embodiments of this disclosure in any way, and they all fall within the protection scope of the embodiments of this disclosure.

[0023] With the surge in demand for high-precision graphics rendering in industries such as film, gaming, and virtual reality, single graphics cards face computational bottlenecks when rendering ultra-high-definition images, complex lighting effects, or large-scale scenes in real time. Multi-GPU rendering technology can coordinate multiple graphics cards in parallel to share the computational load, significantly improving rendering efficiency.

[0024] In SFR mode, multi-GPU rendering divides a single frame into multiple regions, allowing each GPU to render different parts of the same frame in parallel before merging the output. This reduces latency and improves frame rate stability. While the rendering areas are typically evenly distributed across the GPUs, differences in performance and rendering task requirements can lead to situations where data copying between GPUs takes longer than optimized for multi-GPU rendering, thus reducing rendering task efficiency.

[0025] In view of this, this disclosure provides a rendering task allocation method that allocates rendering tasks based on the rendering performance of the primary graphics card and each secondary graphics card. On the one hand, it can avoid the situation where the primary graphics card copies too many rendering tasks to the secondary graphics cards, resulting in the time spent copying rendering tasks and merging rendering results between graphics cards being greater than the time optimized for multi-card rendering, thereby ensuring effective optimization of rendering task processing efficiency. On the other hand, by balancing the load between the primary graphics card and each secondary graphics card based on their rendering performance, it can avoid the situation where the processing time of rendering tasks is extended due to the longer rendering time of individual graphics cards, thereby improving the processing efficiency of rendering tasks.

[0026] This disclosure can be applied to multi-GPU systems, which refer to systems configured with multiple graphics cards or graphics processing units (GPUs). Examples include servers, terminal devices, cloud and IoT devices equipped with multiple graphics cards or GPUs, such as local GPU clusters, cloud GPU clusters, and computers. A GPU is a computing chip within a graphics card, and a graphics card includes at least one GPU. In this disclosure, the primary graphics card is the one in the multi-GPU system responsible for outputting rendering results, processing rendering tasks, and other computing tasks, while the secondary graphics card is the one in the multi-GPU system responsible for processing rendering tasks and other computing tasks.

[0027] Before providing a detailed description of the embodiments of this disclosure, the implementation process of the embodiments of this disclosure will be briefly described as follows: When the main graphics card receives a rendering task, it allocates the rendering task to the corresponding graphics card for rendering based on the rendering task allocation method in the embodiments of this disclosure, and obtains the rendering result. Each graphics card executing the rendering task outputs the obtained rendering result to the main graphics card so that the rendering result can be displayed through the main graphics card.

[0028] The specific implementation of the embodiments of this disclosure is described below with reference to the accompanying drawings.

[0029] See Figure 1 , Figure 1 A schematic diagram of the implementation process of a rendering task allocation method provided in this embodiment of the present disclosure. Figure 1 The rendering task allocation method provided in this disclosure may include the following steps: Step S101: Obtain the current rendering task; Rendering tasks refer to the process of converting 3D models, 3D scenes, or 2D graphics data into final visualized images or videos using a graphics card. The rendering process primarily includes vertex shaders, primitive assembly, geometry shaders, rasterization, fragment shaders, and testing and blending. The current rendering task refers to the current frame being rendered.

[0030] For example, after the computer submits a rendering task, the current rendering task can be obtained through the graphics card to process the current rendering task.

[0031] Step S102: If the rendering cost of the current rendering task meets the multi-GPU rendering conditions, the current rendering task is allocated to the main GPU and at least one secondary GPU for processing based on the rendering performance of the main GPU and each secondary GPU.

[0032] Rendering cost refers to the cost required to process a rendering task using either the primary graphics card or each of the secondary graphics cards. For example, rendering cost can be the time or computing resource cost required for a single secondary graphics card to process the rendering task. For instance, in a multi-GPU system, the graphics card used to independently complete the rendering task can be selected to determine the rendering cost. In a single-GPU rendering mode, the primary graphics card is used by default in the multi-GPU system, and the rendering cost is the cost required for the primary graphics card to process the rendering task alone. Similarly, in a single-GPU rendering mode, a specific secondary graphics card is used by default in the multi-GPU system, and the rendering cost is the cost required for that specific secondary graphics card to process the rendering task alone.

[0033] Taking the time cost required for the primary graphics card to process the current rendering task alone as an example, the time cost can be determined based on the amount of data from historical rendering tasks processed by the primary graphics card alone, the time taken by the primary graphics card to process those historical rendering tasks, and the amount of data from the current rendering task. Alternatively, the time cost required for the primary graphics card to process the current rendering task alone or the time cost required for the primary and secondary graphics cards to process the current rendering task can be determined based on the amount of data from historical rendering tasks processed collaboratively by the primary and secondary graphics cards, the time taken by the primary and secondary graphics cards to process those historical rendering tasks collaboratively, the amount of data from the current rendering task, and a comparison of the hardware performance of the primary and secondary graphics cards.

[0034] Multi-GPU rendering conditions refer to the conditions under which a rendering task is completed collaboratively using the primary graphics card and at least one secondary graphics card. In some possible implementations, the multi-GPU rendering condition can be determined based on the time cost required for either the primary or secondary graphics card to handle the current rendering task individually. Alternatively, the multi-GPU rendering condition can be determined through the task attributes corresponding to the rendering task. These task attributes can include the data volume, computational complexity, and rendering quality requirements (such as resolution, sampling rate, and color depth requirements for the rendered result).

[0035] The rendering performance of a primary or secondary graphics card can be measured by its speed in completing rendering tasks or its energy efficiency during the rendering process. The energy efficiency of a primary or secondary graphics card refers to its efficiency in processing rendering tasks per unit of power consumption. Rendering performance can be determined based on the time taken by the primary or secondary graphics cards to process rendering tasks in historical rendering scenarios. For example, the speed at which the primary graphics card completes a rendering task can be determined by the amount of data in the historical rendering task and the time taken by the primary graphics card to process it. Alternatively, it can be determined by the amount of data in the historical rendering task, the time taken by other secondary graphics cards to process it, and a comparison of the hardware performance of the primary and secondary graphics cards. Here, a historical rendering task refers to a specific rendering task processed within a historical time period.

[0036] In some embodiments of this disclosure, the decision to process the current rendering task collaboratively using the primary graphics card and at least one secondary graphics card can be determined based on the rendering cost corresponding to the current rendering task. Taking the time cost required for the primary graphics card to process the rendering task alone as an example, the decision to process the current rendering task collaboratively using the primary graphics card and at least one secondary graphics card can be determined based on the time cost required for the primary graphics card to process the current rendering task alone. If the time cost required for the primary graphics card to process the rendering task alone meets the conditions for multi-GPU rendering, the current rendering task is allocated to the primary graphics card and at least one secondary graphics card for processing based on the rendering performance of the primary graphics card and each secondary graphics card.

[0037] Specifically, taking the rendering cost as the time cost required for the primary graphics card to process the rendering task alone, and the task attribute corresponding to the rendering task as the data volume of the rendering task, we can determine the amount of data that the primary graphics card needs to copy to the secondary graphics card when the current rendering task is completed collaboratively by the primary graphics card and at least one secondary graphics card. Based on the data volume of the current rendering task and the proportion of the data volume copied by the primary graphics card to the secondary graphics card in the historical rendering tasks, we can determine the copying time required by the primary graphics card to copy the rendering task to the secondary graphics card. By comparing this copying time with the time cost required by the primary graphics card to process the current rendering task alone, we can determine whether the rendering cost corresponding to the current rendering task meets the multi-card rendering conditions.

[0038] In some possible implementations, the multi-GPU rendering condition can be determined by comparing the time cost required for the primary GPU to handle the current rendering task alone with the copying time. This time cost can be determined by the proportion of data copied from the primary GPU to the secondary GPU in historical rendering tasks within the total data volume of the rendering task. Specifically, this proportion can be used as a coefficient, multiplied by the time cost required for the primary GPU to handle the current rendering task alone, to obtain this time cost. The multi-GPU rendering condition is set so that this time cost is not less than the copying time. If this time cost is not less than the copying time, the multi-GPU rendering condition is met. Then, based on the rendering performance of the primary GPU and each secondary GPU, the current rendering task is allocated to the primary GPU and at least one secondary GPU for parallel processing.

[0039] For example, if the amount of data copied from the primary graphics card to the secondary graphics card in a historical rendering task accounts for 50% of the total data in the rendering task, and the time cost required by the primary graphics card to process the current rendering task is 50% of the total time cost, and the multi-GPU rendering condition is met if 50% of the time cost is not less than the copying time, then the current rendering task is allocated to the primary graphics card and at least one secondary graphics card based on the rendering performance of the primary graphics card and each secondary graphics card, so that the current rendering task can be processed in parallel by the primary graphics card and at least one secondary graphics card.

[0040] Taking the rendering performance of the primary or secondary graphics card as an example—the speed at which the primary or secondary graphics card completes the rendering task—the current rendering task can be allocated to the primary graphics card and at least one secondary graphics card according to different ratios based on the speed at which the primary and secondary graphics cards complete the rendering task. In some possible implementations, the secondary graphics card needs to wait for the primary graphics card to finish copying the rendering task before processing its own rendering task. Therefore, the allocation of rendering tasks can also refer to the copying speed of the rendering task from the primary graphics card to the secondary graphics card in historical rendering tasks. By allocating the current rendering task to the primary graphics card and at least one secondary graphics card based on the speed at which the primary and secondary graphics cards complete the rendering task and the copying speed, the waiting time of the secondary graphics card between copying the rendering task from the primary graphics card and processing the rendering task can be reduced, further improving the efficiency of the primary and secondary graphics cards in processing rendering tasks in parallel.

[0041] The rendering task allocation method provided in this embodiment allocates rendering tasks based on the rendering performance of the main graphics card and each secondary graphics card. On the one hand, it avoids the situation where the main graphics card copies too many rendering tasks to the secondary graphics cards, resulting in the time spent copying rendering tasks and merging rendering results between graphics cards being greater than the time optimized for multi-card rendering, thereby ensuring effective optimization of rendering task processing efficiency. On the other hand, by balancing the load between the main graphics card and each secondary graphics card based on their rendering performance, it avoids the situation where the processing time of rendering tasks is extended due to the longer rendering time of individual graphics cards, thereby improving the processing efficiency of rendering tasks.

[0042] In some possible implementations, the multi-GPU rendering criteria can be determined only for more complex rendering tasks. These more complex tasks refer to those with higher rendering costs when processed by the primary GPU and / or various secondary GPUs. The determination of high rendering costs can be based on the correspondence between rendering costs and task allocation methods in multiple historical rendering tasks. For example, multiple historical rendering tasks allocated to the primary GPU and at least one secondary GPU can be collected. The lowest rendering cost can be determined from the rendering costs corresponding to these historical tasks. If the rendering cost of a particular task is not less than this lowest cost, then that task can be defined as a more complex rendering task. Determining whether multi-GPU rendering is met only for more complex tasks reduces the number of checks, thereby reducing energy consumption.

[0043] In some embodiments of this disclosure, the rendering task can be assigned to the main graphics card for processing if the rendering cost of the current rendering task does not meet the conditions for multi-GPU rendering.

[0044] Specifically, based on the above implementation, it can be determined whether to process the current rendering task collaboratively using the primary graphics card and at least one secondary graphics card, based on the rendering cost corresponding to the current rendering task. Taking the time cost required for the primary graphics card to process the rendering task alone as an example, the decision to process the current rendering task collaboratively using the primary graphics card and at least one secondary graphics card can be made based on the time cost required for the primary graphics card to process the current rendering task alone. If the time cost required for the primary graphics card to process the rendering task alone does not meet the conditions for multi-GPU rendering, the current rendering task is assigned to the primary graphics card for processing.

[0045] For example, the multi-GPU rendering condition can be determined by comparing the time cost required for the primary graphics card to handle the current rendering task alone with the copying time. Based on the above implementation, the time cost required for the primary graphics card to handle the current rendering task alone and the copying time are determined, and the multi-GPU rendering condition is set so that the time cost is not less than the copying time. If the time cost is less than the copying time, the multi-GPU rendering condition is not met, and the current rendering task is assigned to the primary graphics card for processing.

[0046] In the above embodiments, when the rendering cost corresponding to the current rendering task does not meet the conditions for multi-card rendering, the current rendering task is processed by the main graphics card alone. Compared with directly allocating the current rendering task to the main graphics card and at least one secondary graphics card for processing, the above implementation method can avoid the situation where the time spent copying rendering tasks and merging rendering results between graphics cards is greater than the time optimized by multi-card rendering, thereby ensuring effective optimization of the rendering task processing efficiency.

[0047] In some embodiments of this disclosure, the current rendering task is allocated to the main graphics card and at least one secondary graphics card for processing based on the rendering performance of the main graphics card and each secondary graphics card, including: determining the task allocation ratio of the current rendering task to the main graphics card and each secondary graphics card based on the rendering performance of the main graphics card and each secondary graphics card, and allocating the current rendering task to the main graphics card and at least one secondary graphics card for processing based on the task allocation ratio corresponding to the current rendering task.

[0048] For example, the rendering performance of the primary or secondary graphics card can be the speed at which it completes a rendering task or the energy efficiency during the rendering process. Taking the rendering performance of the primary or secondary graphics card as the speed at which it completes a rendering task as an example, the task allocation ratio of the current rendering task to the primary and secondary graphics cards can be determined based on the speed at which the primary and secondary graphics cards complete the rendering task. Based on the task allocation ratio corresponding to the current rendering task, the current rendering task is then allocated to the primary graphics card and at least one secondary graphics card for processing.

[0049] Specifically, the proportion of rendering speed of each graphics card can be determined based on the speed at which the main graphics card and each secondary graphics card complete the rendering task, and the task allocation ratio of the current rendering task to the main graphics card and each secondary graphics card can be determined based on the proportion of rendering speed of each graphics card.

[0050] Taking the current rendering task as an example, where the main graphics card completes the rendering task at a speed of 50 milliseconds / frame and the secondary graphics card completes the rendering task at a speed of 40 milliseconds / frame, the ratio of the rendering task completion speed of the main graphics card to the secondary graphics card is 5:4. Based on this ratio, the task allocation ratio of the current rendering task to the main graphics card and the secondary graphics card is 5:4. Based on this task allocation ratio, 5 / 9 of the current rendering task is allocated to the main graphics card for processing, and 4 / 9 of the current rendering task is allocated to the secondary graphics card for processing.

[0051] like Figure 2 As shown, taking a rendering task allocation system 200 including a primary graphics card 211 and a secondary graphics card 212 as an example, the driver 210 can control the primary graphics card 211 and the secondary graphics card 212 to allocate the current rendering task to the primary graphics card 211 and the secondary graphics card 212 for processing. Specifically, taking SFR mode as an example, the driver 210 can divide the single frame of the current rendering task into two regions corresponding to the primary graphics card 211 and the secondary graphics card 212 respectively, according to the task allocation ratio corresponding to the current rendering task. Figure 3 As shown, taking the current rendering task as an example where the task allocation ratio between the main graphics card 211 and the secondary graphics card 212 is 5:4, the driver 210 can divide the single frame of the current rendering task into two regions according to the task allocation ratio of 5:4. The driver 210 allocates the region 301 corresponding to 5 / 9 of the current rendering task to the main graphics card 211 for processing, and allocates the region 302 corresponding to 4 / 9 of the current rendering task to the secondary graphics card 212 for processing, so that the main graphics card 211 and the secondary graphics card 212 can process the current rendering task in parallel.

[0052] In some possible implementations, the secondary graphics card needs to wait for the primary graphics card to finish copying the rendering task before it can process the rendering task. Therefore, the allocation of rendering tasks in the above implementations can also refer to the copying speed of the rendering task from the primary graphics card to the secondary graphics card in the past rendering tasks. Based on the speed at which the primary and secondary graphics cards complete the rendering task and the copying speed, the task allocation ratio of the current rendering task to the primary and secondary graphics cards can be determined. Based on the task allocation ratio corresponding to the current rendering task, the current rendering task can be allocated to the primary and secondary graphics cards for processing. This can reduce the waiting time of the secondary graphics card between copying the rendering task from the primary graphics card and processing the rendering task, and further improve the efficiency of the primary and secondary graphics cards in parallel processing rendering tasks.

[0053] In the above embodiments, the task allocation ratio of the current rendering task to the main graphics card and each secondary graphics card is determined based on the rendering performance of the main graphics card and each secondary graphics card. This can balance the load between the main graphics card and each secondary graphics card, avoid the situation where the processing time of the rendering task is extended due to the long rendering time of individual graphics cards, and thus improve the processing efficiency of the rendering task.

[0054] In some embodiments of this disclosure, the current rendering task is allocated to the main graphics card and at least one secondary graphics card for processing based on the task allocation ratio corresponding to the current rendering task. This includes: splitting the current rendering task into multiple sub-rendering tasks corresponding to the main graphics card and each secondary graphics card based on the task allocation ratio corresponding to the current rendering task, and allocating each sub-rendering task to the corresponding main graphics card or secondary graphics card for processing.

[0055] In this context, a sub-rendering task refers to a rendering task obtained by dividing the current rendering task into multiple sub-rendering tasks, which can then be processed in parallel by multiple graphics cards. Taking SFR mode as an example, a sub-rendering task refers to the rendering task corresponding to each region of the single frame corresponding to the current rendering task.

[0056] Taking SFR mode as an example, the single frame of the current rendering task can be split into multiple regions corresponding to the main graphics card and each secondary graphics card based on the task allocation ratio of the current rendering task, and each region can be assigned to the corresponding main graphics card or secondary graphics card for processing.

[0057] For example, taking the current rendering task as an assignment to the primary graphics card and two secondary graphics cards, where the task allocation ratio of the current rendering task to the primary graphics card and the two secondary graphics cards is 4:3:3, the current rendering task can be split into three sub-rendering tasks corresponding to the primary graphics card and the two secondary graphics cards according to the task allocation ratio of 4:3:3. The sub-rendering tasks corresponding to 4 / 10 of the current rendering task are assigned to the primary graphics card for processing, and the sub-rendering tasks corresponding to 3 / 10 of the two current rendering tasks are assigned to the two secondary graphics cards for processing.

[0058] In the above embodiments, the current rendering task is divided into multiple sub-rendering tasks corresponding to the main graphics card and each secondary graphics card based on the task allocation ratio corresponding to the current rendering task. This allows the main graphics card and each secondary graphics card to process each sub-rendering task in parallel, thereby improving the processing efficiency of the rendering task.

[0059] See Figure 4 , Figure 4 A schematic diagram of the implementation process of a rendering task allocation method provided in this embodiment of the present disclosure. Figure 2The rendering task allocation method provided in this disclosure may include the following steps: Step S401: Obtain the next rendering task; The next rendering task refers to the next frame of the image to be rendered.

[0060] For example, after the current rendering task is completed, the next rendering task can be obtained through the graphics card for processing.

[0061] Step S402: Adjust the task allocation ratio of the current rendering task based on the rendering performance of the main graphics card and each secondary graphics card to obtain the task allocation ratio of the next rendering task. Based on the task allocation ratio of the next rendering task, allocate the next rendering task to the main graphics card and at least one secondary graphics card for processing.

[0062] Specifically, the rendering performance of the primary or secondary graphics card can refer to the speed at which the primary or secondary graphics card completes rendering tasks or the energy efficiency ratio during the rendering process.

[0063] Taking the rendering performance of the primary or secondary graphics card as an example—the speed at which the primary or secondary graphics card completes a rendering task—the task allocation ratio for the current rendering task can be adjusted based on the speed at which the primary and secondary graphics cards complete the rendering task, thus determining the task allocation ratio for the next rendering task. Alternatively, the task allocation ratio for the current rendering task can be adjusted based on the speed at which the primary and secondary graphics cards complete rendering tasks in previous years, also determining the task allocation ratio for the next rendering task. Based on the task allocation ratio for the next rendering task, the next rendering task is then assigned to the primary graphics card and at least one secondary graphics card for processing. The speed at which the primary and secondary graphics cards complete the rendering task is determined by the amount of data and the time taken to complete the rendering task.

[0064] For example, if the current rendering task has a task allocation ratio of 6:4 between the primary graphics card and one secondary graphics card, and the primary graphics card completes the rendering task at a speed of 50 milliseconds / frame while the secondary graphics card completes the rendering task at a speed of 40 milliseconds / frame, and the next rendering task is assigned to the primary and secondary graphics cards used in the current rendering task, then the speed ratio of the primary and secondary graphics cards in completing the current rendering task is 5:4. Based on this ratio, the task allocation ratio of the next rendering task to the primary and secondary graphics cards can be set to 5:4. Alternatively, the current task allocation ratio of 6:4 can be adjusted from 6:4 to 5:4 to obtain the task allocation ratio for the next rendering task. In some possible implementations, the task allocation ratio for the next rendering task can be determined by other methods, such as the time taken by the primary graphics card to complete the rendering task and the time taken by the secondary graphics card to complete the rendering task during the current rendering task, or the speed at which the primary graphics card completes the rendering task and the speed at which the secondary graphics card completes the rendering task during the processing of other historical rendering tasks. The embodiments of this disclosure do not impose any particular limitation on the method for determining the task allocation ratio for the next rendering task.

[0065] In the above embodiments, the task allocation ratio is dynamically adjusted based on the speed or time taken by the main graphics card and each secondary graphics card to complete the rendering tasks during the processing of other historical rendering tasks. This improves the accuracy of load prediction for each graphics card and optimizes the task allocation ratio for the next rendering task, thereby reducing the time taken by each graphics card to process rendering tasks in parallel and improving the processing efficiency of rendering tasks.

[0066] In some embodiments of this disclosure, after the current rendering task is assigned to the main graphics card and at least one secondary graphics card for processing based on the rendering performance of the main graphics card and each secondary graphics card, the sub-rendering results obtained by at least one secondary graphics card in processing the current rendering task can be merged into the main rendering result obtained by the main graphics card in processing the current rendering task to obtain the rendering result corresponding to the current rendering task.

[0067] Among them, the sub-rendering result refers to the rendering result obtained by processing the rendering task corresponding to the secondary graphics card, and the primary rendering result refers to the rendering result obtained by processing the rendering task corresponding to the primary graphics card.

[0068] For example, after the current rendering task is assigned to the main graphics card and at least one secondary graphics card for processing, the sub-rendering results obtained by each secondary graphics card from processing the current rendering task can be transmitted to the main graphics card. The main graphics card can then perform pixel-level stitching and boundary processing on the main rendering result obtained from processing the current rendering task and each sub-rendering result to merge the main rendering result and each sub-rendering result, thereby obtaining the rendering result corresponding to the current rendering task.

[0069] In the above embodiments, the sub-rendering results are merged into the main rendering results to obtain the rendering results, which avoids screen tearing caused by differences in the output progress of different graphics cards and improves the integrity of the rendering results.

[0070] Please see Figure 5 , Figure 5 This is a schematic diagram of a rendering task allocation device 500 provided in an embodiment of the present disclosure. The rendering task allocation device 500 of this embodiment includes the following modules: Task acquisition module 501 is used to acquire the current rendering task; The task allocation module 502 is used to allocate the current rendering task to the main graphics card and at least one secondary graphics card for processing based on the rendering performance of the main graphics card and each secondary graphics card, provided that the rendering cost corresponding to the current rendering task meets the multi-card rendering conditions; the rendering cost is the cost required to process the rendering task by the main graphics card or each secondary graphics card.

[0071] Optionally, in some embodiments of this disclosure, the task allocation module 502 is further configured to allocate the current rendering task to the main graphics card for processing if the rendering cost corresponding to the current rendering task does not meet the multi-card rendering conditions.

[0072] Optionally, in some embodiments of this disclosure, the task allocation module 502 is specifically used to: determine the task allocation ratio of the current rendering task to the main graphics card and each secondary graphics card based on the rendering performance of the main graphics card and each secondary graphics card, and allocate the current rendering task to the main graphics card and at least one secondary graphics card for processing based on the task allocation ratio corresponding to the current rendering task.

[0073] Optionally, in some embodiments of this disclosure, the task allocation module 502 is specifically used to: divide the current rendering task into multiple sub-rendering tasks corresponding to the main graphics card and each secondary graphics card based on the task allocation ratio corresponding to the current rendering task, and allocate each sub-rendering task to the corresponding main graphics card or secondary graphics card for processing.

[0074] Optionally, in some embodiments of this disclosure, the task allocation module 502 is specifically used for: obtaining the next rendering task; adjusting the task allocation ratio corresponding to the current rendering task based on the rendering performance of the main graphics card and each secondary graphics card to obtain the task allocation ratio corresponding to the next rendering task; and allocating the next rendering task to the main graphics card and at least one secondary graphics card for processing based on the task allocation ratio corresponding to the next rendering task.

[0075] Optionally, in some embodiments of this disclosure, the task allocation module 502 is specifically used to: merge the sub-rendering results obtained by at least one secondary graphics card processing the current rendering task into the main rendering result obtained by the primary graphics card processing the current rendering task, so as to obtain the rendering result corresponding to the current rendering task.

[0076] The rendering task allocation apparatus of this disclosure is used to implement the corresponding rendering task allocation methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. Furthermore, the functional implementation of each module in the rendering task allocation apparatus of this disclosure can be referred to the description of the corresponding part in the foregoing method embodiments, which will also not be repeated here.

[0077] Please refer to Figure 6 This diagram illustrates a structural block diagram of a computer device provided in an exemplary embodiment of this disclosure. In some examples, the computer device 60 can be at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. The computer device 60 has communication capabilities and can access wired or wireless networks. The computer device 60 can refer to one of multiple terminals, and those skilled in the art will understand that the number of such terminals can be more or less. In some examples, the computer device 60 can receive rendering tasks based on the accessed wired or wireless network. It is understood that the computer device 60 undertakes the computation and processing work of the technical solutions of this disclosure, and this disclosure does not limit this aspect.

[0078] like Figure 6 As shown, the computer device in this disclosure may include one or more of the following components: a processor 610 and a memory 620, wherein the memory 620 stores a computer program that can run on the processor 610, and the processor 610 executes the program to implement the steps in the method of any of the above embodiments.

[0079] Optionally, the processor 610 connects to various parts of the computer device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and by calling data stored in the memory 620. Optionally, the processor 610 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 610 can integrate one or a combination of several of the following: Central Processing Unit (CPU), GPU, Neural-network Processing Unit (NPU), and baseband chip. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required to be displayed on the touch screen; the NPU is used to implement Artificial Intelligence (AI) functions; and the baseband chip is used to handle wireless communication. It is understood that the baseband chip can also be implemented as a separate chip without being integrated into the processor 610.

[0080] The memory 620 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 620 may include a non-transitory computer-readable storage medium. The memory 620 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created according to the use of the computer device, etc.

[0081] In addition, those skilled in the art will understand that the structure of the computer device shown in the above figures does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the computer device may also include a display screen, camera assembly, microphone, speaker, radio frequency circuit, input unit, sensors (such as accelerometer, angular velocity sensor, light sensor, etc.), audio circuit, WiFi module, power supply, Bluetooth module, etc., which will not be described in detail here.

[0082] This disclosure also provides a computer storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the rendering task allocation method as described in any of the above embodiments.

[0083] It should be noted that the descriptions of the storage medium and device embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this disclosure, please refer to the descriptions of the method embodiments of this disclosure for understanding.

[0084] This disclosure also provides a computer program including computer-readable code, wherein, when the computer-readable code is executed in a computer device, a processor in the computer device performs some or all of the steps in the above-described method.

[0085] This disclosure also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0086] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the computer program and computer program product embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the computer program and computer program product embodiments of this disclosure, please refer to the descriptions of the method embodiments of this disclosure for understanding.

[0087] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0088] In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.

[0089] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0090] In addition, each functional module in the various embodiments of this disclosure can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0091] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0092] Those skilled in the art will recognize that the functions described in this disclosure in one or more of the examples above can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer.

[0093] It should be noted that the technical solutions described in this disclosure can be combined arbitrarily as long as they do not conflict.

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

Claims

1. A method for allocating rendering tasks, characterized in that, include: Get the current rendering task; If the rendering cost of the current rendering task meets the multi-GPU rendering conditions, the current rendering task is allocated to the main GPU and at least one of the secondary GPUs for processing based on the rendering performance of the main GPU and each secondary GPU. The rendering cost is the cost required by the main graphics card or each of the secondary graphics cards to process the rendering task.

2. The rendering task allocation method according to claim 1, characterized in that, The method further includes: If the rendering cost of the current rendering task does not meet the conditions for multi-GPU rendering, the current rendering task will be assigned to the main GPU for processing.

3. The rendering task allocation method according to claim 1, characterized in that, The method of allocating the current rendering task to the main graphics card and at least one of the secondary graphics cards for processing based on the rendering performance of the main graphics card and each secondary graphics card includes: Based on the rendering performance of the main graphics card and each of the secondary graphics cards, the current rendering task is determined to correspond to the task allocation ratio of the main graphics card and each of the secondary graphics cards. Based on the task allocation ratio corresponding to the current rendering task, the current rendering task is allocated to the main graphics card and at least one of the secondary graphics cards for processing.

4. The rendering task allocation method according to claim 3, characterized in that, The step of allocating the current rendering task to the primary graphics card and at least one secondary graphics card for processing based on the task allocation ratio corresponding to the current rendering task includes: Based on the current task allocation ratio, the current rendering task is divided into multiple sub-rendering tasks corresponding to the main graphics card and each of the secondary graphics cards, and each sub-rendering task is assigned to the corresponding main graphics card or secondary graphics card for processing.

5. The rendering task allocation method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the next rendering task; Based on the rendering performance of the main graphics card and each of the secondary graphics cards, the task allocation ratio corresponding to the current rendering task is adjusted to obtain the task allocation ratio corresponding to the next rendering task. Based on the task allocation ratio corresponding to the next rendering task, the next rendering task is allocated to the main graphics card and at least one of the secondary graphics cards for processing.

6. The rendering task allocation method according to any one of claims 1 to 4, characterized in that, After allocating the current rendering task to the primary graphics card and at least one of the secondary graphics cards for processing based on the rendering performance of the primary graphics card and each secondary graphics card, the method further includes: The sub-rendering results obtained by processing the current rendering task using at least one of the secondary graphics cards are merged into the main rendering result obtained by processing the current rendering task using the primary graphics card, thereby obtaining the rendering result corresponding to the current rendering task.

7. A rendering task allocation device, characterized in that, include: The task acquisition module is used to acquire the current rendering task; The task allocation module is used to allocate the current rendering task to the main graphics card and at least one of the secondary graphics cards for processing based on the rendering performance of the main graphics card and each secondary graphics card, provided that the rendering cost corresponding to the current rendering task meets the multi-card rendering conditions. The rendering cost is the cost required by the main graphics card or each of the secondary graphics cards to process the rendering task.

8. The rendering task allocation device according to claim 7, characterized in that, The task allocation module is also used to allocate the current rendering task to the main graphics card for processing when the rendering cost corresponding to the current rendering task does not meet the multi-card rendering conditions.

9. A computer device, characterized in that, include: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the rendering task allocation method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, It stores executable instructions for implementing the rendering task allocation method according to any one of claims 1 to 6 when executed by a processor.