Data transmission method and device of network-on-chip, electronic equipment and storage medium

By dividing the multicast domain in the on-chip network and adding multicast control fields, the problem of system complexity and data payload ratio reduction caused by complex routing protocols is solved, and more efficient data transmission is achieved.

CN119396767APending Publication Date: 2025-02-07BEIJING INSTITUTE OF OPEN SOURCE CHIP

Patent Information

Application Number
CN202411996845.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing on-chip networks have increased system complexity and reduced data payload ratio due to the introduction of complex routing protocols and additional control fields.

Method used

Determine the routing path of the target multicast domain and the target node by dividing the compute node with a spatial topology into multicast domains and adding multicast control fields in the message, including the multicast domain indication field and the in-domain mask field.

Benefits of technology

It reduces the design complexity of the on-chip network, improves the data payload ratio and data transmission efficiency, and avoids the complexity of introducing independent multicast protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396767A_ABST
    Figure CN119396767A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device of a network-on-chip, electronic equipment and a storage medium. The method comprises the following steps: dividing at least two computing nodes with spatial topology into multicast domains; determining a target node for receiving the first message; according to a target multicast domain to which the target node belongs, adding a multicast control field in the first message to obtain a target message; determining a first routing path outside the target multicast domain according to the multicast control field and a routing algorithm; transmitting the target message to the target multicast domain based on the first routing path; determining a second routing path in the target multicast domain according to the intra-domain mask field; and sending the target message to the target node based on the second routing path. In the embodiment of the invention, the routing path of each message can be directly determined according to the multicast control field added in the message, so that the design complexity of the network-on-chip is reduced, and the data payload proportion and the data transmission efficiency of the network-on-chip are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network-on-chip technology, and in particular to a data transmission method, device, electronic device and storage medium of a network-on-chip. Background Art

[0002] Frequent data multiplexing is required in deep learning inference tasks, so the on-chip network needs to support multicast of data packets. The multicast protocol for independent transmission of each data packet will introduce complex routing protocols, resulting in increased system complexity and a decrease in the data payload ratio on the on-chip network. Summary of the invention

[0003] The embodiments of the present invention provide a data transmission method, device, electronic device and storage medium of an on-chip network, which can solve the problem in the related art that the introduction of complex routing protocols and the addition of additional control fields lead to increased system complexity and reduced data payload ratio on the on-chip network.

[0004] In order to solve the above problem, an embodiment of the present invention discloses a data transmission method of a network on chip, which is applied to the network on chip. The method includes: partitioning at least two computing nodes having a spatial topology into multicast domains; Determine a target node for receiving the first message; According to the target multicast domain to which the target node belongs, a multicast control field is added to the first message to obtain a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; Determining a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; Transmitting the target message to the target multicast domain based on the first routing path; Determining a second routing path within the target multicast domain according to the intra-domain mask field; The target message is sent to the target node based on the second routing path.

[0005] Optionally, determining the first routing path outside the target multicast domain according to the multicast control field and the routing algorithm includes: Determining a target multicast domain and a target node of the target message based on the multicast control field; Determine a first routing node between the source sending node and the target multicast domain according to a positional relationship between a source sending node of the target message and the target multicast domain; A first routing path outside the target multicast domain is determined according to the first routing node and the routing algorithm.

[0006] Optionally, determining the second routing path within the target multicast domain according to the intra-domain mask field includes: Determine a first sending node based on the first routing path; the first sending node is a node in the first routing path responsible for sending the target message to the target multicast domain; Determine a second routing node between the first sending node and the target node indicated by the intra-domain mask field; A second routing path within the target multicast domain is determined according to the second routing node and the routing algorithm.

[0007] Optionally, determining a second routing path within the target multicast domain according to the second routing node and the routing algorithm includes: Determine, according to the routing protocol and the second routing node, a candidate routing path for the target message within the target multicast domain; Determine the routing parameters corresponding to each candidate routing path; The candidate routing path whose routing parameters satisfy the first preset condition is determined as the second routing path in the target multicast domain.

[0008] Optionally, the sending the target message to the target node based on the second routing path includes: Adding identification information to the target message to obtain a second message; the identification information is used to indicate the order in which the target message is used in the target node; Based on the second routing path, the second message is sent to the target node, so that the target node reorders the received second messages according to the identification information in the second message and continues to execute the computing task.

[0009] Optionally, before determining the target node for receiving the first message, the method further includes: Split the computational task into at least two subtasks; Determine the data transmission requirements between the subtasks, the memory access requirements and the external interface access requirements corresponding to each subtask according to the processing stage to which the subtasks belong and the dependencies between the subtasks; Determining an offloading strategy corresponding to the subtask based on the data transmission requirement, the memory access requirement, and the external interface access requirement; Based on the offloading strategy, the at least two subtasks are offloaded to at least two computing nodes.

[0010] On the other hand, an embodiment of the present invention discloses a data transmission device of a network on chip, which is applied to the network on chip, and the device includes: A partitioning module, configured to partition at least two computing nodes having a spatial topology into multicast domains; A determination module, used to determine a target node for receiving the first message; an obtaining module, configured to add a multicast control field to the first message according to the target multicast domain to which the target node belongs, so as to obtain the target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; The determination module is further configured to determine a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; A transmission module, configured to transmit the target message to the target multicast domain based on the first routing path; The determination module is further configured to determine a second routing path within the target multicast domain according to the intra-domain mask field; A sending module is used to send the target message to the target node based on the second routing path.

[0011] Optionally, the determining module includes: A determination submodule is used to determine the target multicast domain and target node of the target message based on the multicast control field; determine the first routing node between the source sending node and the target multicast domain according to the positional relationship between the source sending node of the target message and the target multicast domain; and determine the first routing path outside the target multicast domain according to the first routing node and the routing algorithm.

[0012] On the other hand, an embodiment of the present invention further discloses an electronic device, which includes a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the aforementioned on-chip network data transmission method.

[0013] The embodiment of the present invention further discloses a readable storage medium. When instructions in the readable storage medium are executed by a processor of an electronic device, the electronic device can execute the aforementioned data transmission method of the on-chip network.

[0014] The embodiments of the present invention include the following advantages: The embodiment of the present invention provides a data transmission method for a network on chip, which divides at least two computing nodes with a spatial topology into multicast domains; determines a target node for receiving a first message; adds a multicast control field to the first message according to the target multicast domain to which the target node belongs, and obtains a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; determines a first routing path outside the target multicast domain according to the multicast control field and a routing algorithm; transmits the target message to the target multicast domain based on the first routing path; determines a second routing path within the target multicast domain according to the intra-domain mask field; and sends the target message to the target node based on the second routing path. In the embodiment of the present invention, each data packet shares the same routing protocol, and during the transmission process, the routing path of each message can be directly determined according to the multicast control field added in the message, without introducing a multicast protocol for independent transmission of each data packet, thereby reducing the design complexity of the network on chip and facilitating the improvement of the data payload ratio and data transmission efficiency of the network on chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0016] Figure 1 It is a flowchart of a data transmission method embodiment of a network on chip of the present invention; Figure 2 It is a structural frame of a network on chip of the present invention. Figure 1 ; Figure 3 It is a structural frame of a network on chip of the present invention. Figure 2 ; Figure 4 It is a structural block diagram of an embodiment of a data transmission device of a network on chip of the present invention; Figure 5 It is a structural block diagram of an electronic device provided by an example of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the 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.

[0018] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of the present invention, the term "multiple" refers to two or more, and other quantifiers are similar.

[0019] Method Embodiment Reference Figure 1 , showing the steps of a data transmission method embodiment of a network on chip of the present invention Figure 1 , the method may specifically include the following steps: Step S101: dividing at least two computing nodes having a spatial topology into a multicast domain; Step S102: determining a target node for receiving the first message; Step S103: according to the target multicast domain to which the target node belongs, a multicast control field is added to the first message to obtain a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; Step S104: determining a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; Step S105: transmitting the target message to the target multicast domain based on the first routing path; Step S106: determining a second routing path within the target multicast domain according to the intra-domain mask field; Step S107: Send the target message to the target node based on the second routing path.

[0020] In the embodiment of the present invention, the multicast domain may be obtained by dividing at least two computing nodes having a spatial topology, which is not limited in the embodiment of the present application.

[0021] In the embodiment of the present invention, the target node is used to receive the first message.

[0022] In the embodiment of the present invention, the first message may be a basic unit of transmission in network communication, which is usually a data block composed of a series of characters (such as letters, numbers, symbols, etc.) and is used for information exchange in the network.

[0023] Exemplarily, the first message may include various types of data such as text, image, audio, video, etc., and the specific form depends on the communication protocol and application scenario.

[0024] In the embodiment of the present invention, the target multicast domain is used to indicate a target computing area for multicast transmission, which is not limited in the embodiment of the present invention.

[0025] In an embodiment of the present invention, the multicast control field may include a multicast domain indication field and an intra-domain mask field. The multicast domain indication field is used to indicate a target multicast domain, and the intra-domain mask field is used to indicate a target computing node within the target multicast domain.

[0026] In the embodiment of the present invention, the target message may be obtained by adding a multicast control field to the first message.

[0027] In the embodiment of the present invention, the multicast domain indication field is used to indicate the target multicast domain, that is, to determine the area for multicast transmission, which is not limited in the embodiment of the present invention.

[0028] In the embodiment of the present invention, the intra-domain mask field includes a subnet mask used to distinguish a network address part and a host address part in an IP (Internet Protocol), which is not limited in the embodiment of the present invention.

[0029] In the embodiment of the present invention, the target node in the target multicast domain may be a computing node in the multicast domain. The number of the computing nodes may include one or more, which is not limited in the embodiment of the present invention.

[0030] In the embodiment of the present invention, the core function of the routing algorithm is to determine the transmission path of the data packet in the network. When the data packet is transmitted in the network, the router will forward the data packet to the next node according to the best path calculated by the routing algorithm until the data packet reaches the destination node.

[0031] Exemplarily, in an embodiment of the present invention, common routing algorithm types may include but are not limited to distance vector algorithm, link state algorithm, path vector algorithm, etc. Routing algorithms can be classified according to their adaptability and non-adaptability, which is not limited in the embodiment of the present invention.

[0032] In the embodiment of the present invention, the first routing path outside the target multicast domain may be a path composed of routing nodes involved in calculation outside the target multicast domain, which is not limited in the embodiment of the present invention.

[0033] In the embodiment of the present invention, the on-chip network may transmit the target data to the target multicast domain according to the first routing path, and then perform multicast transmission on the target multicast domain.

[0034] In the embodiment of the present invention, the second routing path within the target multicast domain may be a routing path composed of routing nodes within the target multicast domain, which is not limited in the embodiment of the present invention.

[0035] The embodiment of the present invention provides a data transmission method for a network on chip, which divides at least two computing nodes with a spatial topology into multicast domains; determines a target node for receiving a first message; adds a multicast control field to the first message according to the target multicast domain to which the target node belongs, and obtains a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; determines a first routing path outside the target multicast domain according to the multicast control field and a routing algorithm; transmits the target message to the target multicast domain based on the first routing path; determines a second routing path within the target multicast domain according to the intra-domain mask field; and sends the target message to the target node based on the second routing path. In the embodiment of the present invention, each data packet shares the same routing protocol, and during the transmission process, the routing path of each message can be directly determined according to the multicast control field added in the message, without introducing a multicast protocol for independent transmission of each data packet, thereby reducing the design complexity of the network on chip and facilitating the improvement of the data payload ratio and data transmission efficiency of the network on chip.

[0036] In an embodiment of the present invention, in the process of determining a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm, the method may specifically include the following steps: Step S1041: Determine the target multicast domain and target node of the target message based on the multicast control field.

[0037] In the embodiment of the present invention, in the process of determining the first routing path outside the target multicast domain according to the multicast control field and the routing algorithm, the on-chip network can also determine the target multicast domain and target node of the target message based on the multicast control field.

[0038] In the embodiment of the present invention, the target multicast domain of the first message may indicate the multicast area where the first message is located, for subsequent multicast transmission.

[0039] In the embodiment of the present invention, the target node of the first message may be used to process the first message, which is not limited in the embodiment of the present invention.

[0040] Step S1042: Determine a first routing node between the source sending node and the target multicast domain according to the positional relationship between the source sending node of the target message and the target multicast domain.

[0041] In an embodiment of the present invention, after determining the target multicast domain and target node of the target message based on the multicast control field, the on-chip network can also determine the first routing node between the source sending node and the target multicast domain based on the positional relationship between the source sending node of the target message and the target multicast domain.

[0042] In the embodiment of the present invention, the source sending node of the first message may be a node that sends the first message, which is not limited in the embodiment of the present invention.

[0043] Exemplarily, in an embodiment of the present invention, if the positional relationship between the source sending node and the target multicast domain is considered, the spatial position of the source sending node and the target multicast domain needs to be included in the calculation input, and the optimal routing node is the node with the least number of hops for this multicast message; if the positional relationship between the source sending node and the target multicast domain is not considered, it is only necessary to select the shortest path to reach any node in the multicast domain according to the routing protocol, and the remaining routing paths are calculated by the routers in the multicast domain.

[0044] In the embodiment of the present invention, the first routing node between the source sending node and the target multicast domain refers to all computing nodes passed through in the process of sending the first message to the target multicast domain, that is, the first routing node, which is not limited in the embodiment of the present invention.

[0045] Step S1043: Determine a first routing path outside the target multicast domain according to the first routing node and the routing algorithm.

[0046] In an embodiment of the present invention, after determining the first routing node between the source sending node and the target multicast domain based on the positional relationship between the source sending node of the target message and the target multicast domain, the on-chip network can also determine the first routing path outside the target multicast domain based on the first routing node and the routing algorithm.

[0047] In the embodiment of the present invention, the first routing node may include all routing nodes between the source sending node and the target node, which is not limited in the embodiment of the present invention.

[0048] In the embodiment of the present invention, in the process of determining the second routing path within the target multicast domain according to the intra-domain mask field, the method may specifically include the following steps: Step S1061: determine a first sending node based on the first routing path; the first sending node is a node in the first routing path that is responsible for sending a target message to a target multicast domain.

[0049] In an embodiment of the present invention, in the process of determining the second routing path within the target multicast domain according to the intra-domain mask field, the on-chip network can also determine the first sending node based on the first routing path; the first sending node is the node in the first routing path responsible for sending the target message to the target multicast domain.

[0050] In the embodiment of the present invention, the first sending node may be a node in the first routing path that is responsible for sending the target message to the target multicast domain.

[0051] Step S1062: Determine a second routing node between the first sending node and the target node indicated by the intra-domain mask field.

[0052] In the embodiment of the present invention, after determining the first sending node based on the first routing path, the on-chip network may further determine a second routing node between the first sending node and the target node indicated by the intra-domain mask field.

[0053] In the embodiment of the present invention, the routing node between the first sending node and the target node indicated by the intra-domain mask field is the second routing node.

[0054] Step S1063: Determine a second routing path within the target multicast domain according to the second routing node and the routing algorithm.

[0055] In the embodiment of the present invention, after determining the second routing node between the first sending node and the target node indicated by the mask field in the domain, the on-chip network can also determine a second routing path in the target multicast domain according to the second routing node and the routing algorithm.

[0056] In the embodiment of the present invention, the core function of the routing algorithm is to determine the transmission path of the data packet in the network. When the data packet is transmitted in the network, the router will forward the data packet to the next node according to the best path calculated by the routing algorithm until the data packet reaches the destination node.

[0057] Exemplarily, in an embodiment of the present invention, common routing algorithm types may include but are not limited to distance vector algorithm, link state algorithm, path vector algorithm, etc. Routing algorithms can be classified according to their adaptability and non-adaptability, which is not limited in the embodiment of the present invention.

[0058] In the embodiment of the present invention, the first routing path outside the target multicast domain may be a path composed of routing nodes involved in calculation outside the target multicast domain, which is not limited in the embodiment of the present invention.

[0059] In the embodiment of the present invention, a path passing through all second routing nodes is a second routing path.

[0060] In the embodiment of the present invention, in the process of determining the second routing path in the target multicast domain according to the second routing node and the routing algorithm, the method may specifically include the following steps: Step S10631: Determine a candidate routing path for the target message within the target multicast domain according to the routing protocol and the second routing node.

[0061] In an embodiment of the present invention, in the process of determining the second routing path within the target multicast domain according to the second routing node and the routing algorithm, the on-chip network can also determine the candidate routing path of the target message within the target multicast domain according to the routing protocol and the second routing node.

[0062] In the embodiment of the present invention, a routing protocol is a protocol for exchanging routing information between network devices (such as routers) to ensure that data packets can be transmitted from the source address to the destination address along the optimal path. The main goal of these protocols is to dynamically discover and maintain the network topology and calculate the routing table based on the topology.

[0063] Exemplarily, in an embodiment of the present invention, if the positional relationship between the source sending node and the target multicast domain is considered, the spatial position of the source sending node and the target multicast domain needs to be included in the calculation input, and the candidate routing path of the target message within the target multicast domain can be the node with the least hops for this multicast message; if the positional relationship between the source sending node and the target multicast domain is not considered, the candidate routing path of the target message within the target multicast domain can be the shortest path selected according to the routing protocol to reach any node in the multicast domain, and the remaining routing paths are calculated by routers in the multicast domain.

[0064] Step S10632: Determine the routing parameters corresponding to each candidate routing path.

[0065] In the embodiment of the present invention, after determining the candidate routing paths of the target message in the target multicast domain according to the routing protocol and the second routing node, the on-chip network may also determine routing parameters corresponding to each candidate routing path.

[0066] In the embodiment of the present invention, the routing parameters corresponding to each candidate routing path may include the least number of nodes or the shortest path, which is not limited in the embodiment of the present invention.

[0067] Step S10633: determine the candidate routing path whose routing parameters meet the first preset condition as the second routing path in the target multicast domain.

[0068] In the embodiment of the present invention, after determining the routing parameters corresponding to each candidate routing path, the network on chip may also determine the candidate routing path whose routing parameters meet the first preset condition as the second routing path in the target multicast domain.

[0069] In the embodiment of the present invention, the candidate routing path of the first preset condition may include a node with the least hops for the current multicast message, or a shortest path to any node in the multicast domain, which is not limited in the embodiment of the present invention.

[0070] In the embodiment of the present invention, in the process of sending the target message to the target node based on the second routing path, the method may specifically include the following steps: Step S1071: Add identification information to the target message to obtain a second message; the identification information is used to indicate the usage order of the target message in the target node.

[0071] In an embodiment of the present invention, in the process of sending the target message to the target node based on the second routing path, the on-chip network can also add identification information to the target message to obtain a second message; the identification information is used to indicate the usage order of the target message in the target node.

[0072] In the embodiment of the present invention, the target message may be obtained after a multicast control field is added to the first message.

[0073] In the embodiment of the present invention, the identification information can be used to sort the first data.

[0074] Exemplarily, the target message may include adding an ID (Identifier, identification information) to the data, namely, Data0 (ID0), Data1 (ID1), Data8 (ID2), and Data9 (ID3), which is not limited in the embodiments of the present invention.

[0075] Exemplarily, in an embodiment of the present invention, different computing nodes may be CU (Compute Unit) CU0, CU1, CU8, and CU9, the data on the CU0 node may be Data0, the data on the CU1 node may be Data1, the data on the CU8 node may be Date8, and the data on the CU9 node may be Data9, which is not limited in the embodiment of the present invention.

[0076] In an embodiment of the present invention, the process of sorting the first data may include sorting according to the order of the identification information as required, which may be sorting from high to low or from low to high, etc., which is not limited in the embodiment of the present invention.

[0077] In the embodiment of the present invention, the sorting result may include a sorting result from high to low, or may include a sorting result from low to high, which is not limited in the embodiment of the present invention.

[0078] Illustratively, in an embodiment of the present invention, after sorting the first data, the sorting results that may be obtained are Data9 (ID3), Data8 (ID2), Data1 (ID1), Data0 (ID0), or Data0 (ID0), Data1 (ID1), Data8 (ID3), Data9 (ID3), etc., which are not limited in the embodiment of the present invention.

[0079] Step S1072: Based on the second routing path, the second message is sent to the target node, so that the target node reorders the received second messages according to the identification information in the second message and continues to execute the computing task.

[0080] In an embodiment of the present invention, after adding identification information to the target message and obtaining the second message, the on-chip network can also send the second message to the target node based on the second routing path, so that the target node reorders the received second messages according to the identification information in the second message and continues to execute the computing task.

[0081] In the embodiment of the present invention, the target node may be a node that performs calculations on the sorted data. The node may perform calculations such as summing or averaging, which is not limited in the embodiment of the present invention.

[0082] In the embodiment of the present invention, the execution of the computing task may include but is not limited to a sum computing task, or an average computing task, etc., which is not limited in the embodiment of the present invention.

[0083] In an embodiment of the present invention, the data transmission method of the network on chip may further include the following steps: Step S108: split the computing task into at least two subtasks.

[0084] In the embodiment of the present invention, before determining the target node for receiving the first message, the network on chip may split the computing task into at least two subtasks.

[0085] In the embodiment of the present invention, the computing task may include but is not limited to a summing or averaging computing task, which is not limited in the embodiment of the present invention.

[0086] In an embodiment of the present invention, at least two subtasks may be obtained by dividing or abstracting the computing task into an input layer, several intermediate layers, an output layer, etc., or may be obtained by dividing the computing task into finer granularity subtasks, which are not limited in the embodiment of the present invention.

[0087] Step S109: According to the processing stage to which the subtasks belong and the dependencies between the subtasks, determine the data transmission requirements between the subtasks, the memory access requirements and the external interface access requirements corresponding to each subtask.

[0088] In an embodiment of the present invention, after splitting the computing task into at least two subtasks, the on-chip network can also determine the data transmission requirements between the subtasks, the memory access requirements corresponding to each subtask, and the external interface access requirements based on the processing stage to which the subtasks belong and the dependencies between the subtasks.

[0089] In the embodiment of the present invention, the processing stage to which the subtask belongs may include but is not limited to an input stage, or an output stage, etc., which is not limited in the embodiment of the present invention.

[0090] For example, in an embodiment of the present invention, when the inference task Task can be divided into multiple (task) Operations, that is, OP0-OP15, a total of 16 operations, each operation depends on the calculation results of the first two levels (OP0 only depends on the input, and OP1 only depends on the result of OP0), a single chip can run at most 8 of the 16 OPs at the same time. If two chips are available, these 16 operations can be completely performed in parallel, and the operations performed by each CU do not need to change at all. This is static unloading. However, in the case of only one chip, these 16 OPs need to be unloaded to the CU of the chip in a time-sharing manner. Then, according to the stage of T, there may be simultaneous running of OP0-OP7, OP8-OP15 and intermediate situations on the chip (such as OP0 can completely release resources, then the instructions of OP8 can be unloaded to the CU to wait for its data dependency, and the data generated by OP0 to be used for subsequent OPs can be stored at the CU or written back to the memory), until a complete T is completed, that is, semi-static unloading.

[0091] Exemplarily, the dependency relationship between the subtasks may include the case where the computing task T can be divided into 16 operations OP0-OP15, each operation depends on the calculation results of the previous two levels (OP0 only depends on the input, and OP1 only depends on the result of OP0), which is not limited in the embodiments of the present invention.

[0092] In the embodiment of the present invention, the transmission path corresponding to each subtask may include a transmission path passing through the least number of computing nodes, which is not limited in the embodiment of the present invention.

[0093] In the embodiment of the present invention, the memory access path corresponding to each subtask may include a mapping and conversion process from a logical address (or virtual address) to a physical address when a CPU or other processor accesses the memory.

[0094] Step S110: Determine an offloading strategy corresponding to the subtask based on data transmission requirements, memory access requirements, and external interface access requirements.

[0095] In an embodiment of the present invention, after determining the data transmission requirements between subtasks, the memory access requirements and the external interface access requirements corresponding to each subtask according to the processing stage to which the subtasks belong and the dependencies between the subtasks, the on-chip network can also determine the unloading strategy corresponding to the subtask based on the data transmission requirements, memory access requirements and external interface access requirements.

[0096] In the embodiment of the present invention, the offloading strategy corresponding to the subtask may include determining based on the node with the least hops of the multicast message, or determining based on the shortest path selected by the routing protocol to reach any node in the multicast domain, which is not limited in the embodiment of the present invention.

[0097] Step S111 : based on the offloading strategy, offloading at least two subtasks to at least two computing nodes.

[0098] In an embodiment of the present invention, after determining the offloading strategy corresponding to the subtask based on data transmission requirements, memory access requirements and external interface access requirements, the on-chip network can also offload at least two subtasks to at least two computing nodes based on the offloading strategy.

[0099] In the embodiment of the present invention, the at least two computing nodes may include a computing node determined according to a node with the least hop count of the multicast message or a computing node determined according to a shortest path, which is not limited in the embodiment of the present invention.

[0100] Reference Figure 2 , showing a composition structure frame of a network on chip of the present invention Figure 1 , which may include the following: The on-chip network includes PCIe (Peripheral Component Interconnect Express), MC (Memory Controller) and CU, which are not limited in the embodiments of the present invention.

[0101] Exemplarily, a plurality of computing units may be divided into different storage areas.

[0102] Exemplarily, when the computing unit is 8×8, the computing unit may be divided into a plurality of domains according to rows, columns, and blocks, thereby defining the maximum effective range of each multicast message.

[0103] Exemplarily, the computing unit may include 8 row storage areas, or 8 column storage areas, or 8 block storage areas, etc., which is not limited in the embodiments of the present invention.

[0104] Reference Figure 3 , showing a composition structure frame of a network on chip of the present invention Figure 2 , the on-chip network can include the following: Access devices and routers, access devices include processor cores and cache.

[0105] In practical applications, although the multiple processor cores in a multi-core processor chip each execute their own code, data needs to be shared and synchronized between the processor cores. Therefore, the hardware structure of the multi-core processor must support efficient inter-core communication, and the performance of the on-chip communication structure will directly affect the performance of the processor.

[0106] Therefore, the on-chip network aims to solve the communication problem within the multi-core processor. The on-chip network is an integrated circuit on a network-based communication subsystem. The on-chip network is a packet switching network based on routers between on-chip systems. The on-chip network technology draws on the interconnection network structure of parallel computers, integrating a large number of computing resources and an on-chip communication network connecting these resources on a single chip. Each processor core has an independent router and its private cache, and is connected together through an on-chip communication network. The processor cores use a message communication mechanism, and use routers and packet switching technology to replace the on-chip bus of related technologies to complete the communication task, thereby solving various bottleneck problems caused by bus interconnection in related technologies.

[0107] Frequent data multiplexing is required in deep learning reasoning tasks, so the on-chip network needs to support multicast of data packets. The multicast protocol for independent transmission of each data packet will introduce complex routing protocols and add additional control fields, resulting in increased system complexity and a decrease in the data payload ratio on the NoC (Network on Chip).

[0108] Deep learning inference acceleration chips are generally composed of multiple identical computing units according to a certain spatial topology. This solution divides the computing nodes on a certain spatial dimension of the computing units with a certain spatial topology, or several computing nodes in the adjacent area into multicast domains, and specifies the maximum scope of a single multicast message. A multicast control field containing a multicast domain and a mask within the domain is added to the message to specify the target multicast domain and the nodes that need to receive multicasts within the domain. Routers outside the target multicast domain route the message to the optimal routing node within the target multicast domain based on these fields; when the message arrives at the target multicast domain, the router within the domain is responsible for calculating the optimal propagation path and replication timing, and completing the caching, replication, and forwarding of the message to the specified target computing node.

[0109] In a deep learning inference chip where computing units are organized in a two-dimensional form, the computing units are divided into several domains by rows, columns, and blocks according to the above technical solution, thereby defining the maximum effective range of each multicast message. Add domains and masks to distinguish computing units in a certain domain in the control message. When a computing node sends a multicast message, according to the control field and routing protocol of the multicast message, select a router in the multicast domain, copy the data packet in several routers in the target multicast domain, and forward the message to the computing unit or related router in the broadcast domain that needs to receive the broadcast.

[0110] Implementing domain-based multicast in spatial topology based on the data characteristics of deep learning tasks can simplify the design of multicast solutions and effectively reduce the traffic of on-chip networks while maintaining flexibility.

[0111] By uniquely identifying each node that needs to receive the multicast message in the multicast message, a more flexible multicast can be achieved compared to this solution, but a large linked list needs to be transmitted along with the message, which will lead to a sharp increase in overhead. In addition, complex multicast paths are more likely to cause deadlock of link layer resources.

[0112] The computing units in the two-dimensional deep learning accelerator chip are divided into regions according to rows, columns, and blocks. The domain is used as the multicast object and the intra-domain mask is used to assist. This reduces the on-chip network traffic and reduces the overhead of the multicast control field in the multicast message and the complexity of the multicast protocol.

[0113] In summary, the embodiment of the present invention provides a data transmission method for a network on chip, which divides at least two computing nodes with a spatial topology into multicast domains; determines a target node for receiving a first message; adds a multicast control field to the first message according to the target multicast domain to which the target node belongs, and obtains a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; determines a first routing path outside the target multicast domain according to the multicast control field and a routing algorithm; transmits the target message to the target multicast domain based on the first routing path; determines a second routing path within the target multicast domain according to the intra-domain mask field; and sends the target message to the target node based on the second routing path. In the embodiment of the present invention, each data packet shares the same routing protocol. During the transmission process, the routing path of each message can be directly determined according to the multicast control field added in the message, without introducing a multicast protocol for independent transmission of each data packet, which reduces the design complexity of the network on chip and is conducive to improving the data payload ratio and data transmission efficiency of the network on chip.

[0114] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0115] Device Embodiment Reference Figure 4 , shows a structural block diagram of a data transmission device of a network on chip of the present invention, the device is applied to the network on chip, and the device may specifically include: A partitioning module 401 is used to partition at least two computing nodes having a spatial topology into multicast domains; A determination module 402, configured to determine a target node for receiving a first message; The obtaining module 403 is used to add a multicast control field to the first message according to the target multicast domain to which the target node belongs, so as to obtain the target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; The determination module is further configured to determine a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; A transmission module 404, configured to transmit the target message to the target multicast domain based on the first routing path; The determination module is further configured to determine a second routing path within the target multicast domain according to the intra-domain mask field; The sending module 405 is configured to send the target message to the target node based on the second routing path.

[0116] Optionally, the determining module includes: A determination submodule is used to determine the target multicast domain and target node of the target message based on the multicast control field; determine the first routing node between the source sending node and the target multicast domain according to the positional relationship between the source sending node of the target message and the target multicast domain; and determine the first routing path outside the target multicast domain according to the first routing node and the routing algorithm.

[0117] Optionally, determining the second routing path within the target multicast domain according to the intra-domain mask field includes: A first determination submodule is used to determine a first sending node based on the first routing path; the first sending node is a node in the first routing path responsible for sending the target message to the target multicast domain; determine a second routing node between the first sending node and the target node indicated by the mask field in the domain; determine a second routing path within the target multicast domain based on the second routing node and the routing algorithm.

[0118] Optionally, determining a second routing path within the target multicast domain according to the second routing node and the routing algorithm includes: The second determination submodule is used to determine the candidate routing path of the target message within the target multicast domain according to the routing protocol and the second routing node; determine the routing parameters corresponding to each candidate routing path; and determine the candidate routing path whose routing parameters meet the first preset condition as the second routing path within the target multicast domain.

[0119] Optionally, the sending the target message to the target node based on the second routing path includes: An obtaining submodule, used for adding identification information to the target message to obtain a second message; the identification information is used to indicate the order in which the target message is used in the target node; A sending submodule is used to send the second message to the target node based on the second routing path, so that the target node reorders the received second messages according to the identification information in the second message and continues to execute the computing task.

[0120] Optionally, before determining the target node for receiving the first message, the method further includes: A splitting module, used for splitting a computing task into at least two subtasks; The third determination submodule is used to determine the data transmission requirements between the subtasks, the memory access requirements and the external interface access requirements corresponding to each subtask according to the processing stage to which the subtasks belong and the dependency relationship between the subtasks; based on the data transmission requirements, the memory access requirements and the external interface access requirements, determine the unloading strategy corresponding to the subtask; The unloading submodule is used to unload the at least two subtasks to at least two computing nodes based on the unloading strategy.

[0121] In summary, the embodiment of the present invention provides a data transmission device of a network on chip, which divides at least two computing nodes with a spatial topology into multicast domains; determines a target node for receiving a first message; adds a multicast control field to the first message according to the target multicast domain to which the target node belongs, and obtains a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; determines a first routing path outside the target multicast domain according to the multicast control field and a routing algorithm; transmits the target message to the target multicast domain based on the first routing path; determines a second routing path within the target multicast domain according to the intra-domain mask field; and sends the target message to the target node based on the second routing path. In the embodiment of the present invention, each data packet shares the same routing protocol. During the transmission process, the routing path of each message can be directly determined according to the multicast control field added in the message, without introducing a multicast protocol for independent transmission of each data packet, which reduces the design complexity of the network on chip and is conducive to improving the data payload ratio and data transmission efficiency of the network on chip.

[0122] As 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.

[0123] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0124] Regarding the processor in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0125] Reference Figure 5 , is a structural block diagram of an electronic device for data transmission in a network on chip provided by an embodiment of the present invention. Figure 5 As shown, the electronic device includes: a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the data transmission method of the on-chip network of the aforementioned embodiment.

[0126] The processor may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other editable devices, transistor logic devices, hardware components or any combination thereof. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0127] The communication bus may include a path for transmitting information between the memory and the communication interface. The communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.

[0128] The memory may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0129] The embodiment of the present invention also provides a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device (server or terminal), the processor can execute Figure 1 The data transmission method of the on-chip network is shown.

[0130] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0131] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0132] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0133] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0135] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0136] Finally, 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 terminal 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 terminal 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 terminal device including the elements.

[0137] The above is a detailed introduction to the data transmission method, device, electronic device and storage medium of a network on chip provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data transmission method for a network on chip, characterized in that: Applied to a network on chip, the method comprises: partitioning at least two computing nodes having a spatial topology into multicast domains; Determine a target node for receiving the first message; According to the target multicast domain to which the target node belongs, a multicast control field is added to the first message to obtain a target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; Determining a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; Transmitting the target message to the target multicast domain based on the first routing path; Determining a second routing path within the target multicast domain according to the intra-domain mask field; The target message is sent to the target node based on the second routing path.

2. The method according to claim 1, characterized in that: The determining, according to the multicast control field and the routing algorithm, a first routing path outside the target multicast domain comprises: Determining a target multicast domain and a target node of the target message based on the multicast control field; Determine a first routing node between the source sending node and the target multicast domain according to a positional relationship between a source sending node of the target message and the target multicast domain; A first routing path outside the target multicast domain is determined according to the first routing node and the routing algorithm.

3. The method according to claim 1, characterized in that: The determining, according to the intra-domain mask field, a second routing path within the target multicast domain comprises: Determine a first sending node based on the first routing path; the first sending node is a node in the first routing path responsible for sending the target message to the target multicast domain; Determine a second routing node between the first sending node and the target node indicated by the intra-domain mask field; A second routing path within the target multicast domain is determined according to the second routing node and the routing algorithm.

4. The method according to claim 3, characterized in that The determining, according to the second routing node and the routing algorithm, a second routing path within the target multicast domain includes: Determine, according to the routing protocol and the second routing node, a candidate routing path for the target message within the target multicast domain; Determine the routing parameters corresponding to each candidate routing path; The candidate routing path whose routing parameters satisfy the first preset condition is determined as the second routing path in the target multicast domain.

5. The method according to claim 1, characterized in that The sending the target message to the target node based on the second routing path includes: Adding identification information to the target message to obtain a second message; the identification information is used to indicate the order in which the target message is used in the target node; Based on the second routing path, the second message is sent to the target node, so that the target node reorders the received second messages according to the identification information in the second message and continues to execute the computing task.

6. The method according to claim 1, characterized in that Before determining the target node for receiving the first message, the method further includes: Split the computational task into at least two subtasks; Determine the data transmission requirements between the subtasks, the memory access requirements and the external interface access requirements corresponding to each subtask according to the processing stage to which the subtasks belong and the dependencies between the subtasks; Determining an offloading strategy corresponding to the subtask based on the data transmission requirement, the memory access requirement, and the external interface access requirement; Based on the offloading strategy, the at least two subtasks are offloaded to at least two computing nodes.

7. A data transmission device for a network on chip, characterized in that: Applied to a network on chip, the device comprises: A partitioning module, configured to partition at least two computing nodes having a spatial topology into multicast domains; A determination module, used to determine a target node for receiving the first message; an obtaining module, configured to add a multicast control field to the first message according to the target multicast domain to which the target node belongs, so as to obtain the target message; the multicast control field includes a multicast domain indication field and an intra-domain mask field, the multicast domain indication field is used to indicate the target multicast domain, and the intra-domain mask field is used to indicate the target node in the target multicast domain; The determination module is further configured to determine a first routing path outside the target multicast domain according to the multicast control field and the routing algorithm; A transmission module, configured to transmit the target message to the target multicast domain based on the first routing path; The determination module is further configured to determine a second routing path within the target multicast domain according to the intra-domain mask field; A sending module is used to send the target message to the target node based on the second routing path.

8. The device according to claim 7, characterized in that The determining module comprises: A determination submodule is used to determine the target multicast domain and target node of the target message based on the multicast control field; determine the first routing node between the source sending node and the target multicast domain according to the positional relationship between the source sending node of the target message and the target multicast domain; and determine the first routing path outside the target multicast domain according to the first routing node and the routing algorithm.

9. An electronic device, characterized in that: The electronic device includes a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the data transmission method of the on-chip network as described in any one of claims 1 to 6.

10. A readable storage medium, characterized in that: When the instructions in the readable storage medium are executed by a processor of an electronic device, the processor is enabled to execute the data transmission method of the on-chip network as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing unit for compute nodes and storage nodes

    CN110915173A

  • Data retransmission method and device, target node, source node and terminal

    CN113596737A

  • Route generation method and device and storage medium

    CN115801663A

  • Data transmission method and device and storage medium

    CN115955431A

  • Multicast communication method and device, electronic equipment and storage medium

    CN118972189A

Cited By

  • Data transmission method and device, electronic equipment and readable storage medium

    CN119739671A

  • Message processing method and device, electronic equipment and readable storage medium

    CN120512394A

  • Data transmission method and device of network-on-chip, routing node and storage medium

    CN121412175A