Data transmission method and device and related equipment
By combining direct and indirect transmission paths in a multi-device interconnection system, routing IDs are configured and data transmission is divided, and intermediate device relay is used to solve the problem of low data transmission efficiency in multi-device interconnection scenarios, and communication rate and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202411060837.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-17
AI Technical Summary
In multi-device interconnection scenarios, data transmission efficiency is low, resulting in limited resource competition and communication rates.
By combining the direct transmission path and the idle indirect transmission path when determining the transmission path, the routing ID is configured to divide the data and transmit it through different paths, and data transit is used with intermediate devices, making full use of the idle transmission path resources .
It improves the data transmission efficiency of multi-device interconnection systems, avoids resource competition issues, and enhances communication speed.
Smart Images

Figure CN119149476A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a data transmission method, apparatus, and related equipment. Background Art
[0002] Multi-device interconnection refers to the interconnection and intercommunication of multiple similar devices (such as processors, chips, electronic devices, etc.) through an internet network, and an internet network refers to a network formed by interconnection paths between device ports.
[0003] The interconnection of multiple devices involves data transmission between multiple devices, that is, the sending and receiving of data between multiple devices. Therefore, how to provide a data transmission solution to improve the data transmission efficiency in the scenario of multiple device interconnection has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a data transmission method, apparatus and related equipment to improve data transmission efficiency in a multi-device interconnection scenario.
[0005] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.
[0006] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a transmitting-end device in a multi-device interconnection system, and the method includes:
[0007] Initiating data transmission, the data transmission is used to transmit data from a transmitting end device to a receiving end device;
[0008] Determine a transmission path from a transmitting end device to a receiving end device, wherein the transmission path includes a direct transmission path and at least one indirect transmission path; the direct transmission path is a transmission path from the transmitting end device directly to the receiving end device, and the indirect transmission path is a transmission path from the transmitting end device to the receiving end device via an intermediate device;
[0009] If the indirect transmission path is in an idle state, a routing ID for data transmission is configured for the data; wherein the routing ID includes a direct routing ID corresponding to the direct transmission path and an indirect routing ID corresponding to each indirect transmission path in an idle state;
[0010] The configuring of a routing ID for data transmission for the data includes:
[0011] configuring the direct routing ID for the first part of the data, and configuring at least one indirect routing ID for the second part of the data, wherein one indirect routing ID corresponds to an indirect transmission path in an idle state;
[0012] A first portion of the data is transmitted to the receiving device through the direct transmission path based on the direct routing ID, and a second portion of the data is transmitted to the receiving device through an idle indirect transmission path based on the indirect routing ID.
[0013] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a receiving device in a multi-device interconnection system, and the method includes:
[0014] Acquire a first part of data transmitted through a direct transmission path and a second part of data transmitted through an indirect transmission path; the direct transmission path is a transmission path from a transmitting end device directly to a receiving end device, and the indirect transmission path is a transmission path from a transmitting end device to a receiving end device via an intermediate device;
[0015] The data transmitted by the transmitting device is determined according to the first part of the data and the second part of the data.
[0016] In a third aspect, an embodiment of the present application provides a data routing device, which is applied to a transmitting-end device in a multi-device interconnection system, and the data routing device is used to:
[0017] When the transmitting device initiates data transmission, a transmission path from the transmitting device to the receiving device is determined. The data transmission is used to transmit data from the transmitting device to the receiving device, and the transmission path includes a direct transmission path and at least one indirect transmission path. The direct transmission path is a transmission path from the transmitting device directly to the receiving device, and the indirect transmission path is a transmission path from the transmitting device to the receiving device via an intermediate device. If the indirect transmission path is in an idle state, a routing ID for data transmission is configured for the data. Based on the routing ID, a first part of the data is transmitted to the receiving device through the direct transmission path, and a second part of the data is transmitted to the receiving device through the idle indirect transmission path.
[0018] In a fourth aspect, an embodiment of the present application provides a data routing device, which is applied to a receiving-end device in a multi-device interconnection system, including: a data acquisition module and a data processing module;
[0019] The data acquisition module is used to acquire a first part of data transmitted through a direct transmission path and a second part of data transmitted through an indirect transmission path; the direct transmission path is a transmission path from a transmitting end device directly to a receiving end device, and the indirect transmission path is a transmission path from a transmitting end device to a receiving end device via an intermediate device;
[0020] The data processing module is used to determine the data transmitted by the sending end device according to the first part of the data and the second part of the data.
[0021] In a fifth aspect, an embodiment of the present application provides a device, including the data routing device applied to a transmitting-end device as described above, or the data routing device applied to a receiving-end device as described above.
[0022] In a sixth aspect, an embodiment of the present application provides a multi-device interconnection system, comprising at least a transmitting device and a receiving device, wherein the transmitting device is configured to execute the data transmission method applied to the transmitting device as described above, and the receiving device is configured to execute the data transmission method applied to the receiving device as described above.
[0023] The data transmission method provided in the embodiment of the present application can determine the transmission path from the sending-end device to the receiving-end device after the sending-end device in the multi-device interconnection system initiates data transmission, wherein the transmission path includes a direct transmission path and at least one indirect transmission path, wherein the direct transmission path is the transmission path from the sending-end device directly to the receiving-end device, and the indirect transmission path is the transmission path from the sending-end device to the receiving-end device via an intermediate device; furthermore, the embodiment of the present application can configure the routing ID corresponding to the data transmission when there is an indirect transmission path in an idle state in the at least one indirect transmission path; wherein the routing ID includes a direct routing ID corresponding to the direct transmission path, and an indirect routing ID corresponding to each indirect transmission path in an idle state; furthermore, based on the direct routing ID, a first part of the data is transmitted to the receiving-end device through the direct transmission path, and based on the indirect routing ID, a second part of the data is transmitted to the receiving-end device through the indirect transmission path in an idle state, so as to realize data transmission.
[0024] It can be seen that the data transmission method provided in the embodiment of the present application can transmit the first part of the data through a direct transmission data path while transmitting the second part of the data through an idle indirect transmission path, so that the second part of the data can be transferred to the receiving device through an intermediate device, and the idle transmission path resources in the multi-device interconnection system can be fully utilized for data transmission, avoiding the resource contention problem caused by the transmission of all data through the direct transmission path, thereby improving the data transmission efficiency from the sending device to the receiving device in the multi-device interconnection system. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0026] Figure 1 is an example diagram of a multi-GPU interconnection system provided in an embodiment of the present application;
[0027] Figure 2 is an example diagram of a data transmission architecture provided in an embodiment of the present application;
[0028] Figure 3 is an optional flow chart of a data transmission method provided in an embodiment of the present application;
[0029] Figure 4 is an optional flow chart of another data transmission method provided in an embodiment of the present application;
[0030] Figure 5 is an example diagram of another data transmission architecture provided in an embodiment of the present application;
[0031] Figure 6 is another optional flow chart of another data transmission method provided in an embodiment of the present application;
[0032] Figure 7 is another optional flow chart of another data transmission method provided in an embodiment of the present application;
[0033] Figure 8 is a flow chart of another data transmission method provided in an embodiment of the present application;
[0034] Fig. 9 This is an example diagram of a data routing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0036] To facilitate understanding of multi-device interconnection, take the device as GPU (graphics processing unit) and the multi-device interconnection system as a multi-GPU interconnection system as an example. Figure 1An example diagram of a multi-GPU interconnection system is shown as an example. Figure 1 As shown, the multi-GPU interconnection system includes GPU0, GPU1, GPU2, and GPU3. The above four GPUs can be interconnected through transmission paths Path1 to Path6.
[0037] In a multi-device interconnection system, a device that sends data can be called a transmitting device, and a device that receives data can be called a receiving device; data transmission involved in multi-device interconnection can be data transmission from a transmitting device to a receiving device. In a multi-device interconnection scenario, one way to perform data transmission can be: sending data directly from a transmitting device to a receiving device; for example, the direct transmission path between a transmitting device and a receiving device (called a direct transmission path) has the shortest path length, and the direct transmission path with the shortest path length can be used to send data directly from the transmitting device to the receiving device. Figure 1 As shown in the figure, taking GPU0 as the transmitting device and GPU2 as the receiving device as an example, data is transmitted from GPU0 to GPU2. At this time, there are three transmission paths to choose from, including: Path5, Path4->Path3 and Path1->Path2. It can be seen that the transmission path Path5 is the shortest path from GPU0 to GPU2 (that is, the direct transmission path from GPU0 to GPU2), and Path5 can be selected as the transmission path between GPU0 and GPU2 for data transmission.
[0038] However, as the amount of data to be transmitted gradually increases, if only Path5 is selected as the data transmission path, data may be blocked in transmission path Path5, while other transmission paths Path4->Path3 and Path1->Path2 are idle, resulting in the communication rate of the entire multi-device interconnection system being limited by the bandwidth of the shortest path Path5.
[0039] To facilitate understanding of the above problem, the above transmission method is introduced below in conjunction with the accompanying drawings.
[0040] Figure 2 An exemplary diagram of a data transmission architecture is shown. Figure 2 In the data transmission architecture, the memory 110 in the transmitting device 20 is used to store data. For example, if the transmitting device 20 is a GPU, the data stored in the memory 110 may include textures, vertex data, pixel data, etc. The memory may provide the transmitting device 20 with necessary data storage space for graphics rendering and computing operations. The data moving module 111 in the transmitting device 20 is used to control data transmission; the buffer 112 (Buffer) in the data moving module 111 is an area for temporarily storing data.
[0041] In an optional implementation, the data moving module 111 may be a direct memory access (DMA) engine. The DMA engine has the ability to control data transmission. The DMA engine may read data in the memory and load the read data into a buffer, and then route and forward the data through a data routing device 113.
[0042] The data routing device 113 of the transmitting device 20 mainly performs routing control of data transmission. For example, the data routing device 113 is used to route and forward the received data to the designated receiving device 21 or receiving device 22. The data routing device 113 may include a routing ID calculation module 1131 and a data network routing table 1132; wherein the routing ID calculation module 1131 may calculate according to the address interval of the receiving device to generate a routing ID, and the address interval of a receiving device corresponds to a unique routing ID, that is, the address intervals of different receiving devices are inconsistent, and different address intervals of different receiving devices correspond to different routing IDs; the data network routing table 1132 may calculate according to the port of the transmitting device (for example Figure 1 The receiving end device connected to port 210 and port 220 in the routing ID binds the connection port of the receiving end device in the address range corresponding to the routing ID to the routing ID.
[0043] Specifically, in the routing control process of data transmission, the routing ID calculation module of the sending device calculates the routing ID of the data, and then queries the data network routing table to find the port corresponding to the routing ID. The queried port is the connection port of the address interval corresponding to the routing ID, that is, the port of the sending device connected to the receiving device, so that the data is sent to the receiving device through the queried port. For example, referring to Figure 2 When the sending end device 20 transmits data to the receiving end device 21 , the data can be transmitted to the receiving end device 21 through port port210 ; when the sending end device 20 transmits data to the receiving end device 22 , the data can be transmitted to the receiving end device 22 through port 220 .
[0044] It can be seen that in the above-mentioned data transmission method, when the data of the sending device is migrated to a certain receiving device, the sending device selects the transmission path corresponding to the port of the sending device connected to the receiving device (that is, the direct transmission path between the sending device and the receiving device) for data transmission based on the routing ID of the data. This may lead to data congestion when the amount of data to be transmitted is large.
[0045] Correspondingly, based on Figure 2 The data transmission architecture shown, Figure 3An optional flow chart of a data transmission method is shown as an example, and the method flow can be executed by a transmitting end device. Figure 3 As shown, the method flow may include the following steps.
[0046] Step S301: Initiate data transmission.
[0047] In a multi-device interconnected system, the data transmission task is initiated by the sending device, and data is transmitted from the sending device to the receiving device.
[0048] Step S302: Initialize the data network routing table.
[0049] After initiating the data transmission task, the data network routing table for providing transmission path information is initialized first to ensure that the data to be transmitted can be transmitted according to the expected transmission path.
[0050] Step S303: Determine whether the data transmission task can be started, if so, execute step S304, if not, return to step S303.
[0051] The data network routing table can provide path information for the data to be transmitted, and the data to be transmitted can be transmitted based on the transmission path indicated by the data network routing table. If the transmission path indicated by the data network routing table is in an idle state, the data transmission task can be started and the process goes to step S304; if the transmission path indicated by the data network routing table currently has data being transmitted, the data to be transmitted needs to wait until the transmission path is in an idle state to go to step S304.
[0052] Step S304: Start the data transmission task.
[0053] When the transmission path indicated by the data network routing table is in an idle state, the data transmission task can be started to transmit the data to be transmitted to the receiving end device through the idle transmission path.
[0054] Step S305: Determine whether the data transmission task is completed, if so, execute step S306, if not, return to step S305.
[0055] If the current data transmission task has been completed, the process proceeds to step S306 to end the data transmission task; if the current data transmission task has not been completed, the process continues to perform the data transmission task until the data transmission task is completed, and the process proceeds to step S306.
[0056] Step S306: End the data transmission task.
[0057] From the above data transmission method flow, it can be seen that before starting the data transmission task, the data network routing table has been initialized. The data network routing table has bound the connection port of the receiving end device in the address interval corresponding to the routing ID to the routing ID according to the receiving end device connected to the port of the sending end device. That is to say, the data network routing table has recorded the transmission path and the corresponding port from the sending end device to the receiving end device. The transmission path between the sending end device and the receiving end device is determined and cannot be adjusted dynamically, so that data can only be transmitted through the direct transmission path recorded in the data network routing table; therefore, when determining whether to start the data transmission task in step S303, if there is a large amount of data, it may cause multiple data to be transmitted to wait for the determined transmission path until the transmission path is in an idle state for transmission, so that the transmission path will be blocked by data, thereby reducing the data communication rate.
[0058] In view of this, an embodiment of the present application provides a data transmission method. When transmitting data from a sending end device to a receiving end device, part of the data can be transmitted using a direct transmission path between the sending end device and the receiving end device, and another part of the data can be transmitted using an idle indirect transmission path from the sending end device to the intermediate device and then to the receiving end device, so as to achieve the purpose of transmitting data from the sending end device to the receiving end device. Therefore, the data transmission method provided by the embodiment of the present application can improve the data transmission efficiency.
[0059] In one implementation, referring to Figure 1When GPU0 sends data D to GPU2, the data D can be split into multiple sub-data {D1, D2, ..., Dj, ..., DN}, where Dj represents the j-th sub-data, and the value range of j is 1 to N; and a path in the path set R is assigned to the sub-data Dj, and the path set R includes a direct transmission path from GPU0 to GPU2 and at least one indirect transmission path, and a data packet PDj is generated, wherein the data packet PDj includes header information and sub-data information, and the header information includes the destination node GPU2, the assigned path label R0k, and the address offset; wherein the path label R0k represents the k-th path in the path set, and the value of k is The range is 1 to M, where M represents the number of transmission paths in the path set R; assuming that data PDj is sent to the intermediate device GPU1, then after receiving the data packet PDj, the intermediate device GPU1 queries the routing information according to the path label R0k in the data packet, and forwards the corresponding data packet PDj according to the routing information, until the data packet PDj is forwarded to the receiving device GPU2. After receiving the data packet PDj, GPU2 parses the header information of the data packet PDj, and identifies the position of the sub-data carried in the data packet PDj in the data according to the address offset in the header information; and then obtains the data D according to all the relevant sub-data received by the receiving device GPU2.
[0060] As an embodiment of the present application, in the above implementation, when splitting and allocating data, it is also necessary to consider the time required for the transmission path to transmit data. The length of the transmission path is negatively correlated with the amount of sub-data allocated by the transmission path, thereby ensuring the synchronization of data transmission.
[0061] As an optional implementation, the embodiment of the present application provides another optional implementation of the data transmission method. Figure 4 The optional flow chart of another data transmission method is shown as an example, and the method can be executed by a transmitting device. Figure 4 , the data transmission method may include the following steps.
[0062] Step S401: Initiate data transmission, where the data transmission is used to transmit data from a transmitting end device to a receiving end device.
[0063] In a multi-device interconnection system, when a sending-end device needs to transmit data, the sending-end device in the multi-device interconnection system may initiate a data transmission task to enable the sending-end device to transmit data to the receiving-end device.
[0064] Step S402: determine a transmission path from the transmitting device to the receiving device, wherein the transmission path includes a direct transmission path and at least one indirect transmission path; the direct transmission path is a transmission path from the transmitting device directly to the receiving device, and the indirect transmission path is a transmission path from the transmitting device to the receiving device via an intermediate device.
[0065] As an optional implementation, the data network routing table can record all transmission paths between any two devices in the multi-device interconnection system, so that after the sending end initiates a data transmission task, the transmission path from the sending end device to the receiving end device can be determined by querying the data network routing table, wherein the transmission path may include a direct transmission path and at least one indirect transmission path. The direct transmission path is the transmission path from the sending end device directly to the receiving end device without passing through other intermediate devices; the indirect transmission path is the transmission path from the sending end device to the receiving end device through the intermediate device.
[0066] In an embodiment of the present application, when determining the transmission path from the sending device to the receiving device, in addition to the direct transmission path, the indirect transmission path for data transmission through the intermediate device needs to be considered, so that when the routing ID for data transmission is subsequently configured, the idle transmission path resources of the intermediate device can be fully utilized to improve data transmission efficiency.
[0067] The following describes in detail a method for determining transmission from a transmitting-end device to a receiving-end device in conjunction with the accompanying drawings.
[0068] Figure 5 Another exemplary diagram of a data transmission architecture is shown. Figure 5 and Figure 2 The same architecture can refer to the description of the corresponding part in the previous text. Figure 6 Another optional flow chart of another data transmission method is shown exemplarily. Figure 6 and Figure 3 The same steps can refer to the description of the corresponding part above. Figure 6 The data transmission method flow shown corresponds to Figure 5 The data transmission architecture shown is Figure 5 The data transfer architecture shown in the figure is executed when data transfer is performed Figure 6 The method flow is shown.
[0069] In an optional implementation, before initiating data transmission, the routing information corresponding to the transmission path from the transmitting end device to the receiving end device can be configured in advance in the data network routing table 1132. Figure 6 The data transmission method further includes step S603: obtaining a data network routing table; step S604: calculating indirect transmission path routing information; and step S605: configuring indirect transmission path routing information.
[0070] After initializing the data network routing table, the device driver in the multi-device interconnection system can obtain the current data network routing table, in which the direct transmission path between any two devices in the multi-device interconnection system is pre-recorded.
[0071] Furthermore, in an optional implementation, all indirect transmission paths between any two devices in the multi-device interconnected system can be determined based on the topological relationship of the multiple devices in the interconnected system, thereby configuring routing information corresponding to all indirect transmission paths between two devices (for example, a sending end device to a receiving end device) in the data network routing table.
[0072] Combination Figure 5 and Figure 6 In the embodiment of the present application, the routing ID corresponding to the indirect transmission path can be configured in the alternative routing ID module 1152.
[0073] Combination Figure 2 and Figure 5 The data transmission architecture provided in the embodiment of the present application adds a marking module 1151, an alternative route ID module 1152, and a routing table module 1153 to the data routing device 113. The marking module 1151 is used to determine whether to use the alternative route ID module 1152, and the alternative route ID module records the routing ID information of the indirect transmission path. The routing table module 1153 includes a data network routing table 1132. Figure 5 The middle dotted line indicates a path for data transmission through an indirect transmission path using an alternative routing ID module, for example, first transmitting data from the sending end device 20 to the intermediate device 51 , and then transmitting the data from the intermediate device 51 to the receiving end device 22 .
[0074] In an embodiment of the present application, the data routing device may include the above-mentioned marking module, routing ID calculation module, alternative routing ID module and routing table module. The data routing device may be a module that drives a device driver to implement a data routing function.
[0075] When starting a data transmission task, the device driver can decide whether to enable the indirect transmission path and start the alternative route ID module based on the idle status of the current transmission path. If the alternative route ID module is started, the route ID of the part of the data to be transmitted that needs to be transmitted through the indirect transmission path can be configured in the alternative route ID module, and the route ID of the part of the data to be transmitted can be marked as the route ID corresponding to the indirect transmission path in the idle state, and then the part of the data to be transmitted can be transmitted based on the indirect transmission path in the idle state of the corresponding routing ID, thereby achieving the purpose of dynamically adjusting the route.
[0076] Back to Figure 4 As shown, step S403: if the indirect transmission path is in an idle state, a routing ID for data transmission is configured for the data; wherein the routing ID includes a direct routing ID corresponding to the direct transmission path, and an indirect routing ID corresponding to each idle indirect transmission path.
[0077] The following is a further introduction to the data transmission method process provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0078] Figure 7 Another optional flow chart of another data transmission method is exemplarily shown. Figure 7 and Figure 3 The same steps can be referred to the description of the corresponding part above.
[0079] Step S301: Initiate data transmission.
[0080] Step S702: Query the transmission path status.
[0081] After determining all transmission paths from the transmitting device to the receiving device, the device driver can query the idle state of the indirect transmission path from the transmitting device to the receiving device. If there is no indirect transmission path in the idle state, step S304 is executed to use the direct transmission path for data transmission; if there is an indirect transmission path in the idle state in at least one indirect transmission path, step S703 is executed.
[0082] Step S703: split the data according to the number of indirect transmission paths in the idle state and the number of direct transmission paths.
[0083] In an optional implementation, the data to be transmitted in the data transmission may be divided into a plurality of sub-data according to the indirect transmission paths in an idle state and the number of direct transmission paths.
[0084] Therefore, the first part of the data may include a sub-data transmitted through a direct transmission path, and the second part of the data may include at least one sub-data transmitted through each idle indirect transmission path, and one sub-data transmitted through an idle indirect transmission path; that is, a sub-data of the first part of the data and each sub-data of the second part of the data can form the multiple sub-data.
[0085] In an embodiment of the present application, if there is at least one indirect transmission path in an idle state, by splitting the data, it is possible to simultaneously use multiple transmission paths (including direct transmission paths and indirect transmission paths in an idle state) for transmission, thereby making full use of the idle indirect transmission path resources in the multi-device interconnection system, thereby improving data transmission efficiency.
[0086] In an optional embodiment, assuming that the data to be transmitted is D and the size is S, and the number of indirect transmission paths and direct transmission paths in an idle state is N, the data D can be divided into N equal parts of sub-data, such as D1, D2, D3, ..., DN, and the size of each sub-data is S / N.
[0087] Step S704: configure the routing ID corresponding to the data transmission.
[0088] In the embodiment of the present application, the routing ID may include a direct routing ID corresponding to a direct transmission path, and an indirect routing ID corresponding to each indirect transmission path in an idle state.
[0089] Correspondingly, when configuring a routing ID for data transmission for the data, a direct routing ID can be configured for the first part of the data, and at least one indirect routing ID can be configured for the second part of the data, wherein one indirect routing ID corresponds to an indirect transmission path in an idle state.
[0090] After the data to be transmitted is split, the data to be transmitted is split into multiple sub-data. At this time, the multiple sub-data after the split can be processed differently, and each sub-data can be transmitted through a different transmission path; among them, one sub-data can be transmitted through a direct transmission path, and other sub-data can be transmitted through an indirect transmission path that is in an idle state.
[0091] Therefore, a direct routing ID or an indirect routing ID corresponding to the transmission through different transmission paths can be configured for each sub-data in the data network routing table. In an optional implementation, a direct routing ID corresponding to the direct transmission path can be configured for a sub-data corresponding to the first part of the data; and for each sub-data in the second part of the data, an indirect routing ID corresponding to the indirect transmission path in the idle state for transmitting the sub-data can be configured for the sub-data.
[0092] Therefore, after the data transmission task is subsequently started, each sub-data can be transmitted through the transmission path with the corresponding routing ID configured in the data network routing table, thereby achieving simultaneous forwarding through multiple different transmission paths and improving data transmission efficiency.
[0093] In an optional embodiment, when GPU0 sends data D to GPU2, if there is at least one indirect transmission path in an idle state, the data D can be split to obtain multiple sub-data {D1, D2, ..., Dj, ..., DN}, where Dj represents the jth sub-data, and the value range of j is 1 to N; a data packet PDj is generated, wherein the data packet PDj includes header information and sub-data information, and the header information at least includes a routing ID configured for the data Dj; wherein the routing ID corresponds to the routing ID of the transmission path (including the direct transmission path and the indirect transmission path in the idle state) in the data network routing table. For example, the routing ID configured for the data D1 transmitted through the direct transmission path is the direct routing ID, and the routing ID configured for the data Dj transmitted through one of the indirect transmission paths in the idle state is the indirect routing ID corresponding to the indirect transmission path.
[0094] Further, in an optional implementation, referring to Figure 5 In the embodiment of the present application, after splitting the data to be transmitted into multiple sub-data, the marking module 1151 can be used to mark the split sub-data to be transmitted, so as to decide whether to use the alternative route ID module based on the marking of the sub-data to be transmitted, thereby ensuring that the sub-data to be transmitted can enter the corresponding route ID calculation module 1131 or the alternative route ID module 1152 to configure the corresponding route ID, thereby preventing confusion when configuring the route ID.
[0095] In an optional embodiment, a mark can be set for each sub-data in the second part of the data, that is, a mark can be set for the sub-data that transmits data through an indirect transmission path in an idle state; when configuring the routing ID, based on the marking situation, a direct routing ID corresponding to the direct transmission path can be configured for a sub-data corresponding to the first part of the data without a mark set; and an indirect routing ID corresponding to the indirect transmission path in the idle state for transmitting the sub-data can be set for each sub-data in the second part of the data with a mark set.
[0096] For ease of understanding, Figure 1 As an example, the multi-GPU interconnected system shown in Figure 5When data is transmitted from GPU0 to GPU2, it is assumed that the data D to be transmitted is split into data D1, D2, and D3. For example, in the marking module 1151, a mark can be set for data D2 and data D3, and no mark is set for data D1. Then, the unmarked data D1 enters the routing ID calculation module 1131, and a direct routing ID corresponding to the direct transmission path Path5 is configured; the marked data D2 enters the alternative routing ID module 1152, and an indirect routing ID corresponding to the indirect transmission path Path1->Path2 in an idle state can be configured; and the marked data D3 enters the alternative routing ID module 1152, and an indirect routing ID corresponding to the indirect transmission path Path4->Path3 in an idle state can be configured.
[0097] In other embodiments, a first tag may be set for each sub-data in the first part of the data, that is, the first tag is set for the sub-data that transmits data through a direct transmission path; and a second tag may be set for each sub-data in the second part of the data, that is, the second tag is set for the sub-data that transmits data through an indirect transmission path in an idle state. When configuring the routing ID, based on the above-mentioned tag situation, a direct routing ID corresponding to the direct transmission path may be configured for a sub-data corresponding to the first part of the data with the first tag set; and an indirect routing ID corresponding to the indirect transmission path in an idle state for transmitting the sub-data may be set for each sub-data in the second part of the data with the second tag set.
[0098] Step S304: Start the data transmission task.
[0099] Step S705: Perform data transmission task.
[0100] Back to Figure 4 As shown, step S404: transmitting the first part of the data to the receiving end device through the direct transmission path based on the direct routing ID, and transmitting the second part of the data to the receiving end device through the idle state indirect transmission path based on the indirect routing ID.
[0101] In an embodiment of the present application, after completing the configuration of the routing ID for data transmission, the data transmission task can be started to transmit the first part of the data through the direct transmission path corresponding to the direct routing ID, and to transmit each component data of the second part of the data through the indirect transmission path corresponding to the indirect routing ID of each component data of the second part of the data.
[0102] In the data transmission method provided in the embodiment of the present application, during the specific data transmission task, data can be transmitted to the corresponding port based on the routing information recorded in the data network routing table and forwarded through the ports of multiple devices.
[0103] In an optional implementation, routing information of a direct transmission path corresponding to the direct routing ID may be queried in a data network routing table, wherein the routing information of the direct transmission path indicates a first port of a transmitting-end device, and the first port is connected to the receiving-end device; the first part of the data is transmitted through the queried routing information of the direct transmission path;
[0104] And, for each sub-data of the second part of the data, the routing information of the indirect transmission path corresponding to the indirect routing ID of each sub-data can be queried in the data network routing table, wherein the routing information of the indirect transmission path indicates the second port of the sending end device, and the second port is connected to the intermediate device to convey the sub-data of the second part of the data to the receiving end device through the intermediate device; the sub-data of the second part of the data is transmitted through the queried routing information of the indirect transmission path;
[0105] The data network routing table records the routing information and routing IDs corresponding to all transmission paths between any two devices in the multi-device interconnection system.
[0106] Continue to combine Figure 5 In an optional embodiment, after completing the configuration of the routing IDs of the sub-data D1, D2 and D3 to be transmitted, the data transmission task is started, and the routing information of the direct transmission path corresponding to the direct routing ID configured for the data D1 can be queried in the data network routing table. For example, the routing information of the direct transmission path indicates that the first port of the transmitting end device 20 is port220, and the first port port220 is connected to the receiving end device 22, then the data D1 can be transmitted based on the routing information of the direct transmission path queried above;
[0107] And query in the data network routing table, the routing information of the indirect transmission path in the idle state corresponding to the indirect routing ID configured for the data D2, for example, the routing information of the indirect transmission path in the idle state indicates that the second port of the sending end device 20 is port210, and the second port port210 is connected to the intermediate device 51, then the data D2 can be transmitted to the receiving end device 22 through the intermediate device 51 based on the routing information of the indirect transmission path in the idle state queried above, so as to complete the data transmission.
[0108] That is to say, in the embodiment of the present application, when transmitting data, the multi-device interconnection system only needs to provide routing information corresponding to the data transmission path to the corresponding hardware ports in the multiple devices, and perform data transmission through the hardware ports of the devices. Furthermore, when data is transmitted between multiple devices, the loss of data can be reduced, the synchronization of data transmission can be improved, and the data transmission efficiency can be improved.
[0109] Step S306: End the data transmission task.
[0110] It can be seen that the data transmission method provided in the embodiment of the present application can transmit the first part of the data through a direct transmission data path while transmitting the second part of the data through an idle indirect transmission path, so that the second part of the data can be transferred to the receiving device through an intermediate device, and the idle transmission path resources in the multi-device interconnection system can be fully utilized for data transmission, avoiding the resource contention problem caused by the transmission of all data through the direct transmission path, thereby improving the data transmission efficiency from the sending device to the receiving device in the multi-device interconnection system.
[0111] As an optional implementation, the embodiment of the present application also provides a data transmission method, which is applied to a receiving device in a multi-device interconnection system, such as Figure 8 As shown, Figure 8 A flow chart of another data transmission method is exemplarily shown, and the method includes the following steps.
[0112] Step S801: Acquire a first portion of data transmitted via a direct transmission path and a second portion of data transmitted via an indirect transmission path; the direct transmission path is a transmission path from a transmitting device directly to a receiving device, and the indirect transmission path is a transmission path from a transmitting device to a receiving device via an intermediate device.
[0113] Step S802: Determine data transmitted by the transmitting device according to the first part of the data and the second part of the data.
[0114] The first part of the data includes a sub-data transmitted through a direct transmission path; the second part of the data includes at least one sub-data transmitted through an indirect transmission path; wherein each sub-data in the first part of the data and the second part of the data forms the data transmitted by the sending end device.
[0115] In an embodiment of the present application, the receiving device can simultaneously obtain data sent by the sending device through multiple different transmission paths (including direct transmission paths and indirect transmission paths). Since the data to be transmitted is split into multiple sub-data during the data transmission process, the receiving device needs to process the multiple sub-data after receiving the multiple sub-data to form the data transmitted by the sending device.
[0116] The embodiment of the present application also provides a data routing device applied to a sending-end device in a multi-device interconnection system. The data routing device can refer to Figure 5 The data routing device 113 shown is used for:
[0117] When the transmitting device initiates data transmission, a transmission path from the transmitting device to the receiving device is determined. The data transmission is used to transmit data from the transmitting device to the receiving device, and the transmission path includes a direct transmission path and at least one indirect transmission path. The direct transmission path is a transmission path from the transmitting device directly to the receiving device, and the indirect transmission path is a transmission path from the transmitting device to the receiving device via an intermediate device. If the indirect transmission path is in an idle state, a routing ID for data transmission is configured for the data. Based on the routing ID, a first part of the data is transmitted to the receiving device through the direct transmission path, and a second part of the data is transmitted to the receiving device through the idle indirect transmission path.
[0118] In an optional implementation, the routing ID includes a direct routing ID corresponding to the direct transmission path, and an indirect routing ID corresponding to each idle indirect transmission path;
[0119] The data routing device 113 includes:
[0120] A routing ID calculation module 1131, configured to configure the direct routing ID for the first part of the data;
[0121] The alternative route ID module 1152 is used to configure at least one indirect route ID for the second part of the data, wherein one indirect route ID corresponds to an indirect transmission path in an idle state.
[0122] In an optional implementation, the data routing device 113 is driven by a device driver of the transmitting end device; the device driver is used to split the data into multiple sub-data according to the number of the indirect transmission path in the idle state and the direct transmission path;
[0123] The first part of the data includes a sub-data transmitted through a direct transmission path; the second part of the data includes at least one sub-data transmitted through each idle indirect transmission path, and an idle indirect transmission path transmits a sub-data.
[0124] In an optional implementation, the data routing device 113 further includes:
[0125] The marking module 1151 is used to set a mark for each sub-data in the second part of the data, wherein no mark is set for the sub-data in the first part of the data.
[0126] In an optional implementation, the routing ID calculation module 1131, configured to configure the direct routing ID for the first part of the data, includes:
[0127] For a portion of the sub-data that is not marked, configure a direct routing ID corresponding to the direct transmission path;
[0128] The alternative route ID module 1152 is used to configure at least one indirect route ID for the second part of the data, wherein one indirect route ID corresponds to an idle indirect transmission path including:
[0129] For each sub-data to which a mark is set, an indirect route ID corresponding to an idle indirect transmission path for transmitting the sub-data is set.
[0130] In an optional implementation, the data routing device 113 also includes: a routing table module 1153, which is used to transmit the first part of the data through a direct transmission path corresponding to the direct routing ID of the first part of the data when starting data transmission, and transmit each molecular data of the second part of the data through an indirect transmission path corresponding to the indirect routing ID of each molecular data of the second part of the data.
[0131] The present application also provides a data routing device, which is applied to a receiving device in a multi-device interconnection system, such as Fig. 9 As shown, Fig. 9 An exemplary diagram of a data routing device is shown, the device comprising:
[0132] The data acquisition module 901 is used to acquire the first part of the data transmitted through the direct transmission path and the second part of the data transmitted through the indirect transmission path; the direct transmission path is a transmission path from the transmitting end device directly to the receiving end device, and the indirect transmission path is a transmission path from the transmitting end device to the receiving end device via the intermediate device;
[0133] The data processing module 902 is used to determine the data transmitted by the sending end device according to the first part of the data and the second part of the data.
[0134] An embodiment of the present application further provides a device, including the data routing device applied to a transmitting-end device as described in the foregoing embodiment, or the data routing device applied to a receiving-end device as described in the foregoing embodiment.
[0135] An embodiment of the present application also provides a multi-device interconnection system, including multiple interconnected devices, wherein the devices are the devices described in the aforementioned embodiments, or the multiple devices at least include a sending-end device and a receiving-end device, the sending-end device is configured to execute the data transmission method applied to the sending-end device as provided in the aforementioned embodiments, and the receiving-end device is configured to execute the data transmission method applied to the receiving-end device as provided in the aforementioned embodiments.
[0136] The above describes multiple implementation schemes provided by the embodiments of the present application. The various optional methods introduced in each implementation scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible implementation schemes, which can all be considered as implementation schemes disclosed and open in the embodiments of the present application.
[0137] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be subject to the scope defined by the claims.
Claims
1. A data transmission method, It is characterized in that Applied to a transmitting-end device in a multi-device interconnection system, the method comprises: Initiating data transmission, the data transmission is used to transmit data from a transmitting end device to a receiving end device; Determine a transmission path from a transmitting end device to a receiving end device, wherein the transmission path includes a direct transmission path and at least one indirect transmission path; the direct transmission path is a transmission path from the transmitting end device directly to the receiving end device, and the indirect transmission path is a transmission path from the transmitting end device to the receiving end device via an intermediate device; If the indirect transmission path is in an idle state, a routing ID for data transmission is configured for the data; wherein the routing ID includes a direct routing ID corresponding to the direct transmission path and an indirect routing ID corresponding to each indirect transmission path in an idle state; The routing ID configured for data transmission includes: configuring the direct routing ID for the first part of the data, and configuring at least one indirect routing ID for the second part of the data, wherein one indirect routing ID corresponds to an indirect transmission path in an idle state; A first portion of the data is transmitted to the receiving device through the direct transmission path based on the direct routing ID, and a second portion of the data is transmitted to the receiving device through an idle indirect transmission path based on the indirect routing ID.
2. The data transmission method according to claim 1, It is characterized in that Before executing the step of configuring a routing ID for data transmission for the data, the method further includes: Splitting the data into a plurality of sub-data according to the indirect transmission path in the idle state and the number of the direct transmission paths; The first part of the data includes a sub-data transmitted through a direct transmission path; the second part of the data includes at least one sub-data transmitted through each idle indirect transmission path, and an idle indirect transmission path transmits a sub-data.
3. The data transmission method according to claim 2, It is characterized in that Configuring the direct routing ID for the first portion of the data includes: configuring a direct routing ID corresponding to the direct transmission path for a portion of the sub-data corresponding to the first portion of the data; Configuring at least one indirect routing ID for the second portion of the data comprises: For each sub-data in the second part of the data, an indirect routing ID corresponding to an idle indirect transmission path for transmitting the sub-data is configured for the sub-data.
4. The data transmission method according to claim 3, It is characterized in that After splitting the data into a plurality of sub-data, the method further comprises: Setting a mark for each sub-data in the second part of the data, wherein no mark is set for the sub-data in the first part of the data; The configuration of the direct routing ID corresponding to the direct transmission path for a sub-data corresponding to the first part of the data includes: For a portion of the sub-data that is not marked, configure a direct routing ID corresponding to the direct transmission path; For each sub-data in the second part of the data, configuring the indirect routing ID corresponding to the idle indirect transmission path for transmitting the sub-data for the sub-data comprises: For each sub-data to which a mark is set, an indirect route ID corresponding to an idle indirect transmission path for transmitting the sub-data is set.
5. The data transmission method according to any one of claims 1 to 4, It is characterized in that The method further comprises: Initializing a data network routing table, wherein the data network routing table pre-records a direct transmission path between any two devices in the multi-device interconnection system; Determine all indirect transmission paths between any two devices according to the topological relationship of each device in the multi-device interconnection system; Configuring all indirect transmission paths between any two devices in the data network routing table; Determining a transmission path from a transmitting end device to a receiving end device includes: The data network routing table is queried to determine the transmission path from the transmitting end device to the receiving end device; wherein the data network routing table records all transmission paths between any two devices in the multi-device interconnection system.
6. The data transmission method according to any one of claims 3 to 4, It is characterized in that The transmitting of the first part of the data to the receiving end device through the direct transmission path based on the direct routing ID, and the transmitting of the second part of the data to the receiving end device through the idle state indirect transmission path based on the indirect routing ID comprises: Data transmission is initiated to transmit the first part of the data through the direct transmission path corresponding to the direct routing ID, and to transmit each component data of the second part of the data through the indirect transmission path corresponding to the indirect routing ID of each component data of the second part of the data.
7. The data transmission method according to claim 6, It is characterized in that The starting of data transmission to transmit the first part of the data through the direct transmission path corresponding to the direct routing ID comprises: querying the routing information of the direct transmission path corresponding to the direct routing ID in the data network routing table, wherein the routing information of the direct transmission path indicates a first port of the transmitting end device, and the first port is connected to the receiving end device; transmitting the first part of the data through the queried routing information of the direct transmission path; The data network routing table records the routing information and routing IDs corresponding to all transmission paths between any two devices in the multi-device interconnection system.
8. The data transmission method according to claim 7, It is characterized in that The indirect transmission path corresponding to the indirect routing ID of each molecular data of the second part of the data, transmitting each molecular data of the second part of the data includes: For each sub-data of the second part of the data, the routing information of the indirect transmission path corresponding to the indirect routing ID of each sub-data is queried in the data network routing table, and the routing information of the indirect transmission path indicates the second port of the sending end device, and the second port is connected to the intermediate device to convey the sub-data of the second part of the data to the receiving end device through the intermediate device; the sub-data of the second part of the data is transmitted through the queried routing information of the indirect transmission path.
9. A data transmission method, It is characterized in that Applied to a receiving end device in a multi-device interconnection system, the method comprises: Acquire a first part of data transmitted through a direct transmission path and a second part of data transmitted through an indirect transmission path; the direct transmission path is a transmission path from a transmitting end device directly to a receiving end device, and the indirect transmission path is a transmission path from a transmitting end device to a receiving end device via an intermediate device; The data transmitted by the transmitting device is determined according to the first part of the data and the second part of the data.
10. A data routing device, It is characterized in that Applicable to a transmitting device in a multi-device interconnection system, the data routing device is used to: When the transmitting-end device initiates data transmission, determining a transmission path from the transmitting-end device to the receiving-end device, the data transmission is used to transmit data from the transmitting-end device to the receiving-end device, and the transmission path includes a direct transmission path and at least one indirect transmission path; The direct transmission path is a transmission path from the sending end device directly to the receiving end device, and the indirect transmission path is a transmission path from the sending end device to the receiving end device via an intermediate device; If the indirect transmission path is in an idle state, configuring a routing ID for data transmission for the data; A first portion of the data is transmitted to the sink device through the direct transmission path based on the routing ID, and a second portion of the data is transmitted to the sink device through the indirect transmission path in an idle state.
11. The data routing device according to claim 10, It is characterized in that The routing ID includes a direct routing ID corresponding to the direct transmission path and an indirect routing ID corresponding to each idle indirect transmission path; The data routing device comprises: a routing ID calculation module, configured to configure the direct routing ID for the first portion of the data; The alternative route ID module is used to configure at least one indirect route ID for the second part of the data, wherein one indirect route ID corresponds to an indirect transmission path in an idle state.
12. The data routing device according to claim 11, It is characterized in that The data routing device is driven by a device driver of the transmitting device; the device driver is used to split the data into multiple sub-data according to the number of the indirect transmission paths in the idle state and the direct transmission paths; The first part of the data includes a sub-data transmitted through a direct transmission path; the second part of the data includes at least one sub-data transmitted through each idle indirect transmission path, and an idle indirect transmission path transmits a sub-data.
13. The data routing device according to claim 12, It is characterized in that The data routing device also includes: The marking module is used to set a mark for each sub-data in the second part of the data, wherein no mark is set for the sub-data in the first part of the data.
14. The data routing device according to claim 13, It is characterized in that The routing ID calculation module, configured to configure the direct routing ID for the first part of the data, comprises: For a portion of the sub-data that is not marked, configure a direct routing ID corresponding to the direct transmission path; The alternative route ID module is used to configure at least one indirect route ID for the second part of the data, wherein one indirect route ID corresponds to an indirect transmission path in an idle state, including: For each sub-data to which a mark is set, an indirect route ID corresponding to an idle indirect transmission path for transmitting the sub-data is set.
15. The data routing device according to any one of claims 10 to 14, It is characterized in that The data routing device also includes: a routing table module, which is used to transmit the first part of the data through a direct transmission path corresponding to the direct routing ID of the first part of the data when starting data transmission, and transmit each component data of the second part of the data through an indirect transmission path corresponding to the indirect routing ID of each component data of the second part of the data.
16. A data routing device, It is characterized in that A receiving-end device used in a multi-device interconnection system, comprising: a data acquisition module and a data processing module; The data acquisition module is used to acquire a first part of data transmitted through a direct transmission path and a second part of data transmitted through an indirect transmission path; the direct transmission path is a transmission path from a transmitting end device directly to a receiving end device, and the indirect transmission path is a transmission path from a transmitting end device to a receiving end device via an intermediate device; The data processing module is used to determine the data transmitted by the sending end device according to the first part of the data and the second part of the data.
17. A device, It is characterized in that It comprises the data routing device as claimed in any one of claims 10 to 15, or the data routing device as claimed in claim 16.
18. A multi-device interconnection system, It is characterized in that Comprising a plurality of interconnected devices, wherein the device is the device as claimed in claim 17, or the plurality of devices at least comprises a transmitting end device and a receiving end device, wherein the transmitting end device is configured to execute the data transmission method as claimed in any one of claims 1 to 8, and the receiving end device is configured to execute the data transmission method as claimed in claim 9.
