Message transmission method and device, electronic equipment and storage medium

By adding node information to the message in the on-chip network and determining the transmission method based on the identification information, the problem of request duplication during message transmission is solved, and the transmission efficiency is improved.

CN119865452AActive Publication Date: 2025-04-22BEIJING INSTITUTE OF OPEN SOURCE CHIP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510350465.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

In an on-chip network, there is a problem of duplication of requests when transmitting messages, resulting in a decrease in transmission efficiency.

Method used

The target message is generated by determining the response node corresponding to the message to be transmitted in the request node and adding the node information to the message. During the transmission process, the target message is determined based on the identification information, and the message is transmitted to the next response node.

Benefits of technology

It realizes directional transmission of messages, reduces request duplication, and improves the efficiency of message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865452A_ABST
    Figure CN119865452A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method and device, electronic equipment and a storage medium. The method comprises the steps that a request node determines at least one response node corresponding to a to-be-transmitted message; the request node adds the node information corresponding to the at least one response node to the message to obtain a target message, and sends the target message to the first node; the first node is any node in the at least one response node; the first node determines whether identification information exists in the target message or not under the condition that the target message is acquired; the identification information is used for indicating broadcast transmission of the target message; according to the message transmission method and device, under the condition that the identification information exists in the target message, the target message is stored, the target message is transmitted to the next response node in the at least one response node, directional transmission of the message can be achieved according to the node information and the identification information in the message, the problem of request repetition during message transmission is solved, and the message transmission efficiency is improved. And thus, the message transmission efficiency is 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 message transmission method, device, electronic equipment and storage medium. Background Art

[0002] With the increasing demand for artificial intelligence (AI), the Advanced Microcontroller Bus Architecture Coherent Hub Interface (AMBA CHI) is the most widely used protocol on the industry's Network on Chip (NOC). For example, when the Neural Processing Unit (NPU) connects 32 neural network accelerators through CHI, the direct memory access (DMA) will be started to move the data of the Double Data Rate Synchronous Dynamic Random Access Memory (DDR) to the NPU in the broadcast operation on the chip. However, the DMA broadcast is sent to the NPU multiple times, that is, when broadcasting a data to 32 NPUs, 32 requests and corresponding data need to be sent. The broadcast function is not supported at the interconnection protocol layer, so it can only be sent to the corresponding nodes one by one, which cannot solve the problem of request duplication during message transmission, reducing the efficiency of message transmission. Summary of the invention

[0003] The embodiments of the present invention provide a message transmission method, device, electronic device and storage medium, which can solve the problem of request duplication during message transmission in the related art and improve the efficiency of message transmission.

[0004] In one aspect, an embodiment of the present invention discloses a message transmission method, which is applied to a network on chip, wherein the network on chip includes a requesting node and a responding node; the method includes: The requesting node determines at least one responding node corresponding to the message to be transmitted; The requesting node adds the node information corresponding to the at least one responding node to the message, obtains a target message, and sends the target message to a first node; the first node is any node among the at least one responding node; When the first node obtains the target message, it determines whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcast and transmitted; when the identification information exists in the target message, the target message is saved and the target message is transmitted to the next response node among the at least one response node.

[0005] Optionally, the requesting node adds the node information corresponding to the at least one responding node to the message to obtain a target message, and sends the target message to the first node, including: The requesting node generates first indication information according to the node information corresponding to the at least one responding node; the first indication information is used to indicate the transmission order of the message in the at least one responding node; Adding the first indication information to the message to obtain a target message; Based on the first indication information, sending the target message to the first node; The first node is any one of the at least one responding node, including: the first node is the first node that transmits the message among the at least one responding node indicated by the first indication information.

[0006] Optionally, when the identification information exists in the target message, saving the target message and transmitting the target message to a next response node among the at least one response node includes: When the identification information exists in the target message, saving the target message; The target message is transmitted to a next response node among the at least one response node according to the transmission order indicated by the first indication information.

[0007] Optionally, the requesting node generates first indication information according to the node information corresponding to the at least one responding node, including: Adding the identification information to the target message through a compiler; Determine a transmission path corresponding to the target message based on the identification information and the routing algorithm; Based on the transmission path, first indication information is generated.

[0008] Optionally, when the identification information exists in the target message, saving the target message and transmitting the target message to a next response node among the at least one response node includes: When the target message contains identification information, the target message is saved, and second indication information is added to the target message; the second indication information is used to indicate that the first node has received the target message; The target message is transmitted to a response node among the at least one response node that has not received the target message until each node among the at least one response node has received the target message.

[0009] Optionally, transmitting the target message to a next response node among the at least one response node comprises: When the identification information exists in the target message, saving the target message; The target message is copied, and according to the node information of the next response node in the at least one response node, a target address corresponding to the copied target message is modified; Based on the target address, the target message is transmitted to a next response node among the at least one response node.

[0010] On the other hand, an embodiment of the present invention discloses a message transmission device, which is applied to a network on chip, wherein the network on chip includes a request node and a response node; the device includes: A determination module, used to determine at least one response node corresponding to the message to be transmitted; An obtaining module, used for adding the node information corresponding to the at least one response node to the message to obtain a target message; A sending module, configured to send the target message to a first node; the first node is any node among the at least one responding node; The determination module is further used to determine whether there is identification information in the target message when the target message is acquired; the identification information is used to indicate that the target message is to be broadcasted and transmitted; A saving module, used for saving the target message when the identification information exists in the target message; A transmission module is used to transmit the target message to a next response node among the at least one response node.

[0011] Optionally, the obtaining module includes: A generating module, configured to generate first indication information according to the node information corresponding to the at least one responding node; the first indication information is used to indicate the transmission order of the message in the at least one responding node; The obtaining submodule is used to add the first indication information to the message to obtain a target message.

[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 message 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 message transmission method.

[0014] The embodiments of the present invention include the following advantages: An embodiment of the present invention provides a message transmission method, which is applied to an on-chip network. The on-chip network includes a request node and a response node; the request node determines at least one response node corresponding to the message to be transmitted; the request node adds node information corresponding to the at least one response node to the message, obtains a target message, and sends the target message to a first node; the first node is any node among the at least one response node; when the first node obtains the target message, it determines whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcast and transmitted; when the identification information exists in the target message, the target message is saved and the target message is transmitted to the next response node among the at least one response node. The embodiment of the present invention can realize directional transmission of the message according to the node information and identification information in the message, solves the problem of request duplication during message transmission, and thereby improves the efficiency of message transmission. 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 flow chart of steps of an embodiment of a message transmission method of the present invention; Figure 2 It is a structural block diagram of a network on chip of the present invention; Figure 3 This is a step flow of a message transmission method embodiment of the present invention Figure 2 ; Figure 4 This is a step flow of a message transmission method embodiment of the present invention Figure 3 ; Figure 5It is a structural block diagram of an embodiment of a message transmission device of the present invention; Figure 6 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 , shows a flow chart of steps of an embodiment of a message transmission method of the present invention, and the method may specifically include the following steps: Step S101: The requesting node determines at least one responding node corresponding to the message to be transmitted; Step S102: The requesting node adds node information corresponding to at least one responding node to a message, obtains a target message, and sends the target message to a first node; the first node is any node among the at least one responding node; Step S103: When the first node obtains the target message, it determines whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcasted; when the identification information exists in the target message, the target message is saved and transmitted to the next response node among at least one response node.

[0020] The message transmission method provided by the embodiment of the present invention is applied to a network on chip, and the network on chip includes a request node and a response node.

[0021] The requesting node may be any node in the on-chip network, and the requesting node may also be an NPU.

[0022] The responding node may be any node in the on-chip network except the requesting node; in the case where the requesting node is an NPU, the responding node may be a neural network accelerator.

[0023] By adding more routers and communication links, the performance of the on-chip network can be expanded linearly without bottlenecks or performance degradation; and by using parallel transmission and multi-path routing, it can provide fast and efficient data transmission, significantly improving the response speed of the system; finally, the NOC can select appropriate routing algorithms and topologies according to different application requirements to optimize performance and energy consumption.

[0024] The message to be transmitted refers to the block of data that the station wants to send at one time.

[0025] Specifically, the message to be transmitted contains the complete data information to be sent, which is of different lengths, unlimited and variable. It is the basic unit in network communication and is used to transmit information between the source node and the target node.

[0026] Exemplarily, the message to be transmitted may also be a message consisting of 128 bits, wherein 100 bits include message data, and 28 bits include node information and identification information.

[0027] Exemplarily, a message to be transmitted usually consists of three parts: a start line, a header and a body.

[0028] The start line is the first line of the message, which is used to describe what to do in a request message or to describe the problem in a response message.

[0029] The header contains some additional information, such as source address, destination address, message length, checksum, etc. This information helps devices in the network to correctly process and transmit messages.

[0030] The body is the main part of the message, which contains the actual data content to be transmitted.

[0031] The at least one response node corresponding to the message to be transmitted may be a node that transmits the message, and the node that transmits the message may include multiple nodes or one node.

[0032] The node information corresponding to at least one response node refers to the node information of the transmitted message. For example, the node of the transmitted message is a node in the linked list, and (1,0)→(1,2)→(2,2) in the linked list refers to the node information.

[0033] The target message refers to the message with node information added.

[0034] The first node refers to any node that transmits a message, that is, any node among the at least one responding node.

[0035] During the sequential transmission of messages, any one of the at least one response node can be the first node, the last node, or any node in the middle in the sequential linked list; similarly, during the non-sequential transmission of messages, any one of the at least one response node can also be the first node, the last node, or any node in the middle in the sequential linked list.

[0036] The identification information refers to information that is broadcast and transmitted. A message containing the identification information can be broadcast and transmitted.

[0037] Broadcast transmission means that when a node (sending) needs to send data to multiple nodes (receiving), it will send data packets to all nodes in the network. These data packets will be recognized as broadcast data packets by devices such as routers and switches in the network and forwarded to all hosts in the subnet. Each host will receive this data packet and process it according to its own needs.

[0038] Exemplarily, in the process of sending the target message to other response nodes, the target message needs to be firstly saved in the current node, and then the subsequent message transmission process is performed.

[0039] The next response node in at least one response node refers to the next node in the message transmission process. For example, the current node is A. In the process of out-of-order transmission of the message, other nodes except the current node A can be the next response node in at least one response node; in the process of sequential transmission of the message, the order of the transmission linked list is A, B, C, D..., and when the current node is A, the next response node to be transmitted according to the transmission order is B.

[0040] The process of message transmission may include sequential transmission and non-sequential transmission. In the process of saving the target message, in the process of sequential transmission, the message may be saved in an ordered table such as a linked list or a linear list; in the process of non-sequential transmission, the message may be saved in no order, and it is only necessary to ensure that the message is transmitted to the next response node in at least one response node.

[0041] In an embodiment of the present invention, the on-chip network includes a requesting node and a responding node; in the process of message transmission, the requesting node can first add the node information corresponding to at least one responding node to the message to obtain the target message, and then send the target message to the first node; then, when the first node obtains the target message, it is necessary to determine whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcast and transmitted; when there is identification information in the target message, the target message is saved, and then the target message can be transmitted to the next responding node in at least one responding node. The embodiment of the present invention can realize directional transmission of messages according to the node information and identification information in the message, solves the problem of request duplication during message transmission, and thus improves the efficiency of message transmission.

[0042] Further, in the embodiment of the present invention, when the requesting node adds the node information corresponding to the at least one responding node to the message to obtain the target message and sends the target message to the first node, the message transmission method may further include the following steps: Step S1021: The requesting node generates first indication information according to the node information corresponding to at least one responding node; the first indication information is used to indicate the transmission order of the message in at least one responding node.

[0043] Step S1022: Add the first indication information to the message to obtain a target message.

[0044] Step S1023: Based on the first indication information, send the target message to the first node; the first node is the first node that transmits the message among the at least one responding node indicated by the first indication information.

[0045] The first indication information refers to the sequence information of message transmission, that is, during the sequential transmission of messages, the requesting node can generate the first indication information according to the node information corresponding to at least one responding node.

[0046] The transmission order refers to the order in a linked list or the order in a linear list, etc., which is not limited in the embodiments of the present invention.

[0047] Exemplarily, the first node to transmit a message among at least one responding node refers to the first node to transmit the message. In the process of sequential transmission of messages, the order of the transmission linked list is A, B, C, D... When the current node A receives the message, the first node to transmit the message among at least one responding node refers to A.

[0048] In an embodiment of the present invention, in the process of a requesting node adding node information corresponding to at least one responding node to a message to obtain a target message and sending the target message to a first node, the requesting node generates first indication information based on the node information corresponding to at least one responding node; the first indication information is used to indicate the transmission order of the message in at least one responding node; that is, in the case of sequential transmission of the message, the first indication information can be added to the message to obtain the target message; based on the first indication information, the target message is sent to the first node in the transmission order; wherein the first node is the first node to transmit the message among the at least one responding node indicated by the first indication information, that is, in the process of sequential transmission, the target message needs to be sent to the first node to transmit the message first according to the first indication information.

[0049] Furthermore, in the embodiment of the present invention, when the target message contains identification information, the target message is saved, and the target message is transmitted to the next response node among the at least one response node. The message transmission method may further include the following steps: Step S1031: When the target message contains identification information, the target message is saved.

[0050] Step S1032: Transmit the target message to a next response node among the at least one response node according to the transmission order indicated by the first indication information.

[0051] Among them, the transmission order indicated by the first indication information refers to the order in which the message is transmitted, for example: the order of the transmission linked list is A, B, C, D..., when the current node is A, the next response node to be transmitted according to the transmission order is B.

[0052] Exemplarily, in the process of sequential transmission of messages, the order of the transmission linked list is A, B, C, D... When the current node is B, the next response node to be transmitted according to the transmission order is C, that is, the next response node among at least one response node is C.

[0053] In an embodiment of the present invention, when there is identification information in the target message, the target message is saved, and when the target message is transmitted to the next response node among at least one response node, when there is identification information in the target message, the target message is saved; when the messages are transmitted in sequence, the target message can be transmitted to the next response node among at least one response node according to the transmission order indicated by the first indication information, that is, the messages are transmitted in sequence.

[0054] Further, in the embodiment of the present invention, when the requesting node generates the first indication information according to the node information corresponding to the at least one responding node, the message transmission method may further include the following steps: Step S10211: Add identification information to the target message through the compiler.

[0055] Step S10212: Determine the transmission path corresponding to the target message based on the identification information and the routing algorithm.

[0056] Step S10213: Generate first indication information based on the transmission path.

[0057] Among them, a compiler refers to a computer program whose main function is to convert a program written in one programming language (called "source code") into another language (usually machine language or some intermediate representation) so that the computer hardware can execute it.

[0058] Routing algorithm refers to the process of selecting the best path based on the network topology and routing strategy by calculating the distance and cost from each node to the destination node, so that the data packet can reach the destination node quickly and accurately. In this process, the router maintains a routing table (also called a forwarding table), which contains information such as the destination network IP address, subnet mask, next hop IP address and interface, to guide the forwarding of data packets.

[0059] Exemplarily, in the process of sequential transmission of messages, the order of the transmission linked list is A, B, C, D..., and the transmission path corresponding to the target message refers to A, B, C, D...

[0060] Exemplarily, in the process of sequential transmission of messages, the transmitted messages need to pass through A, B, C, D..., and the transmission path corresponding to the target message refers to A, B, C, D..., or D, C, A, B,..., etc., which is not limited in the embodiments of the present invention.

[0061] Exemplarily, during the sequential transmission of messages, the order of the transmission linked list is (1, 0) → (1, 2) → (2, 2), and the transmission path corresponding to the target message is (1, 0) → (1, 2) → (2, 2).

[0062] Exemplarily, in the process of out-of-order transmission of messages, the transmitted messages need to pass through (1, 0), (1, 2), (2, 2), and the transmission path corresponding to the target message can be (1, 0) → (1, 2) → (2, 2), or (2, 2) → (1, 2) → (1, 0), etc., which is not limited in the embodiments of the present invention.

[0063] In an embodiment of the present invention, in the process of generating the first indication information by the requesting node according to the node information corresponding to at least one responding node, the compiler can first add identification information to the target message; then, based on the identification information and the routing algorithm, the transmission path corresponding to the target message can be determined; finally, the first indication information can be generated based on the transmission path, that is, the transmission routing path can be determined by the compiler, that is, the transmission order of the message in at least one responding node can be determined.

[0064] Furthermore, in the embodiment of the present invention, when the target message contains identification information, the target message is saved, and the target message is transmitted to the next response node among the at least one response node. The message transmission method may further include the following steps: Step S1033: When the target message contains identification information, the target message is saved, and second indication information is added to the target message; the second indication information is used to indicate that the first node has received the target message.

[0065] Step S1034: Transmit the target message to the response node in the at least one response node that has not received the target message, until each node in the at least one response node has received the target message.

[0066] The second indication information is used to indicate that the first node has received the target message, that is, the second indication information is used to indicate that the first node has received the target message, that is, the identification information added to the node that has received the target message.

[0067] In the process of sequential transmission of messages, the order of the transmission linked list is A, B, C, D... When the current node is A, the next response node to be transmitted according to the transmission order is B, that is, the first node A has received the target message.

[0068] During the sequential transmission of messages, the order of the transmission linked list is A, B, C, D... When the current node is A, the next response node to be transmitted according to the transmission order is B, that is, the first node A has received the target message, and the response nodes that have not received the target message in at least one response node may include B, C, D...

[0069] During the sequential transmission of messages, the order of the transmission linked list is A, B, C, D... When the current node is A, the next response node to be transmitted according to the transmission order is B, that is, the first node A has received the target message, and the response nodes that have not received the target message in at least one response node may include B, C, D... When the target message is transmitted to all the response nodes that have not received the target message in at least one response node, it indicates that each node in the at least one response node has received the target message.

[0070] In an embodiment of the present invention, when there is identification information in the target message, the target message is saved, and in the process of transmitting the target message to the next response node in at least one response node, in the case where the message is transmitted out of order, the target message with the identification information is first saved in the current node, and second indication information is also required to be added to the target message; the second indication information is used to indicate that the first node has received the target message; that is, the node that has received the message is marked, and then the target message can be transmitted to the response node in at least one response node that has not received the target message, until each node in the at least one response node has received the target message.

[0071] Furthermore, in the embodiment of the present invention, when transmitting the target message to the next response node among the at least one response node, the message transmission method may further include the following steps: Step S1035: If the target message contains identification information, the target message is saved.

[0072] Step S1036: Duplicate the target message, and modify the target address corresponding to the copied target message according to the node information of the next response node in the at least one response node.

[0073] Step S1037: based on the target address, transmit the target message to the next response node among the at least one response node.

[0074] Among them, in the process of sequential transmission of messages, the order of the transmission linked list is A, B, C, D...Z. When the current node is A, the next response node to be transmitted according to the transmission order is B. Before transmitting to node B, the target message needs to be copied. When transmitting to the last node Z in the linked list, the message does not need to be copied, that is, the target node needs to be copied only when it needs to be transmitted to the next node.

[0075] Exemplarily, during the sequential transmission of messages, the order of the transmitted linked list is (1, 0) → (1, 2) → (2, 2). When the current node is (1, 2), the next response node to be transmitted according to the transmission order is (2, 2), that is, the node information of the next response node in at least one response node is (2, 2).

[0076] For example, during the sequential transmission of messages, the order of the transmission linked list is (1, 0) → (1, 2) → (2, 2). When the current node is (1, 2), the next response node to be transmitted according to the transmission order is (2, 2). Then, the address corresponding to the original current node (1, 2) needs to be modified to the target address corresponding to the next response node (2, 2).

[0077] In an embodiment of the present invention, when a target message is transmitted to a next response node among at least one response node, if there is identification information in the target message, the target message can be saved in the current response node. If the target message needs to be transmitted to the next response node, the target message needs to be copied, and the target address corresponding to the copied target message is modified according to the node information of the next response node among at least one response node; then, based on the target address, the target message can be transmitted to the next response node among at least one response node, that is, the message can be sent to different target addresses to realize directional transmission of the message, thereby improving the efficiency of message transmission.

[0078] Reference Figure 2 , shows a structural block diagram of a network on chip of the present invention, the network on chip may include the following: Access devices and routers, access devices include processor cores and cache.

[0079] 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.

[0080] 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.

[0081] The CHI protocol is an advanced bus protocol used to solve the data consistency problem between multiple central processing units (CPUs). It uses packets to transmit information, supports various network topologies, and has good scalability and flexibility. By defining different components and node types as well as mechanisms such as cache consistency protocols and snoop methods, the CHI protocol can effectively maintain data consistency in the system and improve the overall performance of the system.

[0082] With the increasing demand for AI, CHI is the most widely used protocol on NOC in the industry. NPU connects to its 32 neural network accelerators through CHI. When broadcasting the data flow on the chip, DMA is first started to move the DDR data to the NPU. However, the DMA broadcast is sent to the NPU multiple times, that is to say, when broadcasting a data to 32 NPUs, 32 requests and corresponding data need to be sent. Therefore, the broadcast function is not supported at the interconnection protocol layer, so it can only be sent to the corresponding nodes one by one. The present invention is to solve this problem and can send data to the nodes faster.

[0083] The present invention adds broadcast support at the protocol layer. The specific support method is to add the node information that needs to be broadcast in req_filt, because the flit that needs to be broadcast needs to be marked by the compiler first. Because the topology structure of the NOC is known, the nodes that the flit needs to be propagated by the linked list can be written into the flit information, so that a linked list can be generated in the flit. The specific data flow is that when the interface bridge gets the flit from the DDR, the MXP will check whether there is broadcast enable (broadcast transmission) in the flit. If there is enable, the corresponding nodeid (identification information) can be determined in the linked list, and then the data is directly copied and sent to the next one in the linked list. If there is no nodeid after the linked list, then the broadcast is over.

[0084] Reference Figure 3 , showing the steps of a message transmission method embodiment of the present invention Figure 2 , the method may specifically include the following: Add a linked list to the message and broadcast the message to these three nodes while sending the request only once.

[0085] Reference Figure 4 , showing the steps of a message transmission method embodiment of the present invention Figure 3 , the method may specifically include the following: Specifically, if a message (flit) is to be sent to nodes (1,0)→(1,2)→(2,2) with only one request, the present invention can use the form of adding a linked list in the message to broadcast the message to the three nodes with only one request. As shown in the figure, the routing packet will first be routed to the (1,0) node through the yellow arrow according to x, y. Then the routing will check the linked list and find that (1,0) is connected to the node (1,2). Then the routing will directly copy the message, change the target address of the message to (1,2) and then send it. By analogy, the message will then be copied and sent in the direction of the purple and green arrows until there is no information behind the node, at which point the life cycle of the broadcast packet ends. In the traditional method, three requests need to be sent to broadcast to three nodes, and the requested data is the same but the destination address is different.

[0086] In modern AI models, matrices are widely used in attention layers or convolutional layers, and the number of parameters in modern large models is very large. This level of matrix multiplication cannot be multiplied on a single core (single-core processor), so the only way is to split the large matrix into small matrices for multiplication. At this time, the multiplied matrix needs to be broadcast to each core, so the broadcast feature needs to be widely used in gemm (GEneral Matrix to Matrix Multiplication). For example, in tiling matrix multiplication, a (9, 6) × (6, 9) matrix multiplication can be divided into two tensors of shape (6, 3, 3) × (6, 3, 3). Each 3×3 output is a part of the original matrix multiplication and then gathered together. Therefore, as long as the operation of this operator is executed, the multiplicand needs to be broadcast so that parallel computing can be performed.

[0087] The problem of duplicate requests when NOC is broadcasting is solved; the sending of duplicate requests is reduced by adding the broadcast feature to the protocol; and the compiler is used to optimize the optimal routing path to implement the broadcast linked list.

[0088] Device Embodiment Reference Figure 5 , shows a structural block diagram of a message transmission device of the present invention, the device is applied to an on-chip network, and the device may specifically include: A determination module 501, configured to determine at least one response node corresponding to a message to be transmitted; Obtaining module 502, configured to add node information corresponding to the at least one response node to the message to obtain a target message; A sending module 503, configured to send the target message to a first node; the first node is any node among the at least one responding node; The determination module is further used to determine whether there is identification information in the target message when the target message is acquired; the identification information is used to indicate that the target message is to be broadcasted and transmitted; A saving module 504 is used to save the target message when the identification information exists in the target message; The transmission module 505 is configured to transmit the target message to a next response node among the at least one response node.

[0089] Optionally, the obtaining module includes: A generating module, configured to generate first indication information according to the node information corresponding to the at least one responding node; the first indication information is used to indicate the transmission order of the message in the at least one responding node; The obtaining submodule is used to add the first indication information to the message to obtain a target message.

[0090] Optionally, when the identification information exists in the target message, saving the target message and transmitting the target message to a next response node among the at least one response node includes: A saving submodule, used for saving the target message when the identification information exists in the target message; The first transmission submodule is used to transmit the target message to the next response node among the at least one response node according to the transmission order indicated by the first indication information.

[0091] Optionally, the requesting node generates first indication information according to the node information corresponding to the at least one responding node, including: An adding module, used for adding the identification information to the target message through a compiler; A determination submodule, used to determine a transmission path corresponding to the target message based on the identification information and the routing algorithm; The generating submodule is used to generate first indication information based on the transmission path.

[0092] Optionally, when the identification information exists in the target message, saving the target message and transmitting the target message to a next response node among the at least one response node includes: A first saving submodule, used for saving the target message when there is identification information in the target message; An adding submodule, used for adding second indication information to the target message; the second indication information is used for indicating that the first node has received the target message; The second transmission submodule is used to transmit the target message to the response node of the at least one response node that has not received the target message until each node of the at least one response node has received the target message.

[0093] Optionally, transmitting the target message to a next response node among the at least one response node comprises: A second saving submodule, configured to save the target message if the identification information exists in the target message; A copy module, used for copying the target message; A modification module, used to modify the target address corresponding to the copied target message according to the node information of the next response node in the at least one response node; The third transmission submodule is used to transmit the target message to a next response node among the at least one response node based on the target address.

[0094] In summary, an embodiment of the present invention provides a message transmission method, which is applied to an on-chip network, and the on-chip network includes a requesting node and a responding node; the requesting node determines at least one responding node corresponding to the message to be transmitted; the requesting node adds the node information corresponding to the at least one responding node to the message, obtains the target message, and sends the target message to a first node; the first node is any node among the at least one responding node; when the first node obtains the target message, it determines whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcast transmitted; when there is identification information in the target message, the target message is saved and the target message is transmitted to the next response node among the at least one responding node. The embodiment of the present invention can realize directional transmission of messages according to the node information and identification information in the message, solves the problem of request duplication during message transmission, and thereby improves the efficiency of message transmission.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] Reference Figure 6 , 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 6 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 message transmission method of the aforementioned embodiment.

[0099] The processor may be a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) 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.

[0100] The communication bus may include a path to transmit information between the memory and the communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 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.

[0101] The memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or may be an electrically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0102] 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 message transmission method shown.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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 A step that specifies a function in one or more boxes.

[0108] 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.

[0109] 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.

[0110] The message transmission method, device, electronic device and storage medium provided by the present invention are introduced in detail above. The principles and implementation methods of the present invention are explained in this article using specific examples. 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 those skilled in the art, 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 message transmission method, characterized in that: Applied to a network on chip, the network on chip includes a request node and a response node; the method includes: The requesting node determines at least one responding node corresponding to the message to be transmitted; The requesting node adds the node information corresponding to the at least one responding node to the message, obtains a target message, and sends the target message to a first node; the first node is any node among the at least one responding node; When the first node obtains the target message, it determines whether there is identification information in the target message; the identification information is used to indicate that the target message is to be broadcast and transmitted; when the identification information exists in the target message, the target message is saved and the target message is transmitted to the next response node among the at least one response node.

2. The method according to claim 1, characterized in that The requesting node adds the node information corresponding to the at least one responding node to the message to obtain a target message, and sends the target message to the first node, including: The requesting node generates first indication information according to the node information corresponding to the at least one responding node; the first indication information is used to indicate the transmission order of the message in the at least one responding node; Adding the first indication information to the message to obtain a target message; Based on the first indication information, sending the target message to the first node; The first node is any one of the at least one responding node, including: the first node is the first node that transmits the message among the at least one responding node indicated by the first indication information.

3. The method according to claim 2, characterized in that When the identification information exists in the target message, the target message is saved, and the target message is transmitted to a next response node among the at least one response node, including: When the identification information exists in the target message, saving the target message; The target message is transmitted to a next response node among the at least one response node according to the transmission order indicated by the first indication information.

4. The method according to claim 2, characterized in that: The requesting node generates first indication information according to the node information corresponding to the at least one responding node, including: Adding the identification information to the target message through a compiler; Determine a transmission path corresponding to the target message based on the identification information and the routing algorithm; Based on the transmission path, first indication information is generated.

5. The method according to claim 1, characterized in that When the identification information exists in the target message, the target message is saved, and the target message is transmitted to a next response node among the at least one response node, including: When the target message contains identification information, the target message is saved, and second indication information is added to the target message; the second indication information is used to indicate that the first node has received the target message; The target message is transmitted to a response node among the at least one response node that has not received the target message until each node among the at least one response node has received the target message.

6. The method according to claim 1, characterized in that The transmitting the target message to a next response node among the at least one response node comprises: When the identification information exists in the target message, saving the target message; The target message is copied, and according to the node information of the next response node in the at least one response node, a target address corresponding to the copied target message is modified; Based on the target address, the target message is transmitted to a next response node among the at least one response node.

7. A message transmission device, characterized in that: Applied to a network on chip, the network on chip includes a request node and a response node; the device includes: A determination module, used to determine at least one response node corresponding to the message to be transmitted; An obtaining module, used for adding the node information corresponding to the at least one response node to the message to obtain a target message; A sending module, configured to send the target message to a first node; the first node is any node among the at least one responding node; The determination module is further used to determine whether there is identification information in the target message when the target message is acquired; the identification information is used to indicate that the target message is to be broadcasted and transmitted; A saving module, used for saving the target message when the identification information exists in the target message; A transmission module is used to transmit the target message to a next response node among the at least one response node.

8. The device according to claim 7, characterized in that The obtaining module comprises: A generating module, configured to generate first indication information according to the node information corresponding to the at least one responding node; the first indication information is used to indicate the transmission order of the message in the at least one responding node; The obtaining submodule is used to add the first indication information to the message to obtain a target message.

9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the message transmission method according to 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 message transmission method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Path detection method and device and computer storage medium

    CN110995583A

  • Method, network node and system for determining path

    CN114513416A

  • Network-on-chip and multicast message transmission method

    CN115996199A

  • Data transmission method and device and storage medium

    CN116667883A

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

    CN116781608A