Model precision configuration strategy generation method, inference method, device and equipment
Patent Information
- Application Number
- CN202611104887.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-07-23
AI Technical Summary
[0004]然而,相关技术中生成的精度配置策略的准确性较低,导致模型渲染质量差
[0060]上述模型精度配置策略生成方法、推理方法、装置和设备,首先获取着色渲染模型在参考数据精度下的参考推理结果,以及着色渲染模型在初始数据精度下的实际推理结果;接着对参考推理结果和实际推理结果进行至少一个维度的对比分析,得到着色渲染模型在初始数据精度下的精度验证结果;再基于精度验证结果和初始数据精度,生成着色渲染模型的精度配置策略;精度配置策略用于着色渲染模型执行图像数据的渲染步骤。其中,参考数据精度高于初始数据精度。该方法中,先以高数据精度格式的推理方式,得到模型参考推理结果,再结合初始数据精度下模型推理得到的实际推理结果,进行多维度对比分析,实现对初始数据精度的推理结果进行全面核验,提升精度验证结果的全面性,最后依据精度验证结果和初始数据精度,制定适配于高质量图像渲染流程的精度配置策略,这样生成的精度配置策略贴合模型实际运行工况与数据精度条件,可以保障图像渲染的整体效果与输出精度,同时提升整体运行效率和渲染质量。
Smart Images

Figure CN122618003B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of model accuracy detection technology, and in particular to a model accuracy configuration strategy generation method, inference method, apparatus and device. Background Technology
[0002] Neural shading is a rendering technique that uses a pre-trained, lightweight neural network in the real-time rendering process of a graphics processing unit (GPU) to replace complex, manually written formulas for lighting, shadows, and materials. It relies on data to learn real optical laws to calculate pixel colors.
[0003] In related technologies, to ensure the quality of the rendered image, a precision configuration strategy for the lightweight small neural network is usually first formulated based on the running parameters of the lightweight small neural network, and then model inference is performed based on the precision configuration strategy to generate the rendered image.
[0004] However, the accuracy of the precision configuration strategies generated in related technologies is low, resulting in poor model rendering quality. Summary of the Invention
[0005] Therefore, it is necessary to provide a model precision configuration strategy generation method, inference method, apparatus, and device to address the above-mentioned technical problems, which can improve the accuracy of the model precision configuration strategy and thus improve the model rendering quality.
[0006] Firstly, this application provides a method for generating a model accuracy configuration strategy, the method comprising:
[0007] Obtain the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision; the reference data precision is higher than the initial data precision.
[0008] By comparing the reference inference results and the actual inference results in at least one dimension, the accuracy verification results of the shading rendering model under the initial data accuracy are obtained.
[0009] Based on the accuracy verification results and the initial data accuracy, a precision configuration strategy for the shading rendering model is generated; the precision configuration strategy is used by the shading rendering model to execute the rendering steps of the image data.
[0010] In one embodiment, obtaining the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision, includes:
[0011] Obtain the model runtime parameters of the shaded rendering model;
[0012] Based on the model's running parameters, the image data rendering steps are executed on the processor with reference data precision and initial data precision respectively, to obtain reference inference results and actual inference results.
[0013] In one embodiment, the model running parameters include: multiple types of operators, model architecture and weights, and a rendering processor; the image data rendering steps include:
[0014] Perform the reasoning for each operator to obtain the single-operator reasoning results for each operator;
[0015] Perform network layer inference for the shading rendering model to obtain end-to-end inference results;
[0016] Based on the rendering processor, scene rendering inference of the shading rendering model is performed to obtain the scene rendering result.
[0017] In one embodiment, a comparative analysis of at least one dimension is performed between the reference inference result and the actual inference result to obtain the accuracy verification result of the shading rendering model under the initial data accuracy, including:
[0018] Compare and analyze the reference inference results and the actual inference results from at least one of the dimensions of single operator precision, end-to-end inference, and rendering to determine the single operator precision verification results, end-to-end precision verification results, and scene rendering verification results of the shading rendering model under the initial data precision.
[0019] Based on the single operator precision verification results, end-to-end precision verification results, and scene rendering verification results, the precision verification results of the shading rendering model under the initial data precision are generated.
[0020] In one embodiment, a comparative analysis is performed on the reference inference result and the actual inference result based on the single operator precision to determine the single operator precision verification result of the shading rendering model under the initial data precision, including:
[0021] For operators of the same type, obtain the standard inference result of the single operator corresponding to the operator from the reference inference result; and obtain the actual inference result of the single operator corresponding to the operator from the actual inference result.
[0022] Calculate the error between the standard inference result of a single operator and the actual inference result of a single operator;
[0023] The error value is compared with the error threshold corresponding to the initial data accuracy to obtain the single operator accuracy verification result of the operator.
[0024] In one embodiment, from an end-to-end inference perspective, a comparative analysis is performed on the reference inference result and the actual inference result to determine the end-to-end accuracy verification result of the shading rendering model under the initial data precision, including:
[0025] Obtain the standard output results of each network layer of the shading rendering model in different scenarios from the reference inference results, and obtain the actual output results of each network layer of the shading rendering model in different scenarios from the actual inference results;
[0026] Calculate the error between the standard output and the actual output of the shading rendering model for the same network layer in the same scene;
[0027] Based on the error value, the end-to-end accuracy verification results of the shading rendering model under the initial data accuracy are obtained.
[0028] In one embodiment, from a rendering perspective, a comparative analysis is performed on the reference inference result and the actual inference result to determine the scene rendering verification result of the shading rendering model under the initial data precision, including:
[0029] The reference rendering images of the shading rendering model in different scenes are obtained from the reference inference results, and the actual rendering images of the shading rendering model in different scenes are obtained from the actual inference results.
[0030] Obtain the rendering error between the reference rendered image and the actual rendered image in the same scene;
[0031] The rendering errors of the reference rendered image and the actual rendered image in different scenarios are summarized to obtain the scene rendering verification results of the shading rendering model under the initial data accuracy.
[0032] In one embodiment, obtaining the rendering error between the reference rendered image and the actual rendered image in the same scene includes:
[0033] Alignment processing and scene semantic classification are performed on the reference rendered image and the actual rendered image respectively to obtain different scene regions in the reference rendered image and the actual rendered image;
[0034] Calculate the visual difference between the reference rendered image and the actual rendered image in the same scene area;
[0035] By comparing the scene visual difference values of different scene regions with the corresponding scene tolerance thresholds, the rendering error evaluation results of different scene regions are obtained.
[0036] The rendering error evaluation results of different scene areas are summarized to obtain the rendering errors of the reference rendered image and the actual rendered image in different scenes.
[0037] In one embodiment, the method further includes:
[0038] By using different application programming interfaces (APIs) to call hardware instructions, the inference of the shading rendering model is executed with initial data precision, and the actual inference results of the shading rendering model under different APIs are obtained.
[0039] The reference inference results of the shading rendering model at the reference data precision are compared with the actual inference results of the shading rendering model under different application interfaces to determine the model inference error under different application interfaces.
[0040] Based on the model inference error under different application interfaces, evaluate the interface path functionality of each application interface.
[0041] In one embodiment, the interface path functionality of each application interface is evaluated based on the model inference error under different application interfaces, including:
[0042] For any application programming interface (API), if the model inference error under the API exceeds the preset inference error threshold, the API's interface path function is determined to be abnormal.
[0043] If the model inference error under the application programming interface (API) is less than the preset inference error threshold, it is determined that the API interface path function is normal.
[0044] In one embodiment, the method further includes:
[0045] Obtain the current result error and historical baseline error of the shaded rendering model during the processor's inference process;
[0046] If the error between the current result error and the historical baseline error is greater than the preset error threshold, then it is determined that there is an accuracy regression in the inference process of the shading rendering model.
[0047] Secondly, this application also provides a model reasoning method, which includes:
[0048] Obtain the image data to be rendered;
[0049] The image data to be rendered is input into the shading rendering model, and the inference of the shading rendering model is performed using the precision configuration strategy in any embodiment of the first aspect to obtain the image rendering result.
[0050] Thirdly, this application also provides a model accuracy configuration strategy generation apparatus, comprising:
[0051] The result acquisition module is used to acquire the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision; the reference data precision is higher than the initial data precision.
[0052] The inference result comparison module is used to perform a comparative analysis of the reference inference result and the actual inference result in at least one dimension, and obtain the accuracy verification result of the shading rendering model under the initial data accuracy.
[0053] The strategy generation module is used to generate a precision configuration strategy for the shading rendering model based on the precision verification results and the initial data precision. The precision configuration strategy is used by the shading rendering model to execute the rendering steps of the image data.
[0054] Fourthly, this application also provides a model inference apparatus, comprising:
[0055] The data acquisition module is used to acquire the image data to be rendered;
[0056] The image rendering module is used to input the image data to be rendered into the shading rendering model, and to perform inference of the shading rendering model using the precision configuration strategy in any of the embodiments of the first aspect above, so as to obtain the image rendering result.
[0057] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first or second aspect described above.
[0058] In a sixth aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first or second aspect described above.
[0059] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first or second aspect described above.
[0060] The aforementioned model precision configuration strategy generation method, inference method, apparatus, and device first obtain the reference inference result of the shading rendering model under reference data precision, and the actual inference result of the shading rendering model under initial data precision. Next, a comparative analysis of the reference inference result and the actual inference result is performed in at least one dimension to obtain the precision verification result of the shading rendering model under the initial data precision. Then, based on the precision verification result and the initial data precision, a precision configuration strategy for the shading rendering model is generated. The precision configuration strategy is used by the shading rendering model to execute the rendering steps of image data. The reference data precision is higher than the initial data precision. In this method, the model reference inference result is first obtained using a high data precision format inference method. Then, combined with the actual inference result obtained from the model inference under the initial data precision, a multi-dimensional comparative analysis is performed to comprehensively verify the inference result of the initial data precision, improving the comprehensiveness of the precision verification result. Finally, based on the precision verification result and the initial data precision, a precision configuration strategy adapted to a high-quality image rendering process is formulated. This generated precision configuration strategy fits the actual operating conditions and data precision conditions of the model, ensuring the overall effect and output precision of image rendering, while improving overall operating efficiency and rendering quality. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is an internal structural diagram of a computer device in one embodiment;
[0063] Figure 2 This is a schematic diagram of the first process of a model accuracy configuration strategy generation method in one embodiment;
[0064] Figure 3 This is a flowchart illustrating the steps for obtaining the reasoning result in one embodiment;
[0065] Figure 4 This is a schematic diagram of the first step in obtaining the accuracy verification result in one embodiment;
[0066] Figure 5 This is a schematic diagram of the second process of obtaining the accuracy verification result in one embodiment;
[0067] Figure 6 This is a schematic diagram of the third step in the accuracy verification result acquisition process in one embodiment;
[0068] Figure 7 This is a schematic diagram of the fourth step in the accuracy verification result acquisition process in one embodiment;
[0069] Figure 8 This is a flowchart illustrating the rendering error acquisition step in one embodiment;
[0070] Figure 9 This is a flowchart illustrating the interface path function evaluation steps in one embodiment;
[0071] Figure 10 This is a flowchart illustrating the interface path function evaluation steps in another embodiment;
[0072] Figure 11 This is a schematic diagram of the second process of a model accuracy configuration strategy generation method in one embodiment;
[0073] Figure 12 This is a schematic diagram of the third process of a model accuracy configuration strategy generation method in one embodiment;
[0074] Figure 13 This is a flowchart illustrating the model inference method in one embodiment;
[0075] Figure 14 A structural block diagram of a model accuracy configuration strategy generation device in one embodiment;
[0076] Figure 15 This is a structural block diagram of a model inference device in one embodiment. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0078] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0079] Before providing a detailed description of the technical solution of this application, the technical framework of this application will be explained first.
[0080] Neural shading is a rendering technique that uses small neural network models to perform material, lighting, texture, or image reconstruction calculations during the shader stage of the Graphics Processing Unit (GPU) rendering pipeline. The matrix-vector multiplication and addition operations of the neural network model are executed by multi-threaded cooperative vector / tensor acceleration instructions natively supported by the GPU shader core, thus producing shading results during real-time rendering.
[0081] Taking the use of multi-threaded cooperative vectors natively supported in the GPU shader core to perform small neural network operations and achieve real-time rendering as an example, cooperative vectors support multiple precision formats, and the precision performance of different precision formats varies significantly in different network layers and different scenarios. Please refer to Table 1, which is a schematic diagram of scenarios corresponding to different data precision formats.
[0082] Table 1
[0083]
[0084] As shown in Table 1, GPU hardware vector instructions support multiple data precision formats, including float32, float16, FP8 E4M3, FP8 E5M2, INT8, and INT16. Different data precision formats are suitable for different scenarios. Furthermore, in practical applications, low compression ratio formats may produce visually perceptible rendering errors under certain input conditions, while high compression ratio formats, such as float32, are suitable as reference precision formats.
[0085] In related technologies, to ensure the quality of rendered images, the neural network is usually tested first based on the running parameters of a small neural network. This includes methods such as single operator function verification, compilation testing, image quality measurement, and mixed precision calibration of a general deep neural network (DNN). However, there is no layered verification and closed-loop mixed precision control for the GPU Neural Shading pipeline.
[0086] Based on this, this application provides a method for generating model precision configuration strategies. Through a three-layer hierarchical verification approach, the model inference precision is automatically detected to obtain more comprehensive precision verification results, providing a reliable basis for generating precision configuration strategies, thereby improving the actual inference performance of the model and enhancing the model rendering quality.
[0087] The model accuracy configuration strategy generation method provided in this application embodiment can be applied to, for example... Figure 1 The computer device shown can be a server or a terminal. Taking a terminal as an example, its internal structure diagram can be as follows: Figure 1As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a model accuracy configuration strategy generation method or a model inference method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0088] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0089] In one exemplary embodiment, such as Figure 2 As shown, a method for generating a model accuracy configuration strategy is provided, including the following steps:
[0090] S201, obtain the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision; the reference data precision is higher than the initial data precision.
[0091] Among them, the shading rendering model refers to a small neural network model that performs material, lighting, texture or image reconstruction calculations in neural shading rendering technology. It usually has 2 to 8 layers, including dozens to hundreds of neurons / layers; and the core calculation of the shading rendering model is usually multi-layer matrix-vector multiplication and activation functions.
[0092] In shading rendering scenarios, in order to improve the inference efficiency of shading rendering models, low data precision data formats are usually used to perform model inference. In this scenario, considering the impact of the inference precision of the shading rendering model on the rendering quality, it is also necessary to verify the inference precision of the shading rendering model, taking into account both model inference precision and execution efficiency, so as to provide a reliable reference for generating a high-quality precision configuration strategy that fits the actual operating conditions and data precision conditions of the model.
[0093] When verifying the inference accuracy of the shading rendering model at a certain data precision, the model inference is first performed with the data format of the reference data precision to obtain the reference inference result; at the same time, the model inference is performed with the data format of the initial data precision to obtain the actual inference result.
[0094] Optionally, in response to a strategy generation request for a shading rendering model, which carries the model running parameters, initial data precision, and reference data precision of the shading rendering model, the model inference is performed based on the model running parameters by calling the data format of the initial data precision to obtain the actual inference result; and the model inference is performed by calling the data format of the reference data precision to obtain the reference inference result.
[0095] Optionally, in response to a strategy generation request for a shading rendering model, which carries the model running parameters and initial data precision of the shading rendering model, the model inference is then performed based on the model running parameters by calling the data format of the initial data precision to obtain the actual inference result; and the model inference is performed by calling the data format of the preset reference data precision to obtain the reference inference result.
[0096] S202, perform a comparative analysis of the reference inference results and the actual inference results in at least one dimension to obtain the accuracy verification results of the shading rendering model under the initial data accuracy.
[0097] The inference results include at least one dimension of data metrics involved in the inference process of the shading rendering model, such as the calculation results of each type of operator in the model, the accuracy metrics of each network layer, and the overall inference accuracy metrics of the model. In the embodiments of this application, the reference inference results and the actual inference results are inference results obtained by the same model based on different data accuracies. In other words, the two types of inference results have the same metric dimensions, but different metric values.
[0098] The reference inference results and the actual inference results are compared in terms of data metrics under the same dimension. The data error between the two types of inference results under the same dimension is calculated. Then, based on the absolute value of the data error, the accuracy verification result of the shading rendering model in that dimension is obtained. This process is repeated to compare the data metrics and calculate the error of the reference inference results and the actual inference results under each dimension, obtaining the accuracy verification result of the shading rendering model in each dimension. Finally, the accuracy verification results of each dimension are summarized to obtain the accuracy verification result of the shading rendering model under the initial data accuracy.
[0099] S203, Based on the accuracy verification results and the initial data accuracy, generate the accuracy configuration strategy for the shading rendering model; the accuracy configuration strategy is used by the shading rendering model to perform the rendering steps of the image data.
[0100] Based on the accuracy verification results, determine whether the inference accuracy of the shading rendering model under the initial data accuracy meets the reference accuracy requirements. If it does, the initial data accuracy is used as the accuracy configuration strategy for the shading rendering model to execute the image data rendering steps. If it does not meet the requirements, the data accuracy format of the initial data accuracy is improved by one or more levels, and the improved data accuracy is used as the accuracy configuration strategy for the shading rendering model to execute the image data rendering steps.
[0101] Optionally, the accuracy verification results include verification results (verification passed or failed) in at least one dimension. If one or more "verification failed" entries appear in the accuracy verification results, it is determined that the inference accuracy of the shading rendering model under the initial data accuracy does not meet the reference accuracy requirements. If all entries in the accuracy verification results are "verification passed", it is determined that the inference accuracy of the shading rendering model under the initial data accuracy meets the reference accuracy requirements.
[0102] Optionally, the accuracy verification result includes verification results (verification passed or failed) in at least one dimension. The percentage of "verification passed" occurrences in the accuracy verification result is obtained. If the percentage is greater than a preset threshold, it is determined that the inference accuracy of the shading rendering model under the initial data accuracy meets the reference accuracy requirement. If the percentage is less than or equal to the preset threshold, it is determined that the inference accuracy of the shading rendering model under the initial data accuracy does not meet the reference accuracy requirement.
[0103] In this embodiment, the reference inference result of the shading rendering model at the reference data precision and the actual inference result of the shading rendering model at the initial data precision are first obtained. Then, the reference inference result and the actual inference result are compared and analyzed in at least one dimension to obtain the precision verification result of the shading rendering model at the initial data precision. Next, based on the precision verification result and the initial data precision, a precision configuration strategy for the shading rendering model is generated. The precision configuration strategy is used by the shading rendering model to execute the rendering steps of the image data. The reference data precision is higher than the initial data precision. In this embodiment, the model reference inference result is first obtained using a high data precision format inference method. Then, combined with the actual inference result obtained by the model inference at the initial data precision, a multi-dimensional comparative analysis is performed to comprehensively verify the inference result at the initial data precision, improving the comprehensiveness of the precision verification result. Finally, based on the precision verification result and the initial data precision, a precision configuration strategy adapted to a high-quality image rendering process is formulated. This generated precision configuration strategy fits the actual operating conditions and data precision conditions of the model, ensuring the overall effect and output precision of image rendering, while improving overall operating efficiency and rendering quality.
[0104] Next, an embodiment will be used to illustrate one possible way to implement the aforementioned step S201, "obtaining the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision," as follows: Figure 3 As shown, it includes:
[0105] S301, obtain the model running parameters of the shading rendering model.
[0106] The model runtime parameters of a shaded rendering model refer to the configuration parameters that drive the model to perform inference normally, including but not limited to: model weights, inference threshold, computation step size, input / output specifications, processor scheduling rules, etc.
[0107] Extract the core parameters such as inherent weights, biases, and network layer configurations of each network layer in the shading rendering model. Perform format and integrity checks on the extracted parameters to generate a set of model running parameters that can be directly called.
[0108] S302, based on the model running parameters, executes the image data rendering steps on the processor with reference data precision and initial data precision respectively, to obtain reference inference results and actual inference results.
[0109] Optionally, on the same processor, the image data rendering step is first performed with reference data precision to obtain a reference inference result; then, the image data rendering step is performed with initial data precision to obtain the actual inference result. Of course, image data rendering can also be performed first with initial data precision and then with reference data precision. The execution order of the two is not limited in this embodiment.
[0110] Optionally, the image data rendering steps can be executed simultaneously on different processors with different data precisions to obtain corresponding reference inference results and actual inference results. For example, the image data rendering steps can be executed on a first processor with reference data precision to obtain a reference inference result; and, based on the model running parameters, the image data rendering steps can be executed on a second processor with initial data precision to obtain an actual inference result.
[0111] In this case, the processing performance of the first processor is higher than that of the second processor. For example, the first processor can be a central processing unit (CPU), and the second processor can be a graphics processing unit (GPU).
[0112] The model's running parameters are sent to the first processor, and the model instance is initialized. Then, the first processor's operation mode is configured, the reference data precision is enabled, and then image data is input into the initialized model. The rendering process is performed frame by frame / pixel by inference operations such as shading and lighting calculations. Finally, the data after the operation is completed is exported to obtain the reference inference result.
[0113] The model's running parameters are sent to the second processor, and the model instance is initialized. Then, the second processor's operation mode is configured, the initial data precision is enabled, and then image data is input into the initialized model. The rendering process is performed frame by frame / pixel by pixel, and inference operations such as shading and lighting calculations are performed. Finally, the data after the operation is completed is exported to obtain the actual inference result.
[0114] In this embodiment, based on the obtained operating parameters of the shading rendering model, rendering inference is performed on the same image data using both high and low data precision to obtain reference inference results and actual inference results. This provides real and reliable data support for subsequent precision comparison, verification of the model's rendering effect under the initial data precision, and optimization of precision configuration strategies.
[0115] In one exemplary embodiment, the model operating parameters include: multiple types of operators, model architecture and weights, and a rendering processor; the image data rendering steps include at least one of the following:
[0116] Perform the reasoning for each operator to obtain the single-operator reasoning results for each operator;
[0117] Perform network layer inference for the shading rendering model to obtain end-to-end inference results;
[0118] Based on the rendering processor, scene rendering inference of the shading rendering model is performed to obtain the scene rendering result.
[0119] Taking the image data rendering steps with different data precisions using two processors (a first processor and a second processor) as an example, the inference of each operator is executed on the first processor with the initial data precision to obtain the single operator inference result of each operator; and / or, the network layer inference of the shading rendering model is executed on the first processor with the initial data precision to obtain the end-to-end inference result; and / or, based on the rendering processor, the scene rendering inference of the shading rendering model is executed with the initial data precision to obtain the scene rendering result; the single operator inference result, the end-to-end inference result and the scene rendering result of each operator are summarized to generate a reference inference result.
[0120] On the second processor, inference of each operator is executed with initial data precision to obtain the single operator inference result of each operator; and / or, network layer inference of the shading rendering model is executed with initial data precision on the second processor to obtain end-to-end inference result; and / or, scene rendering inference of the shading rendering model is executed with initial data precision based on the rendering processor to obtain scene rendering result; the single operator inference result, end-to-end inference result and scene rendering result of each operator are summarized to generate the actual inference result.
[0121] In this embodiment, the model running parameters are divided into three categories: operators, model architecture weights, and rendering processors. Single operator inference, network layer end-to-end inference, and scene rendering inference relying on the rendering processor are completed in sequence. Then, the multi-dimensional outputs are summarized to form the final inference result. This is equivalent to completely disassembling the rendering calculation process from the three levels of operators, networks, and scenes to accurately locate the running status and calculation deviation of each link, so as to improve the comprehensiveness, integrity and traceability of the rendering results.
[0122] Based on the obtained reference inference results and actual inference results, a comparative analysis can be conducted to evaluate the effectiveness of the actual inference results and provide a basis for subsequent accuracy configuration strategies. Therefore, the steps for comparing and analyzing the inference results are explained below.
[0123] In one exemplary embodiment, such as Figure 4 As shown, a comparative analysis of at least one dimension is performed between the reference inference results and the actual inference results to obtain the accuracy verification results of the shading rendering model under the initial data precision, including:
[0124] S401, compare and analyze the reference inference results and the actual inference results from at least one of the dimensions of single operator precision, end-to-end inference and rendering, and determine the single operator precision verification results, end-to-end precision verification results and scene rendering verification results of the shading rendering model under the initial data precision.
[0125] Obtain the inference results for the same operator from the reference inference results and the actual inference results, calculate the error between the two, and determine the single operator accuracy verification result based on the absolute value of the error.
[0126] From the end-to-end inference dimension, the precision error for the same network layer in the reference inference result and the actual inference result are calculated, and the end-to-end precision verification result is determined based on the absolute value of the precision error.
[0127] From the rendering dimension, the reference rendering image and the actual rendering image for the same image data are obtained from the reference inference result and the actual inference result. The structural similarity, heat map and other index data between the two images are compared and analyzed to determine the scene rendering verification result of the shading rendering model under the initial data accuracy.
[0128] It should be noted that in practical application scenarios, the inference results can be compared and analyzed from any one of the dimensions of single operator precision, end-to-end inference, and rendering. Alternatively, the inference results can be analyzed from any two of the dimensions of single operator precision, end-to-end inference, and rendering. Or, the inference results can be analyzed from all three dimensions of single operator precision, end-to-end inference, and rendering.
[0129] S402 generates the accuracy verification results of the shading rendering model under the initial data accuracy based on the single operator accuracy verification results, end-to-end accuracy verification results, and scene rendering verification results.
[0130] The single operator precision verification results, end-to-end precision verification results, and scene rendering verification results are summarized and organized to obtain the precision verification results of the shading rendering model under the initial data precision.
[0131] In this embodiment, the reference inference results and the actual inference results are compared and analyzed from the dimensions of single operator precision, end-to-end inference, and rendering. The single operator precision verification results, end-to-end precision verification results, and scene rendering verification results of the shading rendering model under the initial data precision are determined. This improves the comprehensiveness and richness of the precision verification results of the shading rendering model under the initial data precision. At the same time, it can accurately locate the precision differences of different calculation stages and provide a precise basis for subsequent precision configuration optimization.
[0132] In an exemplary embodiment, the method for obtaining the single operator precision verification result is described, such as... Figure 5As shown, a comparative analysis of the reference inference results and the actual inference results is performed based on the single operator precision to determine the single operator precision verification results of the shading rendering model under the initial data precision, including:
[0133] S501, for operators of the same type, obtain the standard inference result of the single operator corresponding to the operator from the reference inference result; and obtain the actual inference result of the single operator corresponding to the operator from the actual inference result.
[0134] Taking the image data rendering step performed by the first processor with reference data precision and the image data rendering step performed by the second processor with initial data precision as examples, the actual inference result is obtained by executing the hardware acceleration instructions natively supported by the second processor. An operator refers to a basic computational unit in the shading rendering model that performs a single specific mathematical operation, logical operation, or image processing function; it is the smallest functional module constituting the network inference and rendering process. In the embodiments of this application, the operator includes various arithmetic operators supported by the hardware acceleration instructions natively supported by the second processor, such as matrix-vector multiplication (MatVecMul), multiply-add, vector outer product (OuterProduct), and reduction.
[0135] Please refer to Table 2, which shows the input data size and distribution for different types of operators under different initial data precisions.
[0136] Table 2
[0137]
[0138] For operators of the same type, the standard inference result of the single operator corresponding to the first processor is obtained from the reference inference result; and the actual inference result of the single operator corresponding to the second processor is obtained from the actual inference result.
[0139] S502 calculates the error between the standard inference result of a single operator and the actual inference result of a single operator.
[0140] Error values include absolute error, root mean square error, and relative error. Based on this, the absolute error, root mean square error, and relative error between the standard inference result and the actual inference result of a single operator can be calculated. These three error values are then summarized to obtain the three error values corresponding to the standard inference result and the actual inference result of the single operator.
[0141] The formula for calculating the absolute error (max_abs_error) is as follows:
[0142] max_abs_error = max|ref[i] - test[i]|
[0143] The formula for calculating the root mean square error (RMSE) is:
[0144] RMSE = sqrt(mean((ref[i] - test[i])²))
[0145] The formula for calculating relative error is:
[0146] relative_error = max(|ref[i] - test[i]| / max(|ref[i]|, ε))
[0147] In the above formula, i is the input matrix, ref[i] is the standard inference result of the single operator, test[i] is the actual inference result of the single operator, || is the absolute value operation, sqrt is the square root operation, max|| is the maximum value operation, mean|| is the average value operation, and ε is a preset positive stable term used to limit the lower bound of the relative error denominator when the reference value is close to zero, so as to avoid distortion of the relative error measurement due to division by zero or the denominator being too small.
[0148] S503, compare the error value with the error threshold corresponding to the initial data accuracy to obtain the single operator accuracy verification result of the operator.
[0149] Different initial data precisions correspond to different error thresholds, which are the theoretical upper limit of error set for the corresponding data precision. As shown in Table 3, Table 3 shows the correspondence between different data precisions and error thresholds (tolerances).
[0150] Table 3
[0151]
[0152] In Table 3, the application scenario for the N-time chain operation tolerance is: when multiple cooperative vector operations (multiple single operators) are executed in series according to data dependencies, the number of low-precision multiplication-addition or accumulation on the dependency path is recorded as N, and the chain operation tolerance is determined according to the functional relationship between N and the upper bound of the single operation error.
[0153] The error value is compared with the error threshold corresponding to the initial data precision. If the error value is less than the corresponding error threshold, the single operator precision verification result of the operator is determined to be verified as passed; if the error value is greater than or equal to the corresponding error threshold, the single operator precision verification result of the operator is determined to be verified as failed.
[0154] In this embodiment, for similar operators, the standard inference result and the actual inference result of a single operator are extracted respectively. Then, by calculating the error and comparing it with a preset threshold, the operational deviation of a single operator under the initial data precision is quantitatively evaluated, and the operator precision is accurately identified as meeting the standard. This achieves refined verification of the basic computing unit and provides a quantitative basis for the overall model precision evaluation and parameter optimization.
[0155] In an exemplary embodiment, the method for obtaining the "end-to-end accuracy verification result" described above is explained, such as... Figure 6 As shown, from the end-to-end inference dimension, the reference inference results and the actual inference results are compared and analyzed to determine the end-to-end accuracy verification results of the shading rendering model under the initial data accuracy, including:
[0156] S601, obtain the standard output results of each network layer of the shading rendering model in different scenarios from the reference inference results, and obtain the actual output results of each network layer of the shading rendering model in different scenarios from the actual inference results.
[0157] The reference inference results are parsed according to scene and network layer to obtain the standard output results of each network layer of the shading rendering model in different scenes, such as the feature map, tensor, and pixel calculation value of each layer; the actual inference results are parsed in the same way to obtain the actual output results of each network layer of the shading rendering model in different scenes.
[0158] It is important to emphasize that the test scenario and model network layer used to obtain the standard output results and the actual output results are the same, but the specific output results are different. That is, the standard output results and the actual output results of the same network layer in the same scenario are in one-to-one correspondence. For example, the first network layer in scenario A corresponds to a set of standard output results and actual output results, and the first network layer in scenario B corresponds to a set of standard output results and actual output results.
[0159] The model can be a small neural network with 2-8 layers. The test scenarios are shown in Table 4 and can include standard input set, boundary input set and adversarial input set.
[0160] Table 4
[0161]
[0162] S602 calculates the error between the standard output and the actual output of the shading rendering model for the same network layer in the same scene.
[0163] The standard output and actual output of the same network layer in the same scene are registered, and the cosine similarity, element-wise error distribution, error propagation curve, activation value saturation rate, etc. are calculated.
[0164] Please refer to Table 5, which compares the standard output results with the actual output results.
[0165] Table 5
[0166]
[0167] S603, based on the error value, obtain the end-to-end accuracy verification result of the shading rendering model under the initial data accuracy.
[0168] The error value between the standard output result and the actual output result of the same network layer in the same scene is associated with the scene and the network layer as a set of end-to-end verification results. Since the scenes are different and there are multiple network layers, there are multiple sets of end-to-end verification results. Then, the multiple sets of end-to-end verification results are integrated to obtain the end-to-end accuracy verification result of the shading rendering model under the initial data accuracy.
[0169] In this embodiment, the standard output results and actual output results are extracted by scene and network layer, and the error between the two is calculated to obtain the end-to-end accuracy verification results. This allows for the quantification of model accuracy loss layer by layer and scene by scene, and precise location of network layers with abnormal accuracy and poorly adapted rendering scenes, providing data support for accuracy optimization and problem troubleshooting.
[0170] In one exemplary embodiment, the method for obtaining the scene rendering verification result is described, such as... Figure 7 As shown, from the rendering dimension, a comparative analysis is performed on the reference inference results and the actual inference results to determine the scene rendering verification results of the shading rendering model under the initial data precision, including:
[0171] S701, obtain reference rendering images of the shading rendering model in different scenes from the reference inference results, and obtain actual rendering images of the shading rendering model in different scenes from the actual inference results.
[0172] For the same image data in the same scene, a reference rendered image is obtained from the reference inference result by the first processor performing shading rendering model inference and rendering with reference data precision; and an actual rendered image is obtained from the actual inference result by the second processor performing shading rendering model inference and rendering with initial data precision.
[0173] S702, obtain the rendering error between the reference rendered image and the actual rendered image in the same scene.
[0174] Image registration is performed between the reference rendered image and the actual rendered image in the same scene. Then, the perceptual difference metric, structural similarity, and perceptual difference heatmap of the two rendered images are calculated as the rendering error between the reference rendered image and the actual rendered image in that scene.
[0175] In practical application scenarios, the reference inference result and the actual inference result can also include the reference rendered video and the actual rendered video. In this scenario, the temporal flicker detection value of the reference rendered video and the actual rendered video in the same scene can also be calculated as the rendering error of the reference rendered video and the actual rendered video in that scene.
[0176] S703 summarizes the rendering errors of the reference rendered image and the actual rendered image in different scenes to obtain the scene rendering verification results of the shading rendering model under the initial data accuracy.
[0177] According to the scene category, the rendering errors of the reference rendered image and the actual rendered image in different scenes are summarized to obtain the scene rendering verification results of the shading rendering model under the initial data accuracy.
[0178] In this embodiment, reference rendered images and actual rendered images are extracted for each scene, and the rendering error under the same scene is calculated and summarized to obtain the scene rendering verification results of the shading rendering model under the initial data accuracy. The rendering effects under different working conditions are quantitatively compared, and the accuracy differences and problem scenes of different scenes are accurately identified, providing comprehensive and reliable data support for subsequent targeted optimization of rendering configuration and ensuring the rendering quality of each scene.
[0179] In an exemplary embodiment, one possible implementation of the aforementioned step S702, "obtaining the rendering error between the reference rendered image and the actual rendered image in the same scene," will be described, such as... Figure 8 As shown, it includes:
[0180] S801 performs alignment processing and scene semantic classification on the reference rendered image and the actual rendered image respectively to obtain different scene regions in the reference rendered image and the actual rendered image.
[0181] The reference rendered image and the actual rendered image are aligned. At the same time, the pixel regions in the reference rendered image are classified into different scene regions, such as highlight regions, shadow regions, diffuse regions, and semi-transparent regions. Similarly, the pixel regions in the actual rendered image are classified into different scene regions, such as highlight regions, shadow regions, diffuse regions, and semi-transparent regions.
[0182] Optionally, scene semantic classification can be performed on the reference rendered image to generate multiple region masks, and these region masks can be applied simultaneously to the visual difference statistics of the reference rendered image and the actual rendered image to obtain different scene regions in the reference rendered image and different scene regions in the actual rendered image.
[0183] S802 calculates the visual difference between the reference rendered image and the actual rendered image in the same scene area.
[0184] Within each category region, calculate the scene visual difference value between the reference rendering result and the test rendering result.
[0185] Please refer to Table 6, which is a list of scene visual difference values for a single scene region.
[0186] Table 6
[0187]
[0188] S803 compares the scene visual difference values of different scene regions with the corresponding scene tolerance thresholds to obtain the rendering error evaluation results of different scene regions.
[0189] Please refer to Table 7, which lists the scene tolerance thresholds for different scene regions.
[0190] Table 7
[0191]
[0192] Select the corresponding visual tolerance threshold based on the region type, compare the scene visual difference value with the corresponding scene tolerance threshold to obtain the region-level visual quality judgment result, which serves as the rendering error evaluation result.
[0193] S804 summarizes the rendering error evaluation results of different scene areas to obtain the rendering errors of the reference rendered image and the actual rendered image in different scenes.
[0194] The rendering error evaluation results of different scene areas are summarized to obtain the rendering errors of the reference rendered image and the actual rendered image in different scenes.
[0195] In this embodiment, the reference rendered image and the actual rendered image are first aligned and classified according to scene semantics to divide different scene regions in the two types of rendered images. Then, with a single scene region as the smallest granularity, the visual difference value of each scene region is calculated and compared with the corresponding tolerance threshold to obtain the region-level evaluation result. Finally, the evaluation results of each scene region are summarized to obtain the scene-level rendering error. This realizes refined error calculation and layered verification based on scene semantics, which can accurately locate the rendering deviation of different scene regions, improve the pertinence, accuracy and traceability of rendering error evaluation, and provide a more accurate basis for subsequent rendering optimization.
[0196] In practical applications, different Application Programming Interfaces (APIs) can call the same instruction set on the processor (e.g., GPU) hardware to achieve model inference. In this scenario, the results of model inference for the same shading rendering model using different APIs should be consistent. Inconsistency indicates a bug in the API path. Therefore, this application also provides a cross-API consistency verification method to promptly query and locate APIs with bugs. In an exemplary embodiment, such as... Figure 9 As shown, the method also includes:
[0197] S901 uses different application programming interfaces to call hardware instructions to perform inference of the shading rendering model with initial data precision, and obtains the actual inference results of the shading rendering model under different application programming interfaces.
[0198] Taking the example that hardware instructions can be called by two different application programming interfaces (APIs), the first API is used to call the hardware instructions to perform inference of the shading rendering model with initial data precision, and the first actual inference result of the shading rendering model is obtained; and the second API is used to call the hardware instructions to perform inference of the shading rendering model with initial data precision, and the second actual inference result of the shading rendering model is obtained.
[0199] S902, compare the reference inference results of the shading rendering model under the reference data precision with the actual inference results of the shading rendering model under different application interfaces, and determine the model inference error under different application interfaces.
[0200] Using the reference inference result of the shading rendering model at the reference data precision as a benchmark, the reference inference result and the actual inference result under each application interface are calculated to obtain the model inference error under different application interfaces.
[0201] Taking the actual inference results as an example, including the first actual inference result executed by calling hardware instructions using the first application programming interface and the second actual inference result executed by calling hardware instructions using the second application programming interface, the error between the reference inference result and the first actual inference result is calculated to obtain the model inference error under the first application programming interface; the error between the reference inference result and the second actual inference result is calculated to obtain the model inference error under the second application programming interface.
[0202] S903 evaluates the interface path functionality of each application interface based on the model inference error under different application interfaces.
[0203] For any application interface, the model inference error is compared with a preset inference error threshold. Based on the comparison results of each application interface, the optimal interface path and the problem interface path are determined.
[0204] Taking the actual inference results, including single-operator inference results, end-to-end inference results, and scene rendering results, and two application interface paths as an example, the evaluation steps for the interface path functions can be as follows: First, pre-configure multiple different API interface paths for the shading rendering model. Then, call the model through each application interface to execute model inference, obtaining model inference error data such as single-operator inference error, end-to-end inference error, and scene rendering error under the corresponding interface. Based on the magnitude, stability, and distribution of the inference error corresponding to each interface, quantitatively evaluate the functional integrity, data transmission accuracy, computational execution reliability, and rendering effect consistency of each interface path. By comparing the differences in model inference errors under different interface paths, select the optimal interface path with the smallest error, highest stability, and rendering effect that best matches the reference result. Simultaneously, identify problematic interface paths with excessive errors, functional abnormalities, or rendering distortions, thus completing a comprehensive evaluation of the functions of each application interface and interface path.
[0205] In this embodiment, hardware instructions are called through different application programming interfaces (APIs) to execute shading rendering model inference with initial data precision. The actual inference results under each API are then compared with the reference inference results under high reference precision to determine the model inference error of each API. Finally, the path function of each API is evaluated based on the model inference error, thereby achieving quantitative verification of the functional reliability, data transmission accuracy, and computational execution consistency of different hardware call paths. This allows for the accurate identification of problematic API paths with abnormal errors and rendering distortion, as well as the selection of the optimal inference call path for the shading rendering model.
[0206] In one exemplary embodiment, such as Figure 10 As shown, based on the model inference error under different application interfaces, the interface path functionality of each application interface is evaluated, including:
[0207] S1001, for any application programming interface (API), if the model inference error under the API exceeds the preset inference error threshold, determine that the API's interface path function is abnormal.
[0208] If the model inference error under the application programming interface (API) is greater than the preset inference error threshold, it indicates that there is a deviation in the call path corresponding to the API during instruction transmission, data interaction, or hardware scheduling. This causes the calculation deviation generated when the shading rendering model infers with the initial data precision to exceed the allowable range. The API path cannot complete the model inference and rendering-related functions normally and accurately, thus determining that the API path function is abnormal.
[0209] S1002, if the model inference error under the application programming interface is less than the preset inference error threshold, the interface path function of the application programming interface is determined to be normal.
[0210] If the model inference error under the application programming interface (API) is less than the preset inference error threshold, it indicates that the instruction transmission, data interaction and hardware scheduling of the calling path corresponding to the API are normal, the inference calculation deviation of the model under the initial data accuracy is within the compliant range, and the interface path can stably and accurately realize the shading rendering inference function. Therefore, it is determined that the interface path function of the application programming interface is normal.
[0211] In this embodiment, a preset inference error threshold is used as the judgment standard to compare with the model inference error corresponding to each application interface, so as to quickly distinguish whether the interface path function of each application interface is normal or abnormal, identify abnormal interfaces with data transmission, hardware scheduling or instruction execution problems, and ensure the stable operation of the shading rendering model inference and rendering process.
[0212] In one exemplary embodiment, the method further includes:
[0213] Obtain the current result error and historical baseline error of the shaded rendering model during processor inference;
[0214] If the error between the current result error and the historical baseline error is greater than the preset error threshold, then it is determined that there is an accuracy regression in the inference process of the shading rendering model.
[0215] The current result error refers to the current error metric obtained by the processor using cooperative vector instructions to run the shading model inference; the historical baseline error refers to the baseline error metric obtained by the stable version of the processor using cooperative vector instructions to run the shading model inference. In practical applications, the historical baseline error can be pre-stored in memory and dynamically updated as the image processor version is updated.
[0216] When using the current version of the processor to run the shading model inference with cooperative vector instructions and obtain the actual inference result, the error between the actual inference result and the reference inference result is calculated to obtain the current error index. Then, the current error index with matching dimensions is compared with the historical benchmark error index item by item. If the difference between the two exceeds the pre-configured floating error threshold, the neural shading rendering process with cooperative vector operation is automatically determined to have a regression in accuracy in the continuous integration delivery process.
[0217] Furthermore, if accuracy regression is confirmed, alarm logs can be automatically generated, fully storing the current error indicators, historical baseline error indicators, and out-of-limit indicators, and pushing them to the corresponding R&D personnel for investigation and repair. The version can only be released after the repair and retest meet the standards. When optimization is completed and accuracy is improved, the historical baseline error can be updated synchronously. In addition, the current version build and code merging operation can be automatically interrupted to prevent new versions with accuracy defects from flowing into the main project.
[0218] In this embodiment, the current result error and historical baseline error of the shading rendering model during the processor's inference process are compared. If the error between the two is greater than a preset error threshold, it is determined that the inference process of the shading rendering model has accuracy regression, so as to block the defective version from being merged in time and ensure the stability of the inference calculation accuracy of the neural shading rendering pipeline.
[0219] In an exemplary embodiment, taking a CPU as the first processor and a GPU as the second processor, a method for generating a model accuracy configuration strategy is provided, such as... Figure 11 As shown, it includes the following steps:
[0220] S1101, obtain model running parameters.
[0221] Model runtime parameters include: multiple types of operators, model architecture and weights, and rendering processor.
[0222] S1102, Single operator precision verification.
[0223] All types of operator operations are implemented on the CPU with reference data precision (float64) to obtain single-operator reference inference results.
[0224] All types of operator operations are performed on the GPU with initial data precision (lower than float64 data precision) to obtain the actual inference results of a single operator.
[0225] S1103, Baseline Comparison and Numerical Measurement.
[0226] In the single-operator accuracy verification process, each initial data accuracy format generates multiple error dimensions: ① max_abs_error: maximum absolute error, used to capture the worst-case scenario; ② RMSE: root mean square error, used to reflect the overall error level; ③ relative_error: relative error, used to evaluate the error proportion under different orders of magnitude of the reference value. In the embodiments of this application, individual indicators can be retained, or a comprehensive accuracy level or pass / fail conclusion can be generated simultaneously for automatic determination.
[0227] When retaining individual indicators, a "individual threshold + comprehensive judgment" method is introduced: each indicator is compared with its corresponding threshold; if any key indicator exceeds the threshold, the combination is judged to be unqualified.
[0228] When generating a comprehensive rating, such as Pass / Warning / Fail or A / B / C accuracy ratings, multiple error dimensions can be fused together. The expression for the fused score is as follows:
[0229] Score=w1×norm(max_abs_error)+w2×norm(RMSE)+w3 × norm(relative_error)
[0230] Here, norm represents the tolerance threshold divided by the metric in the current precision format, and w1, w2, and w3 can be configured according to scenario sensitivity. A fusion score less than 1 indicates that the overall result is within the tolerance range, but in actual release, it is still recommended to retain the hard constraint that key metrics must not exceed the limit.
[0231] S1104, End-to-end accuracy verification.
[0232] Inference with the same network structure and weights is performed on the CPU with reference data precision (float64) to obtain end-to-end reference inference results.
[0233] Perform inference on the GPU with the same network structure and weights at the initial data precision (lower than float64 data precision) to obtain end-to-end actual inference results.
[0234] S1105, Baseline Comparison and Model Measurement.
[0235] During end-to-end accuracy verification, the data structures in the actual inference results and the reference inference results correspond, including: ① Final output vector: calculated by calling hardware instructions in the graphics processor shader; ② Pre-activation output of each layer: used to compare the multiplication and addition calculation errors of each layer; ③ Post-activation output of each layer: used to observe the propagation of errors after passing through the activation function; ④ Statistical information of each layer: maximum value, minimum value, mean, variance, dynamic range; ⑤ Quantization-related status: activation value saturation rate, number of clamps, scaling factor usage, number of overflows / underflows; ⑥ Execution path information: graphics API type, shader compilation target, GPU model, driver version, precision format, matrix layout, and compiler options.
[0236] Based on sample number, layer number, and output dimension, the data in the actual inference result and the reference inference result are compared item by item to calculate the output cosine similarity, element-wise error distribution, layer-wise error propagation curve, and saturation rate. Among them, the output cosine similarity indicates whether the final vector direction is consistent; the element-wise error distribution indicates whether the error is concentrated in a few output dimensions; the error propagation curve indicates at which layer the degradation occurs; and the activation value saturation rate indicates whether there is insufficient quantization dynamic range.
[0237] In addition, a scenario-level comprehensive judgment can be added for automated continuous integration (CI) approval: if all key indicators are within the threshold, the scenario is judged as pass; if non-key indicators are slightly out of the limit, the scenario is judged as warning; if any key indicator is out of the limit, such as the final output similarity being lower than the threshold or a sudden increase in error at a certain layer, the scenario is judged as fail.
[0238] S1106, Visual verification of the rendered scene.
[0239] Specifically, the following steps are included:
[0240] (1) Fixed test conditions.
[0241] Fixed scene, camera, light source, material, resolution, random seed, and rendering parameters; ensuring that the reference rendering and the rendering under test differ only in inference precision / API / driving path.
[0242] (2) Generate reference rendering results.
[0243] The rendering scene inference results are generated using a high-precision path on the CPU, with a float32 CPU high-precision reference path preferred; the dynamic image scene is inferred and rendered to generate a reference frame sequence.
[0244] (3) Generate the rendering result of the test.
[0245] On the GPU, with initial data precision (lower than float64), such as FP8, INT8, or float16; using the same type structure, weights, and scene input; generate the corresponding image or frame sequence.
[0246] S1107, Baseline Comparison and Visual Measurements.
[0247] Specifically, the following steps are included:
[0248] (1) Generate scene region mask.
[0249] Based on information such as material number, normal, roughness, metallicity, depth, transparency, and lighting type in the Geometry Buffer (G-Buffer), pixel regions are classified to form area masks such as specular highlights, shadows, diffuse reflection, and semi-transparent areas.
[0250] (2) Calculate the visual difference index.
[0251] Calculate global FLIP, SSIM, PSNR, or pixel difference on the final image; calculate regional FLIP, regional SSIM, regional maximum error, and regional mean error within each scene region mask; calculate inter-frame difference changes for consecutive frames to detect temporal flicker.
[0252] (3) Compare with tolerance and historical baseline.
[0253] First, compare the visual difference index of each region with the scene perception tolerance of that region; then compare it with the historical stable version or the target hardware baseline to determine whether accuracy regression has occurred; if a region exceeds the limit, mark the corresponding scene region, accuracy format and API path.
[0254] (4) Feedback to configuration strategy generation.
[0255] If the specular region fails, increase the precision of the specular-related network layer or shader branch; if the diffuse region index is far below the threshold, the precision can be preserved or reduced to improve performance; if only a certain API fails, the problem is located to be an API / driver / compilation path issue.
[0256] S1108, Cross-API Consistency Verification.
[0257] S1109, Precision Regression Judgment.
[0258] Based on the three-layer verification results, a precision configuration strategy is generated. The strategy includes, but is not limited to: improving the execution precision of a specific layer or a specific rendering region, adjusting the quantization scaling factor, changing the blend precision allocation, recalibrating the range of input or activation values, selecting an alternative shader branch, or triggering quantization-aware retraining.
[0259] In this embodiment, multi-level precision verification is performed through single operators, end-to-end, and rendering scenes. Quantitative comparison is carried out by combining multiple error indicators and visual evaluation dimensions. At the same time, cross-API consistency and precision regression judgment are added to comprehensively investigate problems such as precision deviation, error propagation, visual distortion, and temporal flicker under different processors, data precision, interfaces, and operating environments. Based on the verification results of each stage, precision allocation, quantization parameters, shader branches, etc. can be adjusted in a targeted manner to automatically generate model precision configuration strategies adapted to different scenarios and hardware. This ensures the computational accuracy, visual effect, and operational stability of the shading rendering model when running on a low-precision GPU, while also taking into account hardware computing performance while meeting precision requirements, thus achieving synergistic optimization of precision and performance.
[0260] In one exemplary embodiment, a method for automated model deployment is also provided based on the model accuracy configuration strategy generation method, such as... Figure 12 As shown, it includes the following steps:
[0261] S1201, Submit compiler code.
[0262] S1202, Construct the shading rendering model.
[0263] S1203, Perform single operator precision verification.
[0264] If the verification passes, proceed to step S1204; if the verification fails, proceed to step S1207.
[0265] S1204, Perform end-to-end accuracy verification.
[0266] If the verification passes, proceed to step S1205; if the verification fails, proceed to step S1207.
[0267] S1205, Perform visual accuracy verification of the rendered scene.
[0268] If the verification passes, proceed to step S1206; if the verification fails, proceed to step S1207.
[0269] S1206, Cross-API Attribution.
[0270] S1207, Strategy Generation.
[0271] The process includes the following steps: (1) Collect the measurement results of the three-layer verification, including single operator error, end-to-end layer error propagation, activation saturation rate, regional visual differences, and cross-API differences. (2) Compare the measurement results with the preset tolerance, historical baseline, and target hardware performance constraints to identify the operators, network layers, output channels, shader branches, or scene regions corresponding to the error sources. (3) Based on the preset strategy table or cost function, select the precision format that meets the quality constraints and has the lowest performance cost for each network layer, output channel, or shader branch from the available precision format set. (4) Generate a compilation configuration that includes the precision format, quantization scaling factor, matrix layout, accumulated precision, and fallback path. (5) Pass the compilation configuration to the shader compiler or runtime pipeline generation module to regenerate the shader machine code on the target hardware. (6) Perform at least the second and third layer verifications on the regenerated shader again. If the verifications pass, the model is solidified as the recommended configuration on the target hardware.
[0272] S1208, recompile and execute.
[0273] In this embodiment, the three-layer verification corresponds to the numerical correctness of a single operator, the end-to-end inference accuracy of a multi-layer model, and the final rendered visual quality. These three aspects exist in parallel in terms of system functionality and can be executed sequentially from low cost to high cost. Cross-API consistency verification is a horizontal verification dimension, which can compare the output differences of different graphics API paths at any layer. Based on the three-layer verification results and scene-aware tolerance, the system identifies the source of error and automatically generates a hybrid precision configuration strategy for the target hardware, including hierarchical precision, branch precision, quantization scale, matrix layout, cumulative precision, and fallback path. Subsequently, it controls the shader compiler or runtime pipeline to regenerate the corresponding machine code, thereby forming a closed-loop control from precision verification to execution configuration optimization.
[0274] In an exemplary embodiment, a model accuracy configuration strategy generation method is also provided, applied to evaluating the accuracy performance of a 4-layer MLP material shading model with FP8 E4M3 accuracy format. The actual inference result obtained under MulAdd(FP8_E4M3) and the reference inference result obtained under reference data accuracy (float64) are compared. If the single operator verification result is: single-layer max_abs_error = 0.015; the 4-layer MLP end-to-end verification result is: cosine similarity 0.9987, with cumulative error significantly increasing in layers 3-4; and the rendering scene verification result is: mean FLIP 0.023, but local FLIP > 0.15 in the specular region (color banding artifacts), then the model accuracy configuration strategy is determined to be: FP8 E4M3 is not suitable for the specular rendering path of this model, and it is recommended to use float16 for the specular layer.
[0275] In one exemplary embodiment, a model reasoning method is also provided, such as Figure 13 As shown, the method includes:
[0276] S1301, Obtain the image data to be rendered.
[0277] The image data to be rendered refers to all the original scene information required for the model to be drawn, including but not limited to: scene geometry information (model, vertices, coordinates); lighting parameters, camera parameters; rendering attributes such as material, texture, roughness, and metallicity; pixel coordinates, texture coordinates (UV coordinates), depth information; fixed random seed, rendering resolution, and other data.
[0278] In response to a rendering request, the content in the rendering request is parsed to obtain the image data to be rendered.
[0279] S1302, the image data to be rendered is input into the shading rendering model, and the inference of the shading rendering model is performed using the precision configuration strategy in any of the above embodiments to obtain the image rendering result.
[0280] The image data to be rendered is taken as input, and the color value, lighting value, and material value of each pixel are output through the shading rendering model. Then, these values are mapped to pixel colors, combined according to resolution to form a complete two-dimensional image, and finally, the visible rendering result is generated.
[0281] In this embodiment, a shading rendering model with a dedicated precision configuration strategy is used to perform inference operations. While ensuring that the image rendering quality and visual effects are not significantly lost, the computational power consumption, memory usage and computational latency during the model inference process are effectively reduced, achieving a balance between image rendering efficiency and rendering quality.
[0282] In an exemplary embodiment, a model accuracy evaluation method is also provided, applied to a scenario where the CI reports a failure in Neural Shading accuracy testing after a driver update. The single-operator accuracy verification results corresponding to the actual inference results using the first interface path (e.g., the Vulkan path) and the actual inference results using the second interface path (e.g., the DX12 path) both pass; however, the corresponding end-to-end cosine similarity decreases from 0.9999 to 0.9823, triggering regression detection. The error propagation curve shows a sudden increase in error in the second layer, MatVecMul, suggesting a possible change in the Tensor Core scheduling path at this layer. Further, cross-API verification is performed; the accuracy of the first interface path is normal, while the accuracy of the second interface path degrades, confirming a bug in the second interface driver.
[0283] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0284] Based on the same inventive concept, this application also provides a model accuracy configuration strategy generation apparatus for implementing the model accuracy configuration strategy generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the model accuracy configuration strategy generation apparatus provided below can be found in the limitations of the model accuracy configuration strategy generation method described above, and will not be repeated here.
[0285] In one exemplary embodiment, such as Figure 14 As shown, a model accuracy configuration strategy generation device is provided, including: a result acquisition module 1401, an inference result comparison module 1402, and a strategy generation module 1403, wherein:
[0286] The result acquisition module 1401 is used to acquire the reference inference result of the shading rendering model under the reference data precision, and the actual inference result of the shading rendering model under the initial data precision; the reference data precision is higher than the initial data precision.
[0287] The inference result comparison module 1402 is used to perform a comparative analysis of the reference inference result and the actual inference result in at least one dimension to obtain the accuracy verification result of the shading rendering model under the initial data accuracy.
[0288] The strategy generation module 1403 is used to generate a precision configuration strategy for the shading rendering model based on the precision verification results and the initial data precision; the precision configuration strategy is used by the shading rendering model to perform the rendering steps of the image data.
[0289] In an exemplary embodiment, the result acquisition module 1401 includes: a parameter acquisition unit and an image rendering unit, wherein:
[0290] The parameter acquisition unit is used to acquire the model running parameters of the shading and rendering model;
[0291] The image rendering unit is used to execute the image data rendering steps on the processor with reference data precision and initial data precision respectively, to obtain reference inference results and actual inference results.
[0292] In an exemplary embodiment, the model running parameters include: multiple types of operators, model architecture and weights, and a rendering processor; an image rendering unit, which is also used to perform inference for each operator to obtain the single operator inference result for each operator; and to perform network layer inference for the shading rendering model to obtain end-to-end inference results; and, based on the rendering processor, to perform scene rendering inference for the shading rendering model to obtain scene rendering results.
[0293] In an exemplary embodiment, the reasoning result comparison module 1402 includes: a multi-dimensional comparison analysis unit and a result summarization unit, wherein:
[0294] The multidimensional comparative analysis unit is used to compare and analyze the reference inference results and the actual inference results from at least one of the dimensions of single operator precision, end-to-end inference and rendering, and to determine the single operator precision verification results, end-to-end precision verification results and scene rendering verification results of the shading rendering model under the initial data precision.
[0295] The results aggregation unit is used to generate accuracy verification results of the shading rendering model under the initial data accuracy based on the single operator accuracy verification results, end-to-end accuracy verification results, and scene rendering verification results.
[0296] In an exemplary embodiment, the multidimensional comparison analysis unit includes an operator precision verification subunit, which is used to: obtain the standard inference result of a single operator corresponding to the operator from the reference inference result for operators of the same type; and obtain the actual inference result of a single operator corresponding to the operator from the actual inference result; calculate the error value between the standard inference result of the single operator and the actual inference result of the single operator; and compare the error value with the error threshold corresponding to the initial data precision to obtain the single operator precision verification result of the operator.
[0297] In an exemplary embodiment, the multidimensional comparison analysis unit includes an end-to-end accuracy verification subunit, which is used to obtain the standard output results of each network layer of the shading rendering model in different scenarios from the reference inference results, and to obtain the actual output results of each network layer of the shading rendering model in different scenarios from the actual inference results; calculate the error value between the standard output result and the actual output result of the same network layer of the shading rendering model in the same scenario; and obtain the end-to-end accuracy verification result of the shading rendering model under the initial data accuracy based on the error value.
[0298] In an exemplary embodiment, the multidimensional comparison analysis unit includes a scene rendering verification subunit, which is used to obtain reference rendering images of the shading rendering model in different scenes from the reference inference results, and to obtain actual rendering images of the shading rendering model in different scenes from the actual inference results; to obtain the rendering error of the reference rendering image and the actual rendering image in the same scene; and to summarize the rendering errors of the reference rendering image and the actual rendering image in different scenes to obtain the scene rendering verification result of the shading rendering model under the initial data accuracy.
[0299] In an exemplary embodiment, the scene rendering verification subunit is further configured to perform alignment processing and scene semantic classification on the reference rendered image and the actual rendered image respectively to obtain different scene regions in the reference rendered image and the actual rendered image; calculate the scene visual difference value of the reference rendered image and the actual rendered image in the same scene region; compare the scene visual difference value of different scene regions with the corresponding scene tolerance threshold to obtain the rendering error evaluation result of different scene regions; and summarize the rendering error evaluation results of different scene regions to obtain the rendering error of the reference rendered image and the actual rendered image in different scenes.
[0300] In an exemplary embodiment, the model accuracy configuration strategy generation apparatus includes: an instruction invocation module, a result comparison module, and a path evaluation module, wherein:
[0301] The instruction invocation module is used to invoke hardware instructions using different application programming interfaces (APIs) to perform inference of the shading rendering model with initial data precision, and to obtain the actual inference results of the shading rendering model under different APIs.
[0302] The results comparison module is used to compare the reference inference results of the shading rendering model at the reference data precision with the actual inference results of the shading rendering model under different application interfaces, and to determine the model inference error under different application interfaces.
[0303] The path evaluation module is used to evaluate the interface path functionality of each application interface based on the model inference error under different application interfaces.
[0304] In an exemplary embodiment, the path evaluation module is further configured to, for any application interface, determine that the interface path function of the application interface is abnormal if the model inference error under the application interface is greater than a preset inference error threshold, and determine that the interface path function of the application interface is normal if the model inference error under the application interface is less than the preset inference error threshold.
[0305] In an exemplary embodiment, the model accuracy configuration strategy generation device includes: a baseline error acquisition module and a baseline error comparison module, wherein:
[0306] The baseline error acquisition module is used to acquire the current result error and historical baseline error of the shading rendering model during the processor's inference process;
[0307] The baseline error comparison module is used to determine that the inference process of the shading rendering model has accuracy regression if the error between the current result error and the historical baseline error is greater than a preset error threshold.
[0308] Based on the same inventive concept, this application also provides a model reasoning apparatus for implementing the model reasoning method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more model reasoning apparatus embodiments provided below can be found in the limitations of the model reasoning method described above, and will not be repeated here.
[0309] In one exemplary embodiment, such as Figure 15 As shown, a model inference device is provided, including: a data acquisition module 1501 and an image rendering module 1502, wherein:
[0310] Data acquisition module 1501 is used to acquire image data to be rendered;
[0311] The image rendering module 1502 is used to input the image data to be rendered into the shading rendering model, and to perform the inference of the shading rendering model using the precision configuration strategy in any of the embodiments of the first aspect above, so as to obtain the image rendering result.
[0312] Each module in the aforementioned model accuracy configuration strategy generation device or model inference device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0313] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0314] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0315] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0316] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0317] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0318] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0319] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating a model accuracy configuration strategy, characterized in that, The method includes: Obtain the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision; the reference data precision is higher than the initial data precision. The reference inference results and the actual inference results are compared and analyzed from the dimensions of single operator precision, end-to-end inference, and rendering to determine the single operator precision verification results, end-to-end precision verification results, and scene rendering verification results of the shading rendering model under the initial data precision; the end-to-end inference refers to performing network layer inference of the shading rendering model. Based on the single operator precision verification result, the end-to-end precision verification result, and the scene rendering verification result, the precision verification result of the shading rendering model under the initial data precision is generated. Based on the accuracy verification results and the initial data accuracy, an accuracy configuration strategy for the shading rendering model is generated; the accuracy configuration strategy is used by the shading rendering model to perform the image data rendering steps.
2. The method according to claim 1, characterized in that, The process of obtaining the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision, includes: Obtain the model runtime parameters of the shading rendering model; Based on the model's operating parameters, the rendering steps of the image data are executed on the processor with the reference data precision and the initial data precision, respectively, to obtain the reference inference result and the actual inference result.
3. The method according to claim 2, characterized in that, The model operating parameters include: multiple types of operators, model architecture and weights, and a rendering processor; the image data rendering steps include at least one of the following: Perform the reasoning for each of the operators to obtain the single-operator reasoning results for each of the operators; Perform network layer inference of the shading rendering model to obtain end-to-end inference results; Based on the rendering processor, the scene rendering inference of the shading rendering model is executed to obtain the scene rendering result.
4. The method according to claim 1, characterized in that, The step of comparing and analyzing the reference inference result and the actual inference result from the perspective of single operator precision to determine the single operator precision verification result of the shading rendering model under the initial data precision includes: For operators of the same type, the standard inference result of the single operator corresponding to the operator is obtained from the reference inference result; and the actual inference result of the single operator corresponding to the operator is obtained from the actual inference result. Calculate the error value between the standard inference result of the single operator and the actual inference result of the single operator; The error value is compared with the error threshold corresponding to the initial data accuracy to obtain the single operator accuracy verification result of the operator.
5. The method according to claim 1, characterized in that, The end-to-end inference dimension compares and analyzes the reference inference result and the actual inference result to determine the end-to-end accuracy verification result of the shading rendering model under the initial data accuracy, including: Obtain the standard output results of each network layer of the shading rendering model in different scenarios from the reference inference results, and obtain the actual output results of each network layer of the shading rendering model in different scenarios from the actual inference results; Calculate the error between the standard output and the actual output of the shading rendering model at the same network layer in the same scene; Based on the error value, the end-to-end accuracy verification result of the shading rendering model under the initial data accuracy is obtained.
6. The method according to claim 1, characterized in that, The step of comparing and analyzing the reference inference result and the actual inference result from the rendering dimension to determine the scene rendering verification result of the shading rendering model under the initial data precision includes: The reference rendering images of the shading rendering model in different scenes are obtained from the reference inference results, and the actual rendering images of the shading rendering model in different scenes are obtained from the actual inference results. Obtain the rendering error between the reference rendered image and the actual rendered image in the same scene; The rendering errors of the reference rendered image and the actual rendered image under different scenes are summarized to obtain the scene rendering verification result of the shading rendering model under the initial data accuracy.
7. The method according to claim 6, characterized in that, The step of obtaining the rendering error between the reference rendered image and the actual rendered image in the same scene includes: Alignment processing and scene semantic classification are performed on the reference rendered image and the actual rendered image respectively to obtain different scene regions in the reference rendered image and the actual rendered image; Calculate the visual difference between the reference rendered image and the actual rendered image in the same scene area; The scene visual difference values of different scene regions are compared with the corresponding scene tolerance thresholds to obtain the rendering error evaluation results of the different scene regions. The rendering error evaluation results of the different scene regions are summarized to obtain the rendering errors of the reference rendered image and the actual rendered image in different scenes.
8. The method according to any one of claims 1-3, characterized in that, The method further includes: By using different application programming interfaces (APIs) to call hardware instructions, the inference of the shading rendering model is executed with the initial data precision, and the actual inference results of the shading rendering model under different APIs are obtained. The reference inference results of the shading rendering model under the reference data precision are compared with the actual inference results of the shading rendering model under different application interfaces to determine the model inference error under different application interfaces. The interface path functionality of each application interface is evaluated based on the model inference error under different application interfaces.
9. The method according to claim 8, characterized in that, The step of evaluating the interface path functionality of each application interface based on the model inference error under different application interfaces includes: For any application programming interface (API), if the model inference error under the API exceeds a preset inference error threshold, the API's interface path function is determined to be abnormal. If the model inference error under the application programming interface is less than the preset inference error threshold, the interface path function of the application programming interface is determined to be normal.
10. The method according to any one of claims 1-3, characterized in that, The method further includes: Obtain the current result error and historical baseline error of the shading rendering model during the processor's inference process; If the error between the current result error and the historical baseline error is greater than a preset error threshold, then it is determined that the inference process of the shading rendering model has accuracy regression.
11. A model reasoning method, characterized in that, The method includes: Obtain the image data to be rendered; The image data to be rendered is input into the shading rendering model, and the inference of the shading rendering model is performed using the precision configuration strategy described in any one of claims 1-10 to obtain the image rendering result.
12. A model accuracy configuration strategy generation device, characterized in that, The device includes: The result acquisition module is used to acquire the reference inference result of the shading rendering model at the reference data precision, and the actual inference result of the shading rendering model at the initial data precision; the reference data precision is higher than the initial data precision. The inference result comparison module is used to compare and analyze the reference inference result and the actual inference result from the dimensions of single operator precision, end-to-end inference, and rendering to determine the single operator precision verification result, end-to-end precision verification result, and scene rendering verification result of the shading rendering model under the initial data precision; the end-to-end inference is to perform network layer inference of the shading rendering model; based on the single operator precision verification result, the end-to-end precision verification result, and the scene rendering verification result, the precision verification result of the shading rendering model under the initial data precision is generated; The strategy generation module is used to generate a precision configuration strategy for the shading rendering model based on the precision verification results and the initial data precision; the precision configuration strategy is used by the shading rendering model to perform the image data rendering steps.
13. A model reasoning device, characterized in that, The device includes: The data acquisition module is used to acquire the image data to be rendered; An image rendering module is used to input the image data to be rendered into a shading rendering model, and to perform inference of the shading rendering model using the precision configuration strategy described in any one of claims 1-10 to obtain the image rendering result.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Transform model-based precision tuning method, system and device, and storage medium
CN119886346A
