Task execution method and device, electronic equipment and storage medium
By performing initial tasks at different accuracies in the deep learning framework and evaluating the accuracy differences of new hardware devices, we solve the problem of accuracy evaluation of new hardware devices, improve the accuracy and stability of the framework, reduce hardware costs, and adapt to more equipment.
Patent Information
- Application Number
- CN202410684330.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-23
AI Technical Summary
In the deep learning framework, the accuracy of new hardware devices is difficult to quickly evaluate, resulting in a waste of resources and model incompatibility in different scenarios. Low-precision data is difficult to discover, affecting model deployment and task execution.
By performing initial tasks under different accuracies of the verification data set, determine the difference results between the computing device under test and the target computing device, evaluate whether the accuracy of the computing device under test meets the requirements, and then adjust hardware parameters and distribution strategies to improve accuracy. .
Quickly and accurately evaluate the accuracy of new hardware devices to ensure they meet requirements, improve the accuracy and stability of deep learning frameworks, reduce hardware costs, and adapt to more computing devices.
Smart Images

Figure CN118535336A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the technical fields of distributed computing platforms, deep learning frameworks, and artificial intelligence accelerators. More specifically, the present disclosure provides a task execution method, device, electronic device, and storage medium. Background Art
[0002] With the development of artificial intelligence technology, various computing devices can be used to perform artificial intelligence tasks. Summary of the invention
[0003] The present disclosure provides a task execution method, apparatus, device and storage medium.
[0004] According to one aspect of the present disclosure, a task execution method is provided, the method comprising: executing at least one initial task in a task set using a computing device to be tested based on data to be processed of a first precision of a verification data set, to obtain a result to be verified of at least one initial task; determining at least one first difference result based on at least one result to be verified and at least one first execution result, wherein the at least one first execution result is obtained by a target computing device executing at least one initial task based on data to be processed of a second precision of the verification data set; obtaining an accuracy evaluation result of the computing device to be tested based on the at least one first difference result and at least one second difference result, wherein the at least one second difference result is determined based on the at least one first execution result and at least one second execution result, and the at least one second execution result is obtained by the target computing device executing at least one initial task based on the data to be processed of the first precision.
[0005] According to another aspect of the present disclosure, a task execution device is provided, which includes: an execution module, which is used to execute at least one initial task in a task set using a computing device to be tested according to the first precision of the verification data set to be processed, and obtain a result to be verified of at least one initial task; a determination module, which is used to determine at least one first difference result according to the at least one result to be verified and at least one first execution result, wherein the at least one first execution result is obtained by the target computing device executing the at least one initial task according to the second precision of the verification data set to be processed; an acquisition module, which is used to obtain the accuracy evaluation result of the computing device to be tested according to the at least one first difference result and at least one second difference result, wherein the at least one second difference result is determined according to the at least one first execution result and the at least one second execution result, and the at least one second execution result is obtained by the target computing device executing the at least one initial task according to the first precision of the verification data set.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of an exemplary system architecture to which a task execution method and apparatus can be applied according to an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of a task execution method according to an embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram of a task execution method according to an embodiment of the present disclosure;
[0014] Figure 4 is a block diagram of a task execution device according to an embodiment of the present disclosure; and
[0015] Figure 5 is a block diagram of an electronic device to which a task execution method can be applied according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0017] If a new hardware device is connected to a deep learning framework, the new hardware device can be used to perform training tasks or inference tasks. During the training process, you can focus on the functions, performance, and accuracy of the new hardware device. For example, you can determine the plug-in development capabilities supported by the new hardware device to determine the software R&D investment cost after the new hardware device is connected. You can also determine the data throughput of the new hardware device to determine whether the deep learning framework can work deeply with the new hardware device, and whether the computing power of the new hardware device can be fully utilized. Accuracy includes the convergence of loss during training.
[0018] The deep learning framework can support various deep learning models. A deep learning model can include multiple operators. After the new hardware device is connected to the deep learning framework, the workload of adjusting the operators and adapting the distributed strategy for the new hardware device is large. If there is a problem with the accuracy of the new hardware device, it will lead to a huge waste of resources. In addition, the impact of accuracy problems is different in different scenarios. For example, in some scenarios, if the accuracy is greater than 0.6, the model can be deployed to the corresponding scenario and perform the corresponding tasks. In other scenarios, even if the accuracy is greater than 0.7, the model is difficult to meet the requirements.
[0019] As the model depth (number of operators) increases, the accuracy of new hardware devices may continue to decrease. New hardware devices may have lower accuracy in executing some operators. Deep learning models can tolerate a certain degree of error, making it difficult to detect low-precision operators. For example, if the data is low-precision data, low-precision operators are difficult to detect. Low-precision data can be 16-bit floating point (FP16) data.
[0020] In some embodiments, in order to determine the accuracy of an operator, the result of the new hardware device executing the operator can be determined, or the result of the original hardware device executing the operator can be determined. Next, the difference between the two results can be determined. If the difference is less than or equal to a preset difference threshold, it can be determined that the accuracy of the new hardware device meets the requirements. However, the preset difference threshold is usually an empirical value. If the preset difference threshold is inaccurate, it is difficult to accurately evaluate the accuracy of the new hardware device.
[0021] Therefore, in order to determine whether the accuracy of the new hardware device meets the requirements, the present disclosure provides a task execution method, which is described below.
[0022] Figure 1 An exemplary system architecture to which the task execution method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown.
[0023] It should be noted that Figure 1What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0024] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a terminal device 101, a network 102, and a server cluster 103. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server cluster 103. The network 102 may also be used to provide a medium for a communication link within the server cluster 103. The network 102 may include various connection types, such as wired and / or wireless communication links, etc.
[0025] The user can use the terminal device 101 to interact with the server cluster 103 through the network 102 to receive or send messages, etc. For example, the terminal device 101 can send a request for training a deep learning model to the server cluster 103 through the network 102.
[0026] Various communication client applications may be installed on the terminal device 101, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software (for example only).
[0027] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0028] The server cluster 103 may be a server that provides various services, such as a background management server that provides support for requests sent by users using the terminal device 101 (only an example).
[0029] The server cluster 103 may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0030] The server cluster 103 includes multiple server nodes 1031, 1032, 1033, 1034, each server node includes one or more hardware devices. The server cluster 103 or the server node can be used to run the above-mentioned deep learning framework. Based on the task execution method provided by the present disclosure, the accuracy evaluation results of one or more hardware devices of the server node can be determined.
[0031] It can be understood that the above describes the system architecture of the present disclosure, and the following describes the method of the present disclosure.
[0032] Figure 2 is a flowchart of a task execution method according to an embodiment of the present disclosure.
[0033] like Figure 2 As shown, the method 200 may include operations S210 to S230.
[0034] In operation S210, at least one initial task in a task set is executed by using a computing device under test according to the to-be-processed data of the first precision of the verification data set to obtain a to-be-verified result of the at least one initial task.
[0035] In the embodiment of the present disclosure, the task set may correspond to the deep learning model. Each operator of the deep learning model may correspond to an initial task in the task set.
[0036] In the disclosed embodiment, the validation data set may include the data to be processed of the initial task and the input data of the task set. For example, if the validation data set includes input data of a deep learning model, the input data of multiple operators of the model may be determined based on the input data of the model. It is understood that the input data of the operator may be used as the data to be processed of the initial task. The input data of the model may be used as the input data of the task set.
[0037] In the embodiment of the present disclosure, the data to be processed with the first precision may be low-precision data, and the low-precision data may be 16-bit floating point data.
[0038] In the embodiments of the present disclosure, the computing device to be tested may be a device to be connected to a deep learning framework. For example, the computing device to be tested may be the above-mentioned new hardware device. The new hardware device may be a device including one of various chips such as a neural network processing unit (NPU), a tensor processing unit (TPU), and a Kunlun core.
[0039] In the embodiment of the present disclosure, the task set may include multiple initial tasks. The computing device under test may execute one or more initial tasks in the task set, or may execute all of the multiple initial tasks.
[0040] In operation S220, at least one first difference result is determined according to at least one result to be verified and at least one first execution result.
[0041] In the embodiment of the present disclosure, at least one first execution result is obtained by the target computing device executing at least one initial task according to the to-be-processed data of the second precision of the verification data. The target computing device may be a device including a central computing unit or a device including a graphics processing unit.
[0042] In the embodiment of the present disclosure, the second precision data to be processed may be high precision data, and the high precision data may be 32-bit floating point data (FP32).
[0043] In the disclosed embodiment, the result to be verified may correspond to the first execution result. For example, according to the data to be processed of the first precision, the computing device to be tested performs the initial task and obtains the result to be verified. According to the data to be processed of the second precision, the target computing device performs the initial task and obtains the first execution result. The first execution result corresponds to the result to be verified. It can be understood that for the same initial task, the difference between the data to be processed of the first precision and the data to be processed of the second precision is the different precision.
[0044] In the embodiment of the present disclosure, the first difference result may indicate a difference between the result to be verified and the first execution result.
[0045] In operation S230, an accuracy evaluation result of the computing device to be tested is obtained according to the at least one first difference result and the at least one second difference result.
[0046] In an embodiment of the present disclosure, at least one second difference result is determined according to at least one first execution result and at least one second execution result. The second difference result may indicate a difference between the first execution result and the second execution result.
[0047] In an embodiment of the present disclosure, at least one second execution result is obtained by the target computing device executing at least one initial task according to the data to be processed of the first precision. The first execution result may correspond to the second execution result. As described above, according to the data to be processed of the second precision, the target computing device executes the initial task to obtain the first execution result. According to the data to be processed of the first precision, the target computing device executes the initial task to obtain the second execution result.
[0048] In the embodiment of the present disclosure, the accuracy evaluation result may indicate whether the accuracy of the computing device to be tested meets the requirements.
[0049] Through the disclosed embodiment, the difference between the low-precision result to be verified and the high-precision first execution result is determined, and the difference between the low-precision second execution result and the high-precision first execution result is also determined. Based on these two differences, it can be quickly determined whether the accuracy of the initial task performed by the computing device under test can meet the requirements, so as to quickly solve the problems caused by insufficient accuracy and improve the accuracy and stability of the deep learning framework. It also helps the deep learning framework adapt to more different types of computing devices, thereby reducing hardware costs.
[0050] It can be understood that the method of the present disclosure is described above, and the method of the present disclosure will be further described below.
[0051] Figure 3 is a schematic diagram of a task execution method according to an embodiment of the present disclosure.
[0052] In operation S301, hardware function adaptation is performed on the computing device to be tested. For example, the hardware parameters (voltage, frequency, etc.) of the computing device to be tested may be adjusted so as to access the deep learning framework.
[0053] In operation S302, a deep learning model is generated based on the computing device to be tested. For example, the deep learning framework can support one or more deep learning models. A deep learning model can be written based on the code generation function. The deep learning model can include multiple operators. The deep learning module can correspond to a set of tasks that the computing device to be tested needs to perform. The task set can include multiple initial tasks. Each initial task can correspond to an operator of the model. Next, a test is performed according to one or more test data to obtain a test loss.
[0054] In an embodiment of the present disclosure, the test loss may be obtained based on the output result. The output result may be obtained by the computing device to be tested executing the task set based on the training data. The test data may be one or more. The multiple test data may include at least one of the first test data and the second test data. The first test data may have a low correlation with the scene to be deployed. The second test data may be data of the scene to be deployed, and the scene to be deployed may include at least one of an image processing scene, a text processing scene, and an audio processing scene. For example, the image processing scene may include an image recognition scene, a target detection scene, a target tracking scene, etc. The text processing scene may include a text generation scene, a translation scene, etc. The audio processing scene may include an audio recognition scene, an audio generation scene, etc. The following will be described in conjunction with operation S303 and operation S304.
[0055] In operation S303 , the computing device to be tested executes a task set according to the first training data.
[0056] In an embodiment of the present disclosure, the computing device to be tested executes a task set according to the first training data, and a first output result can be obtained. According to the first output result, a first test loss can be obtained. For example, taking supervised training as an example, the first training loss can be determined according to the first output result and the corresponding label. The first training data can be one or more. Therefore, the first output result and the corresponding label can also be one or more. The first training loss can also be one or more. It can be understood that the training method can also be unsupervised training or semi-supervised training, and the present disclosure does not limit this.
[0057] In operation S304 , the computing device to be tested executes the task set according to the second training data.
[0058] In the disclosed embodiment, the computing device to be tested performs the task set according to the second training data, and a second output result can be obtained. According to the second output result, a second test loss can be obtained. For example, taking supervised training as an example, the second training loss can be determined according to the second output result and the corresponding label. The second training data can be one or more. Therefore, the second output result and the corresponding label can also be one or more. The second training loss can also be one or more.
[0059] In operation S305 , it is determined whether the first training loss and the second training loss converge.
[0060] In an embodiment of the present disclosure, in response to determining that both the first training loss and the second training loss have converged, it can be determined that the accuracy assessment result is a second accuracy assessment result. The second accuracy assessment result can indicate that the accuracy of the computing device to be tested is high. For example, taking the example that both the first training data and the second training data are N, N first training losses and N second training losses can be obtained. If the N first training losses converge and the N second training losses converge, it can be determined that the accuracy of the computing device to be tested is high. N can be an integer greater than or equal to 1.
[0061] In the embodiment of the present disclosure, in response to determining that the first training loss or the second training loss has not converged, operation S306 is performed. For example, if it is determined that N first training losses have not converged or it is determined that N second training losses have not converged, operation S306 can be performed. Through the embodiment of the present disclosure, multiple initial tasks are performed using data of the scene to be deployed, and a new dimension is added on the basis of the first test loss to evaluate the computing device to be tested, which can effectively evaluate the accuracy of the computing device to be tested.
[0062] In operation S306 , at least one of a hyper parameter and a distribution strategy used by the computing device under test to execute the task set is adjusted.
[0063] In the disclosed embodiment, the distributed strategy used by the computing device under test to execute the task set is adjusted according to the distributed strategy used by the target computing device when executing the task set. For example, the distributed strategy may be a distributed strategy such as a Data Parallel (DP) strategy or a Pipeline Parallel (PP) strategy. It can be determined whether the distributed strategy is correct. In the case where multiple computing devices under test execute the task set respectively, it can be determined whether the communication between the multiple computing devices under test is correct, or it can be determined whether the communication efficiency between the computing devices under test can be improved.
[0064] In the embodiment of the present disclosure, the hyperparameters used by the computing device under test to execute the task set are adjusted according to the hyperparameters used by the target computing device when executing the task set. For example, the hyperparameters of the computing device under test and the hyperparameters of the target computing device can be aligned to eliminate the increase in loss caused by the difference in hyperparameters. Next, according to the data set to be verified, the computing device under test can execute one or more initial tasks in the task set again, which will be explained below.
[0065] In operation S310 , at least one initial task in a task set is executed using a computing device under test according to the to-be-processed data of the first precision of the verification data set.
[0066] In the embodiment of the present disclosure, based on the first precision of the to-be-processed data set of the verification data, at least one initial task in the task set is executed by the computing device under test to obtain a to-be-verified result of the at least one initial task.
[0067] In the embodiment of the present disclosure, the verification data set may include input data of each initial task. For example, the input data of each initial task generated during the target computing device executing the task set may be used as the input data of each initial task in the verification data set.
[0068] In the disclosed embodiment, the computing device under test executes the initial task to perform a unit test (UT). For example, based on the operation (matrix multiplication, normalization, etc.) corresponding to the initial task and the input data of the initial task, the computing device under test can execute the initial task to implement the unit test.
[0069] In operation S320, at least one first difference result is determined according to at least one result to be verified and at least one first execution result.
[0070] In the embodiment of the present disclosure, the first execution result may be obtained by the target computing device executing the initial task based on the to-be-processed data of the second precision of the verification data set.
[0071] In the embodiment of the present disclosure, the first difference result diff_b can be determined by the following formula:
[0072] (Formula 1)
[0073] NewPU_LP_result may be the result to be verified. TargetPU_HP_result may be the first execution result. diff() may be any way of taking differences (difference, division, etc.). For example, diff() may determine the absolute value of the difference between two values. Thus, the absolute value of the difference between the result to be verified and the first execution result may be determined as the first difference result. It can be understood that operation S310 and operation S320 are the same or similar to the above-mentioned operation S310 and operation S320, and the present disclosure will not be repeated here.
[0074] Next, based on the at least one first difference result and the at least one second difference result, an accuracy evaluation result may be determined, which will be described below.
[0075] In operation S331 , at least one task to be verified is determined according to at least one first difference result and at least one second difference result.
[0076] In the embodiment of the present disclosure, the second difference result may be determined according to the first execution result and the second execution result. The second execution result is obtained by the target computing device executing at least one initial task according to the to-be-processed data of the first precision.
[0077] In the embodiment of the present disclosure, the second difference result diff_a may be determined according to the following formula:
[0078] (Formula 2)
[0079] TargetPU_LP_result may be the second execution result. As described above, diff() may be any way of taking the difference (taking the difference, dividing, etc.). For example, diff() may determine the absolute value of the difference between two values. Thus, the second difference result may be the absolute value of the difference between the second execution result and the first execution result.
[0080] In the embodiment of the present disclosure, the initial task whose first difference result is greater than the second difference result is determined as the task to be verified. For example, the initial task whose diff_b is greater than diff_a can be used as the task to be verified. The number of tasks to be verified may be less than or equal to the number of initial tasks. Through the embodiment of the present disclosure, if the result obtained by the target computing device based on high-precision data (such as the first execution result mentioned above) is taken as the true value, the smaller the difference with the true value, the higher the precision of the relevant device. In addition, when determining the task to be verified, the results obtained by different computing devices based on low-precision data are used, so that the task to be verified can be quickly identified, so as to quickly solve the hardware precision problem.
[0081] In operation S332 , at least one target task corresponding to at least one task to be verified is used to replace at least one task to be verified in the task set to obtain a replaced task set.
[0082] In an embodiment of the present disclosure, the task to be verified can be replaced by the target task to conduct an ablation experiment. For example, based on a black and white list mechanism, the target task can be executed by the target computing device, and the initial task can be executed by the computing device to be tested. In this case, the operation or operator corresponding to the target task can be the same as the initial task. For another example, the task to be verified can correspond to multiple target tasks. The task to be verified can correspond to multiple more complex operations, and the target task can correspond to a single operation. Multiple target tasks can be equivalent to the task to be verified. The cumulative error of multiple target tasks is less than or equal to the error of the task to be verified. In this case, the target task can be executed by the computing device to be tested, or by the target computing device. For another example, the target computing device may include a central processing unit. The central processing unit can execute the target task. For another example, the graphics processing unit can be remotely called to execute the target task. Through the embodiment of the present disclosure, an ablation experiment can be conducted to accurately determine the accuracy of the computing device to be tested.
[0083] Next, the replaced task set can be executed by at least one of the computing device to be tested and the target computing device to obtain the accuracy evaluation result of the computing device to be tested. For example, according to the test data, the replaced task set is executed by at least one of the computing device to be tested and the target computing device to obtain the test result. The test data may include at least one of the first test data and the second test data. The second test data is the data of the to-be-deployed scenario of the computing device to be tested, and the to-be-deployed scenario includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario. It can be understood that the second test data is the same or similar to the above-mentioned second training data, and the present disclosure will not be repeated here.
[0084] In operation S333 , the replaced task set is executed using at least one of the computing device under test and the target computing device according to the first test data.
[0085] In the embodiment of the present disclosure, according to the first test data, at least one of the computing device under test and the target computing device is used to execute the replaced task set to obtain a first test result. For example, the computing device under test can execute the initial task in the replaced task set. The target computing device can execute the target task in the replaced task set.
[0086] In operation S334 , the replaced task set is executed using at least one of the computing device under test and the target computing device according to the second test data.
[0087] In the embodiment of the present disclosure, according to the second test data, a second test result can be obtained by executing the replaced task set using at least one of the computing device to be tested and the target computing device.
[0088] Next, based on the test result, the test loss can be determined. In response to determining that the test loss has not converged, the accuracy assessment result can be determined to be a first accuracy assessment result. In response to determining that the test loss has converged, the accuracy assessment result can be determined to be a second accuracy assessment result. The first accuracy assessment result can indicate that the accuracy of the computing device to be tested is low. The second accuracy assessment result can indicate that the accuracy of the computing device to be tested is high. The test loss may include at least one of the first test loss and the second test loss. The first test loss may correspond to the first test result. The second test loss may correspond to the second test result. This will be described below in conjunction with operations S335 to S337.
[0089] In operation S335 , it is determined whether the first test loss and the second test loss converge.
[0090] In the embodiment of the present disclosure, in response to determining that the first test loss or the second test loss is converged, operation S336 may be performed. In response to determining that the first test loss or the second test loss is not converged, operation S337 may be performed.
[0091] In operation S336, the accuracy evaluation result is determined to be a first accuracy evaluation result. For example, based on the first accuracy evaluation result, it can be determined that the accuracy of the computing device to be tested is low, and the hardware architecture of the computing device to be tested can be adjusted, or higher-precision data (such as FP32) can be used to perform the task, or the target computing device can be used to perform the above-mentioned task to be verified during the task execution to alleviate the accuracy problem.
[0092] In operation S337, the accuracy evaluation result is determined to be a second accuracy evaluation result. For example, based on the second accuracy evaluation result, it can be determined that the accuracy of the computing device under test meets the requirement. The computing device under test can be connected to a deep learning framework.
[0093] It is understood that after the above operation S336, if it is determined that the accuracy evaluation result is the first accuracy evaluation result, it is possible to return to operation S310 or S331 to redetermine one or more tasks to be verified. Next, operations S331 to S335 may be repeated multiple times to comprehensively and accurately evaluate the accuracy of the computing device to be tested. It is understood that a threshold value for the number of repeated executions may be set, or the execution may be terminated after the accuracy evaluation result is determined to be the second accuracy evaluation result.
[0094] It can be understood that the above is an example in which the training data includes one of the first training data and the second training data to illustrate the present disclosure. However, the present disclosure is not limited thereto, and the training data may include only the first training data or only the second training data. Accordingly, the training loss may also include only the first training loss and the second training loss. Operation S306 or operation S337 may be performed according to the first training loss. Operation S306 or operation S337 may also be performed according to the second training loss.
[0095] It can be understood that the above is an example in which the training data includes one of the first test data and the second test data to illustrate the present disclosure. However, the present disclosure is not limited thereto, and the test data may include only the first test data or only the second test data. Accordingly, the test loss may also include only the first test loss and the second test loss. Operation S336 or operation S337 may be performed according to the first test loss. Operation S336 or operation S337 may also be performed according to the second test loss.
[0096] It can be understood that the target computing device may include a graphics processing unit, may include a central processing unit, or may be a heterogeneous device consisting of a graphics processing unit and a central processing unit.
[0097] It can be understood that the initial tasks whose first difference result is greater than the second difference result are taken as the tasks to be verified. However, the present disclosure is not limited thereto, and the tasks can also be sorted according to the difference between the first difference result and the second difference result. One or more tasks with larger difference values are taken as the tasks to be verified.
[0098] It can be understood that the method of the present disclosure is described above, and the device of the present disclosure will be described below.
[0099] Figure 4 is a block diagram of a task execution device according to an embodiment of the present disclosure.
[0100] like Figure 4 As shown, the device 400 may include an execution module 410 , a determination module 420 and an acquisition module 430 .
[0101] The execution module 410 is used to execute at least one initial task in the task set using the computing device under test according to the to-be-processed data of the first precision of the verification data set, and obtain a to-be-verified result of the at least one initial task.
[0102] The determination module 420 is configured to determine at least one first difference result according to at least one result to be verified and at least one first execution result.
[0103] In the embodiment of the present disclosure, at least one first execution result is obtained by the target computing device executing at least one initial task based on the to-be-processed data of the second precision of the verification data set.
[0104] The obtaining module 430 is used to obtain the accuracy evaluation result of the computing device to be tested according to the at least one first difference result and the at least one second difference result.
[0105] In an embodiment of the present disclosure, at least one second difference result is determined based on at least one first execution result and at least one second execution result, and at least one second execution result is obtained by the target computing device executing at least one initial task based on the first precision data to be processed.
[0106] In some embodiments, the execution module is also used to: in response to determining that at least one training loss has not converged, use the computing device under test to execute at least one initial task in the task set based on the processed data of the first precision of the verification data set, wherein the training loss is obtained based on the output result, and the output result is obtained by the computing device under test executing the task set based on the training data.
[0107] In some embodiments, the training loss includes at least one of a first training loss and a second training loss, the first training loss is obtained according to a first output result, and the first output result is obtained by the computing device under test performing multiple initial tasks according to the first training data. The second training loss is obtained according to a second output result, and the second output result is obtained by the computing device under test performing multiple initial tasks according to the second training data, and the second training data is data of a to-be-deployed scenario of the computing device under test, and the to-be-deployed scenario includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario.
[0108] In some embodiments, the determination module includes: a first determination submodule, configured to determine the absolute value of the difference between the result to be verified and the first execution result as the first difference result. The second difference result is the absolute value of the difference between the first execution result and the second execution result.
[0109] In some embodiments, the acquisition module includes: a second determination submodule, which is used to determine at least one task to be verified from at least one initial task based on at least one first difference result and at least one second difference result. The number of tasks to be verified is less than or equal to the number of initial tasks. A replacement submodule, which is used to replace at least one task to be verified in a task set with at least one target task corresponding to at least one task to be verified, and obtain a replaced task set. An acquisition submodule, which is used to execute the replaced task set using at least one of the computing device to be tested and the target computing device, and obtain an accuracy evaluation result of the computing device to be tested. The computing device to be tested is used to execute at least one of the initial task and the target task in the replaced task set, and the target computing device is used to execute the target task in the replaced task set.
[0110] In some embodiments, the second determination submodule is further used to: determine the initial task whose first difference result is greater than the second difference result as the task to be verified.
[0111] In some embodiments, the obtaining submodule includes: a first obtaining unit, configured to obtain a test result by executing a replaced task set using at least one of the computing device to be tested and the target computing device according to the test data. A second obtaining unit, configured to obtain a test loss according to the test result. A first determining unit, configured to determine that the accuracy evaluation result is a first accuracy evaluation result in response to determining that the test loss has not converged. The first accuracy evaluation result is used to indicate that the accuracy of the computing device to be tested is low.
[0112] In some embodiments, the obtaining submodule further includes: a second determining unit, configured to determine, in response to determining that the test loss converges, that the accuracy evaluation result is a second accuracy evaluation result. The second accuracy evaluation result is used to indicate that the accuracy of the computing device to be tested is high.
[0113] In some embodiments, the test data includes at least one of first test data and second test data, the second test data is data of a to-be-deployed scenario of the computing device to be tested, and the to-be-deployed scenario includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario. The first obtaining unit also includes at least one of the following: a first obtaining subunit, for executing a replaced task set using at least one of the computing device to be tested and the target computing device according to the first test data to obtain a first test result. A second obtaining subunit, for executing a replaced task set using at least one of the computing device to be tested and the target computing device according to the second test data to obtain a second test result.
[0114] In some embodiments, the test loss includes at least one of a first test loss and a second test loss, the first test loss corresponds to the first test result, and the second test loss corresponds to the second test result.
[0115] In some embodiments, at least one of the following is further included: a first adjustment module, configured to adjust the hyperparameters used by the target computing device to execute the task set according to the hyperparameters used by the target computing device to execute the task set. A second adjustment module, configured to adjust the distributed strategy used by the target computing device to execute the task set according to the distributed strategy used by the target computing device to execute the task set.
[0116] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0117] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0118] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0119] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0120] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0121] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the task execution method. For example, in some embodiments, the task execution method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the task execution method described above may be executed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the task execution method in any other appropriate manner (eg, by means of firmware).
[0122] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories (EPROM) or flash memories, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0126] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
[0127] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0129] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A task execution method, comprising: Execute at least one initial task in the task set using the computing device under test according to the to-be-processed data of the first precision of the verification data set, and obtain a to-be-verified result of at least one of the initial tasks; Determine at least one first difference result according to at least one of the results to be verified and at least one first execution result, wherein at least one of the first execution results is obtained by the target computing device executing at least one of the initial tasks according to the data to be processed of the second precision of the verification data set; Based on at least one of the first difference results and at least one of the second difference results, an accuracy evaluation result of the computing device under test is obtained, wherein at least one of the second difference results is determined based on at least one of the first execution results and at least one of the second execution results, and at least one of the second execution results is obtained by the target computing device executing at least one of the initial tasks based on the data to be processed with the first accuracy.
2. The method according to claim 1, wherein: The step of executing at least one initial task in the task set using the computing device under test according to the to-be-processed data of the first precision of the verification data set comprises: In response to determining that at least one training loss has not converged, based on the processed data of the first precision of the verification data set, at least one of the initial tasks in the task set is executed using the computing device under test, wherein the training loss is obtained based on the output result, and the output result is obtained by the computing device under test executing the task set based on the training data.
3. The method according to claim 1, wherein: The training loss includes at least one of a first training loss and a second training loss, The first training loss is obtained according to a first output result, wherein the first output result is obtained by the computing device under test executing a plurality of the initial tasks according to the first training data, The second training loss is obtained based on the second output result, and the second output result is obtained by the computing device under test performing multiple initial tasks according to the second training data, and the second training data is data of the scenario to be deployed of the computing device under test, and the scenario to be deployed includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario.
4. The method according to claim 1, wherein: The determining at least one first difference result according to at least one of the results to be verified and at least one first execution result comprises: Determine the absolute value of the difference between the result to be verified and the first execution result as the first difference result; The second difference result is an absolute value of a difference between the first execution result and the second execution result.
5. The method according to claim 1, wherein: The obtaining, according to at least one of the first difference results and at least one of the second difference results, an accuracy evaluation result of the computing device to be tested comprises: Determining at least one task to be verified from at least one of the initial tasks according to at least one of the first difference results and at least one of the second difference results, wherein the number of the tasks to be verified is less than or equal to the number of the initial tasks; Using at least one target task corresponding to at least one of the tasks to be verified, replacing at least one of the tasks to be verified in the task set, to obtain a replaced task set; Utilize at least one of the computing device under test and the target computing device to execute the replaced task set to obtain an accuracy evaluation result of the computing device under test, wherein the computing device under test is used to execute at least one of the initial task and the target task in the replaced task set, and the target computing device is used to execute the target task in the replaced task set.
6. The method according to claim 5, wherein: Determining at least one task to be verified from at least one of the initial tasks comprises: The initial task whose first difference result is greater than the second difference result is determined as the task to be verified.
7. The method according to claim 5, wherein: The step of using at least one of the computing device under test and the target computing device to execute the replaced task set to obtain the accuracy evaluation result of the computing device under test comprises: According to the test data, using at least one of the computing device to be tested and the target computing device to execute the replaced task set to obtain a test result; According to the test results, the test loss is obtained; In response to determining that the test loss has not converged, the accuracy assessment result is determined to be a first accuracy assessment result, wherein the first accuracy assessment result is used to indicate that the accuracy of the computing device under test is low.
8. The method according to claim 7, wherein: The step of using the computing device under test and the target computing device to execute the replaced task set to obtain an accuracy evaluation result of the computing device under test further comprises: In response to determining that the test loss has converged, the accuracy evaluation result is determined to be a second accuracy evaluation result, wherein the second accuracy evaluation result is used to indicate that the accuracy of the computing device under test is high.
9. The method according to claim 7 or 8, wherein: The test data includes at least one of first test data and second test data, the second test data is data of a to-be-deployed scenario of the computing device to be tested, the to-be-deployed scenario includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario, The step of executing the replaced task set using the computing device to be tested and the target computing device according to the test data set to obtain a test result comprises at least one of the following operations: executing the replaced task set using at least one of the computing device to be tested and the target computing device according to the first test data to obtain a first test result; According to the second test data, the replaced task set is executed using at least one of the computing device under test and the target computing device to obtain a second test result.
10. The method according to claim 7, wherein: The test loss includes at least one of a first test loss and a second test loss, the first test loss corresponds to the first test result, and the second test loss corresponds to the second test result.
11. The method according to claim 1, further comprising at least one of the following: According to the hyper-parameters used by the target computing device to execute the task set, adjusting the hyper-parameters used by the computing device under test to execute the task set; According to the distributed strategy used by the target computing device to execute the task set, the distributed strategy used by the computing device under test to execute the task set is adjusted.
12. A task execution device, comprising: An execution module, configured to execute at least one initial task in a task set using a computing device to be tested according to the data to be processed of the first precision of the verification data set, and obtain a result to be verified of at least one of the initial tasks; a determination module, configured to determine at least one first difference result according to at least one of the results to be verified and at least one first execution result, wherein at least one of the first execution results is obtained by a target computing device executing at least one of the initial tasks according to the data to be processed of the second precision of the verification data set; An acquisition module is used to obtain the accuracy evaluation result of the computing device under test based on at least one of the first difference results and at least one of the second difference results, wherein at least one of the second difference results is determined based on at least one of the first execution results and at least one of the second execution results, and at least one of the second execution results is obtained by the target computing device executing at least one of the initial tasks based on the first precision data to be processed.
13. The device according to claim 12, wherein: The execution module is also used for: In response to determining that at least one training loss has not converged, based on the processed data of the first precision of the verification data set, at least one of the initial tasks in the task set is executed using the computing device under test, wherein the training loss is obtained based on the output result, and the output result is obtained by the computing device under test executing the task set based on the training data.
14. The device according to claim 12, wherein: The training loss includes at least one of a first training loss and a second training loss, The first training loss is obtained according to a first output result, wherein the first output result is obtained by the computing device under test executing a plurality of the initial tasks according to the first training data, The second training loss is obtained based on the second output result, and the second output result is obtained by the computing device under test performing multiple initial tasks according to the second training data, and the second training data is data of the scenario to be deployed of the computing device under test, and the scenario to be deployed includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario.
15. The device according to claim 12, wherein: The determination module comprises: a first determining submodule, configured to determine an absolute value of a difference between the result to be verified and the first execution result as the first difference result; The second difference result is an absolute value of a difference between the first execution result and the second execution result.
16. The device according to claim 12, wherein: The acquisition module comprises: A second determining submodule, configured to determine at least one task to be verified from at least one of the initial tasks according to at least one of the first difference results and at least one of the second difference results, wherein the number of the tasks to be verified is less than or equal to the number of the initial tasks; a replacement submodule, configured to replace at least one of the tasks to be verified in the task set with at least one target task corresponding to at least one of the tasks to be verified, so as to obtain a replaced task set; An acquisition submodule is used to utilize at least one of the computing device under test and the target computing device to execute the replaced task set to obtain an accuracy evaluation result of the computing device under test, wherein the computing device under test is used to execute at least one of the initial task and the target task in the replaced task set, and the target computing device is used to execute the target task in the replaced task set.
17. The device according to claim 16, wherein: The second determining submodule is further used for: The initial task whose first difference result is greater than the second difference result is determined as the task to be verified.
18. The device according to claim 16, wherein: The obtaining submodule comprises: A first obtaining unit is used to execute the replaced task set using at least one of the computing device to be tested and the target computing device according to the test data to obtain a test result; A second obtaining unit is used to obtain a test loss according to the test result; The first determining unit is configured to determine, in response to determining that the test loss has not converged, that the accuracy assessment result is a first accuracy assessment result, wherein the first accuracy assessment result is used to indicate that the accuracy of the computing device to be tested is low.
19. The device according to claim 18, wherein: The obtaining submodule also includes: A second determining unit is configured to determine, in response to determining that the test loss converges, that the accuracy assessment result is a second accuracy assessment result, wherein the second accuracy assessment result is used to indicate that the accuracy of the computing device to be tested is high.
20. The device according to claim 18 or 19, wherein: The test data includes at least one of first test data and second test data, the second test data is data of a to-be-deployed scenario of the computing device to be tested, the to-be-deployed scenario includes at least one of an image processing scenario, a text processing scenario, and an audio processing scenario, The first obtaining unit further includes at least one of the following: A first obtaining subunit is configured to execute the replaced task set using at least one of the computing device to be tested and the target computing device according to the first test data to obtain a first test result; The second obtaining subunit is used to execute the replaced task set using at least one of the computing device to be tested and the target computing device according to the second test data to obtain a second test result.
21. The device according to claim 18, wherein The test loss includes at least one of a first test loss and a second test loss, the first test loss corresponds to the first test result, and the second test loss corresponds to the second test result.
22. The apparatus according to claim 12, further comprising at least one of the following: A first adjustment module, configured to adjust the hyper-parameters used by the computing device under test to execute the task set according to the hyper-parameters used by the target computing device to execute the task set; The second adjustment module is used to adjust the distributed strategy used by the computing device under test to execute the task set according to the distributed strategy used by the target computing device to execute the task set.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 11.
25. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.
