Data multicast method, device and system, electronic equipment and storage medium
By generating data storage packets carrying multicast data and multicast address information and performing multicast processing, the problem of excessive memory and network bandwidth burden caused by data multicasting methods in the prior art is solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN202411783668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the data multicast method causes the source node's memory bandwidth and network bandwidth to be overloaded. The source node needs to read data multiple times and transmit multiple identical messages at the network level.
By obtaining the multicast address information of the multicast data, a data storage packet carrying the multicast data and multicast address information is generated and sent to the switching node. The switching node multicasts the packet to each member node of the multicast group based on the multicast address information.
Reduces the burden of memory bandwidth of the source node, requires only one data reading, and reduces the network bandwidth pressure by reducing the number of messages transmitted by the network.
Smart Images

Figure CN119520184A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a data multicast method, device, system, electronic device and storage medium. Background Art
[0002] In large-scale model training, when using multiple GPUs / CPUs (Graphics Processing Unit / Central Processing Unit) for model parallelism, data parallelism, or pipeline parallelism, it is often necessary to perform data multicast operations to ensure that all devices participating in the calculation can share the same data.
[0003] Figure 1 This is a data multicast scheme commonly used in the prior art. In this scheme, CPU / GPU1 is used as a source node and its data needs to be multicast to three destination nodes: CPU / GPU0, CPU / GPU2, and CPU / GPU3. In this process, CPU / GPU1 first needs to read the data to be multicast three times, and generate an independent data storage message for each target storage address and send it to the switching component; then, the switching component will decode the received target storage address and forward the corresponding data storage message to the correct destination node.
[0004] However, the above existing data multicasting methods have obvious technical problems. First, since the source node must read the same data multiple times to meet the needs of different destinations, it will increase the burden on the source node's memory bandwidth. Secondly, at the network level, since each transmission needs to be packaged into a message and transmitted through the network, three messages with the same content are actually circulating in the network, which puts additional pressure on the overall network bandwidth. Summary of the invention
[0005] In view of this, embodiments of the present invention provide a data multicast method, device, system, electronic device and storage medium to solve the problem of excessive burden on memory bandwidth and network bandwidth in the prior art.
[0006] In a first aspect, an embodiment of the present invention provides a data multicast method, which is applied to a data source node, and the method includes: Get the multicast address information of multicast data; Generate a data storage message carrying the multicast data and multicast address information; The data storage message is sent to the switching node, so that the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0007] Further, the obtaining of multicast address information of multicast data includes: Sending a request for generating multicast address information to a third-party node, the request including an identifier and a storage address of each member node of the multicast group; The multicast address information returned by the third-party node according to the request is received as the multicast address information of the multicast data.
[0008] Further, after receiving the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data, the method further includes: The connection unit sends the multicast address information of the multicast data to the memory management unit; The processing core obtains the multicast address information of the multicast data from the memory management unit through the virtual storage address of the multicast data at the data source node.
[0009] Further, the generating a data storage message carrying the multicast data and the multicast address information includes: Generate an initial data storage message; Filling the multicast address information in the destination node storage address position in the initial data storage message; The multicast data is filled in the data content position in the initial data storage message.
[0010] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
[0011] In a second aspect, an embodiment of the present invention provides a data multicast method, which is applied to a switching node, and the method includes: Receive a data storage message sent by a data source node; Determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message; According to the determination result, the data storage message is multicast to each member node of the multicast group, so that each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0012] Further, before determining the corresponding member nodes of the multicast group according to the multicast address information in the data storage message, the method further includes: Receive the correspondence between part or all of the multicast address information sent by the third-party node and each member node of the multicast group.
[0013] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
[0014] In a third aspect, an embodiment of the present invention provides a data multicast method, which is applied to a multicast group member node, and the method includes: Receiving a data storage message from a data source node sent by a switching node; Read the multicast address information in the data storage message to determine its own node storage address; The multicast data in the data storage message is read and saved to the memory location pointed to by the own node storage address.
[0015] Furthermore, before reading the multicast address information in the data storage message to determine the node storage address of the node, the method further includes: Receive the correspondence between part or all of the multicast address information sent by the third-party node and its own node storage address.
[0016] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine the multicast group member nodes; The multicast storage address is used by the multicast group member node to determine its own node storage address.
[0017] In a fourth aspect, an embodiment of the present invention provides a data multicast device, applied to a data source node, the device comprising: An address acquisition module, used to obtain multicast address information of multicast data; A message generation module, used for generating a data storage message carrying the multicast data and multicast address information; The message sending module is used to send the data storage message to the switching node, so that the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0018] Furthermore, the address acquisition module is specifically used for: Sending a request for generating multicast address information to a third-party node, the request including an identifier and a storage address of each member node of the multicast group; The multicast address information returned by the third-party node according to the request is received as the multicast address information of the multicast data.
[0019] Furthermore, the address acquisition module is further configured to, after receiving the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data: The connection unit sends the multicast address information of the multicast data to the memory management unit; The processing core obtains the multicast address information of the multicast data from the memory management unit through the virtual storage address of the multicast data at the data source node.
[0020] Furthermore, the message generation module is specifically used for: Generate an initial data storage message; Filling the multicast address information in the destination node storage address position in the initial data storage message; The multicast data is filled in the data content position in the initial data storage message.
[0021] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
[0022] In a fifth aspect, an embodiment of the present invention provides a data multicast device, applied to a switching node, the device comprising: A message receiving module, used for receiving a data storage message sent by a data source node; A member determination module, used to determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message; The message multicast module is used to multicast the data storage message to each member node of the multicast group according to the determination result of the member determination module, so that each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0023] Furthermore, the member determination module is further configured to, before determining the corresponding member nodes of the multicast group according to the multicast address information in the data storage message: Receive the correspondence between part or all of the multicast address information sent by the third-party node and each member node of the multicast group.
[0024] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
[0025] In a sixth aspect, an embodiment of the present invention provides a data multicast device, applied to a multicast group member node, the device comprising: A message receiving module, used for receiving a data storage message sent by a switching node from a data source node; An address mapping module is used to read the multicast address information in the data storage message to determine its own node storage address; The data storage module is used to read the multicast data in the data storage message and save it to the memory location pointed to by the node storage address of the own node.
[0026] Furthermore, the address mapping module is further configured to, before reading the multicast address information in the data storage message and determining its own node storage address: Receive the correspondence between part or all of the multicast address information sent by the third-party node and its own node storage address.
[0027] Furthermore, the multicast address information includes: A multicast domain identifier, used by the switching node to determine the multicast group member nodes; The multicast storage address is used by the multicast group member node to determine its own node storage address.
[0028] In a seventh aspect, an embodiment of the present invention provides a data multicast system, the system comprising a data source node, a switching node, and a multicast group member node, wherein: The data source node comprises the data multicast device described in the fourth aspect; The switching node comprises the data multicast device described in the fifth aspect; The multicast group member node includes the data multicast device described in the sixth aspect above.
[0029] Furthermore, the data source node and the multicast group member node are different processors on the same chip.
[0030] In an eighth aspect, an embodiment of the present invention provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data multicasting method described in the first aspect, the second aspect or the third aspect above.
[0031] In the ninth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data multicasting method described in the first aspect, the second aspect or the third aspect.
[0032] The technical solution provided by the embodiment of the present invention, on the one hand, the data source node only needs to read the data once and pack it into a data storage message, thereby reducing the memory bandwidth burden; on the other hand, only one data storage message is transmitted between the data source node and the switching node, which significantly reduces the number of messages transmitted between the two nodes and reduces the network bandwidth pressure. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of implementing a data multicast solution in the prior art; Figure 2 A flowchart of a data multicast method provided in Embodiment 1 of the present invention; Figure 3 A flowchart of a data multicast method provided in Embodiment 2 of the present invention; Figure 4 A flowchart of a data multicast method provided in Embodiment 3 of the present invention; Figure 5 A schematic diagram of the structure of a data multicast device provided in Embodiment 4 of the present invention; Figure 6 A schematic diagram of the structure of a data multicast device provided in Embodiment 5 of the present invention; Figure 7 A structural diagram of a data multicast device provided in Embodiment 6 of the present invention; Figure 8 A structural diagram of a data multicast system provided in Embodiment 7 of the present invention; Fig. 9 A schematic diagram of implementing a data multicast solution in a system provided by Embodiment 7 of the present invention; Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The technical solution of the present invention is described in detail below through various embodiments.
[0038] Embodiment 1 This embodiment provides a data multicast method, which can be executed by a data multicast device on a data source node. Figure 2 The method specifically includes the following steps 201-203.
[0039] Step 201: Acquire multicast address information of multicast data.
[0040] In this step, a multicast group may be defined in advance for data that needs to be received at multiple points (multicast data). The group consists of multiple destination nodes for receiving the data and has unique multicast address information.
[0041] As an implementation method ①, the multicast address information includes the following two items: Multicast domain identifiers are used to distinguish different multicast groups and help switching nodes in the network identify the member nodes of the multicast group so that they can correctly identify and forward messages. The multicast storage address refers to the virtual storage address used consistently by all member nodes in the multicast group. This address is used to identify the location where the multicast data should be stored. The actual data storage location will be converted into a specific physical storage address through the mapping mechanism inside each node, which helps each member node of the multicast group in the network to determine its own node storage address.
[0042] In this mode, the data source node can obtain the multicast address information through configuration files, network management protocols (such as IGMP, Internet Group Management Protocol) or other methods. For example, the data source node accesses the configuration service centrally deployed by the system to obtain the multicast address information predefined for this multicast operation. Furthermore, the configuration service centrally deployed by the system can send the correspondence between the multicast domain identifier and the identifier of each member node of the multicast group to the switching node, and send the correspondence between the multicast storage address and the storage address of each member node of the multicast group to each member node of the multicast group.
[0043] In some dynamic environments, multicast address information can be generated in real time by a data source node or other nodes according to multicast needs. Preferably, the data source node can apply to a third-party node for currently available multicast address information. A third-party node refers to a service node that is independent of the data source node, switching node, and destination node in the network and is specifically responsible for generating and managing multicast address information. Specifically, a request for generating multicast address information is sent to a third-party node, the request including the identifier and storage address of each member node of the multicast group; and the multicast address information returned by the third-party node according to the request is received as the multicast address information of the multicast data. Among them, the storage address of each member node of the multicast group contained in the generation request refers to: the actual physical address for storing multicast data on each destination node that needs to receive multicast data. After receiving the generation request, the third-party node performs the following operations: Allocate a multicast domain identifier: dynamically generate a new multicast domain identifier according to predefined rules (based on the current timestamp, request sequence number, or set algorithm, etc.); or, query multiple existing defined multicast domain identifiers and select an unused identifier from them; Determine the multicast storage address: select an unused multicast storage address from the pre-configured multicast storage address pool to ensure the uniqueness of the address; Recording corresponding relationships, including: a corresponding relationship between a multicast domain identifier and an identifier of each member node of the multicast group in the request; a corresponding relationship between a multicast storage address and a storage address of each member node of the multicast group in the request; Return multicast address information: Encapsulate the generated multicast address information (including the multicast domain identifier and the multicast storage address) into a response message and return it to the data source node.
[0044] It should be noted that before the third-party node returns the generated multicast address information to the data source node, the third-party node can send the correspondence between the recorded multicast domain identifier and the identifier of each member node of the multicast group in the request to the switching node in real time, and send the correspondence between the recorded multicast storage address and the storage address of each member node of the multicast group in the request to each member node of the multicast group. In this embodiment, there are two sending methods for the second correspondence: 1. Send all correspondences: for each member node in the multicast group, send the correspondence between the multicast storage address and the storage addresses of all member nodes of the multicast group to the member node; 2. Send a single correspondence: for each member node in the multicast group, only send the correspondence between the multicast storage address and the storage address of the member node to the member node.
[0045] Of course, those skilled in the art should understand that the above two correspondences do not have to be sent by the third party node to the switch node and each member node of the multicast group. Subsequently, the switch node and each member node of the multicast group can obtain the corresponding correspondences from the third party node in real time as needed.
[0046] As another implementation method ②, the multicast address information includes only one content: The multicast storage address refers to the virtual storage address used consistently by all member nodes in a multicast group. This address is used to identify the location where multicast data should be stored. The actual data storage location will be converted into a specific physical storage address through the mapping mechanism within each node. At the same time, it is also used to distinguish different multicast groups and help switching nodes in the network correctly identify and forward messages.
[0047] In this mode, the data source node can still obtain the multicast address information through the configuration file, network management protocol or other methods. For example, the data source node accesses the configuration file to obtain the multicast address information predefined for this multicast operation. Furthermore, the data source node can send the corresponding relationship between the multicast storage address and the identifier of each member node of the multicast group to the switching node, and send the corresponding relationship between the multicast storage address and the storage address of each member node of the multicast group to each member node of the multicast group.
[0048] Similarly, the data source node can also apply to the third-party node for currently available multicast address information. For the specific application process, please refer to the relevant description of the above implementation mode ①. The difference is that after receiving the generation request, the third-party node performs the following operations: Determine the multicast storage address: select an unused multicast storage address from the pre-configured multicast storage address pool to ensure the uniqueness of the address; Recording corresponding relationships, including: corresponding relationships between the multicast storage address and the identifiers of each member node of the multicast group in the request; corresponding relationships between the multicast storage address and the storage addresses of each member node of the multicast group in the request; Return multicast address information: Encapsulate the generated multicast address information (including the multicast storage address) into a response message and return it to the data source node.
[0049] It should be noted that before the third-party node returns the generated multicast address information to the data source node, the third-party node can send the correspondence between the recorded multicast storage address and the identifiers of each member node of the multicast group in the request to the switching node in real time, and send the correspondence between the recorded multicast storage address and the storage addresses of each member node of the multicast group in the request to each member node of the multicast group.
[0050] Exemplarily, the data source node is a processor, including: a processing core core, a memory management unit MMU (Memory Management Unit) and a connection unit Link. Accordingly, after receiving the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data, it also includes: The connection unit Link sends the multicast address information of the multicast data to the memory management unit MMU; The processing core core obtains the multicast address information of the multicast data from the memory management unit MMU through the virtual storage address of the multicast data in the data source node.
[0051] In the above example, the processing core core accesses the memory management unit MMU through the virtual storage address, and the memory management unit MMU can find the corresponding multicast data and multicast address information according to the virtual storage address.
[0052] In addition, it should be noted that in the above example, the multicast operation is triggered by the processing core in the on-chip processor. In addition, the multicast operation can also be triggered by the input / output (IO) interface or the direct memory access (DMA) controller in the on-chip processor. In this case: The connection unit Link sends the multicast address information of the multicast data to the Input / Output Memory Management Unit (IOMMU); The input / output IO interface or the direct memory access DMA controller obtains the multicast address information of the multicast data from the input / output memory management unit IOMMU through the virtual storage address of the multicast data in the data source node.
[0053] Step 202: Generate a data storage message carrying multicast data and multicast address information.
[0054] In this step, an initial data storage message can be generated in advance. Subsequently, the multicast data and multicast address information are filled into the initial data storage message to generate a final data storage message. The data storage message can be a storage request message constructed by the processing core core, or a write data message constructed by the input / output IO interface or the direct memory access DMA controller. Specifically, the multicast data should be filled in the data content position in the initial data storage message. The filling position of the multicast address information can be determined according to the actual situation. For example, the multicast address information can be filled in the expandable field at the frame header or other position in the data storage message. At this time, the destination node storage address position can be filled with an invalid address. If the multicast address information includes two contents, a multicast domain identifier and a multicast storage address, the following filling method can be used: fill the multicast storage address in the destination node storage address position in the data storage message; fill the multicast domain identifier in the expandable field at the frame header or other position in the data storage message. This embodiment does not make specific restrictions on this.
[0055] As a preferred implementation, the multicast address information is directly filled in the destination node storage address position in the initial data storage message. It should be noted that in this case, the format of the generated multicast address information should be the same as the format of the destination node storage address, but the multicast address information and the destination node storage address can be distinguished through a setting mechanism.
[0056] This preferred method reduces the use of additional modifications and extension fields to the data storage message, thereby reducing processing overhead and enabling the receiving end to directly parse the content of the location without looking up other fields, thereby improving the speed and efficiency of data processing. At the same time, using the same format as the destination node storage address ensures high compatibility with existing network protocols and hardware, avoiding problems caused by inconsistent formats.
[0057] Step 203: Send the data storage message to the switching node, so that: the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0058] In this step, the data storage message can be sent to the switching node through the connection unit in the data source node. Afterwards, the switching node determines each member node of the multicast group of the multicast data according to the multicast domain identifier or multicast storage address in the data storage message, and multicasts the data storage message to each member node of the multicast group. Finally, each member node of the multicast group maps the multicast storage address in the data storage message to their own node storage address to save the multicast data in the data storage message.
[0059] In this embodiment, one is to use a multicast domain identifier and a multicast storage address in combination to form multicast address information, and the other is to use a multicast storage address alone to form multicast address information. In this way, the switching node determines the member nodes of the multicast group in different ways: in the former case, the switching node determines each member node of the multicast group according to the multicast domain identifier in the message; in the latter case, the switching node determines each member node of the multicast group according to the multicast storage address in the message. Preferably, the former case is selected. The use of a multicast storage address alone may cause conflicts in a complex network environment, while the combination of a multicast domain identifier and a multicast storage address can allow the same multicast storage address in different domains, thereby increasing the flexibility of address allocation and reducing the impact of address conflicts on the multicast function. In addition, through the multicast domain identifier, the former case can more flexibly adapt to changes or dynamic joining of multicast group members, thereby improving the scalability of the system.
[0060] Embodiment 2 This embodiment provides a data multicast method, which can be executed by a data multicast device on a switching node and cooperate with the data source node in the first embodiment to complete data multicast. Figure 3 The method specifically includes the following steps 301-303.
[0061] Step 301: Receive a data storage message sent by a data source node.
[0062] Step 302: Determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message.
[0063] In this step, as an implementation method, the multicast address information includes: a multicast domain identifier, which is used by the switching node to determine each member node of the multicast group; and a multicast storage address, which is used by each member node of the multicast group to determine its own node storage address. The switching node can pre-receive and save the correspondence between the multicast domain identifier (part of the multicast address information) and each member node of the multicast group (usually issued by a configuration service or a third-party node). After receiving the data storage message from the data source node, the switching node identifies the multicast domain identifier in the message; if the identification is successful, it means that the message needs to be multicast forwarded, and the corresponding multicast group member node is searched according to the pre-saved correspondence.
[0064] As another implementation, the multicast address information includes a multicast storage address, which is used for: the switching node to determine each member node of the multicast group, and each member node of the multicast group to determine its own node storage address. The switching node can pre-receive and save the correspondence between the multicast storage address (all multicast address information) and each member node of the multicast group (usually sent by a configuration service or a third-party node). After receiving the data storage message from the data source node, the switching node identifies the multicast storage address in the message; if the identification is successful, it means that the message needs to be multicast forwarded, and the corresponding multicast group member node is searched and determined according to the pre-saved correspondence.
[0065] The identification operation of the multicast domain identifier and the multicast storage address is related to the filling position in the message. The switching node locates and reads the multicast domain identifier and the multicast storage address according to the predefined data storage message format.
[0066] Step 303: multicast the data storage message to each member node of the multicast group according to the determination result, so that: each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0067] In this step, after the switching node learns that the data storage message needs to be multicast forwarded and determines the multicast group member nodes, it copies one or more data storage messages and sends them to each member node of the multicast group. The specific number of copies depends on the number of multicast group member nodes and the network topology. After each member node of the multicast group receives the data storage message sent by the switching node, it maps the multicast storage address in the message to its own node storage address to save the multicast data in the message.
[0068] Embodiment 3 This embodiment provides a data multicast method, which can be executed by a data multicast device on a multicast group member node. Figure 4 The method specifically includes the following steps 401-403.
[0069] Step 401: Receive a data storage message from a data source node and sent by a switching node.
[0070] Step 402: Read the multicast address information in the data storage message to determine its own node storage address.
[0071] The multicast address information includes: a multicast domain identifier, which is used by a switching node to determine a multicast group member node; and a multicast storage address, which is used by a multicast group member node to determine its own node storage address.
[0072] In this step, as an implementation method, the multicast address information includes: a multicast domain identifier, which is used by the switching node to determine each member node of the multicast group; and a multicast storage address, which is used by each member node of the multicast group to determine its own node storage address. The multicast group member node can pre-receive and save the correspondence between the multicast storage address (part of the multicast address information) and each member node of the multicast group (usually issued by the configuration service or a third-party node).
[0073] As another implementation, the multicast address information includes a multicast storage address, which is used for: the switch node to determine the multicast group member node, and the multicast group member node to determine its own node storage address. The multicast group member node can pre-receive and save the correspondence between the multicast storage address (all multicast address information) and each member node of the multicast group (usually issued by a configuration service or a third-party node).
[0074] After receiving the data storage message sent by the switching node from the data source node, the multicast group member node extracts the multicast storage address in the message and searches for the corresponding node storage address of itself according to the pre-stored corresponding relationship.
[0075] Step 403: read the multicast data in the data storage message, and save it to the memory location pointed to by its own node storage address.
[0076] Embodiment 4 This embodiment provides a data multicast device, which can be used to execute the data multicast method described in the first embodiment of the present invention, and can be implemented by software and / or hardware and applied to a data source node. Figure 5 , the device specifically includes the following modules: An address acquisition module 501 is used to acquire multicast address information of multicast data; A message generation module 502, used to generate a data storage message carrying the multicast data and multicast address information; The message sending module 503 is used to send the data storage message to the switching node, so that the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by its own node storage address according to the multicast address information in the message.
[0077] The data multicast device in this embodiment can implement the data multicast method described in the first embodiment above. Its implementation principle and corresponding technical effects are basically the same and will not be described in detail here.
[0078] Exemplarily, the address acquisition module 501 is specifically used to: send a request for generating multicast address information to a third-party node, the request including: the identifier and storage address of each member node of the multicast group; receive the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data.
[0079] Furthermore, the address acquisition module 501 is also used to, after receiving the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data: the connection unit sends the multicast address information of the multicast data to the memory management unit; and the processing core obtains the multicast address information of the multicast data from the memory management unit through the virtual storage address of the multicast data at the data source node.
[0080] Exemplarily, the message generation module 502 is specifically used to: generate an initial data storage message; fill the multicast address information in the destination node storage address position in the initial data storage message; fill the multicast data in the data content position in the initial data storage message.
[0081] Typically, the multicast address information includes: a multicast domain identifier, which is used by the switching node to determine each member node of the multicast group; and a multicast storage address, which is used by each member node of the multicast group to determine its own node storage address.
[0082] Embodiment 5 This embodiment provides a data multicast device, which can be used to execute the data multicast method described in the second embodiment of the present invention, and can be implemented by software and / or hardware and applied to a switching node. Figure 6 , the device specifically includes the following modules: The message receiving module 601 is used to receive a data storage message sent by a data source node; A member determination module 602, configured to determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message; The message multicast module 603 is used to multicast the data storage message to each member node of the multicast group according to the determination result of the member determination module, so that each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
[0083] Furthermore, the member determination module 602 is also used to: receive the correspondence between part or all of the multicast address information sent by a third-party node and the member nodes of the multicast group before determining the corresponding member nodes of the multicast group according to the multicast address information in the data storage message.
[0084] Typically, the multicast address information includes: a multicast domain identifier, which is used by the switching node to determine each member node of the multicast group; and a multicast storage address, which is used by each member node of the multicast group to determine its own node storage address.
[0085] The data multicast device in this embodiment can implement the data multicast method described in the aforementioned second embodiment. Its implementation principle and corresponding technical effects are basically the same and will not be described in detail here.
[0086] Embodiment 6 This embodiment provides a data multicast device, which can be used to execute the data multicast method described in Embodiment 3 of the present invention, and can be implemented by software and / or hardware and applied to multicast group member nodes. Figure 7 , the device specifically includes the following modules: The message receiving module 701 is used to receive the data storage message sent by the switching node from the data source node; An address mapping module 702 is used to read the multicast address information in the data storage message to determine its own node storage address; The data storage module 703 is used to read the multicast data in the data storage message and save it to the memory location pointed to by the node storage address of the own node.
[0087] Furthermore, the address mapping module 702 is also used to receive the correspondence between part and all of the multicast address information sent by the third party node and its own node storage address before reading the multicast address information in the data storage message to determine its own node storage address.
[0088] Typically, the multicast address information includes: a multicast domain identifier, which is used by the switching node to determine the multicast group member node; and a multicast storage address, which is used by the multicast group member node to determine its own node storage address.
[0089] The data multicast device in this embodiment can implement the data multicast method described in the aforementioned embodiment 3. Its implementation principle and corresponding technical effects are basically the same and will not be described in detail here.
[0090] Embodiment 7 This embodiment provides a data multicast system. Figure 8 The system includes a data source node 801, a switching node 802 and a multicast group member node 803 (n nodes in the example in the figure), wherein: The data source node 801 includes the data multicast device according to the fourth embodiment of the present invention; The switching node 802 includes the data multicast device according to the fifth embodiment of the present invention; The multicast group member node 803 includes the data multicast device described in Embodiment 6 of the present invention.
[0091] Embodiments of the present invention may be applicable to data multicast scenarios when multiple processors are used for model parallelism, data parallelism, or pipeline parallelism in large-scale model training. Typically, the data source node 801 and the multicast group member node 803 are different processors on the same chip (e.g., a system-on-chip SoC), and may specifically be processors used for model parallelism, data parallelism, or pipeline parallelism in large-scale model training. Optionally, the switching node 802 may be located in the same chip as the data source node 801 and the multicast group member node 803, specifically as a switching component in the chip. The third node may also be located in the same chip, but unlike the data source node 801 and the multicast group member node 803, as an independent processor.
[0092] The following example illustrates the data multicast solution in the system provided by this embodiment. Fig. 9 , assuming that CPU / GPU1 is the data source node, multicasting data to three destination nodes CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3 via the switch node Switch, the process includes: Step 1: Create a multicast domain using the Multicast Management node ① The Multicast Manager receives the multicast address information MA generation request from CPU / GPU 1, which carries the identifiers and storage addresses of each member node of the multicast group of the multicast data, including the identifier and storage address PA0 of CPU / GPU 0, the identifier and storage address PA2 of CPU / GPU 2, and the identifier and storage address PA3 of CPU / GPU 3; ②Multicast Manager generates a corresponding MA for the request, including a DomainID and a VAm, where: DomainID is a multicast domain identifier corresponding to CPU / GPU 0 identifier, CPU / GPU 2 identifier, and CPU / GPU 3 identifier; VAm is a multicast storage address corresponding to PA0, PA2, and PA3; ③ Multicast Manager sends the generated MA to the requesting CPU / GPU 1; The Multicast Manager sends the correspondence between the DomainID in the generated MA and the CPU / GPU 0 identifier, the CPU / GPU 2 identifier, and the CPU / GPU 3 identifier to the Switch; The Multicast Manager sends the correspondence between VAm and PA0 in the generated MA to CPU / GPU 0, the correspondence between VAm and PA2 to CPU / GPU 2, and the correspondence between VAm and PA3 to CPU / GPU 3. Step 2: CPU / GPU 1 sends a storage request message to Switch ① The core on CPU / GPU 1 sends the virtual storage address VAc of the multicast data to the MMU. The MMU obtains the MA corresponding to VAc based on the managed VAc->MA relationship and returns it to the core. ②The core on CPU / GPU 1 constructs a storage request message. The destination PA in the message is the MA obtained from the MMU. The core sends the data storage request message to the Switch through the Link unit. Step 3: Switch multicasts storage request messages to CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3 ① After receiving the storage request message sent by CPU / GPU 1, Switch searches for the correspondence between DomainID and CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3, and obtains CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3 corresponding to the DomainID in the message; ②Switch copies the data storage request message into three copies and sends them to CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3 respectively; Step 4: CPU / GPU 0, CPU / GPU 2, and CPU / GPU 3 receive the storage request message and save the multicast data. ①After receiving the storage request message, the Link unit on CPU / GPU 0 looks up the correspondence between VAm and PA0 stored in the TLB (Translation Lookaside Buffer), and replaces VAm in the MA in the message with PA0; the Link unit on CPU / GPU 0 sends the storage request message with the replaced address to the core, which reads PA0 and multicast data in the message and accesses the memory location pointed to by the PA0 address to store the multicast data; ②After receiving the storage request message, the Link unit on CPU / GPU 2 looks up the correspondence between VAm and PA2 stored in the TLB (Translation Lookaside Buffer) and replaces VAm in MA in the message with PA2; the Link unit on CPU / GPU 2 sends the storage request message with the replaced address to the core, which reads PA2 and multicast data in the message and accesses the memory location pointed to by the PA2 address to store the multicast data; ③After receiving the storage request message, the Link unit on CPU / GPU 3 looks up the correspondence between VAm and PA3 stored in the TLB (Translation Lookaside Buffer), and replaces VAm in the MA in the message with PA3; the Link unit on CPU / GPU3 sends the storage request message with the replaced address to the core, which reads PA3 and multicast data in the message and accesses the memory location pointed to by the PA3 address to store the multicast data.
[0093] Fig.10 FIG. 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present invention, which can implement the process of any method embodiment of the present invention, such as Fig.10 As shown, the above-mentioned electronic device may include: a shell 1001, a processor 1002, a memory 1003, a circuit board 1004 and a power supply circuit 1005, wherein the circuit board 1004 is arranged inside the space enclosed by the shell 1001, and the processor 1002 and the memory 1003 are arranged on the circuit board 1004; the power supply circuit 1005 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 1003 is used to store executable program codes; the processor 1002 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 1003, so as to execute the data multicasting method described in any of the aforementioned embodiments.
[0094] The specific execution process of the above steps by the processor 1002 and the steps further executed by the processor 1002 by running the executable program code can be found in the description of the embodiment of the method of the present invention, which will not be repeated here.
[0095] This electronic device exists in many forms, including but not limited to: (1) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server has a similar architecture to general computers, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability. (2) Other electronic equipment with data processing and communication functions.
[0096] Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data multicasting method described in the above embodiment.
[0097] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0098] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0099] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0100] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0101] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0103] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data multicast method, characterized in that: Applied to a data source node, the method comprises: Get the multicast address information of multicast data; Generate a data storage message carrying the multicast data and multicast address information; The data storage message is sent to the switching node, so that the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
2. The method according to claim 1, characterized in that The obtaining of multicast address information of multicast data includes: Sending a request for generating multicast address information to a third-party node, wherein the request includes an identifier and a storage address of each member node of the multicast group; The multicast address information returned by the third-party node according to the request is received as the multicast address information of the multicast data.
3. The method according to claim 2, characterized in that After receiving the multicast address information returned by the third-party node according to the request as the multicast address information of the multicast data, the method further includes: The connection unit sends the multicast address information of the multicast data to the memory management unit; The processing core obtains the multicast address information of the multicast data from the memory management unit through the virtual storage address of the multicast data at the data source node.
4. The method according to claim 1, characterized in that: The generating of a data storage message carrying the multicast data and multicast address information comprises: Generate an initial data storage message; Filling the multicast address information in the destination node storage address position in the initial data storage message; The multicast data is filled in the data content position in the initial data storage message.
5. The method according to any one of claims 1 to 4, characterized in that The multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
6. A data multicast method, characterized in that: Applied to a switching node, the method comprises: Receive a data storage message sent by a data source node; Determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message; According to the determination result, the data storage message is multicast to each member node of the multicast group, so that each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
7. The method according to claim 6, characterized in that Before determining the corresponding member nodes of the multicast group according to the multicast address information in the data storage message, the method further includes: Receive the correspondence between part or all of the multicast address information sent by the third-party node and each member node of the multicast group.
8. The method according to claim 6 or 7, characterized in that: The multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
9. A data multicast method, characterized in that: Applied to a multicast group member node, the method comprises: Receiving a data storage message from a data source node sent by a switching node; Read the multicast address information in the data storage message to determine its own node storage address; The multicast data in the data storage message is read and saved to the memory location pointed to by the own node storage address.
10. The method according to claim 9, characterized in that Before reading the multicast address information in the data storage message to determine the node storage address of the node, the method further includes: Receive the correspondence between part or all of the multicast address information sent by the third-party node and its own node storage address.
11. The method according to claim 9 or 10, characterized in that: The multicast address information includes: A multicast domain identifier, used by the switching node to determine the multicast group member nodes; The multicast storage address is used by the multicast group member node to determine its own node storage address.
12. A data multicast device, characterized in that: Applied to a data source node, the device comprises: An address acquisition module, used to obtain multicast address information of multicast data; A message generation module, used for generating a data storage message carrying the multicast data and multicast address information; The message sending module is used to send the data storage message to the switching node, so that the switching node multicasts the message to each member node of the multicast group according to the multicast address information in the message; each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
13. The device according to claim 12, characterized in that The address acquisition module is specifically used for: Sending a request for generating multicast address information to a third-party node, wherein the request includes an identifier and a storage address of each member node of the multicast group; The multicast address information returned by the third-party node according to the request is received as the multicast address information of the multicast data.
14. The device according to claim 13, characterized in that The address acquisition module is further configured to, after receiving the multicast address information returned by the third-party node according to the request, use it as the multicast address information of the multicast data: The connection unit sends the multicast address information of the multicast data to the memory management unit; The processing core obtains the multicast address information of the multicast data from the memory management unit through the virtual storage address of the multicast data at the data source node.
15. The device according to claim 12, characterized in that The message generation module is specifically used for: Generate an initial data storage message; Filling the multicast address information in the destination node storage address position in the initial data storage message; The multicast data is filled in the data content position in the initial data storage message.
16. The device according to any one of claims 12 to 15, characterized in that The multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
17. A data multicast device, characterized in that: Applied to a switching node, the device comprises: A message receiving module, used for receiving a data storage message sent by a data source node; A member determination module, used to determine the corresponding member nodes of the multicast group according to the multicast address information in the data storage message; The message multicast module is used to multicast the data storage message to each member node of the multicast group according to the determination result of the member determination module, so that each member node of the multicast group saves the multicast data in the message to the memory location pointed to by the respective node storage address according to the multicast address information in the message.
18. The device according to claim 17, characterized in that The member determination module is further configured to, before determining the corresponding multicast group member nodes according to the multicast address information in the data storage message: Receive the correspondence between part or all of the multicast address information sent by the third-party node and each member node of the multicast group.
19. The device according to claim 17 or 18, characterized in that The multicast address information includes: A multicast domain identifier, used by the switching node to determine each member node of the multicast group; The multicast storage address is used by each member node of the multicast group to determine its own node storage address.
20. A data multicast device, characterized in that: Applied to a multicast group member node, the device comprises: A message receiving module, used for receiving a data storage message sent by a switching node from a data source node; An address mapping module is used to read the multicast address information in the data storage message to determine its own node storage address; The data storage module is used to read the multicast data in the data storage message and save it to the memory location pointed to by the node storage address of the own node.
21. The device according to claim 20, characterized in that The address mapping module is further configured to, before reading the multicast address information in the data storage message and determining its own node storage address: Receive the correspondence between part or all of the multicast address information sent by the third-party node and its own node storage address.
22. The device according to claim 20 or 21, characterized in that The multicast address information includes: A multicast domain identifier, used by the switching node to determine the multicast group member nodes; The multicast storage address is used by the multicast group member node to determine its own node storage address.
23. A data multicast system, characterized in that: The system comprises a data source node, a switching node and a multicast group member node, wherein: The data source node comprises a data multicast device as described in any one of claims 12 to 16; The switching node comprises a data multicast device as described in any one of claims 17 to 19; The multicast group member node comprises the data multicast device described in any one of claims 20-22.
24. The system according to claim 23, characterized in that The data source node and the multicast group member node are different processors on the same chip.
25. An electronic device, characterized in that: The electronic device includes: a processor and a memory, wherein the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute the method described in any one of claims 1 to 5, or the method described in any one of claims 6 to 8, or the method described in any one of claims 9 to 11.
26. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in any one of claims 1 to 5, or the method described in any one of claims 6 to 8, or the method described in any one of claims 9 to 11.
Citation Information
Cited By
DMA (Direct Memory Access) controller supporting multicast, PCIe (Peripheral Component Interface Express) switch and communication method thereof
CN120358109A
Message processing method and MMU
CN120614329A