Accelerator card test method and system, computer equipment and readable storage medium
By automatically obtaining and loading accelerator card configuration information, the problems of redundant and errors in traditional accelerator card testing are solved, and the testing efficiency and reliability are improved.
Patent Information
- Application Number
- CN202411212890.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
AI Technical Summary
The testing process of traditional accelerator cards is tedious, and testers need to manually configure the accelerator cards, which are prone to problems such as version errors, resulting in inefficient testing.
Provides an accelerator card testing method and system, which can obtain target configuration information by obtaining the accelerator card category, querying the test configuration table, and automatically loading the operating system and the basic input and output system version of the graphics card to realize the automatic configuration and testing of the accelerator card.
The automation of accelerator card testing is realized, reducing the risk of manual configuration errors, improving testing efficiency and reliability, and reducing testing burden.
Smart Images

Figure CN119201563A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an accelerator card testing method, an accelerator card testing system, a computer device, and a computer-readable storage medium. Background Art
[0002] With the significant development of accelerator cards in recent years, the demand for accelerator card production testing has also increased. Among them, stress testing usually requires accelerator cards to run in a cycle to test the stability of the accelerator card.
[0003] In traditional accelerator card testing, relevant testers are usually required to configure the accelerator cards and update the system version. Since the operation of different accelerator cards is relatively different, testers are required to consult relevant manuals according to the specific accelerator cards to configure the operating environment of the accelerator card, such as the accelerator card system. The operation is relatively cumbersome and prone to problems such as version errors in the loading system. Summary of the invention
[0004] Based on this, it is necessary to provide an accelerator card testing method, an accelerator card testing system, a computer device and a computer-readable storage medium to address the above technical problems, which can automatically complete the configuration of the accelerator card to be tested and realize the automation of accelerator card testing.
[0005] On the one hand, an accelerator card testing method is provided, and the accelerator card testing method includes: in response to obtaining an accelerator card test instruction, obtaining the accelerator card category of the accelerator card to be tested as the current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information; querying the accelerator card configuration information associated with the current category in the test configuration table as target configuration information; identifying a target accelerator card configuration included in the target configuration information, obtaining a loading file of the target accelerator card configuration, and loading it into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0006] In one embodiment of the present application, the acceleration card configuration information includes the operating system of the acceleration card; obtaining the loading file of the target acceleration card configuration includes: obtaining the operating system that is targeted to be loaded by the acceleration card to be tested in the current test as the first target version; querying the operating systems pre-deployed in the operating system library, obtaining the target operating system that matches the first target version, and controlling the acceleration card to be tested to load the target operating system to load the test file in the target operating system environment; wherein the test file includes at least one of the acceleration card driver and the test tool.
[0007] In one embodiment of the present application, the acceleration card configuration information includes the version information of the graphics card basic input and output system of the acceleration card; obtaining the loading file configured by the target acceleration card includes: in response to the acceleration card to be tested having loaded the test file, obtaining the version information of the graphics card basic input and output system that is targeted to be loaded by the acceleration card to be tested in the current test; using the obtained version information of the graphics card basic input and output system that is targeted to be loaded as the second target version; using the query instruction that matches the current category of the acceleration card to be tested to query the current version of the acceleration card to be tested; comparing the current version with the second target version; in response to the current version not matching the second target version, querying the graphics card interface control library to obtain the version information of the loading file of the graphics card basic input and output system that is pre-stored; obtaining the loading file of the graphics card basic input and output system whose version information matches the second target version as the file to be loaded; loading the file to be loaded to the acceleration card to be tested, so that the acceleration card to be tested loads the graphics card basic input and output system that matches the target configuration information in the test configuration table, so as to refresh the version of the graphics card basic input and output system of the accelerator card to be tested.
[0008] In one embodiment of the present application, after identifying the target accelerator card configuration included in the target configuration information, it also includes: in response to the target configuration information not including the version information of the graphics card basic input and output system of the target loaded graphics card, determining that the current category of the accelerator card to be tested does not constrain the graphics card basic input and output system version of the test process; allowing the accelerator card to be tested to be tested; and / or, after testing the loaded accelerator card to be tested, it also includes: in response to the target configuration information including the product version information of the graphics card basic input and output system, determining whether the accelerator card to be tested has completed the test; in response to the accelerator card to be tested completing the test, querying the graphics card interface control library to obtain the loading file of the graphics card basic input and output system matching the product version information, and loading it to the accelerator card to be tested.
[0009] In one embodiment of the present application, testing the loaded accelerator card to be tested includes: in response to the completion of the current stress test, obtaining test results and / or test logs as test records; wherein the test results of the stress test are both failure and success, allowing the formation of test records; uploading the test records to a test record library; counting the number of test records in the test record library; in response to the number of test records matching a preset number of tests, determining that the accelerator card to be tested has completed the stress test; in response to the number of test records not reaching the preset number of tests, executing the next stress test.
[0010] In one embodiment of the present application, before testing the loaded accelerator card to be tested, the method further includes: generating a test mode selection request; wherein the test mode includes an automatic test mode and a manual test mode, and the automatic test mode indicates that the next stress test is automatically performed after the current test is completed; in response to meeting the automatic test conditions, determining to perform an automatic test on the accelerator card to be tested; wherein the automatic test conditions include: obtaining an automatic test indication based on the test mode selection request, or failing to obtain an instruction to respond to the test mode selection request within a preset time period.
[0011] On the other hand, an acceleration card testing system is provided, which includes a connection module and a testing device; the connection module is used to connect to the acceleration card to be tested; the testing device is connected to the connection module to implement the steps of the acceleration card testing method as described in any of the above embodiments.
[0012] In one embodiment of the present application, the accelerator card testing system also includes a server; the server is connected to the test device and is used to store a test configuration table; the server is also used to store each preset version of the accelerator card configuration file and / or test record; wherein the accelerator card configuration file includes at least one of the accelerator card operating system, the loading file of the graphics card basic input and output system, and the test file; wherein the test file includes at least one of the accelerator card driver and the test tool; the test device accesses the server based on the test configuration table to obtain the target accelerator card configuration of the target accelerator card configuration to be tested in the target configuration information; the target accelerator card configuration includes at least one of the target operating system, the loading file of the graphics card basic input and output system, and the test file.
[0013] On the other hand, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: in response to obtaining an accelerator card test instruction, obtaining the accelerator card category of the accelerator card to be tested as the current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and the accelerator card configuration information associated therewith; querying the accelerator card configuration information associated with the current category in the test configuration table as the target configuration information; identifying the target accelerator card configuration included in the target configuration information, obtaining the loading file of the target accelerator card configuration, and loading it into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0014] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: in response to obtaining an accelerator card test instruction, obtaining the accelerator card category of the accelerator card to be tested as the current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information; querying the accelerator card configuration information associated with the current category in the test configuration table as the target configuration information; identifying the target accelerator card configuration included in the target configuration information, obtaining the loading file of the target accelerator card configuration, and loading it on the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0015] The above-mentioned accelerator card testing method, accelerator card testing system, computer device and computer-readable storage medium can pre-establish a test configuration table including accelerator card categories and their associated accelerator card configuration information. In this way, when obtaining a test instruction for testing the accelerator card to be tested, the test configuration table can be queried to obtain the target configuration information suitable for the accelerator card to be tested, and the loading file of the target accelerator card configuration is obtained based on the target configuration information, and the loading file is loaded into the accelerator card to be tested, thereby realizing the automation of the configuration of the accelerator card to be tested. Therefore, the test is performed based on the loaded accelerator card to be tested to realize the automation of accelerator card testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of an embodiment of the accelerator card testing method of the present application;
[0017] Figure 2 It is a flowchart of another embodiment of the accelerator card testing method of the present application;
[0018] Figure 3 yes Figure 2 A command line diagram of an embodiment of an acceleration card testing method is shown;
[0019] Figure 4 This is a command line diagram of an embodiment of a test configuration table of the present application;
[0020] Figure 5 It is a flowchart of another embodiment of the accelerator card testing method of the present application;
[0021] Figure 6 It is a structural schematic diagram of an embodiment of an accelerator card testing system of the present application;
[0022] Figure 7 It is a structural schematic diagram of another embodiment of the accelerator card testing system of the present application;
[0023] Figure 8 It is a structural diagram of an embodiment of a computer device of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0025] In order to solve the technical problem of the cumbersome accelerator card testing process existing in the related art, the present application provides an accelerator card testing method, an accelerator card testing system, a computer device and a computer-readable storage medium. The accelerator card testing method includes obtaining the accelerator card category of the accelerator card to be tested as the current category in response to obtaining an accelerator card test instruction; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information; querying the accelerator card configuration information associated with the current category in the test configuration table as the target configuration information; identifying the target accelerator card configuration included in the target configuration information, obtaining the loading file of the target accelerator card configuration, and loading it on the accelerator card to be tested, so as to test the loaded accelerator card to be tested. The specific structure and detailed working principle of the present application are described below with examples.
[0026] See also Figure 1 , Figure 1 It is a flow chart of an embodiment of the accelerator card testing method of the present application. It should be noted that the accelerator card testing method of the present application can also be applied to network cards, etc., which is not limited here.
[0027] S101: In response to obtaining an accelerator card test instruction, obtaining an accelerator card category of an accelerator card to be tested as a current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information.
[0028] In this embodiment, the acceleration card to be tested is an acceleration card that currently needs to be tested.
[0029] The accelerator card test instruction is used to instruct an accelerator card to be tested to perform an accelerator card test such as an accelerator card stress test.
[0030] The test configuration table is created and maintained in advance (or maintained in real time based on the accelerator card test process), which includes the accelerator card categories that support automated testing in the accelerator card test method, and the accelerator card configuration related information that needs to be loaded during the test process for the accelerator card corresponding to each accelerator card category, i.e., the accelerator card configuration information. The word "load" can refer to loading, installing, etc., which is not limited here.
[0031] For example, the acceleration card configuration file includes at least one of the operating system of the acceleration card, the loading file of the basic input and output system of the graphics card, and the test file.
[0032] S102: Query the test configuration table for accelerator card configuration information associated with the current category as target configuration information.
[0033] In this embodiment, in response to obtaining the current category of the accelerator card to be tested, the accelerator card configuration information associated with the current category of the accelerator card to be tested in the test configuration table can be queried as information of the target accelerator card configuration to be loaded on the accelerator card to be tested, that is, the target configuration information. The target accelerator card configuration can be at least one of the accelerator card operating system configuration, the video card basic input and output system (vBIOS) configuration, and the test file configuration in the test environment construction process.
[0034] S103: Identify the target accelerator card configuration included in the target configuration information, obtain a loading file of the target accelerator card configuration, and load the loading file into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0035] In this embodiment, the acquired target configuration information is identified to parse and obtain the target accelerator card configuration to be configured on the accelerator card to be tested. When the target accelerator card configuration has a loading file, the corresponding loading file is acquired and loaded into the accelerator card to be tested. In this way, when the accelerator card to be tested is configured based on the target configuration information, it can be considered that the preliminary preparation for the test has been completed, and the loaded accelerator card to be tested can be tested.
[0036] It can be seen that in this embodiment, a test configuration table including the accelerator card category and its associated accelerator card configuration information can be pre-established. In this way, when obtaining a test instruction for testing the accelerator card to be tested, the test configuration table can be queried to obtain the target configuration information suitable for the accelerator card to be tested, and the loading file of the target accelerator card configuration can be obtained based on the target configuration information, and the loading file can be loaded into the accelerator card to be tested, thereby realizing the automation of the configuration of the accelerator card to be tested. Therefore, the test is performed based on the loaded accelerator card to be tested to realize the automation of the accelerator card test.
[0037] See also Figure 2 , Figure 2 It is a flowchart of another embodiment of the acceleration card testing method of the present application.
[0038] S201: Obtain an accelerator card test instruction.
[0039] In this embodiment, as described in step S101 in the above embodiment, it will not be described in detail here.
[0040] Taking the test including stress test as an example, in this embodiment, a test mode can also be selected. Among them, the test mode includes automatic test mode and manual test mode. As the name implies, the automatic test mode means that the next stress test is automatically performed after the current test is completed, and the manual test mode means that the tester / user needs to trigger the start of the stress test.
[0041] Specifically, a test mode selection request may be generated, wherein the test mode includes an automatic test mode and a manual test mode, and the automatic test mode indicates that the next stress test is automatically performed after the current test is completed. In response to meeting the automatic test conditions, it is determined that the acceleration card to be tested is automatically tested.
[0042] The automatic test condition may include: obtaining an automatic test instruction based on a test mode selection request, or failing to obtain an instruction in response to the test mode selection request within a preset time period.
[0043] That is to say, in this embodiment, a preset time can be planned so that the system can automatically switch to the automatic test mode after reaching the preset time. If so, when the test mode is selected as the automatic test mode, after each stress test, the accelerator card to be tested restarts and runs to the test mode selection again. There is no need for the operator of the test process to select the test mode or instruct to conduct the next stress test. The system will automatically enter the automatic test mode after reaching the preset time to complete the stress test. Figure 3 As shown in the example, Figure 3 yes Figure 2 The command line diagram of an embodiment of the acceleration card testing method is shown. The number of cycles of the test card test, i.e., the preset number and / or the preset round, can be input in advance, and each round of testing includes at least one test. During the acceleration card testing process, the number of tests can be recorded, so that when the recorded number matches the preset number, it is determined that the test of the acceleration card to be tested is completed or a round of testing is completed.
[0044] S202: Query the test configuration table to obtain target configuration information.
[0045] In this embodiment, the test configuration table includes the accelerator card category and the accelerator card configuration information associated therewith. The accelerator card configuration information associated with the current category in the test configuration table is queried as the target configuration information.
[0046] As described in the above embodiments, the acceleration card configuration information may include the operating system of the acceleration card. The acceleration card configuration information may also include the graphics card basic input and output system version information of the acceleration card.
[0047] like Figure 4 As shown in the example, Figure 41 is a command line diagram of an embodiment of a test configuration table of the present application. The accelerator card configuration table may include accelerator card categories and their associated accelerator card configuration information. Figure 4 Wherein lspci represents the keyword displayed by the accelerator card in the accelerator card test system, that is, the accelerator card category, and the accelerator card types can be distinguished by this keyword; system corresponds to the operating system corresponding to the accelerator card category; test_vbios represents the vbios version required to be used in the stress test of the accelerator card. If the value of test_vbios is NA, it can be considered that there is no vbios version requirement for the test of the accelerator card of this category, that is, the graphics card basic input and output system version of the accelerator card is not constrained, and the vbios version of the accelerator card does not need to be refreshed; the prod_vbios version is the target version of the accelerator card vbios that needs to be refreshed after the accelerator card completes the test, that is, the product version mentioned later in this embodiment.
[0048] S203: Obtain the target loaded operating system as the first target version.
[0049] In this embodiment, the operating system to be loaded by the accelerator card to be tested in the current test can be obtained as the first target version. In other words, the operating system to be loaded by the accelerator card to be tested can be obtained by comparing the current category of the accelerator card to be tested with the corresponding parameter content of the lspci field in the test configuration table.
[0050] For example, the current type of the accelerator card to be tested can be obtained through the lspci command (an acquisition command).
[0051] S204: Load the target operating system from the operating system library, and load the test file in the target operating system environment.
[0052] In this embodiment, the pre-deployed operating systems in the operating system library are queried to obtain a target operating system that matches the first target version, and the acceleration card to be tested is controlled to load the target operating system to load a test file in the target operating system environment; wherein the test file includes at least one of an acceleration card driver and a test tool.
[0053] Specifically, the operating system library can be created in a server such as Diag (i.e., a server that can support fault detection functions and has diagnostic components, etc.) that assists in implementing the acceleration card test. The PXE (Preboot eXecution Environment) boot image and other loading files of various operating systems can be deployed in advance in the Diag server. After obtaining the loading file of the first target version of the operating system, the first target version of the operating system can be loaded in the form of PXE boot to enter the first target version of the operating system. In this way, in this embodiment, the test configuration table can be used, and the operating system image files corresponding to each acceleration card category can be pre-stored in other servers, so that in the process of testing the acceleration card, the operating system to be installed in the test environment of the acceleration card to be tested (such as a server, etc.) can be automatically loaded and obtained, so as to realize the automation of the acceleration card test environment construction.
[0054] S205: Determine whether the target configuration information includes a second target version of the basic input and output system of the graphics card.
[0055] In this embodiment, when it is determined that the target configuration information includes the second target version of the graphics card basic input and output system, step S206 is executed; when it is determined that the target configuration information does not include the second target version of the graphics card basic input and output system, it can be considered that the current category of the accelerator card to be tested does not constrain the graphics card basic input and output system version of the test process, and step S210 is executed. As such, in this embodiment, while the accelerator card test process is considered globally, the test environment configuration details can also be considered locally. When the accelerator card to be tested does not restrict the second target version of the graphics card basic input and output system, the steps of loading or refreshing the graphics card basic input and output system are reduced, which can improve the efficiency of building the accelerator card test environment, thereby helping to improve the accelerator card test efficiency.
[0056] That is, in response to the target configuration information not including the version information of the graphics card BIOS loaded by the target, it can be determined that the current category of the accelerator card to be tested does not constrain the graphics card BIOS version of the test process, allowing the accelerator card to be tested to be tested.
[0057] S206: Obtain a second target version of the basic input and output system of the graphics card.
[0058] In this embodiment, the version information of the graphics card basic input and output system loaded by the acceleration card to be tested in the current test can be obtained, and the obtained version information of the graphics card basic input and output system loaded by the acceleration card to be tested is used as the second target version.
[0059] Furthermore, after the accelerator card to be tested completes the loading of the test file, it can be determined whether the graphics card basic input and output system of the accelerator card to be tested needs to be loaded or refreshed to adapt to the instruction differences that may exist in different accelerator card types due to different test environments. This is conducive to the reliable operation of the configuration of the accelerator card to be tested, reduces the risk of being unable to automatically configure the accelerator card to be tested, and can further improve the reliability of the accelerator card testing method. In this way, the version information of the graphics card basic input and output system that is targeted to be loaded by the accelerator card to be tested in the current test can be obtained.
[0060] S207: Query the current version of the accelerator card to be tested.
[0061] In this embodiment, the current version of the accelerator card to be tested is queried using a query instruction that matches the current category of the accelerator card to be tested.
[0062] S208: Compare the current version with the second target version.
[0063] In this embodiment, when it is determined that the current version matches the second target version, step S210 may be executed; when it is determined that the current version does not match the second target version, step S209 may be executed.
[0064] S209: Obtain a loading file of a graphics card basic input and output system of a second target version from the graphics card interface control library, and load it into the accelerator card to be tested.
[0065] In this embodiment, in response to the current version not matching the second target version, the graphics card interface control library may be queried to obtain the version information of the loading file of the graphics card basic input and output system stored in advance.
[0066] A loading file of a basic input and output system of a graphics card whose version information matches the second target version is obtained as a file to be loaded.
[0067] The file to be loaded is loaded into the acceleration card to be tested, so that the acceleration card to be tested is loaded with a basic input and output system of a graphics card matching the target configuration information in the test configuration table.
[0068] Furthermore, after the acceleration card to be tested is loaded with the graphics card basic input and output system of the second target version, the test device (such as a server, etc.) that loads the acceleration card to be tested may be restarted.
[0069] S210: Testing the accelerator card to be tested.
[0070] In this embodiment, in response to the completion of the current stress test, the test result and / or test log is obtained as a test record, wherein the test result of the stress test is failure or success, and the test record is uploaded to the test record library.
[0071] Furthermore, when performing tests such as stress testing and stability verification of the accelerator card, if errors may occur during the test, the abnormal logs can be directly packaged and uploaded to the test supervision end such as the diag server for further analysis. The abnormal logs can be analyzed in combination with the pre-trained abnormal analysis model, and the past abnormal logs and treatment measures can be learned and reasoned to automatically try to solve the abnormalities in the stress test process and record the learning.
[0072] That is to say, in this embodiment, a test record is formed regardless of success or failure, which can promote the start of the next stress test and reduce the risk of test interruption due to abnormal test results / failure during the acceleration card test process, thereby facilitating the smooth progress of the acceleration card test and further improving the efficiency and reliability of the acceleration card test.
[0073] See also Figure 5 , Figure 5 It is a flowchart of another embodiment of the acceleration card testing method of the present application.
[0074] S301: Determine whether the acceleration card to be tested has completed the test.
[0075] In this embodiment, when it is determined that the acceleration card to be tested has completed the test, step S302 is executed; when it is determined that the acceleration card to be tested has not completed the test, the acceleration card to be tested can continue to be tested and step S302 is executed.
[0076] Furthermore, in combination with the implementation of the test record library in the above embodiment, the number of test records in the test record library may be counted.
[0077] In response to the number of test records matching the preset test times, it is determined that the accelerator card to be tested has completed the stress test. In response to the number of test records not reaching the preset test times, the next stress test is performed.
[0078] S302: Query whether the target configuration information constrains the product version of the basic input and output system of the graphics card.
[0079] In this embodiment, when it is determined that the target configuration information constrains the product version of the graphics card basic input and output system, step S302 is executed; when it is determined that the target configuration information does not constrain the product version of the graphics card basic input and output system, the process ends or the accelerator card to be tested is restarted.
[0080] S303: Obtain a graphics card basic input and output system loading file of a product version from a graphics card interface control library, and load it into the accelerator card to be tested.
[0081] In this embodiment, in response to the completion of the test of the acceleration card to be tested, and the target configuration information constrains the product version of the graphics card BIOS, the graphics card interface control library can be queried to obtain the graphics card BIOS loading file that matches the product version information.
[0082] S304: Restart the accelerator card to be tested.
[0083] In this embodiment, the test device (such as a server, etc.) loaded with the acceleration card to be tested may be restarted.
[0084] Furthermore, in response to loading the graphics card basic input and output system loading file of the product version into the accelerator card to be tested, the next round of testing can be performed on the accelerator card to be tested. That is to say, the accelerator card to be tested with the graphics card basic input and output system loaded with the product version can be tested in the next round of testing, and in the next round of testing, the test environment of the accelerator card to be tested will also be configured through the test configuration table. Therefore, the product version of the graphics card basic input and output system may be different from the second target version. The second target version is the graphics card basic input and output system version that constrains the target loading of the accelerator card to be tested during the test process. Therefore, in the next round of testing, the graphics card basic input and output system will be refreshed from the product version to the second target version.
[0085] Furthermore, when obtaining a test configuration table, a first target version of an operating system, and a second target version of a graphics card basic input and output system from a server such as the Diag server, verification information can be carried so that the test information provider such as the Diag server can verify the identity information of the acquisition request, thereby improving the storage security of the test configuration table, the first target version of the operating system, and the second target version of the graphics card basic input and output system.
[0086] In summary, it can be seen that the present application can perform automated testing on different types of accelerator cards. During the production test process, the operating system required for the accelerator card can be automatically selected, saving the tedious work of selecting the operating system by comparing the instructions for use and user manuals of different accelerator cards. At the same time, the vBIOS file can be automatically selected for refresh according to configuration files such as the test configuration table, reducing the risk of vBIOS version refresh errors caused by unfamiliarity or negligence of operators, and improving the reliability of the accelerator card configuration. Moreover, in the automatic test mode, the corresponding number of stress tests can be automatically performed, reducing the cumbersome manual participation in the operation of manually starting the stress test. And in the present application, logs can also be automatically collected after each test. It can be seen that the present application can significantly reduce the cumbersome operation process and improve the efficiency of accelerator card testing, which is conducive to reducing the test burden while increasing the production line capacity.
[0087] It should be understood that although Figure 1 , Figure 2 as well as Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , Figure 2 as well as Figure 5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0088] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of an accelerator card testing system of the present application.
[0089] In one embodiment, the acceleration card testing system includes a connection module 11 and a testing device 12 .
[0090] The connection module 11 is used to connect to the acceleration card to be tested.
[0091] The testing device 12 is connected to the connecting module 11 and is used to implement the steps of the accelerator card testing method as described in any of the above embodiments.
[0092] Specifically, the test device 12 can obtain the accelerator card category of the accelerator card to be tested as the current category in response to obtaining the accelerator card test instruction; obtain a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information; query the accelerator card configuration information associated with the current category in the test configuration table as the target configuration information; identify the target accelerator card configuration included in the target configuration information, obtain the loading file of the target accelerator card configuration, and load it into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0093] It can be seen that in this embodiment, a test configuration table including the accelerator card category and its associated accelerator card configuration information can be pre-established. In this way, when obtaining a test instruction for testing the accelerator card to be tested, the test configuration table can be queried to obtain the target configuration information suitable for the accelerator card to be tested, and the loading file of the target accelerator card configuration can be obtained based on the target configuration information, and the loading file can be loaded into the accelerator card to be tested, thereby realizing the automation of the configuration of the accelerator card to be tested. Therefore, the test is performed based on the loaded accelerator card to be tested to realize the automation of the accelerator card test.
[0094] See also Figure 7 , Figure 7It is a structural diagram of another embodiment of the acceleration card testing system of the present application.
[0095] In one embodiment, the acceleration card testing system may further include a server 20 .
[0096] The server 20 is connected to the testing device 12 and can be used to store the test configuration table.
[0097] The server 20 can also be used to store various preset versions of acceleration card configuration files and / or test records; wherein, as described in the above examples, the acceleration card configuration file includes at least one of the acceleration card operating system, the loading file of the graphics card basic input and output system, and the test file; wherein the test file includes at least one of the acceleration card driver and the test tool.
[0098] That is to say, the test device 12 can access the server 20 based on the test configuration table to obtain the target accelerator card configuration of the target accelerator card to be tested in the target configuration information; the target accelerator card configuration includes at least one of the target operating system, the loading file of the graphics card basic input and output system, and the test file.
[0099] Optionally, in this embodiment, the server may be an independent server or a server cluster, which is not limited here. Optionally, the server may be a Diag server (i.e., a server that can support fault detection functions and has diagnostic components, etc.), which is not limited here.
[0100] It should be noted that the test device 12 can also be a server, which serves as the test environment of the accelerator card to be tested, that is, the test server. Figure 7 The servers 20 shown in the example are two servers.
[0101] For the specific definition of the accelerator card test system, please refer to the definition of the accelerator card test method above, which will not be repeated here. Each module in the above-mentioned accelerator card test system device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0102] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the acceleration card testing method described above are implemented, which will not be described in detail here.
[0103] See also Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer device of the present application.
[0104] In one embodiment, the computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown in the example.
[0105] The computer device includes a processor, a memory, and a network interface connected via a system bus.
[0106] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a server control method is implemented.
[0107] Those skilled in the art will understand that Figure 8 The structure shown as an example is merely a block diagram of a portion of the structure related to the present application solution, and does not constitute a limitation on the computer device to which the present application solution is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0108] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0109] S101: In response to obtaining an accelerator card test instruction, obtaining an accelerator card category of an accelerator card to be tested as a current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information.
[0110] S102: Query the test configuration table for accelerator card configuration information associated with the current category as target configuration information.
[0111] S103: Identify the target accelerator card configuration included in the target configuration information, obtain a loading file of the target accelerator card configuration, and load the loading file into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0112] In one embodiment, the acceleration card configuration information includes the operating system of the acceleration card; when obtaining the loading file configured for the target acceleration card, the processor may also implement the following steps when executing the computer program: obtaining the operating system targeted to be loaded by the acceleration card to be tested in the current test as the first target version; querying the operating systems pre-deployed in the operating system library, obtaining the target operating system matching the first target version, and controlling the acceleration card to be tested to load the target operating system so as to load the test file in the target operating system environment; wherein the test file includes at least one of the acceleration card driver and the test tool.
[0113] In one embodiment, the acceleration card configuration information includes the graphics card basic input and output system version information of the acceleration card; when obtaining the loading file configured by the target acceleration card, the processor can also implement the following steps when executing the computer program: in response to the acceleration card to be tested having loaded the test file, obtaining the version information of the graphics card basic input and output system that is targeted to be loaded by the acceleration card to be tested in the current test; using the obtained version information of the graphics card basic input and output system that is targeted to be loaded as the second target version; using the query instruction that matches the current category of the acceleration card to be tested to query the current version of the acceleration card to be tested; comparing the current version with the second target version; in response to the current version not matching the second target version, querying the graphics card interface control library to obtain the version information of the loading file of the graphics card basic input and output system that is pre-stored; obtaining the loading file of the graphics card basic input and output system whose version information matches the second target version as the file to be loaded; loading the file to be loaded to the acceleration card to be tested, so that the acceleration card to be tested loads the graphics card basic input and output system that matches the target configuration information in the test configuration table, so as to refresh the version of the graphics card basic input and output system of the acceleration card to be tested.
[0114] In one embodiment, after identifying the target accelerator card configuration included in the target configuration information, the processor may further implement the following steps when executing the computer program: in response to the target configuration information not including the version information of the graphics card basic input and output system of the target loaded graphics card, determining that the current category of the accelerator card to be tested does not constrain the graphics card basic input and output system version of the test process; allowing the accelerator card to be tested to be tested; and / or, after testing the loaded accelerator card to be tested, the processor may further implement the following steps when executing the computer program: in response to the target configuration information including the product version information of the graphics card basic input and output system, determining whether the accelerator card to be tested has completed the test; in response to the accelerator card to be tested completing the test, querying the graphics card interface control library to obtain the loading file of the graphics card basic input and output system matching the product version information, and loading it to the accelerator card to be tested.
[0115] In one embodiment, when testing the loaded accelerator card to be tested, the processor can also implement the following steps when executing the computer program: in response to the completion of the current stress test, obtain the test results and / or test logs as test records; wherein the test results of the stress test are both failure and success, allowing the formation of test records; uploading the test records to the test record library; counting the number of test records in the test record library; in response to the number of test records matching the preset test number, determining that the accelerator card to be tested has completed the stress test; in response to the number of test records not reaching the preset test number, executing the next stress test.
[0116] In one embodiment, before testing the loaded accelerator card to be tested, the processor may further implement the following steps when executing a computer program: generating a test mode selection request; wherein the test mode includes an automatic test mode and a manual test mode, and the automatic test mode indicates that the next stress test is automatically performed after the current test is completed; in response to meeting the automatic test conditions, determining to perform an automatic test on the accelerator card to be tested; wherein the automatic test conditions include: obtaining an automatic test indication based on the test mode selection request, or failing to obtain an instruction in response to the test mode selection request within a preset time period.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0118] S101: In response to obtaining an accelerator card test instruction, obtaining an accelerator card category of an accelerator card to be tested as a current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information.
[0119] S102: Query the test configuration table for accelerator card configuration information associated with the current category as target configuration information.
[0120] S103: Identify the target accelerator card configuration included in the target configuration information, obtain a loading file of the target accelerator card configuration, and load the loading file into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
[0121] In one embodiment, the acceleration card configuration information includes the operating system of the acceleration card; when obtaining the loading file of the target acceleration card configuration, the computer program can also implement the following steps when being executed by the processor: obtaining the operating system targeted to be loaded by the acceleration card to be tested in the current test as the first target version; querying the operating systems pre-deployed in the operating system library, obtaining the target operating system matching the first target version, and controlling the acceleration card to be tested to load the target operating system so as to load the test file in the target operating system environment; wherein the test file includes at least one of the acceleration card driver and the test tool.
[0122] In one embodiment, the acceleration card configuration information includes the graphics card basic input and output system version information of the acceleration card; when obtaining the loading file configured by the target acceleration card, the computer program can also implement the following steps when being executed by the processor: in response to the acceleration card to be tested having loaded the test file, obtaining the version information of the graphics card basic input and output system that is targeted to be loaded by the acceleration card to be tested in the current test; using the obtained version information of the graphics card basic input and output system that is targeted to be loaded as the second target version; using the query instruction that matches the current category of the acceleration card to be tested to query the current version of the acceleration card to be tested; comparing the current version with the second target version; in response to the current version not matching the second target version, querying the graphics card interface control library to obtain the version information of the loading file of the graphics card basic input and output system that is pre-stored; obtaining the loading file of the graphics card basic input and output system whose version information matches the second target version as the file to be loaded; loading the file to be loaded to the acceleration card to be tested, so that the acceleration card to be tested loads the graphics card basic input and output system that matches the target configuration information in the test configuration table, so as to refresh the version of the graphics card basic input and output system of the acceleration card to be tested.
[0123] In one embodiment, after identifying the target accelerator card configuration included in the target configuration information, the computer program may further implement the following steps when executed by the processor: in response to the target configuration information not including the version information of the graphics card basic input and output system of the target loaded graphics card, determining that the current category of the accelerator card to be tested does not constrain the graphics card basic input and output system version of the test process; allowing the accelerator card to be tested to be tested; and / or, after testing the loaded accelerator card to be tested, the computer program may further implement the following steps when executed by the processor: in response to the target configuration information including the product version information of the graphics card basic input and output system, determining whether the accelerator card to be tested has completed the test; in response to the accelerator card to be tested completing the test, querying the graphics card interface control library to obtain the loading file of the graphics card basic input and output system matching the product version information, and loading it to the accelerator card to be tested.
[0124] In one embodiment, when testing the loaded accelerator card to be tested, the following steps may also be implemented when the computer program is executed by the processor: in response to the completion of the current stress test, obtaining test results and / or test logs as test records; wherein the test results of the stress test are both failure and success, allowing the formation of test records; uploading the test records to a test record library; counting the number of test records in the test record library; in response to the number of test records matching a preset number of tests, determining that the accelerator card to be tested has completed the stress test; in response to the number of test records not reaching the preset number of tests, executing the next stress test.
[0125] In one embodiment, before testing the loaded accelerator card to be tested, the following steps may be implemented when the computer program is executed by the processor: generating a test mode selection request; wherein the test mode includes an automatic test mode and a manual test mode, and the automatic test mode indicates that the next stress test is automatically performed after the current test is completed; in response to meeting the automatic test conditions, determining to perform an automatic test on the accelerator card to be tested; wherein the automatic test conditions include: obtaining an automatic test indication based on the test mode selection request, or failing to obtain an instruction to respond to the test mode selection request within a preset time period.
[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A method for testing an accelerator card, characterized in that: The accelerator card testing method comprises: In response to obtaining an accelerator card test instruction, obtaining an accelerator card category of the accelerator card to be tested as a current category; obtaining a test configuration table; wherein the test configuration table includes the accelerator card category and its associated accelerator card configuration information; Querying the test configuration table for accelerator card configuration information associated with the current category as target configuration information; The target accelerator card configuration included in the target configuration information is identified, a loading file of the target accelerator card configuration is obtained, and the loading file is loaded into the accelerator card to be tested, so as to test the loaded accelerator card to be tested.
2. The accelerator card testing method according to claim 1, characterized in that: The acceleration card configuration information includes the operating system of the acceleration card; The step of obtaining the loading file configured by the target accelerator card includes: Obtaining an operating system that is targeted to be loaded by the accelerator card to be tested in the current test as a first target version; Query the pre-deployed operating systems in the operating system library, obtain the target operating system that matches the first target version, control the acceleration card to be tested to load the target operating system, and load the test file in the target operating system environment; wherein the test file includes at least one of the acceleration card driver and the test tool.
3. The accelerator card testing method according to claim 1 or 2, characterized in that: The acceleration card configuration information includes the graphics card basic input and output system version information of the acceleration card; The step of obtaining the loading file configured by the target accelerator card includes: In response to the test file being loaded on the accelerator card to be tested, obtaining version information of a graphics card basic input and output system that is targeted to be loaded on the accelerator card to be tested in the current test; The obtained version information of the basic input and output system of the graphics card loaded by the target is used as the second target version; Using a query instruction that matches the current category of the accelerator card to be tested, query the current version of the accelerator card to be tested; comparing the current version with the second target version; In response to the current version not matching the second target version, querying a graphics card interface control library to obtain version information of a loading file of a graphics card basic input and output system stored in advance; Acquire a loading file of a basic input and output system of a graphics card whose version information matches the second target version as a file to be loaded; The file to be loaded is loaded into the acceleration card to be tested, so that the acceleration card to be tested loads the graphics card basic input and output system matching the target configuration information in the test configuration table, so as to refresh the version of the graphics card basic input and output system of the acceleration card to be tested.
4. The accelerator card testing method according to claim 3, characterized in that: After identifying the target accelerator card configuration included in the target configuration information, the step further includes: In response to the target configuration information not including the version information of the graphics card basic input and output system loaded by the target, determining that the current category of the accelerator card to be tested does not constrain the graphics card basic input and output system version of the test process; Allowing the accelerator card to be tested to be tested; and / or, After testing the loaded acceleration card to be tested, the method further includes: In response to the target configuration information including the product version information of the basic input and output system of the graphics card, determining whether the acceleration card to be tested has completed the test; In response to the acceleration card to be tested completing the test, the graphics card interface control library is queried to obtain a loading file of a graphics card basic input and output system matching the product version information, and the loading file is loaded into the acceleration card to be tested.
5. The accelerator card testing method according to claim 1, characterized in that: The testing of the loaded accelerator card to be tested comprises: In response to the current stress test being completed, obtaining a test result and / or a test log as a test record; wherein the test result of the stress test being a failure or a success allows the formation of the test record; Uploading the test record to a test record library; Counting the number of the test records in the test record library; In response to the number of the test records matching the preset test times, determining that the accelerator card to be tested completes the stress test; in response to the number of the test records not reaching the preset test times, executing the next stress test.
6. The accelerator card testing method according to claim 1, characterized in that: Before testing the loaded acceleration card to be tested, the method further includes: Generate a test mode selection request; wherein the test mode includes an automatic test mode and a manual test mode, and the automatic test mode means that the next stress test is automatically performed after the current test is completed; In response to meeting the automatic test condition, determining to perform automatic testing on the accelerator card to be tested; The automatic test condition includes: obtaining an automatic test instruction based on the test mode selection request, or failing to obtain an instruction in response to the test mode selection request within a preset time period.
7. An accelerator card testing system, characterized in that: The accelerator card testing system comprises: A connection module, used for connecting to the accelerator card to be tested; A testing device, connected to the connection module, is used to implement the steps of the acceleration card testing method according to any one of claims 1 to 6.
8. The accelerator card testing system according to claim 7, characterized in that: The accelerator card test system also includes: A server connected to the test device and used to store a test configuration table; the server is also used to store various preset versions of accelerator card configuration files and / or test records; wherein the accelerator card configuration file includes at least one of an accelerator card operating system, a loading file of a graphics card basic input and output system, and a test file; wherein the test file includes at least one of an accelerator card driver and a test tool; The test device accesses the server based on the test configuration table to obtain a target accelerator card configuration of the accelerator card to be tested in the target configuration information; the target accelerator card configuration includes a target operating system, a loading file of the basic input and output system of the graphics card, and at least one of the test files.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the acceleration card testing method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the acceleration card testing method according to any one of claims 1 to 6 are implemented.