A method and device for automatically verifying NPU driver stability and performance
Through the automated NPU driver stability and performance verification method and device, the tedious problem of NPU card driver adaptability verification is solved, the test efficiency and accuracy are improved, the evaluation of computing power and power consumption is optimized, and the optimal driver firmware version is selected.
Patent Information
- Application Number
- CN202411560529.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In the existing technology, the driver and firmware adaptability verification process of the NPU card is cumbersome and lacks automation, resulting in low manual testing efficiency and inability to effectively analyze computing power and power consumption, affecting the stability and performance of the AI card.
A method and device for automatically verifying the stability and performance of NPU drivers are designed. Automated verification is achieved by automatically installing and uninstalling drivers and firmware using a host computer, a power controller, and a server under test, combined with computing power testing and power consumption analysis.
It realizes the automatic switching and testing of NPU drivers and firmware, improves the testing efficiency, ensures the compatibility between drivers and systems, provides an accurate assessment of actual computing power and power consumption, and selects the appropriate driver firmware version.
Smart Images

Figure CN119440927B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graphics card testing, and in particular to a method and device for automatically verifying NPU driver stability and performance. Background Art
[0002] NVIDIA's GPUs are rapidly developing in the AI field, and the development of AI cards is also progressing rapidly in China. Since AI primarily relies on matrix operations, Huawei has designed an AI chip specifically for this purpose—the Ascend series (NPU). NPU cards offer powerful performance in both training and inference. However, due to the wide variety of product models and rapid development, system, driver, and firmware compatibility with the cards is becoming increasingly important, significantly impacting the stability and performance of AI cards. While the hardware structure of NPU cards is fixed upon manufacture, driver and firmware updates are constantly updated. Due to the wide variety of card models and rapid version iterations, automated implementation and verification based on customer-specified systems and versions eliminates the need for manual verification. Manual testing of different driver and firmware versions is lengthy, and the uninstall and install processes are also lengthy and tedious. Furthermore, it lacks analysis of actual computing power and power consumption. This automated testing process, while covering traditional testing procedures, optimizes workflow and time, while also optimizing computing power and power consumption. Summary of the Invention
[0003] The present invention provides a method and a testing device for automatically verifying the stability and performance of an NPU driver, aiming to solve at least one of the technical problems existing in the prior art.
[0004] The technical solution of the present invention is a method for automatically verifying the stability and performance of an NPU driver. The method is run on a device for automatically verifying the stability and performance of an NPU driver. The device includes a host computer, a power controller, and a server to be tested. The server to be tested has at least one NPU card installed therein. The method includes the following steps:
[0005] S100: Install at least one NPU card into the server to be tested, connect a host computer and a power controller to the server to be tested, and connect the power controller to the host computer;
[0006] S200, the host computer starts the server under test by controlling the power controller, and the host computer controls the server under test to install the system and dependent packages;
[0007] S300: The host computer installs the driver and firmware on the server to be tested;
[0008] S400: The host computer performs an Int8 computing power test on the server to be tested after the driver and firmware are installed;
[0009] S500: The host computer performs a stress test on the server to be tested;
[0010] S600, the host computer controls the power controller to perform power-off and power-on operations on the server under test, and the server under test after restarting repeats steps S400 and S500, and then repeats step S600 a preset number of times before jumping to step S700;
[0011] S700: The host computer controls the server to be tested to install the next version of the driver and firmware;
[0012] S800: The host computer analyzes and collects statistical data.
[0013] Furthermore, the step S200 includes:
[0014] S210, the host computer controls the server to be tested to install an operating system, wherein the operating system includes at least OpenEuler 22.03SP3;
[0015] S220: The host computer controls the server to be tested to install a dependency library and a Python compilation library.
[0016] Furthermore, in step S220,
[0017] The dependent libraries include at least gcc, gcc-c++, make, cmake, unzip, zlib-devel, libffi-devel, openssl-devel, pciutils, net-tools, sqlite-devel, lapack-devel, gcc-gfortran and python3-devel;
[0018] Install Python compiled libraries including at least attrs, numpy, decorator, sympy, cffi, pyyaml, pathlib2, psutil, protobuf, scipy, requests, and absl-py.
[0019] Furthermore, the step S300 includes:
[0020] S310, use the scp command to copy and install the driver and firmware through two IP addresses;
[0021] S320, after installing the driver and firmware, install the toolkit and toolbox;
[0022] S330: The host computer verifies whether the driver and firmware are successfully installed through the npu-smi info command.
[0023] Furthermore, in step S400, the peak computing power of the NPU card is obtained by using the ascend-dmi -f -t int8 command.
[0024] Furthermore, the step S500 includes:
[0025] S510. Perform a stress test for a preset time by using the ascend-dmi -p -dur xx -it X -pm refresh command.
[0026] S520: Run stdbuf -oL npu-smi info watch -i 0 -c 0 >v1.log 2>&1 to collect statistics on the output computing power and calculate the average value and fluctuation range of the power consumption.
[0027] Furthermore, the step S700 includes:
[0028] S710. Execute Ascend-hdk-xxx.run --uninstall to first uninstall the firmware currently installed on the server under test, and then uninstall the driver currently installed on the server under test.
[0029] S720: Repeat step S300, and the host computer installs a new driver and new firmware on the server to be tested;
[0030] S730 , repeating steps S400 to S600 , wherein the host computer performs an Int8 computing power test, a stress test, and a preset number of power-off and power-on operations on the new driver and the new firmware newly installed on the server to be tested.
[0031] Furthermore, the step S800 includes:
[0032] S810, determining a power consumption floating error through a stress test;
[0033] S820. Determine average power consumption through stress testing.
[0034] S830, calculate the maximum computing power through the Int8 computing power test;
[0035] S840: Calculate the maximum energy consumption ratio based on the preset computing power weight and power consumption weight.
[0036] Furthermore, the present invention also proposes a device for automatically verifying NPU driver stability and performance, the device for automatically verifying NPU driver stability and performance is used to implement the method for automatically verifying NPU driver stability and performance, and the device for automatically verifying NPU driver stability and performance includes:
[0037] Host computer;
[0038] A power supply controller, wherein the host computer is electrically connected to the power supply controller;
[0039] The server to be tested, the host computer and the power controller are respectively connected to the server to be tested, the server to be tested is an X86 model server or an ARM model server, and the server to be tested includes at least a central processing unit, a memory bar, a PCIE slot and a hard disk;
[0040] At least one NPU card is installed in the server to be tested, and the NPU card is connected to the server to be tested via a PCIE interface.
[0041] Furthermore, the present invention also proposes a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the method of automatically verifying the stability and performance of the NPU driver is implemented.
[0042] The beneficial effects of the present invention are:
[0043] The method and device for automatically verifying NPU driver stability and performance can automatically switch between different versions of drivers and firmware, including installing and uninstalling drivers and firmware on the server under test. Using a power controller, they perform stress testing to verify driver and system compatibility and stability. The NPU card computing power is tested to obtain actual computing power, while also providing the ability to test and calculate floating power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flowchart of a method for automatically verifying NPU driver stability and performance.
[0045] Figure 2 This is a diagram of the connection control structure of a device that automatically verifies the stability and performance of the NPU driver.
[0046] Figure 3 This is a schematic diagram of the structure of a server under test in a device for automatically verifying the stability and performance of an NPU driver.
[0047] Figure 4 This is a schematic diagram of different versions of drivers and firmware, as well as tool sets and toolkit files in a method for automatically verifying NPU driver stability and performance.
[0048] Figure 5 This is a diagram of the driver and firmware folders in one version of the method for automatically verifying the stability and performance of the NPU driver, which contains the driver and firmware files of a specific version.
[0049] Figure 6 This is a schematic diagram of an implementation process of a method for automatically verifying NPU driver stability and performance.
[0050] Figure 7 This is a diagram showing how to automatically verify the stability and performance of the NPU driver, and verify whether the driver and firmware are successfully installed.
[0051] Figure 8 This is a schematic diagram of calculating peak computing power in a method for automatically verifying NPU driver stability and performance.
[0052] Figure 9 This diagram shows the difference in peak computing power results caused by different versions of drivers in the method for automatically verifying NPU driver stability and performance.
[0053] Figure 10 This is a schematic diagram of NPU usage in a method for automatically verifying NPU driver stability and performance.
[0054] Figure 11 This is a schematic diagram of the average power consumption and floating error of the NPU in the method for automatically verifying the stability and performance of the NPU driver. DETAILED DESCRIPTION
[0055] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other unless there is a conflict.
[0056] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, terms such as "upper," "lower," "left," "right," "top," and "bottom" used in this disclosure are intended solely to describe the relative positions of the components of the disclosure as shown in the accompanying drawings.
[0057] In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art. The terms used in this specification are only for describing specific embodiments and are not intended to limit the present invention. The term "and / or" as used herein includes any combination of one or more of the related listed items.
[0058] It should be understood that although the terms first, second, third, etc. may be used to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, a first element may also be referred to as a second element, and similarly, a second element may also be referred to as a first element without departing from the scope of the present disclosure.
[0059] Reference Figures 1 to 11 In some embodiments, the technical solution of the present invention is a method for automatically verifying the stability and performance of an NPU driver. The method for automatically verifying the stability and performance of an NPU driver is run on a device for automatically verifying the stability and performance of an NPU driver. The device for automatically verifying the stability and performance of an NPU driver includes a host computer, a power controller, and a server to be tested. The server to be tested is equipped with at least one NPU card. Figure 1 and Figure 6 The method for automatically verifying the stability and performance of the NPU driver includes the following steps:
[0060] S100: Install at least one NPU card into the server to be tested, connect a host computer and a power controller to the server to be tested, and connect the power controller to the host computer;
[0061] S200, the host computer starts the server under test by controlling the power controller, and the host computer controls the server under test to install the system and dependent packages;
[0062] S300: The host computer installs the driver and firmware on the server to be tested;
[0063] S400: The host computer performs an Int8 computing power test on the server to be tested after the driver and firmware are installed;
[0064] S500: The host computer performs a stress test on the server to be tested;
[0065] S600, the host computer controls the power controller to perform power-off and power-on operations on the server under test, and the server under test after restarting repeats steps S400 and S500, and then repeats step S600 a preset number of times before jumping to step S700;
[0066] S700: The host computer controls the server to be tested to install the next version of the driver and firmware;
[0067] S800: The host computer analyzes and collects statistical data.
[0068] The beneficial effects of the present invention are:
[0069] The method and device for automatically verifying NPU driver stability and performance can automatically switch between different versions of drivers and firmware, including installing and uninstalling drivers and firmware on the server under test. Using a power controller, they perform stress testing to verify driver and system compatibility and stability. The NPU card computing power is tested to obtain actual computing power, while also providing the ability to test and calculate floating power consumption.
[0070] The described method and apparatus for automatically verifying NPU driver stability and performance replaces manual verification testing, automating the stability of AI card drivers and firmware. The computing power test also considers power consumption and power consumption stability. When multiple versions and driver firmware are iterated, the most suitable driver firmware version can be selected.
[0071] Specifically, in step S100, the hardware is assembled to prepare a server to be tested (which can be an X86 model server - Powerleader self-developed server, or an ARM model server Kunpeng server) including major configurations such as CPU, memory, hard disk, and one or more NPU cards (depending on the customer's actual assembly requirements).
[0072] Furthermore, the step S200 includes:
[0073] S210, the host computer controls the server to be tested to install an operating system, wherein the operating system includes at least OpenEuler 22.03SP3;
[0074] S220: The host computer controls the server to be tested to install a dependency library and a Python compilation library.
[0075] Specifically, in step S200, the system and dependent packages are installed, the operating system required by the customer, such as OpenEuler 22.03SP3, is installed, and then the system dependent libraries and Python compilation library support are installed.
[0076] Including installing system dependent libraries: yum install -y gcc gcc-c++ make cmake unzip zlib-devel libffi-devel openssl-devel pciutils net-tools sqlite-devel lapack-develgcc-gfortran python3-devel
[0077] It also includes installing python3 dependent libraries:
[0078] pip3 install attrs
[0079] pip3 install numpy
[0080] pip3 install decorator
[0081] pip3 install sympy
[0082] pip3 install cffi
[0083] pip3 install pyyaml
[0084] pip3 install pathlib2
[0085] pip3 install psutil
[0086] pip3 install protobuf
[0087] pip3 install scipy
[0088] pip3 install requests
[0089] pip3 install absl-py
[0090] Furthermore, in step S220,
[0091] The dependent libraries include at least gcc, gcc-c++, make, cmake, unzip, zlib-devel, libffi-devel, openssl-devel, pciutils, net-tools, sqlite-devel, lapack-devel, gcc-gfortran and python3-devel;
[0092] Install Python compiled libraries including at least attrs, numpy, decorator, sympy, cffi, pyyaml, pathlib2, psutil, protobuf, scipy, requests, and absl-py.
[0093] Specifically, installing the dependent libraries includes at least the following commands:
[0094] yum install -y gcc gcc-c++ make cmake unzip zlib-devel libffi-developenssl-devel pciutils net-tools sqlite-devel lapack-devel gcc-gfortranpython3-devel.
[0095] Furthermore, the step S300 includes:
[0096] S310, use the scp command to copy and install the driver and firmware through two IP addresses;
[0097] S320, after installing the driver and firmware, install the toolkit and toolbox;
[0098] S330: The host computer verifies whether the driver and firmware are successfully installed through the npu-smi info command.
[0099] Specifically, install the driver and firmware: read the directory from the firmware source address, select the first version, and automatically install the driver and firmware (here is 6.0.1.alpha001), and then install the toolkit and toolbox. The specific implementation is to use the scp command to copy through two IP addresses, and then execute Ascend-hdk-xxx.run --full and Ascend-hdk-xxx.run –install.
[0100] Specifically, the Ascend environment dependency packages are described as follows. In addition to the operating system, the Ascend environment has four dependency packages. The method for automatically verifying the stability and performance of the Ascend NPU driver described above switches the driver and firmware versions, while the tool set and toolkit versions remain unchanged.
[0101] Reference Figure 4 , contains multiple different versions of drivers and firmware. Each round of testing installs the drivers and firmware in a folder in sequence. The two run files are the toolkit and toolbox respectively. These two run files do not need to be replaced and only need to be installed once.
[0102] Reference Figure 5 In a specific version of the driver and firmware folder, there are two files, namely the driver file and the firmware file.
[0103] Specifically, the included file types are as follows:
[0104] 1) Driver (multiple versions): Ascend-hdk-xxx-npu-dirver_xxxx.run
[0105] 2) Firmware (multiple versions): Ascend-hdk-xxx-npu-firmware_xxxx.run
[0106] 3) Toolkit (version unchanged): Ascend-cann-toolkit_xxx.run
[0107] 4) Toolbox (version unchanged): Ascend-mindx-toolbox_xxx.run
[0108] Specifically, refer to Figure 7 In step S330, npu-smi info is used to verify whether the driver and firmware are successfully installed. When the driver and firmware are successfully installed, the command line will have default npu-smi parameters. The hardware information can be viewed through npu-smi --help.
[0109] Furthermore, in step S400, the peak computing power of the Ascend NPU card is obtained by using the ascend-dmi -f -t int8 command.
[0110] Specifically, refer to Figure 8 , execute the ascend-dmi -f -t int8 command, which takes about 1.6 seconds and is recorded.
[0111] Reference Figure 9 After installing different versions of drivers and firmware, different computing power test results were obtained through the Int8 computing power test.
[0112] Further, refer to Figure 10 and Figure 11 , the step S500 includes:
[0113] S510. Perform a stress test for a preset time by using the ascend-dmi -p -dur xx -it X -pm refresh command.
[0114] S520: Run stdbuf -oL npu-smi info watch -i 0 -c 0 >v1.log 2>&1 to collect statistics on the output computing power and calculate the average value and fluctuation range of the power consumption.
[0115] Specifically, in step S510, referring to Figure 10Table 1 shows a 5-minute stress test result excerpt, which shows that the NPU utilization rate has reached 100%.
[0116] Table 1,
[0117] Among them, NpuID refers to the card serial number, ChipID refers to the serial number of the chip on the card, Pwr(W) refers to the power, Temp refers to the card temperature, AI core refers to the load of the AI chip, AI CPU refers to the load of the logic chip on the card, Ctrl cpu refers to the load of the control CPU, Memory refers to the usage ratio of the video memory, and Memory BW refers to the ratio of the video memory bandwidth.
[0118] In step S520, the average power consumption, maximum power consumption, minimum power consumption and floating error are obtained by executing the following code:
[0119] fh = open('v1.log')
[0120] l= []
[0121] def is_number(s):
[0122] try:
[0123] float(s)
[0124] return True
[0125] except ValueError:
[0126] pass
[0127] try:
[0128] import unicodedata
[0129] unicodedata.numeric(s)
[0130] return True
[0131] except (TypeError, ValueError):
[0132] pass
[0133] return False
[0134] for index ,lx in enumerate(fh):
[0135] if index >= 20:
[0136] power = lx.rstrip().split()[2]
[0137] if is_number(power):
[0138] l.append(float(power))
[0139] fh.close()
[0140] print("The average power consumption is:" + str(sum(l) / len(l))+ "w")
[0141] print("Maximum power consumption:" + str(max(l))+ "w")
[0142] print("Minimum power consumption:" + str(min(l))+ "w")
[0143] diff_max = (max(l) - min(l)) / ((max(l) + min(l) / 2))
[0144] print("Floating error: " + str(diff_max))
[0145] In step S600, the preset number of times of re-execution of step S600 is set to 5 or 6. The main verification has two functions: the first is the stability verification of the drive, and the second is the repeated verification of the test data to ensure the accuracy of the data.
[0146] Further, the step S700 includes: referring to Figure 11 , the average value and floating range of power consumption are automatically analyzed through Python scripts.
[0147] S710. Execute Ascend-hdk-xxx.run –uninstall to first uninstall the firmware currently installed on the server under test, and then uninstall the driver currently installed on the server under test.
[0148] S720: Repeat step S300, and the host computer installs a new driver and new firmware on the server to be tested;
[0149] S730 , repeating steps S400 to S600 , wherein the host computer performs an Int8 computing power test, a stress test, and a preset number of power-off and power-on operations on the new driver and the new firmware newly installed on the server to be tested.
[0150] Furthermore, the step S800 includes:
[0151] S810, determining a power consumption floating error through a stress test;
[0152] S820. Determine average power consumption through stress testing.
[0153] S830, calculate the maximum computing power through the Int8 computing power test;
[0154] S840: Calculate the maximum energy consumption ratio based on the preset computing power weight and power consumption weight.
[0155] Specifically, in step S840, the energy efficiency ratio is calculated based on the computing power weight parameter W and the power consumption weight parameter Y. In a specific embodiment, the energy efficiency ratio = (computing power * W) / (power consumption * Y).
[0156] Furthermore, the present invention also proposes a device for automatically verifying NPU driver stability and performance, the device for automatically verifying NPU driver stability and performance is used to implement the method for automatically verifying NPU driver stability and performance, and the device for automatically verifying NPU driver stability and performance includes:
[0157] Host computer;
[0158] A power supply controller, wherein the host computer is electrically connected to the power supply controller;
[0159] The server to be tested, the host computer and the power controller are respectively connected to the server to be tested, the server to be tested is an X86 model server or an ARM model server, and the server to be tested includes at least a central processing unit, a memory bar, a PCIE slot and a hard disk;
[0160] At least one NPU card is installed in the server to be tested, and the NPU card is connected to the server to be tested via a PCIE interface.
[0161] Specifically, refer to Figure 2 First of all, when testing the NPU card, you need to assemble the hardware structure of the NPU card. The Ascend NPU card is generally connected via PCIE. Therefore, when installing, you can directly insert the NPU card into the PCIE slot of the server to be tested.
[0162] Reference Figure 3 The server to be tested includes at least a central processing unit, a memory bar, a PCIE slot and a hard disk.
[0163] Reference Figure 3The communication relationship between the CPU, NPU, memory, and hardware is supplemented as follows: First, the calculated data is stored on the hard disk. The program executes and reads the data into memory for temporary storage. The data is then copied from memory to the NPU card's video memory, where the NPU's AI core performs the calculations. Once the calculation results are obtained, they are copied back to system memory from the NPU card's video memory for subsequent data processing (data storage and non-convolution operations on the CPU side).
[0164] Furthermore, the present invention also proposes a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the method of automatically verifying the stability and performance of the NPU driver is implemented.
[0165] In a specific embodiment, the power controller is a model XC3006 from Teprius Technology, with a power of 2500W. Some Chinese annotations are as follows:
[0166] NPU: Huawei's Ascend card.
[0167] ascend-dmi and npu-smi: Huawei Ascend software commands.
[0168] stdbuf: is a Linux system command.
[0169] Furthermore, the present invention also provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the USB interface power automatic testing method is implemented.
[0170] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the aforementioned embodiments. As long as the technical effects of the present invention are achieved by the same means, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure. Within the scope of protection of the present invention, its technical solutions and / or implementation methods may be modified and varied in various ways.
Claims
1. A method for automatically verifying NPU driver stability and performance, wherein the method is run on a device for automatically verifying NPU driver stability and performance, the device comprising a host computer, a power controller, and a server to be tested, wherein at least one NPU card is installed in the server to be tested, and wherein: The method for automatically verifying the stability and performance of the NPU driver includes the following steps: S100: Install at least one NPU card into the server to be tested, connect a host computer and a power controller to the server to be tested, and connect the power controller to the host computer; S200, the host computer starts the server under test by controlling the power controller, and the host computer controls the server under test to install the system and dependent packages; S300: The host computer installs the driver and firmware on the server to be tested; S400: The host computer performs an Int8 computing power test on the server to be tested after the driver and firmware are installed; S500: The host computer performs a stress test on the server to be tested; S600, the host computer controls the power controller to perform power-off and power-on operations on the server under test, and the server under test after restarting repeats steps S400 and S500, and then repeats step S600 a preset number of times before jumping to step S700; S700: The host computer controls the server to be tested to install the next version of the driver and firmware; S800: The host computer analyzes and collects statistical data.
2. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: The step S200 includes: S210, the host computer controls the server to be tested to install an operating system, wherein the operating system includes at least OpenEuler 22.03SP3; S220: The host computer controls the server to be tested to install a dependency library and a Python compilation library.
3. The method for automatically verifying NPU driver stability and performance according to claim 2, characterized in that: In the step S220, The dependent libraries include at least gcc, gcc-c++, make, cmake, unzip, zlib-devel, libffi-devel, openssl-devel, pciutils, net-tools, sqlite-devel, lapack-devel, gcc-gfortran and python3-devel; Install Python compiled libraries including at least attrs, numpy, decorator, sympy, cffi, pyyaml, pathlib2, psutil, protobuf, scipy, requests, and absl-py.
4. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: The step S300 includes: S310, use the scp command to copy and install the driver and firmware through two IP addresses; S320, after installing the driver and firmware, install the toolkit and toolbox; S330: The host computer verifies whether the driver and firmware are successfully installed through the npu-smi info command.
5. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: In step S400, the peak computing power of the NPU card is obtained by using the ascend-dmi -f -t int8 command.
6. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: The step S500 includes: S510. Perform a stress test for a preset time by using the ascend-dmi -p -dur xx -it X -pm refresh command. S520: Run stdbuf -oL npu-smi info watch -i 0 -c 0 >v1.log 2>&1 to collect statistics on the output computing power and calculate the average value and fluctuation range of the power consumption.
7. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: The step S700 includes: S710. Execute Ascend-hdk-xxx.run –uninstall to first uninstall the firmware currently installed on the server under test, and then uninstall the driver currently installed on the server under test. S720: Repeat step S300, and the host computer installs a new driver and new firmware on the server to be tested; S730 , repeating steps S400 to S600 , wherein the host computer performs an Int8 computing power test, a stress test, and a preset number of power-off and power-on operations on the new driver and the new firmware newly installed on the server to be tested.
8. The method for automatically verifying NPU driver stability and performance according to claim 1, characterized in that: The step S800 includes: S810, determining a power consumption floating error through a stress test; S820. Determine average power consumption through stress testing. S830, calculate the maximum computing power through the Int8 computing power test; S840: Calculate the maximum energy consumption ratio based on the preset computing power weight and power consumption weight.
9. A device for automatically verifying NPU driver stability and performance, characterized in that: The device for automatically verifying the stability and performance of the NPU driver is used to implement the method for automatically verifying the stability and performance of the NPU driver as claimed in any one of claims 1 to 8. The device for automatically verifying the stability and performance of the NPU driver includes: Host computer; A power supply controller, wherein the host computer is electrically connected to the power supply controller; The server to be tested, the host computer and the power controller are respectively connected to the server to be tested, the server to be tested is an X86 model server or an ARM model server, and the server to be tested includes at least a central processing unit, a memory bar, a PCIE slot and a hard disk; At least one NPU card is installed in the server to be tested, and the NPU card is connected to the server to be tested via a PCIE interface. 10 . A computer-readable storage medium having program instructions stored thereon, wherein the program instructions are executed by a processor to implement the method according to claim 1 .
Citation Information
Patent Citations
NPU type server power consumption test method and system
CN112069022A
Data source fault processing method and system based on AI server redundant system
CN118394576A