Test method and device, computer equipment and storage medium
By inputting test instructions on the first device, sending them to the first graphics processor cluster for testing, and sending the results to the second device, the problem that the prior art cannot effectively test the data transmission performance between multiple GPUs is solved, and a fully automatic and effective testing method is realized.
Patent Information
- Application Number
- CN202311265848.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
The existing transmission control protocols in the method of testing data transmission performance between multi-machine graphics processors cannot be directly applied to RDMA technology, making it difficult to achieve effective testing of data transmission performance between multi-machine GPUs.
A test method is provided, by inputting test instructions on the first device, sending the test instructions to the first graphics processor cluster for testing, obtaining test results, and sending the results to the second device for further testing. This method realizes fully automatic testing of data transmission performance between multi-machine GPUs.
It realizes effective testing of data transmission performance between GPUs of multiple machines, simplifies the test process, and only needs to enter test instructions on the first device to complete the test, improving the testing efficiency and automation level.
Smart Images

Figure CN119728475A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server testing, and in particular to a testing method, apparatus, computer equipment and storage medium. Background Art
[0002] With the rapid development of cloud computing, big data, and artificial intelligence, the demand for high-bandwidth, low-latency data transmission is increasing. Remote Direct Memory Access (RDMA) technology has been widely used in data center networks due to its high efficiency and low latency.
[0003] However, since RDMA technology is relatively new, the existing Transmission Control Protocol (TCP) method for testing the data transmission performance between multiple GPUs cannot be directly applied to the RDMA technology test due to the different test paths. Therefore, it is difficult to effectively test the data transmission performance between multiple GPUs for RDMA technology. Summary of the invention
[0004] Based on this, it is necessary to provide a test method, device, computer equipment and storage medium that can effectively test the data transmission performance between multiple GPUs in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a testing method, comprising:
[0006] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0007] A second test result returned after the second device tests the second GPU cluster is received.
[0008] The above method realizes an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also realizes the test of the data transmission performance between the multiple first graphics processors on the first device and the multiple second graphics processors on the second device. Moreover, the above method only needs to input the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processor cluster on the second device, realizing a fully automatic test method.
[0009] In one embodiment, the first graphics processor cluster includes K first graphics processors connected in cascade, and sending a test instruction to the first graphics processor cluster for testing to obtain a first test result includes:
[0010] Sending a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor to send the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor;
[0011] The test data output by the (i-1)th first graphics processor is determined as the first test result.
[0012] The test method provided in the present application is based on the transmission of test instructions by each end-to-end cascaded first graphics processor to obtain a first test result after the first graphics processor cluster tests the test instruction, so as to test the transmission performance of each first graphics processor of the first device, and at the same time, provide a data basis for sending the first test result of the first graphics processor cluster to the second device for testing.
[0013] In one embodiment, a path between the first first graphics processor and the Kth first graphics processor in the first graphics processor cluster is in a disconnected state, and a test instruction is sent to the first graphics processor cluster for testing to obtain a first test result, including:
[0014] Sending a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor;
[0015] The test data output by the Kth first graphics processor is determined as a first test result.
[0016] The test method provided in the present application is based on sending test data to the first graphics processor at the head end of a cascaded first graphics processor cluster, and transmitting it to the first graphics processor at the tail end in sequence, thereby obtaining a first test result after the first graphics processor cluster tests the test instruction, so as to test the transmission performance of each first graphics processor of the first device, and at the same time, provide a data basis for sending the first test result of the first graphics processor cluster to the second device for testing.
[0017] In one embodiment, sending the first test result to the second device includes:
[0018] Calling a first kernel module to send a first test result to a first network card on a first device;
[0019] The first message transfer tool is called to send the first test result to the second network card on the second device through the first network card.
[0020] The test method provided by the present application calls a first kernel module and a first message passing tool to transmit test data output by a first graphics processor cluster to a second network card on a second device, thereby providing a transmission basis for transmitting the test data of the first device to the second device.
[0021] In one embodiment, the present application provides a testing method, comprising:
[0022] Receive a first test result, and test the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction;
[0023] The second test result is returned to the first device.
[0024] The above method realizes an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also realizes the test of the data transmission performance between the multiple first graphics processors on the first device and the multiple second graphics processors on the second device. Moreover, the above method only needs to input the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processor cluster on the second device, realizing a fully automatic test method.
[0025] In one embodiment, the second graphics processor cluster includes N second graphics processors connected in cascade, and the second graphics processor cluster is tested according to the first test result to obtain a second test result, including:
[0026] Sending the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor to send the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor;
[0027] The first test result output by the j-1th second graphics processor is determined as the second test result.
[0028] The test method provided in the present application is based on the transmission of the first test result by each end-to-end cascaded second graphics processor, and obtains a second test result after the second graphics processor cluster tests the first test result, so as to test the transmission performance of each second graphics processor of the second device. At the same time, the second test result of the second graphics processor cluster is sent to the first device so that the first device can perform subsequent analysis on the test result.
[0029] In one embodiment, the path between the first second graphics processor and the Kth second graphics processor in the second graphics processor cluster is in a disconnected state, and the second graphics processor cluster is tested according to the first test result to obtain a second test result, including:
[0030] Sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor to send the first test result to the third second graphics processor, until the K-1 second graphics processor sends the first test result to the K second graphics processor;
[0031] The test data output by the Kth second graphics processor is determined as the second test result.
[0032] The test method provided in the present application is based on sending test data to the head-end second graphics processor in the cascaded second graphics processor cluster, and transmitting it to the tail-end second graphics processor in sequence, so as to obtain a second test result after the second graphics processor cluster tests the first test result, so as to test the transmission performance of each second graphics processor of the second device, and at the same time, provide a data basis for sending the second test result of the second graphics processor cluster to the first device for testing.
[0033] In one embodiment, returning the second test result to the first device includes:
[0034] Calling the second kernel module to send the second test result to the second network card on the second device;
[0035] The second message transfer tool is called to send the second test result to the first network card on the first device through the second network card.
[0036] The test method provided by the present application calls the second kernel module and the second message passing tool to transmit the test data output by the second graphics processor cluster to the first network card on the first device, thereby providing a transmission basis for transmitting the test data of the second device to the first device.
[0037] In a second aspect, the present application also provides a testing device, comprising:
[0038] A sending module, configured to, upon receiving a test instruction, send the test instruction to the first graphics processor cluster for testing, obtain a first test result, and send the first test result to the second device; and set a second graphics processor cluster on the second device;
[0039] The receiving module is used to receive a second test result returned after the second device tests the second graphics processor cluster.
[0040] In a third aspect, the present application also provides a testing device, comprising:
[0041] A receiving module receives a first test result, and tests the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction;
[0042] The returning module is used to return the second test result to the first device.
[0043] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0044] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0045] A second test result returned after the second device tests the second GPU cluster is received.
[0046] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0047] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0048] A second test result returned after the second device tests the second GPU cluster is received.
[0049] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0050] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0051] A second test result returned after the second device tests the second GPU cluster is received.
[0052] In the above-mentioned test method, apparatus, computer equipment and storage medium, the first device can first send the test instruction to the first graphics processor cluster for testing after receiving the test instruction, and obtain the first test result, and send the first test result to the second device, and receive the second test result returned by the second device after testing the second graphics processor cluster. The above-mentioned method realizes an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also realizes the test of the data transmission performance between the multiple first graphics processors on it and the multiple second graphics processors on the second device through the first device. Moreover, the above-mentioned method only needs to input the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processing cluster on the second device, realizing a fully automatic testing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 An application environment diagram of a test method in an embodiment;
[0055] Figure 2 A schematic diagram of a test method in one embodiment;
[0056] Figure 3 A schematic diagram of a test method in another embodiment;
[0057] Figure 4 A schematic diagram of a test method in another embodiment;
[0058] Figure 5 A schematic diagram of a test method in another embodiment;
[0059] Figure 6 A schematic diagram of a test method in another embodiment;
[0060] Figure 7 A schematic flow chart of a testing method in another embodiment;
[0061] Figure 8 A schematic flow chart of a testing method in another embodiment;
[0062] Fig. 9 A schematic flow chart of a testing method in another embodiment;
[0063] Fig.10 A schematic flow chart of a testing method in another embodiment;
[0064] Fig.11 is a structural block diagram of a testing device in one embodiment;
[0065] Fig.12 is a structural block diagram of a testing device in one embodiment;
[0066] Fig.13 is a structural block diagram of a testing device in one embodiment;
[0067] Fig.14 is a structural block diagram of a testing device in one embodiment;
[0068] Fig.15 is a structural block diagram of a testing device in one embodiment;
[0069] Fig.16 is a structural block diagram of a testing device in one embodiment;
[0070] Fig.17 is a structural block diagram of a testing device in one embodiment;
[0071] Fig.18 is a structural block diagram of a testing device in one embodiment;
[0072] Fig.19 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] 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.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0075] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0077] With the rapid development of cloud computing, big data, and artificial intelligence, the demand for high-bandwidth, low-latency data transmission is increasing. The traditional Transmission Control Protocol / Internet Protocol (TCP / IP) is the most commonly used communication protocol on the Internet, with a wide range of applications and support. However, TCP / IP has the following disadvantages:
[0078] 1. Low reliability: Although the TCP protocol is a connection-oriented reliable transmission protocol, it still has problems such as network congestion and delay that lead to packet loss and retransmission, thus affecting the stability of the application layer.
[0079] 2. Poor security: Some protocols in the TCP / IP protocol stack (such as TCP and User Datagram Protocol (UDP)) do not provide security guarantees themselves. For example, data packets can be tampered with, eavesdropped, replayed, etc.
[0080] 3. Low transmission efficiency: Since many protocols in the TCP / IP protocol stack have relatively large message headers, a certain amount of bandwidth resources will be wasted, so there is room for optimization in transmission efficiency. As a result, it is not suitable for real-time applications that require fast response.
[0081] In view of the above disadvantages of TCP / IP protocol in the data transmission process, Remote Direct Memory Access (RDMA) technology has been widely used in data center networks due to its high efficiency and low latency. However, since RDMA technology is relatively new, the existing method of testing the data transmission performance between multiple GPUs in the Transmission Control Protocol (TCP) cannot be directly applied to the test of RDMA technology due to the different test paths. Therefore, it is difficult to effectively test the data transmission performance between multiple GPUs for RDMA technology. This application aims to solve this problem.
[0082] After introducing the background technology of the test method provided by the embodiment of the present application, the following briefly describes the implementation environment involved in the test method provided by the embodiment of the present application. The test method provided by the embodiment of the present application can be applied to Figure 1 The distributed system is composed of a first device 10 and a plurality of second devices 20 ( Figure 1Only four second devices 20 are shown in the figure, which is an exemplary description, and the number of the second devices 20 is not limited). The first device 10 is connected to each second device through a network, and the multiple second devices 20 are connected to each other through a network, and the adjacent devices in the system communicate with each other based on the RDMA protocol. Among them, the first device 10 can test the data transmission performance of any second device 20, or test the GPU performance on any second device 20. Specifically, the first device 10 carries a plurality of first graphics processors 101, and the first device 20 carries a plurality of second graphics processors 201. The plurality of first graphics processors 101 are connected in cascade connection to the communication network card 102 of the first device 10, and the plurality of second processors 201 are connected in cascade connection to the communication network card 202 of the second device 20. The communication network card 102 of the first device 10 is connected to the communication network card 202 of the second device 20 to transmit the data of the first device 10 to the second device 20, or to transmit the data of the second device 20 to the first device 10. The first device 10 and the second device 20 are any two terminal devices in the distributed system. The first device 10 and the second device 20 may include but are not limited to various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The first device 10 and the second device 20 transmit data through the RDMA protocol. The RDMA protocol refers to a protocol that allows data to be transmitted from the first device 10 to the second device 20 without involving the central processing unit (CPU). It can transmit large amounts of data between GPUs on the network with minimal delay and overhead, and the data transmission task is offloaded from the CPU to the GPU through the RDMA technology, so that the GPU can perform other tasks at the same time, thereby improving performance and shortening overall processing time.
[0083] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0084] In one embodiment, Figure 2 As shown, a test method is provided, which is applied to Figure 1 Taking the first device 10 in the example as an example, the method includes the following steps:
[0085] S201: When a test instruction is received, the test instruction is sent to a first graphics processor cluster for testing, a first test result is obtained, and the first test result is sent to a second device.
[0086] The test instruction refers to an instruction input into the first device 10 by a user when testing the data transmission performance of the RDMA technology between GPUs of multiple devices; for example, the test instruction may include:
[0087] {
[0088] / usr / local / openmpi-4.1.3 / bin / mpirun--allow-run-as-root-bind-to none
[0089] -H node1:8,node2:8
[0090] -x LD_LIBRARY_PATH
[0091] -x CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
[0092] -x NCCL_IB_DISABLE=0
[0093] -x NCCL_SOCKET_IFNAME=ib0
[0094] -xNCCL_IB_HCA=mlx5_2,mlx5_3,mlx5_4,mlx5_5,mlx5_6,mlx5_7,mlx5_8,mlx5_9
[0095] -x NCCL_DEBUG=INFO
[0096] / root / test / nccl-tests-master / build / all_reduce_perf-b 8-e 4G-f 2-g 1
[0097] }
[0098] Among them, " / usr / local / openmpi-4.1.3 / bin / mpirun" means calling a subtask balancing tool (for example, an Openmpi tool installed in the first device 10 for dividing a complex computing task into multiple subtasks and averaging them on each GPU); "-H node1:8,node2:8" node1 is the host name of the first device 10, node2 is the host name of the second device 210, and 8 represents the number of GPUs used in the first device 10 and the second device 20; "-x LD_LIBRARY_PATH" means that the above instructions can call the CUDA computing platform, which is a parallel computing and programming platform provided by GPU manufacturers; "-x CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7" means the number of GPUs that can be called by the above instructions; "-x NCCL_SOCKET_IFNAME=ib0 ib0" means the IB network card interface used for communication; "-x "NCCL_IB_HCA=mlx5_0,mlx5_3,mlx5_4,mlx5_5,mlx5_6,mlx5_9,mlx5_10,mlx5_11" indicates the names of all available IB network card interfaces; "-x NCCL_DEBUG=INFO" indicates that the debug information in the data transmission process can be displayed, so that the user can obtain the data transmission location during the test at any time; " / root / test / nccl-tests-master / build / all_reduce_perf-b 8-e 4G-f 2-g 1" indicates calling the test tool (for example, nccl test tool), where -b8 indicates that the smallest data in the transmission starts from 8 bytes, -e 4G indicates that the largest data in the transmission ends from 4G bytes, -f 2 indicates that the step size is 2, that is, the data volume increases by 2 times each time, and -g 1 indicates that the transmission starts from one GPU.
[0099] The first graphics processor cluster includes at least two first graphics processors for testing received test instructions; the first test result refers to the result after the test instruction is processed by the first graphics processor cluster; and the second graphics processor cluster includes at least two second graphics processors.
[0100] In an embodiment of the present application, when a user needs to implement a data transmission performance test between a first graphics processor cluster of a first device and a second graphics processor cluster of a second device based on RDMA technology, the first device and the second device can be started first, and static IPs of the same network segment need to be set for the corresponding interconnected network ports of the first device and the second device to ensure that each machine can communicate with each other. At the same time, for the convenience of management and operation, an easily recognizable host name can be set for both the first device and the second device, and a password-free login entrance can be set for the first device and the second device. After the setting is completed, a test instruction is entered on the first device. When the central processing unit in the first device receives the test instruction entered by the user, the test instruction is sent to the first graphics processor cluster in the first device. After receiving the test instruction, the first graphics processor cluster can test the test instruction to obtain a first test result, and the first graphics processor cluster sends the first test result to the second device to instruct the second graphics processor cluster in the second device to test the first test result and return the test result to the first device.
[0101] S202: Receive a second test result returned by the second device after the second device tests the second graphics processor cluster.
[0102] In the embodiment of the present application, after the first test result is sent to the second device, the second graphics processor cluster in the second device will test the first test result to obtain the second test result, and return the second test result to the first device. The first device receives the returned second test result and determines the transmission rate of the transmission data in the test instruction and the packet loss of the transmission data according to the second test result. Exemplarily, the second test result can show the transmission data corresponding to different transmission data, for example, the transmission rate corresponding to 8 bytes of transmission data is 0, the transmission rate corresponding to 16 bytes of transmission data is 0, ..., the transmission rate corresponding to 2147483648 bytes of transmission data is 209.32GB / s, and the transmission rate corresponding to 4294967296 bytes of transmission data is 214.56GB / s, thereby concluding that as the number of bytes of transmission data increases, the data transmission rate of RDMA technology also increases continuously, and no packet loss is found during data transmission.
[0103] In the test method provided in the embodiment of the present application, the first device can, upon receiving the test instruction, send the test instruction to the first graphics processor cluster for testing to obtain a first test result, and send the first test result to the second device, and receive the second test result returned by the second device after testing the second graphics processor cluster. The above method implements an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also implements the test of the data transmission performance between the multiple first graphics processors on it and the multiple second graphics processors on the second device through the first device. Moreover, the above method only requires inputting the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processing cluster on the second device, thereby implementing a fully automatic test method.
[0104] In one embodiment, an implementation method for obtaining a first test result based on a first graphics processor cluster is provided, that is, "sending a test instruction to the first graphics processor cluster for testing to obtain a first test result" in the above S201, such as Figure 3 As shown, including:
[0105] S401, sending a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor sends the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor.
[0106] If the first graphics processor cluster in the above S201 includes K first graphics processors connected in cascade, and the K first graphics processors connected in cascade are connected end to end to form a closed loop.
[0107] In an embodiment of the present application, if the central processing unit in the first device sends a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, the i+1-th first graphics processor forwards the test instruction to the i+2-th first graphics processor after receiving the test instruction, ..., until the i-2-th first graphics processor receives the test instruction and sends the test instruction to the i-1-th first graphics processor. At this time, the i-1-th first graphics processor obtains the test data transmitted from the i-th first graphics processor, the i+1-th first graphics processor, the i+2-th first graphics processor, ..., the i-2-th first graphics processor.
[0108] For example, the test instruction includes 8 first graphics processors of the first device, namely GPU1, GPU2, GPU3, GPU4, GPU5, GPU6, GPU7 and GPU8, and these 8 first graphics processors are cascaded connected in sequence, that is, GPU1 is connected to GPU2, GPU2 is connected to GPU3, ..., GPU7 is connected to GPU8, and GPU8 is connected to GPU1. At this time, if the test instruction is sent to the 4th first graphics processor (GPU4), then GPU4 sends the test instruction to the 5th first graphics processor (GPU5), and the 5th first graphics processor (GPU5) sends the test instruction to the 6th first graphics processor (GPU6), until the 2nd first graphics processor (GPU2) sends the test instruction to the 3rd first graphics processor (GPU3).
[0109] S402: Determine the test data output by the (i-1)th first graphics processor as a first test result.
[0110] In an embodiment of the present application, after the above-mentioned i-1th first graphics processor obtains the test data transmitted from the i-th first graphics processor, the i+1th first graphics processor, the i+2th second graphics processor, ..., the i-2th first graphics processor, the i-1th first graphics processor can output the test data and determine the test data output by the i-1th first graphics processor as the first test result.
[0111] For example, after the third first graphics processor (GPU3) receives the test data transmitted by the fourth first graphics processor (GPU4), the fifth first graphics processor (GPU5), the sixth second graphics processor (GPU6), ..., the second first graphics processor (GPU2), the third first graphics processor (GPU3) can output the test data and determine the test data output by the third first graphics processor (GPU3) as the first test result.
[0112] The test method provided in the present application is based on the transmission of test instructions by each end-to-end cascaded first graphics processor to obtain a first test result after the first graphics processor cluster tests the test instruction, so as to test the transmission performance of each first graphics processor of the first device, and at the same time, provide a data basis for sending the first test result of the first graphics processor cluster to the second device for testing.
[0113] In one embodiment, another implementation method for obtaining the first test result based on the first graphics processor cluster is provided, that is, "sending the test instruction to the first graphics processor cluster for testing to obtain the first test result" in the above S201. Figure 4 As shown, including:
[0114] S601, sending a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor, until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor.
[0115] If the first graphics processor cluster in S201 includes K first graphics processors connected in cascade, and the path between the 1st first graphics processor and the Kth first graphics processor in the first graphics processor cluster is in a disconnected state.
[0116] In an embodiment of the present application, if the central processing unit in the first device sends a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, the second first graphics processor forwards the test instruction to the third first graphics processor after receiving the test instruction, ..., until the K-1th first graphics processor receives the test instruction and sends the test instruction to the Kth first graphics processor. At this time, the Kth first graphics processor obtains the test data transmitted from the first first graphics processor, the second first graphics processor, the third graphics processor, ..., the K-1th first graphics processor.
[0117] S602: Determine the test data output by the Kth first graphics processor as a first test result.
[0118] In an embodiment of the present application, after the Kth first graphics processor obtains the test data transmitted from the 1st first graphics processor, the 2nd first graphics processor, the 3rd graphics processor, ..., the K-1th first graphics processor, the Kth first graphics processor may output the test data and determine the test data output by the Kth first graphics processor as the first test result.
[0119] The test method provided in the present application is based on sending test data to the first graphics processor at the head end of a cascaded first graphics processor cluster, and transmitting it to the first graphics processor at the tail end in sequence, thereby obtaining a first test result after the first graphics processor cluster tests the test instruction, so as to test the transmission performance of each first graphics processor of the first device, and at the same time, provide a data basis for sending the first test result of the first graphics processor cluster to the second device for testing.
[0120] In one embodiment, a method for implementing sending the first test result to the second device is provided, that is, “sending the first test result to the second device” in the above S202, such as Figure 5 As shown, including:
[0121] S801. Call a first kernel module to send a first test result to a first network card on a first device.
[0122] The first kernel module refers to a module pre-installed on the first device for connecting the first graphics processor to the first network card, and can transmit the test data output from the first graphics processor to the first network card. For example, the first kernel module may be nv_peer_memory.
[0123] In the embodiment of the present application, after the first test result obtained through the first graphics processor cluster test, the first kernel module installed on the first device is called to send the first test result to the first network card on the first device.
[0124] S802: Call a first message transfer tool to send a first test result to a second network card on a second device through the first network card.
[0125] The first message passing tool refers to a tool pre-installed on the first device to connect the first network card on the first device to the second network card on the second device, capable of transmitting test data on the first network card to the second network card, and providing an optimized communication layer for the message passing interface (MPI), the partitioned global address space / OpenSHMEM library and the RPC / data-centric application. For example, the first message passing tool may be a UCX tool.
[0126] In the embodiment of the present application, after the first test result transmitted via the first network card is obtained, the first message transmission tool is called to send the first test result to the second network card on the second device.
[0127] The test method provided by the present application calls a first kernel module and a first message passing tool to transmit test data output by a first graphics processor cluster to a second network card on a second device, thereby providing a transmission basis for transmitting the test data of the first device to the second device.
[0128] In one embodiment, Figure 6 As shown, a test method is provided, which is applied to Figure 1 Taking the first device 20 in the example as an example, the method includes the following steps:
[0129] S101, receiving a first test result, and testing a second graphics processor cluster according to the first test result to obtain a second test result.
[0130] The first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction. The second graphics processor cluster includes at least two second graphics processors, which are used to test the received first test result.
[0131] In an embodiment of the present application, after receiving the first test result, the central processor in the second device sends the first test result to the second graphics processor cluster in the second device. After receiving the first test result, the second graphics processor cluster can test the first test result to obtain a second test result, and the second graphics processor cluster sends the second test result to the first device.
[0132] S102: Return the second test result to the first device.
[0133] In an embodiment of the present application, after the second device obtains the second test result, the second test result can be returned to the first device, the first device receives the returned second test result, and determines the transmission rate of the transmission data in the test instruction and the packet loss of the transmission data according to the second test result. Exemplarily, the second test result can show the transmission data corresponding to different transmission data, for example, the transmission rate corresponding to 8 bytes of transmission data is 0, the transmission rate corresponding to 16 bytes of transmission data is 0, ..., the transmission rate corresponding to 2147483648 bytes of transmission data is 209.32GB / s, and the transmission rate corresponding to 4294967296 bytes of transmission data is 214.56GB / s, thereby concluding that as the number of bytes of transmission data increases, the data transmission rate of RDMA technology also increases continuously, and no packet loss is found during data transmission.
[0134] The test method provided in the embodiment of the present application is applied to the second device, first receiving the first test result, and testing the second graphics processor cluster according to the first test result to obtain the second test result; the first test result is the test result obtained after the first device tests the first graphics processor cluster according to the test instruction, and then the second test result is returned to the first device. The above method realizes an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also realizes the test of the data transmission performance between the multiple first graphics processors on it and the multiple second graphics processors on the second device through the first device. Moreover, the above method only needs to input the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processing cluster on the second device, realizing a fully automatic testing method.
[0135] In one embodiment, an implementation method for obtaining a second test result based on a second graphics processor cluster is provided, that is, "testing the second graphics processor cluster according to the first test result to obtain a second test result" in the above S101, such as Figure 7 As shown, including:
[0136] S301. Send the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor sends the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor.
[0137] If the second graphics processor cluster in the above S101 includes N second graphics processors connected in cascade, and the N second graphics processors connected in cascade are connected end to end to form a closed loop.
[0138] In an embodiment of the present application, if the central processor in the second device sends the first test result to the jth second graphics processor to instruct the jth second graphics processor to send the first test result to the j+1th second graphics processor, the j+1th second graphics processor forwards the first test result to the j+2th second graphics processor after receiving the first test result,..., until the j-2th second graphics processor receives the first test result and sends the first test result to the j-1th second graphics processor. At this time, the j-1th second graphics processor obtains the test data transmitted from the jth second graphics processor, the j+1th second graphics processor, the j+2th second graphics processor,..., the j-2th second graphics processor.
[0139] For example, the first test result includes 8 second graphics processors of the second device, namely GPU1', GPU2', GPU3', GPU4', GPU5', GPU6', GPU7' and GPU8', and these 8 second graphics processors are cascaded connected in sequence, that is, GPU1' is connected to GPU2', GPU2' is connected to GPU3', ..., GPU7' is connected to GPU8', and GPU8' is connected to GPU1'. At this time, if the first test result is sent to the 4th second graphics processor (GPU4'), then GPU4' sends the test instruction to the 5th second graphics processor (GPU5'), and the 5th second graphics processor (GPU5') sends the test instruction to the 6th second graphics processor (GPU6'), until the 2nd second graphics processor (GPU2') sends the test instruction to the 3rd second graphics processor (GPU3').
[0140] S302: Determine the first test result output by the j-1th second graphics processor as the second test result.
[0141] In an embodiment of the present application, after the j-1th second graphics processor obtains the first test result transmitted from the j-th second graphics processor, the j+1th second graphics processor, the j+2th second graphics processor, ..., the j-2th second graphics processor, the j-1th second graphics processor may output the first test result and determine the first test result output by the i-1th first graphics processor as the second test result.
[0142] For example, after the third second graphics processor (GPU3') receives the first test result transmitted by the fourth second graphics processor (GPU4'), the fifth second graphics processor (GPU5'), the sixth second graphics processor (GPU6'), ..., the second second graphics processor (GPU2'), the third second graphics processor (GPU3') can output the first test result and determine the first test result output by the third second graphics processor (GPU3') as the second test result.
[0143] The test method provided in the present application is based on the transmission of the first test result by each end-to-end cascaded second graphics processor, and obtains a second test result after the second graphics processor cluster tests the first test result, so as to test the transmission performance of each second graphics processor of the second device. At the same time, the second test result of the second graphics processor cluster is sent to the first device so that the first device can perform subsequent analysis on the test result.
[0144] In one embodiment, another implementation method for obtaining a second test result based on the second GPU cluster is provided, namely, "testing the second GPU cluster according to the first test result to obtain a second test result" in the above S101. Figure 8 As shown, including:
[0145] S501, sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor sends the first test result to the third second graphics processor, until the K-1th second graphics processor sends the first test result to the Kth second graphics processor.
[0146] If the second graphics processor cluster in S101 includes K second graphics processors connected in cascade, and the path between the first second graphics processor and the Kth second graphics processor in the second graphics processor cluster is in a disconnected state.
[0147] In an embodiment of the present application, if the central processor in the second device sends the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, the second second graphics processor forwards the first test result to the third second graphics processor after receiving the first test result, ..., until the K-1th second graphics processor receives the first test result and sends the first test result to the Kth second graphics processor. At this time, the Kth second graphics processor obtains the test data transmitted from the first second graphics processor, the second second graphics processor, the third second graphics processor, ..., the K-1th second graphics processor.
[0148] S502: Determine the test data output by the Kth second graphics processor as a second test result.
[0149] In an embodiment of the present application, after the Kth second graphics processor obtains the test data transmitted from the 1st second graphics processor, the 2nd second graphics processor, the 3rd second graphics processor, ..., the K-1th second graphics processor, the Kth second graphics processor may output the test data and determine the test data output by the Kth second graphics processor as the second test result.
[0150] The test method provided in the present application is based on sending test data to the head-end second graphics processor in the cascaded second graphics processor cluster, and transmitting it to the tail-end second graphics processor in sequence, so as to obtain a second test result after the second graphics processor cluster tests the first test result, so as to test the transmission performance of each second graphics processor of the second device, and at the same time, provide a data basis for sending the second test result of the second graphics processor cluster to the first device for testing.
[0151] In one embodiment, a method for implementing sending the second test result to the first device is provided, that is, “sending the second test result to the first device” in the above S102, such as Fig. 9 As shown, including:
[0152] S701. Call a second kernel module to send a second test result to a second network card on a second device.
[0153] The second kernel module refers to a module pre-installed on the second device for connecting the second graphics processor to the second network card, and can transmit the test data output from the second graphics processor to the second network card. For example, the second kernel module may be nv_peer_memory.
[0154] In the embodiment of the present application, after the second test result obtained through the second graphics processor cluster test, the second kernel module installed on the second device is called to send the second test result to the second network card on the second device.
[0155] S702: Call a second message transfer tool to send a second test result to the first network card on the first device through the second network card.
[0156] The second message passing tool refers to a tool pre-installed on the second device to connect the second network card on the second device and the first network card on the first device, capable of transmitting test data on the second network card to the first network card, and providing an optimized communication layer for the message passing interface (MPI), the partitioned global address space / OpenSHMEM library and the RPC / data-centric application. For example, the second message passing tool can be a UCX tool.
[0157] In the embodiment of the present application, after the second test result transmitted via the second network card is obtained, the second message transmission tool is called to send the second test result to the first network card on the first device.
[0158] The test method provided by the present application calls the second kernel module and the second message passing tool to transmit the test data output by the second graphics processor cluster to the first network card on the first device, thereby providing a transmission basis for transmitting the test data of the second device to the first device.
[0159] In one embodiment, Fig.10 As shown, a complete testing method is provided, which is applied in a distributed system, the distributed system includes a first device and a second device, a first graphics processor cluster is set on the first device, and a second graphics processor cluster is set on the second device, the method includes:
[0160] S10, receiving a test instruction;
[0161] S11, sending a test instruction to the first graphics processor cluster;
[0162] S12, testing the test instruction to obtain a first test result;
[0163] S13, calling the first kernel module to send the first test result to the first network card on the first device;
[0164] S14, calling the first message transmission tool to send the first test result to the second network card on the second device through the first network card;
[0165] S15, sending the first test result to the second graphics processor cluster;
[0166] S16, testing the first test result to obtain a second test result;
[0167] S17, calling the second kernel module to send the second test result to the second network card on the second device;
[0168] S18. Call the second message transfer tool to send the second test result to the first network card on the first device through the second network card.
[0169] S19. Send the second test result to the processor.
[0170] S20, display the second test result.
[0171] The above method realizes an effective test of the data transmission performance between the graphics processor on the first device and the graphics processor on the second device, and also realizes the test of the data transmission performance between the multiple first graphics processors on the first device and the multiple second graphics processors on the second device. Moreover, the above method only needs to input the test instruction on the first device to complete the test of the first graphics processor cluster on it and the second graphics processor cluster on the second device, realizing a fully automatic test method.
[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0173] Based on the same inventive concept, the embodiment of the present application also provides a test device for implementing the test method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more test device embodiments provided below can refer to the limitations on the test method above, and will not be repeated here.
[0174] In an exemplary embodiment, Fig.11 As shown, a test device is provided, including: a sending module 10 and a receiving module 11, wherein:
[0175] The sending module 10 is used for sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device when receiving the test instruction; and setting the second graphics processor cluster on the second device;
[0176] The receiving module 11 receives a second test result returned by the second device after the second device tests the second GPU cluster.
[0177] In an exemplary embodiment, the first graphics processor cluster includes K first graphics processors connected in cascade, and the sending module 10, such as Fig.12 As shown, it includes: a first sending unit 101 and a first determining unit 102, wherein:
[0178] The first sending unit 101 specifically sends the test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor sends the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor;
[0179] The first determining unit 102 specifically determines the test data output by the (i-1)th first graphics processor as the first test result.
[0180] In an exemplary embodiment, the path between the 1st first graphics processor and the Kth first graphics processor in the first graphics processor cluster is in a disconnected state, and the sending module 10, such as Fig.13 As shown, it includes: a second sending unit 103 and a second determining unit 104, wherein:
[0181] The second sending unit 103 specifically sends the test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor;
[0182] The second determining unit 104 is specifically configured to determine the test data output by the Kth first graphics processor as the first test result.
[0183] In an exemplary embodiment, the sending module 10, such as Fig.14 As shown, it includes: a first calling unit 105 and a second calling unit 106, wherein:
[0184] A first calling unit 105 is specifically used to call a first kernel module to send a first test result to a first network card on a first device;
[0185] The second calling unit 106 is specifically configured to call the first message transmission tool to send the first test result to the second network card on the second device through the first network card.
[0186] In an exemplary embodiment, Fig.15 As shown, a testing device is provided, including: a receiving module 20 and a returning module 21, wherein:
[0187] The receiving module 20 is used to receive the first test result, and test the second GPU cluster according to the first test result to obtain the second test result; the first test result is the test result obtained after the first device tests the first GPU cluster according to the test instruction;
[0188] The returning module 21 is used to return the second test result to the first device.
[0189] In an exemplary embodiment, the second graphics processor cluster includes N second graphics processors connected in cascade, and the receiving module 20, such as Fig.16 As shown, it includes: a first sending unit 201 and a first determining unit 202, wherein:
[0190] The first sending unit 201 is specifically configured to send the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor sends the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor;
[0191] The first determining unit 202 is specifically configured to determine the first test result output by the j-1th second graphics processor as the second test result.
[0192] In an exemplary embodiment, the path between the first second graphics processor and the Kth second graphics processor in the second graphics processor cluster is in a disconnected state, and the receiving module 20, such as Fig.17 As shown, it includes: a second sending unit 203 and a second determining unit 204, wherein:
[0193] The second sending unit 203 is specifically configured to send the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor sends the first test result to the third second graphics processor, until the K-1th second graphics processor sends the first test result to the Kth second graphics processor;
[0194] The second determining unit 204 determines the test data output by the Kth second graphics processor as the second test result.
[0195] In an exemplary embodiment, Fig.18 As shown, the above-mentioned return module 21 includes: a first calling unit 210 and a second calling unit 211, wherein:
[0196] The first calling unit 210 is specifically used to call the second kernel module to send the second test result to the second network card on the second device;
[0197] The second calling unit 211 is specifically configured to call the second message transmission tool to send the second test result to the first network card on the first device through the second network card.
[0198] Each module in the above-mentioned test device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0199] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.19 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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 database of the computer device is used to store test instruction data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication 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 test method is implemented.
[0200] Those skilled in the art will understand that Fig.19 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0201] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0202] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0203] A second test result returned after the second device tests the second GPU cluster is received.
[0204] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0205] Sending a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor to send the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor;
[0206] The test data output by the (i-1)th first graphics processor is determined as the first test result.
[0207] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0208] Sending a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor;
[0209] The test data output by the Kth first graphics processor is determined as a first test result.
[0210] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0211] Calling a first kernel module to send a first test result to a first network card on a first device;
[0212] The first message transfer tool is called to send the first test result to the second network card on the second device through the first network card.
[0213] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0214] Receive a first test result, and test the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction;
[0215] The second test result is returned to the first device.
[0216] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0217] Sending the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor to send the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor;
[0218] The first test result output by the j-1th second graphics processor is determined as the second test result.
[0219] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0220] Sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor to send the first test result to the third second graphics processor, until the K-1 second graphics processor sends the first test result to the K second graphics processor;
[0221] The test data output by the Kth second graphics processor is determined as the second test result.
[0222] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0223] Calling the second kernel module to send the second test result to the second network card on the second device;
[0224] The second message transfer tool is called to send the second test result to the first network card on the first device through the second network card.
[0225] 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:
[0226] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0227] A second test result returned after the second device tests the second GPU cluster is received.
[0228] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0229] Sending a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor to send the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor;
[0230] The test data output by the (i-1)th first graphics processor is determined as the first test result.
[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0232] Sending a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor;
[0233] The test data output by the Kth first graphics processor is determined as a first test result.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0235] Calling a first kernel module to send a first test result to a first network card on a first device;
[0236] The first message transfer tool is called to send the first test result to the second network card on the second device through the first network card.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] Receive a first test result, and test the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction;
[0239] The second test result is returned to the first device.
[0240] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0241] Sending the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor to send the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor;
[0242] The first test result output by the j-1th second graphics processor is determined as the second test result.
[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0244] Sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor to send the first test result to the third second graphics processor, until the K-1 second graphics processor sends the first test result to the K second graphics processor;
[0245] The test data output by the Kth second graphics processor is determined as the second test result.
[0246] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0247] Calling the second kernel module to send the second test result to the second network card on the second device;
[0248] The second message transfer tool is called to send the second test result to the first network card on the first device through the second network card.
[0249] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0250] When receiving the test instruction, sending the test instruction to the first graphics processor cluster for testing, obtaining a first test result, and sending the first test result to the second device; setting a second graphics processor cluster on the second device;
[0251] A second test result returned after the second device tests the second GPU cluster is received.
[0252] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0253] Sending a test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor to send the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor;
[0254] The test data output by the (i-1)th first graphics processor is determined as the first test result.
[0255] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0256] Sending a test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor;
[0257] The test data output by the Kth first graphics processor is determined as a first test result.
[0258] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0259] Calling a first kernel module to send a first test result to a first network card on a first device;
[0260] The first message transfer tool is called to send the first test result to the second network card on the second device through the first network card.
[0261] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0262] Receive a first test result, and test the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction;
[0263] The second test result is returned to the first device.
[0264] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0265] Sending the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor to send the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor;
[0266] The first test result output by the j-1th second graphics processor is determined as the second test result.
[0267] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0268] Sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor to send the first test result to the third second graphics processor, until the K-1 second graphics processor sends the first test result to the K second graphics processor;
[0269] The test data output by the Kth second graphics processor is determined as the second test result.
[0270] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0271] Calling the second kernel module to send the second test result to the second network card on the second device;
[0272] The second message transfer tool is called to send the second test result to the first network card on the first device through the second network card.
[0273] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0274] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0275] 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.
[0276] The above-described 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 present application. It should be pointed out that, for a person of ordinary skill in the art, 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. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A testing method, characterized in that: The method is applied to a first device, and the method includes: When receiving the test instruction, the test instruction is sent to the first graphics processor cluster for testing to obtain a first test result, and the first test result is sent to the second device; and a second graphics processor cluster is set on the second device; Receive a second test result returned by the second device after testing the second GPU cluster.
2. The method according to claim 1, characterized in that The first graphics processor cluster includes K first graphics processors connected in cascade, and sending the test instruction to the first graphics processor cluster for testing to obtain a first test result includes: Sending the test instruction to the i-th first graphics processor to instruct the i-th first graphics processor to send the test instruction to the i+1-th first graphics processor, and the i+1-th first graphics processor to send the test instruction to the i+2-th first graphics processor until the i-2-th first graphics processor sends the test instruction to the i-1-th first graphics processor; The test data output by the (i-1)th first graphics processor is determined as the first test result.
3. The method according to claim 2, characterized in that The path between the first first graphics processor and the Kth first graphics processor in the first graphics processor cluster is in a disconnected state, and the test instruction is sent to the first graphics processor cluster for testing to obtain a first test result, including: Sending the test instruction to the first first graphics processor to instruct the first first graphics processor to send the test instruction to the second first graphics processor, and the second first graphics processor sends the test instruction to the third first graphics processor until the K-1th first graphics processor sends the test instruction to the Kth first graphics processor; The test data output by the Kth first graphics processor is determined as the first test result.
4. The method according to claim 1 or 2, characterized in that: The sending the first test result to the second device includes: Calling a first kernel module to send the first test result to a first network card on the first device; The first message transmission tool is called to send the first test result to the second network card on the second device through the first network card.
5. A testing method, characterized in that: The method is applied to a second device, and the method includes: receiving a first test result, and testing the second graphics processor cluster according to the first test result to obtain a second test result; the first test result is a test result obtained after the first device tests the first graphics processor cluster according to the test instruction; The second test result is returned to the first device.
6. The method according to claim 5, characterized in that The second graphics processor cluster includes N second graphics processors connected in cascade, and the second graphics processor cluster is tested according to the first test result to obtain a second test result, including: Sending the first test result to the j-th second graphics processor to instruct the j-th second graphics processor to send the first test result to the j+1-th second graphics processor, and the j+1-th second graphics processor to send the first test result to the j+2-th second graphics processor until the j-2-th second graphics processor sends the first test result to the j-1-th second graphics processor; The first test result output by the j-1th second graphics processor is determined as the second test result.
7. The method according to claim 6, characterized in that The path between the first second graphics processor and the Kth second graphics processor in the second graphics processor cluster is in a disconnected state, and the second graphics processor cluster is tested according to the first test result to obtain a second test result, including: Sending the first test result to the first second graphics processor to instruct the first second graphics processor to send the first test result to the second second graphics processor, and the second second graphics processor to send the first test result to the third second graphics processor until the K-1 second graphics processor sends the first test result to the K second graphics processor; The test data output by the Kth second graphics processor is determined as the second test result.
8. The method according to claim 5 or 6, characterized in that: The returning the second test result to the first device includes: Calling a second kernel module to send the second test result to a second network card on the second device; The second message transmission tool is called to send the second test result to the first network card on the first device through the second network card.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 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 method according to any one of claims 1 to 8 are implemented.