A multi-processor system and data transmission method

By using the first barrier atomic request mechanism in a multiprocessor system to ensure that the data is written successfully and atomic information is sent, the problems of data synchronization and order preservation in multipath data transmission are solved, and processing speed is improved and delay is reduced.

CN118964274BActive Publication Date: 2025-02-28北京壁仞科技开发有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411428622.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-28
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

In multiprocessor systems, multi-path data transmission makes it difficult to ensure data synchronization and order preservation, resulting in slow processing speed, long delay and low efficiency.

Method used

By writing the target data to the destination processor in the source processor, and ensuring that the data is written successfully through the first barrier atomic request mechanism, the destination processor polls the atomic information locally to determine that the data transmission is completed.

Benefits of technology

It realizes that while ensuring data synchronization and order preservation, it improves processing speed, reduces delays, and improves data transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present application discloses a multi-processor system and a data transmission method, including: the operation unit of the source processor writes the target data to be transmitted to the destination processor through each first port unit in the source processor, and sends the first barrier atomic request to each second port unit through each first port unit; each second port unit in the destination processor receives the first barrier atomic request, and after determining that the associated data corresponding to the first barrier atomic request is successfully written, sends the first barrier atomic request to the aggregation unit; after the aggregation unit receives the first barrier atomic request sent by all the second port units, it sends the first atomic information corresponding to the target data to the storage unit of the destination processor; after the destination processor locally polls the first atomic information, it determines that the target data is ready. The application of the present application can effectively improve the processing speed and reduce the delay while ensuring synchronization and order preservation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data transmission technology, and in particular to a multi-processor system and a data transmission method. Background Art

[0002] In various intelligent systems currently available, data transmission and consumption between multiple processors are often involved, where the processors may be, for example, a central processing unit (CPU), a graphics processing unit (GPU), or a neural network processing unit (NPU). There are usually multiple paths between different processors, so data transmission between multiple paths of multiple processors needs to ensure data synchronization and order preservation.

[0003] At present, for multi-path data transmission of multiple processors, in order to ensure data synchronization and order preservation, the target data to be transmitted is usually written locally in the source processor, and then the synchronization signal corresponding to the target data is written locally, and then the next data and its synchronization signal are written locally; the destination processor remotely polls the synchronization signal stored in the source processor, and when the synchronization signal corresponding to the target data is polled, it is determined that the corresponding target data is ready, and the corresponding data stored in the source processor is remotely read. In the above data transmission method, the remote polling processing speed of the destination processor is slow, the delay is long, and the efficiency is low, which makes the performance of the entire data transmission relatively poor. Summary of the invention

[0004] The present application provides a multi-processor system and a data transmission method, which can effectively improve the processing speed and reduce the delay while ensuring synchronization and order preservation.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] A data transmission method between multiple processors, comprising:

[0007] The operation unit of the source processor writes the target data to be transmitted to the destination processor through all the first port units in the source processor connected to the destination processor, and sends the first barrier atomic request to each second port unit through each of the first port units; wherein the second port unit is a port unit connected to the first port unit and located on the destination processor;

[0008] Each second port unit in the destination processor receives the first barrier atomic request, and after determining that the associated data corresponding to the first barrier atomic request are all successfully written, sends the first barrier atomic request to the aggregation unit;

[0009] After receiving the first barrier atomic requests sent by all the second port units, the aggregation unit sends first atomic information corresponding to the target data to the storage unit of the destination processor;

[0010] After the destination processor locally polls the first atomic information, it determines that the target data has been transmitted.

[0011] Preferably, the target data includes one or more target data packets;

[0012] The method further includes: transmitting a write request for requesting to write any target data packet into the destination processor through each of the first port units to the second port unit connected to each of the first port units, the second port unit counting the write requests for the associated data to obtain a current counting result, and after receiving the first barrier atomic request, establishing a corresponding relationship between the current counting result and the destination address corresponding to the first barrier atomic request; after receiving the first confirmation instruction corresponding to the write request received by this port unit, the second port unit subtracts 1 from the current counting result corresponding to the write request as a new current counting result.

[0013] Preferably, the method of determining that all associated data corresponding to the first barrier atomic request are successfully written includes:

[0014] When the current count result corresponding to the destination address corresponding to the first barrier atomic request decreases to 0, it is determined that all associated data corresponding to the first barrier atomic request are successfully written.

[0015] Preferably, the manner of determining that the aggregation unit receives the first barrier atomic requests sent by all the second port units includes:

[0016] Each time the aggregation unit receives the first barrier atomic request, it determines the destination address corresponding to the first barrier atomic request and counts the number of first barrier atomic requests corresponding to the destination address that have been received. When the count number reaches the total number of paths between the source processor and the destination processor, it determines that the Agg unit has received the first barrier atomic requests sent by all the second port units.

[0017] Preferably, the method further comprises: pre-setting a number of table entries in the second port unit;

[0018] When the write request of the associated data is counted for the first time, the method further comprises: setting the current counting result to correspond to the current table entry;

[0019] The establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request includes: determining a current table entry, and corresponding the current table entry to the destination address corresponding to the first barrier atomic request;

[0020] Among them, the current table entry is: a currently unused table entry selected after the second port unit receives a write request for the first time in the current task, or after receiving the first barrier atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request.

[0021] Preferably, after the second port unit determines that the current count result corresponding to the destination address corresponding to the first barrier atomic request is reduced to 0, the method further includes: releasing the table entry corresponding to the current count result and treating the table entry as an unused table entry.

[0022] Preferably, the method further comprises: storing the first atomic information at a destination address corresponding to the first barrier atomic request in the storage unit;

[0023] The method of determining that the destination processor locally polls the first atomic information includes:

[0024] The destination processor locally polls an address space for storing atomic information, and determines that the first atomic information has been polled when information on the destination address corresponding to the first barrier atomic request indicates that target data has been successfully received.

[0025] A multi-processor system, comprising: a source processor and a destination processor; the source processor comprises a plurality of operation units and a plurality of first port units, the destination processor comprises a plurality of second port units, an aggregation unit, a storage unit and a polling unit; the first port units and the second port units are connected in a one-to-one correspondence;

[0026] The computing unit in the source processor is used to write the target data to be sent to the destination processor through all the first port units, and send the first barrier atomic request to each second port unit through each of the first port units;

[0027] a first port unit in the source processor, configured to forward the target data and the first barrier atomic request to the connected second port unit;

[0028] Each second port unit in the destination processor is configured to receive the first barrier atomic request, and after determining that all associated data corresponding to the first barrier atomic request are successfully written, send the first barrier atomic request to the aggregation unit;

[0029] The aggregation unit is configured to send first atomic information corresponding to the target data to the storage unit after receiving the first barrier atomic requests sent by all the second port units;

[0030] The storage unit is used to store the target data and the first atomic information;

[0031] The polling unit is used to determine that the target data has completed transmission after polling the first atomic information in the storage unit.

[0032] Preferably, the target data includes one or more target data packets;

[0033] The computing unit is further configured to transmit, through each of the first port units, a write request for requesting to write any target data packet into the destination processor to a second port unit connected to each of the first port units;

[0034] The second port unit is further used to count the write requests for the associated data to obtain a current counting result, and after receiving the first barrier atomic request, establish a corresponding relationship between the current counting result and the destination address corresponding to the first barrier atomic request; after receiving the first confirmation instruction corresponding to the write request received by this port unit, the second port unit subtracts 1 from the current counting result corresponding to the write request as a new current counting result.

[0035] Preferably, in the second port unit, a method of determining that all associated data corresponding to the first barrier atomic request are successfully written includes:

[0036] When the current count result corresponding to the destination address corresponding to the first barrier atomic request decreases to 0, it is determined that all associated data corresponding to the first barrier atomic request are successfully written.

[0037] Preferably, in the aggregation unit, a method of determining that the aggregation unit receives the first barrier atomic requests sent by all the second port units includes:

[0038] Each time the aggregation unit receives the first barrier atomic request, it determines the destination address corresponding to the first barrier atomic request and counts the number of first barrier atomic requests corresponding to the destination address that have been received. When the count number reaches the total number of paths between the source processor and the destination processor, it determines that the Agg unit has received the first barrier atomic requests sent by all the second port units.

[0039] Preferably, each of the second port units is further used to set a table entry, and is also used to set the current counting result to correspond to a current table entry when the write request of the associated data is counted for the first time;

[0040] Among them, establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request includes: determining a current table entry and corresponding the current table entry to the destination address corresponding to the first barrier atomic request; the current table entry is: a currently unused table entry selected by the second port unit after receiving a write request for the first time in the current task, or after receiving the first barrier atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request.

[0041] Preferably, each of the second port units is further used to release the table entry corresponding to the current counting result after determining that the current counting result corresponding to the destination address corresponding to the first barrier atomic request is reduced to 0, and treat the table entry as an unused table entry.

[0042] Preferably, the aggregation unit is further used to store the first atomic information at a destination address corresponding to the first barrier atomic request in the storage unit;

[0043] In the polling unit, determining that the first atomic information is polled in the storage unit includes:

[0044] An address space for storing atomic information is polled in the storage unit, and when information on a destination address corresponding to the first barrier atomic request is polled indicating that target data has been successfully received, it is determined that the first atomic information has been polled.

[0045] It can be seen from the above technical solution that in this application, the computing unit (CU) of the source processor writes the target data to be transmitted to the destination processor through all port units (hereinafter referred to as the first port unit) connected to the destination processor in the source processor, and sends the first barrier (fence) atomic (atomic) request to each second port unit connected to the first port unit on the destination processor through each first port unit. On the destination processor, each second port unit receives the first fence atomic request, and after determining that the associated data corresponding to the request are all successfully written, sends the first fence atomic request to the aggregation (Agg) unit; thereby, the second port unit can notify the Agg unit that the data transmitted through this port unit has been successful; next, after collecting the first fence atomic requests sent by all second port units, the Agg unit can confirm that the associated data sent through all second ports have been written successfully, which means that the target data have been written successfully, and then the Agg unit writes the first atomic information corresponding to the target data to the HBM to indicate that the target data is ready; the destination processor can determine that the target data is ready after finding the first atomic information through local polling. Through the above processing, the data to be transmitted can be saved to the destination processor, and through the cooperation of each second port unit and the Agg unit, it is ensured that the atomic information corresponding to the data is written after the target data is successfully written, which is used as the basis for local polling of the destination processor to achieve synchronization and order preservation of data transmission. The target data is directly written remotely to the destination processor, and the polling of atomic information is performed locally on the destination processor, thereby greatly improving the polling speed and reducing the processing delay, thereby effectively improving the performance of the entire data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A basic flow chart of the multi-processor data transmission method in this application;

[0047] Figure 2 A schematic diagram of the internal structure of the processor in this application;

[0048] Figure 3 A schematic diagram of a specific flow chart of a multi-processor data transmission method in a specific embodiment of the present application;

[0049] Figure 4 A schematic diagram of the interaction and structure between multiple processors in a specific embodiment of the present application;

[0050] Figure 5 This is an example diagram of updating an entry in a specific embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical means and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings.

[0052] The basic idea of ​​the present application is that the source processor remotely writes the target data to the destination processor, and after determining that the target data is written successfully, the atomic information corresponding to the target data is used as a synchronization signal to write it to the destination processor. The destination processor locally polls the atomic information, thereby effectively improving the polling processing speed and reducing the delay, thereby effectively improving the performance of data transmission.

[0053] Figure 1 is a basic flow chart of the data transmission method between multiple processors in this application, Figure 2 Figure 1 is a schematic diagram of the internal structure of the processor. Figure 1 and Figure 2 As shown, the method includes:

[0054] Step 101, the CU of the source processor writes the target data that the CU needs to send to the destination processor through all first port units connected to the destination processor, and sends a first fence request to each second port unit through each first port unit.

[0055] The synchronization and order preservation of data transmitted between multiple processors mainly refers to the synchronization and order preservation of data sent by a single CU. Therefore, the specific data transmission method is described in units of CU in this application. The processing for each CU is the same, and the processing of a CU (hereinafter referred to as the first CU) is used as an example for description.

[0056] In the current data transmission method, there are multiple paths between the source processor and the destination processor, and each path is a port unit in the source processor connected to a port unit in the destination processor, and the port unit of the source processor is connected to the port unit of the destination processor in a one-to-one correspondence. Among them, the port unit in the source processor connected to the destination processor is called the first port unit, and the port unit in the destination processor connected to the source processor is called the second port unit. In this application, the CU in the source processor writes the target data to the destination processor through the first port unit. Usually, the target data is written to the storage unit of the destination processor (for example, it can be a high bandwidth memory (HBM)).

[0057] After the CU sends the target data, it continues to send the first fence atomic request to the second port unit through the first port unit. Here, the first fence atomic request is a request process newly introduced in this application, which is used to indicate that the target data has been sent out.

[0058] Step 102, each second port unit of the destination processor receives the first fence atomic request forwarded by the first port unit, and after determining that the associated data corresponding to the first fence atomic request are all successfully written, sends the first fence atomic request to the Agg unit.

[0059] In step 101, the source processor transmits the first fence atomic request to the second port unit connected to it through each first port unit. Each second port unit in the destination processor needs to process the received request. Different second port units have the same way of processing received requests. A second port unit is used as an example for explanation below.

[0060] After receiving the first fence atomic request, the second port unit waits to send the first fence atomic request to the Agg unit. The condition for sending the first fence atomic request to the Agg unit is to determine that the associated data corresponding to the first fence atomic request have been successfully written. Here, when the first fence atomic request is the first fence atomic request received by the second port unit, the associated data is the data requested to be written to the destination processor through the second port unit before the first fence atomic request. When the first fence atomic request is not the first fence atomic request received by the second port unit, the associated data is the data requested to be written to the destination processor through the second port unit between the first fence atomic request received by the second port unit and the previous fence atomic request. Of course, the above-mentioned data and requests are all for the current task.

[0061] As can be seen above, the associated data corresponding to the first fence atomic request actually includes multiple data within a time period, which can also be regarded as a group of data, including the target data written through the second port unit. The successful writing of this group of associated data ensures that the target data transmitted through the second port unit can be successfully written, that is, the second port unit sends the first fence atomic request to the Agg unit, which means that the target data transmitted through the second port unit has been successfully written.

[0062] Step 103, after receiving the first fence atomic requests sent by all the second port units, the Agg unit sends the first atomic information corresponding to the target data to the storage unit of the destination processor.

[0063] As mentioned above, after determining that the associated data is successfully written, the second port unit sends a first fence atomic request to the Agg unit; then, the Agg unit receives the first fence atomic requests sent by all second port units, which means that the target data transmitted by all second port units has been written successfully, that is, the target data transmitted by all paths between the source processor and the destination processor has been written, that is, the target data is ready, and the Agg unit sends the first atomic information corresponding to the target data to the storage unit of the destination processor (for example, it can be HBM), and uses it as a synchronization signal of the target data to mark that the target data is ready.

[0064] So far, through the processing of steps 101 to 103, on the one hand, each second port unit is used to mark the target data and its ACK transmitted by the port unit, and the information of successful writing of the target data transmitted by the port unit is notified to the Agg unit; on the other hand, the Agg unit summarizes the write success information reported by each second port unit. After determining that all second port units have completed reporting, it can ensure that the target data sent by a certain CU is successfully written to the destination processor through multiple paths, and then the first atomic information marking that the target data is ready is saved in the storage unit of the destination processor. In this way, the synchronization and order preservation of data transmission between different processors are achieved.

[0065] Step 104: After the destination processor locally polls the first atomic information, it determines that the target data has been transmitted.

[0066] Since the source processor in this application writes the target data to the destination processor, when the target data is needed in this application, the destination processor can locally poll the atomic information used as a synchronization signal without remote polling. When the first atomic information corresponding to the target data is polled, it is determined that the target data is ready, and the destination processor can use the target data as needed.

[0067] At this point, the data transmission method process in the present application ends. Through the above method, the source processor writes the target data to the destination processor, and by introducing the fence atomic request in the processing of each second port unit and Agg unit and the writing of atomic information, the synchronization and order-preserving transmission of the target data are guaranteed, so that the destination processor can obtain the target data by locally polling the atomic information. Since the polling operation is a repeated read operation, by converting the remote polling into the local polling, the processing efficiency of the polling operation can be greatly improved and the processing delay can be reduced. Although the write operation of the target data and the synchronization signal is converted from local to remote, since the write operation does not need to be repeated many times, on the whole, it can still effectively improve the efficiency of the entire data transmission and consumption process, reduce the entire processing delay, and greatly improve the overall performance of data transmission and consumption processing.

[0068] In the above-mentioned data transmission method of the present application, the target data sent by the CU may include one or more target data packets. Optionally, each data packet may correspond to a write request for performing a write operation to the destination processor. That is, after the CU writes data once or multiple times, a fence atomic request may be sent again.

[0069] In this case, a write request for requesting a target data packet to be written to the destination processor can be transmitted to the corresponding second port unit through each first port unit, and the second port unit can count each write request for associated data in the same group to obtain the current counting result; next, after receiving the first fence atomic request, a corresponding relationship is established between the current counting result of a group of associated data of the first fence atomic request and the destination address corresponding to the first fence atomic request. Among them, the destination address corresponding to the first fence atomic request actually refers to the destination storage address of the first atomic information sent by the Agg unit to the HBM after receiving the first fence atomic request sent by all second port units. In this way, the counting result corresponding to the destination address reflects the total number of all write data packets received by the second port unit between the current reception of the fence atomic request and the last reception of the fence atomic request.

[0070] At the same time, in addition to counting the write requests, the current counting result will also reduce the ACK fed back after the data packet is successfully written. Specifically, after receiving the first ACK for confirming that a certain target data packet has been received, the second port unit will reduce the current counting result corresponding to the write request of the target data packet by 1 as the new current counting result. That is to say, in addition to using the current counting result to count the write requests sent between the fence atomic request received this time and the fence atomic request received last time, for the data that has been successfully written, the corresponding number of write requests is subtracted from the current counting result. Therefore, the current counting result is the number of data packets that have been requested and not determined to be successfully written between the fence atomic request received this time and the fence atomic request received last time. Based on such processing, when the current counting result corresponding to the destination address corresponding to the first fence atomic request is reduced to 0, it means that all the data packets requested to be written by the second port unit between the fence atomic request received this time and the fence atomic request received last time have been successfully written, that is to say, it is determined that the associated data corresponding to the first fence atomic request received this time by the second port unit are all successfully written. In addition, since the processing of fence atomic requests in the second port unit is performed in serial order, the next fencatomic request will be sent to the Agg unit only after the previous fence atomic request is sent to the Agg unit. Therefore, the second port unit sending fence atomic request B to the Agg unit actually means that all data requested to be written through the second port unit before fence request B have been written successfully.

[0071] The above processing is an exemplary implementation method provided by the present application for determining that all associated data are successfully written. Of course, other methods may also be used as long as it can be determined that the associated data are successfully written.

[0072] In addition, in the above exemplary implementation, the correspondence between the destination address and the current counting result is established when the first fence atomic request is received, and the current counting result needs to be counted before the first fence atomic request is sent. To mark the current counting result, several entries can be set in the second port unit optionally; the entry can be logical, and the second port unit selects a currently unused entry as the current entry after receiving the write request for the first time, or after receiving the first fence atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first fence atomic request; when a write request for a group of associated data starts counting, its current counting result is set to correspond to the current entry; in this way, when counting the write request, the current entry can be used to correspond to the current counting result. Specifically, the entry identifier can be used to mark different entries. At the same time, the set entry can also be used to establish a correspondence between the destination address corresponding to the first fence atomic request and the current counting result. Specifically, after receiving the first fence atomic request, the current table entry can be determined, and the current table entry can be corresponded to the destination address corresponding to the first fence atomic request. Since the current table entry has already corresponded to the current counting result, the correspondence between the destination address corresponding to the first fence atomic request and the current counting result is established here.

[0073] The number of entries usually set is limited. In order to enable entry reuse, the second port unit can release the entry corresponding to the current count result after determining that the current count result corresponding to the CU unit that sends the first fence atomic request is reduced to 0, and treat the entry as an unused entry so that it can be reused later.

[0074] The specific implementation of the data transmission method in this application is described below through specific embodiments. Figure 3 is a schematic diagram of a specific flow chart of the data transmission method in this embodiment, Figure 4 FIG. 1 is a schematic diagram of the structure and interaction of the source processor and the destination processor in this embodiment. Figure 3 and Figure 4 As shown, the source processor includes at least a plurality of CUs, a first network on chip (NoC) unit, an HBM unit and a plurality of port (PORT) units, and the destination processor includes at least a plurality of PORT units, an Agg unit, a second NoC unit and an HBM unit. Of course, in practical applications, the destination processor can generally be a processor having the same structure as the source processor. The method in this embodiment includes:

[0075] Step 301: The software dispatches the current task to each CU unit.

[0076] As mentioned above, the processing of each CU unit is the same. Figure 4 CU0 is shown as an example for explanation.

[0077] Step 302, the source processor CU0 writes the target data packet into the HBM of the destination processor through the first NoC unit, PORT0-PORT3, PORT4-PORT7, Agg unit and the second NoC unit. After the target data packet is written successfully, the HBM feeds back the first ACK to PORT4-PORT7 through the second NoC unit.

[0078] As mentioned above, the target data may include one or more target data packets. In this embodiment, it is assumed that the target data to be sent by CU0 includes multiple target data packets. When the target data packet is remotely written to the destination processor, the corresponding target data packet is usually loaded from the HBM of the source processor according to the write instruction of the target data packet, and sent to PORT0~PORT3 connected to the destination processor through the first NoC unit.

[0079] In this embodiment, Figure 4 As shown, PORT0~PORT3 of the source processor are connected to PORT4~PORT7 of the destination processor respectively, and the target data packet is written into the HBM of the destination processor through PORT4~PORT7, the Agg unit and the second NoC unit. The specific process of transmitting and writing the target data packet along the above path can be implemented in an existing manner, which will not be repeated here.

[0080] The target data packet is transmitted through PORT4~PORT7 on the destination processor. For each PORT unit, when the target data packet transmitted through the PORT unit is written successfully, the HBM generates a first ACK corresponding to the successfully written target data packet, indicating that the target data packet has been successfully written. The HBM sends the first ACK to the PORT unit that transmits the target data packet, such as PORT4, through the second NoC unit and the Agg unit to notify it that the corresponding target data packet is successfully written.

[0081] Each target data packet included in the target data is written into the HBM of the destination processor in the above manner, and after the writing is successful, a corresponding first ACK is fed back to the PORT that transmits the corresponding data packet.

[0082] Step 303 , CU0 of the source processor sends each write request corresponding to the target data packet to PORT4 - PORT7 through the first NoC unit and PORT0 - PORT3 .

[0083] Corresponding to each target data packet, CU0 generates a write request to write the data packet into the destination processor, and sends the write request to PORT0-PORT3 through the first NoC unit, and sends the write request to PORT4-PORT7 through PORT0-PORT3 respectively.

[0084] In addition, those skilled in the art will appreciate that the target data packet and its write request are sent and processed together. In this embodiment, considering that the processing of the target data packet and its corresponding write request is different, they are described in different steps for easy understanding.

[0085] Step 304: After receiving the write request, PORT4-PORT7 of the destination processor corresponds the write request to the current entry and counts the write request. After receiving the first ACK corresponding to the target data packet, the count of the corresponding write request is reduced by 1.

[0086] The processing of PORT4 to PORT7 in this step is the same, and the processing of PORT4 is taken as an example for explanation.

[0087] In this embodiment, an entry is set in PORT4 of the destination processor, and in the initialization state, an entry is selected as the current entry. Thereafter, during the data transmission process, the current entry may be updated. The specific update timing is: each time a fence atomic request is received and a corresponding relationship is established between the current entry and the destination address corresponding to the fence atomic request, the current entry is updated; the specific update method is: select the next unused entry as the new current entry. In this way, during the data transmission process, there is always a current entry.

[0088] When the current entry is known, each time PORT4 receives a write request for a target data packet, the write request is matched to the current entry, and all write requests corresponding to the current entry are counted to obtain the current count result FenceValue, and a correspondence is established between the current count result and the current entry.

[0089] Specifically, assuming that before receiving the write request this time, the current count result of the write request corresponding to the current entry is represented by FenceValue, then after receiving the write request this time, FenceValue is incremented.

[0090] At the same time, after PORT4 receives the first ACK indicating that a target data packet has been successfully written, it determines the write request corresponding to the target data packet, finds the entry corresponding to the write request (due to the continuous update of the current entry, the entry found at this time may no longer be the current entry), and decrements the current count result FenceValue corresponding to the entry. It can be seen that the current count result FenceValue corresponding to a certain entry actually represents the number of data packets that have been requested to be written to the destination processor through PORT4 since the last fence atomic request was received and have not been successfully written.

[0091] Step 305 , CU0 of the source processor sends the first fence atomic request to PORT4 - PORT7 respectively through the first NoC unit and PORT0 - PORT3 .

[0092] This application newly introduces the fence atomic request, which is used to indicate that the CU has sent the target data.

[0093] The specific processing may include: after CU0 sends all target data packets and their write requests, CU0 generates a first fence atomic request, and sends the request to PORT4~PORT7 through the first NoC unit and PORT0~PORT3 respectively. The specific processing of sending the first fence atomic request to PORT4~PORT7 is the same as the aforementioned method of sending the target data packet, which will not be repeated here.

[0094] Step 306, for each PORT in PORT4-PORT7, after receiving the first fence atomic request, a corresponding relationship is established between the current entry and the destination address corresponding to the first fence request, and then an unused entry is selected as a new current entry.

[0095] Each second port unit in the destination processor (specifically PORT4 to PORT7 in this embodiment) needs to execute step 306. The processing for each PORT is the same, and the processing of PORT4 is still taken as an example for description below.

[0096] As mentioned above, the current entry of PORT4 corresponds to a group of write requests and their current count result FenceValue. After receiving the first fence atomic request in step 306, PORT4 establishes a corresponding relationship between the current entry and the destination address corresponding to the first fence atomic request, that is, the destination address is established with the current count result FenceValue of a group of write requests. In this embodiment, the current entry is established with the destination address.

[0097] After the corresponding relationship is established, the current entry is updated, specifically: an unused entry is selected as the new current entry. In fact, the update operation has been described when the current entry is introduced in the aforementioned step 304. After the corresponding relationship is established in this step, it is the specific update time of the current entry mentioned above.

[0098] Combined with the initialization and update processing of the current entry in the aforementioned steps 304 and 306, it can be seen that in PORT4, the set of write requests corresponding to the current entry is actually a set of write requests for associated data corresponding to the first fence atomic request. In more detail, the current entry corresponds to a set of write requests for associated data of a certain fence atomic request (specifically the first fence atomic request here), that is, a series of write requests received before receiving the fence atomic request. When the corresponding fence atomic request is received, this series of write requests (that is, a set of write requests for associated data) has been received, that is, FenceValue no longer increases, and FenceValue is only reduced each time the first ACK of associated data is received. Based on this, a correspondence is established between the current entry and the destination address corresponding to the fence atomic request, which is equivalent to establishing a correspondence between the current count result corresponding to the current entry and the destination address. Therefore, the current entry corresponds to a write request for a set of related data of a fence atomic request received by PORT4 and its current count result, and corresponds to the destination address corresponding to the fence atomic request, that is, a correspondence between entry, FenceValue and the destination address is established. In specific implementation, the corresponding correspondence can be represented by the following Table 1, where entryID represents an entry, addr represents the destination address corresponding to the fence atomic request, and FenceValue represents the number of data packets that have been requested and not successfully written in a set of related data corresponding to the fenceatomic request.

[0099] Table 1

[0100]

[0101] After the above correspondence is established, the current entry is updated, that is, the write requests received thereafter start counting again, the FenceValue of the group of write requests is obtained, and the corresponding entry is switched to specifically correspond to the new current entry.

[0102] It can be seen that the corresponding relationship shown in Table 1 indicates that for each group of associated data, the current counting result FenceValue of the group of data, the entry corresponding to the write request of the group of data, and the destination address corresponding to the fence atomic request corresponding to the group of data are saved.

[0103] In addition, to illustrate the entry update process, Figure 5 An example of entry update is given. The left column in the figure shows the requests received by PORT4 in order from bottom to top. wr_i represents the write request of the data packet, and fence atomic represents the fence atomic request. The right column in the figure shows the current entry ID of PORT4 and the corresponding entryID update operation. Figure 5 As shown, in the initial state, the current entryID is 0, corresponding to n consecutive write requests. Then, the first fence atomic request is received, and the current entryID is updated to 1, corresponding to the next n write requests. Next, the second fence atomic request is received, and the current entryID is updated to 2 again, corresponding to the next n write requests, and so on. The correspondence between entry and write request is continuously established, and the current entry is updated based on the fence atomic request.

[0104] Step 307, when PORT4 of the destination processor finds that the FenceValue value corresponding to the destination address corresponding to the first fence atomic request decreases to 0, it sends the first fence atomic request to the Agg unit and releases the entry corresponding to the FenceValue as an unused entry.

[0105] As mentioned above, FenceValue indicates the number of data packets that have been requested but not successfully written in the associated data corresponding to a fence atomic request. When the value of FenceValue decreases to 0, it indicates that all the corresponding associated data have been written successfully. The fence atomic request corresponding to the group of associated data means that the CU that sent the fence atomic request has completed the sending of a group of data.

[0106] In PORT4, the associated data corresponding to FenceValue includes the data corresponding to all write requests received by PORT4 between two fence atomic requests, and of course also includes the target data packet sent by CU0, which means that the target data packet sent by CU0 through PORT4 has been successfully written. Based on this, the first fence atomic request can be sent to the Agg unit, prompting the Agg unit that the target data packet transmitted through PORT4 has been successfully written. After waiting for all other second port units to send the first fence atomic request, the first atomic information corresponding to the target data can be sent.

[0107] After PORT4 sends the first fence atomic request, the correspondence between FenceValue and the destination address is no longer needed, and the corresponding entryID is released, that is, the correspondence between the corresponding entry and the FenceValue and the destination address is released, and the corresponding entry is treated as an unused entry to facilitate subsequent reuse.

[0108] The above is the specific processing of PORT4 in step 306. The same processing needs to be performed on PORT5 to PORT7, which will not be repeated here.

[0109] Step 308, after receiving the first fence atomic request sent by PORT4~PORT7, the Agg unit of the destination processor sends the first atomic information corresponding to the target data to the HBM of the destination processor and saves it to the destination address corresponding to the first fence atomic request.

[0110] The Agg unit receives the first fence atomic request sent by each second port unit. Among them, the method of determining that the Agg unit has received the corresponding request sent by each second port unit can be specifically as follows: after receiving a fence atomic request, the Agg unit determines the destination address corresponding to the fence atomic request, and counts the received fence atomic requests corresponding to the same destination address. When the count reaches the total number of paths between the source processor and the destination processor, it is determined that the corresponding fence atomic requests sent by all second port units have been received. In other words, the target data transmitted by the CU that sends the fence atomic request via all the first port units and the second port units has been written successfully, and the atomic information corresponding to the target data can be written to the destination address corresponding to the fence atomic request.

[0111] When counting fence atomic requests, the count can be accumulated or subtracted. In this embodiment, a method of determining whether all requests sent by the second port units have been received by accumulating and subtracting counts is provided. Specifically, each time the Agg unit receives the first fence atomic request, it determines whether the destination address corresponding to the request has the corresponding request count value RefCount saved. If not saved, the corresponding request count value is set to the initialization count value N-1 for the destination address corresponding to the first fence atomic; if saved, the corresponding request count value is reduced by 1; wherein N is the initialization count value, that is, the total number of paths between the source processor and the destination processor; when the request count value corresponding to the destination address corresponding to the first fence atomic request is 0, it is determined that the Agg unit has received the first fenceatomic request sent by all second port units. In this embodiment, the total number of paths between the source processor and the destination processor is 4, so N=4. Table 2 gives an example of the correspondence between the destination address and the request count value in the Agg unit.

[0112] Table 2

[0113]

[0114] After determining that the Agg unit receives the first fence atomic request sent by all second port units in the above manner, it is determined that the target data transmitted by CU0 that sends the first fence atomic request via PORT0~PORT7 has been written successfully, and the atomic information corresponding to the target data can be written to the destination address corresponding to the first fence atomic request, and the atomic information is used as a synchronization signal to indicate that the target data has been written. This ensures the synchronization and order of data transmission. Among them, the written atomic information can specifically be the value of RefCount after determining that the target data has been written successfully.

[0115] Step 309: After the destination processor locally polls the first atomic information corresponding to the target data, it determines that the target data is ready.

[0116] The processing of this step is the same as step 104 and will not be repeated here.

[0117] At this point, the data transmission processing for a group of CU0 is completed. In the above specific embodiment, entry is used in each second port unit to mark a group of write requests, and a corresponding relationship is established between the current count result FenceValue of the CU and the associated data write request; at the same time, RefCount is used in the Agg unit to count the fence atomic requests corresponding to the same destination address. On the one hand, each second port unit ensures that the data transmitted through the unit is written successfully and notifies the Agg unit. On the other hand, the Agg unit synthesizes the fence atomic requests sent by all second port units after the data is written successfully to determine that the target data transmitted through all second port units has been written successfully, and then sends the atomic information corresponding to the target data to the destination address as a synchronization signal, thereby realizing the synchronization and order preservation of data transmission. At the same time, through the above processing, the consumed target data and its atomic information are written to the destination processor, so that the destination processor can realize data consumption through local polling of atomic information without the need for remote polling of synchronization signals, which greatly improves processing efficiency, reduces processing delay, and effectively improves the overall performance of data transmission.

[0118] The above is a specific implementation of the data transmission method in this application. This application also provides a multi-processor system for implementing the above data transmission method. The basic structure of the multi-processor system in this application includes: a source processor and a destination processor; the source processor includes multiple computing units and multiple first port units, and the destination processor includes multiple second port units, Agg units, storage units, and polling units; the first port units and the second port units are connected one by one;

[0119] The operation unit in the source processor is used to write the target data to be sent to the destination processor through all the first port units, and send the first barrier atomic request to each second port unit through each first port unit;

[0120] a first port unit in the source processor, configured to forward the target data and the first barrier atomic request to a connected second port unit;

[0121] Each second port unit in the destination processor is used to receive the first barrier atomic request, and after determining that the associated data corresponding to the first barrier atomic request are all successfully written, send the first barrier atomic request to the Agg unit;

[0122] An Agg unit is used to send first atomic information corresponding to target data to the second high bandwidth memory after receiving the first barrier atomic request sent by all the second port units;

[0123] A storage unit, used for storing target data and first atom information;

[0124] The polling unit is used to determine whether the target data has been transmitted after polling the first atomic information in the storage unit.

[0125] Optionally, the target data may include one or more target data packets;

[0126] The operation unit is further used to transmit a write request for requesting to write any target data packet into a destination processor to a second port unit connected to each of the first port units through each of the first port units;

[0127] The second port unit is further used to count the write requests for associated data to obtain a current counting result, and after receiving a first barrier atomic request, establish a corresponding relationship between the current counting result and the destination address corresponding to the first barrier atomic request; after receiving the first ACK corresponding to the write request received by this port unit, the second port unit subtracts 1 from the current counting result corresponding to the write request as a new current counting result.

[0128] Optionally, in the second port unit, a method of determining that all associated data corresponding to the first barrier atomic request are successfully written includes:

[0129] When the current count result corresponding to the destination address corresponding to the first barrier atomic request decreases to 0, it is determined that all associated data corresponding to the first barrier atomic request are successfully written.

[0130] Optionally, in the Agg unit, determining a manner in which the Agg unit receives the first barrier atomic requests sent by all the second port units may specifically include:

[0131] Each time the Agg unit receives a first barrier atomic request, it determines the destination address corresponding to the first barrier atomic request and counts the number of first barrier atomic requests corresponding to the destination address that have been received. When the count number reaches the total number of paths between the source processor and the destination processor, it is determined that the Agg unit has received the first barrier atomic requests sent by all second port units.

[0132] Optionally, each second port unit is further used to set a table entry, and is also used to set the current counting result to correspond to the current table entry when the write request of the associated data is counted for the first time;

[0133] Among them, the processing of establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request can specifically include: determining the current table entry and corresponding the current table entry to the destination address corresponding to the first barrier atomic request; the current table entry is: a currently unused table entry selected by the second port unit after receiving the write request for the first time in the current task, or after receiving the first barrier atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request.

[0134] Optionally, each second port unit is further configured to release the table entry corresponding to the current counting result after determining that the current counting result corresponding to the destination address corresponding to the first barrier atomic request is reduced to 0, and treat the table entry as an unused table entry.

[0135] Optionally, the Agg unit may also be used to store the first atomic information at a destination address corresponding to the first barrier atomic request in the storage unit;

[0136] In the polling unit, determining a method for locally polling the first atomic information may specifically include:

[0137] An address space for storing atomic information is polled in a storage unit, and when information on a destination address corresponding to the first barrier atomic request is polled indicating that target data has been successfully received, it is determined that the first atomic information is polled.

[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data transmission method between multiple processors, characterized in that: include: The computing unit of the source processor writes the target data to be transmitted to the destination processor through all the first port units in the source processor connected to the destination processor, and sends the first barrier atomic request to each second port unit through each of the first port units; wherein the second port unit is a port unit connected to the first port unit and located on the destination processor, and the first barrier atomic request is used to indicate that the target data has been sent; Each second port unit in the destination processor receives the first barrier atomic request, and after determining that the associated data corresponding to the first barrier atomic request are all successfully written, sends the first barrier atomic request to the aggregation unit; After receiving the first barrier atomic requests sent by all the second port units, the aggregation unit sends first atomic information corresponding to the target data to the storage unit of the destination processor; After the destination processor locally polls the first atomic information, it determines that the target data has been transmitted; Among them, when the first barrier atomic request is the first barrier atomic request received by any second port unit, the associated data is the data requested to be written to the destination processor through any second port unit before the first barrier atomic request; when the first barrier atomic request is not the first barrier atomic request received by any second port unit, the associated data is the data requested to be written to the destination processor through the second port unit between the first barrier atomic request received by the second port unit and its previous barrier atomic request.

2. The method according to claim 1, characterized in that The target data includes one or more target data packets; The method further includes: transmitting a write request for requesting to write any target data packet into the destination processor through each of the first port units to the second port unit connected to each of the first port units, the second port unit counting the write requests for the associated data to obtain a current counting result, and after receiving the first barrier atomic request, establishing a corresponding relationship between the current counting result and the destination address corresponding to the first barrier atomic request; after receiving the first confirmation instruction corresponding to the write request received by this port unit, the second port unit subtracts 1 from the current counting result corresponding to the write request as a new current counting result.

3. The method according to claim 2, characterized in that The method of determining that all associated data corresponding to the first barrier atomic request are successfully written includes: When the current count result corresponding to the destination address corresponding to the first barrier atomic request decreases to 0, it is determined that all associated data corresponding to the first barrier atomic request are successfully written.

4. The method according to claim 1, 2 or 3, characterized in that: The manner of determining that the aggregation unit receives the first barrier atomic request sent by all the second port units includes: Each time the aggregation unit receives the first barrier atomic request, it determines the destination address corresponding to the first barrier atomic request and counts the number of first barrier atomic requests corresponding to the destination address that have been received. When the counted number reaches the total number of paths between the source processor and the destination processor, it is determined that the aggregation unit has received the first barrier atomic requests sent by all the second port units.

5. The method according to claim 3, characterized in that: The method further comprises: pre-setting a number of table entries in the second port unit; When the write request of the associated data is counted for the first time, the method further comprises: setting the current counting result to correspond to the current table entry; The establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request includes: determining a current table entry, and corresponding the current table entry to the destination address corresponding to the first barrier atomic request; Among them, the current table entry is: a currently unused table entry selected after the second port unit receives a write request for the first time in the current task, or after receiving the first barrier atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request.

6. The method according to claim 5, characterized in that After the second port unit determines that the current count result corresponding to the destination address corresponding to the first barrier atomic request is reduced to 0, the method further includes: releasing the table entry corresponding to the current count result and treating the table entry as an unused table entry.

7. The method according to claim 3, characterized in that The method further includes: storing the first atomic information at a destination address corresponding to the first barrier atomic request in the storage unit; The method of determining that the destination processor locally polls the first atomic information includes: The destination processor locally polls an address space for storing atomic information, and determines that the first atomic information has been polled when information on the destination address corresponding to the first barrier atomic request indicates that target data has been successfully received.

8. A multiprocessor system, characterized in that: include: A source processor and a destination processor; the source processor comprises a plurality of operation units and a plurality of first port units, the destination processor comprises a plurality of second port units, an aggregation unit, a storage unit and a polling unit; the first port units and the second port units are connected in a one-to-one correspondence; The computing unit in the source processor is used to write the target data to be sent to the destination processor through all the first port units, and send the first barrier atomic request to each second port unit through each of the first port units; wherein the first barrier atomic request is used to indicate that the target data has been sent; a first port unit in the source processor, configured to forward the target data and the first barrier atomic request to the connected second port unit; Each second port unit in the destination processor is used to receive the first barrier atomic request, and after determining that the associated data corresponding to the first barrier atomic request are all successfully written, send the first barrier atomic request to the aggregation unit; wherein, when the first barrier atomic request is the first barrier atomic request received by any second port unit, the associated data is the data requested to be written to the destination processor through any second port unit before the first barrier atomic request, and when the first barrier atomic request is not the first barrier atomic request received by any second port unit, the associated data is the data requested to be written to the destination processor through the second port unit between the first barrier atomic request received by the second port unit and the previous barrier atomic request; The aggregation unit is configured to send first atomic information corresponding to the target data to the storage unit after receiving the first barrier atomic requests sent by all the second port units; The storage unit is used to store the target data and the first atomic information; The polling unit is used to determine that the target data has completed transmission after polling the first atomic information in the storage unit.

9. The system according to claim 8, characterized in that The target data includes one or more target data packets; The computing unit is further configured to transmit, through each of the first port units, a write request for requesting to write any target data packet into the destination processor to a second port unit connected to each of the first port units; The second port unit is further used to count the write requests of the associated data to obtain a current counting result, and after receiving the first barrier atomic request, establish a corresponding relationship between the current counting result and a destination address corresponding to the first barrier atomic request; After receiving the first confirmation instruction corresponding to the write request received by the port unit, the second port unit subtracts 1 from the current counting result corresponding to the write request and uses it as a new current counting result.

10. The system according to claim 9, characterized in that In the second port unit, a method of determining that all associated data corresponding to the first barrier atomic request are successfully written includes: When the current count result corresponding to the destination address corresponding to the first barrier atomic request decreases to 0, it is determined that all associated data corresponding to the first barrier atomic request are successfully written.

11. A system according to claim 8, 9 or 10, characterized in that In the aggregation unit, a manner of determining that the aggregation unit receives the first barrier atomic request sent by all the second port units includes: Each time the aggregation unit receives the first barrier atomic request, it determines the destination address corresponding to the first barrier atomic request and counts the number of first barrier atomic requests corresponding to the destination address that have been received. When the counted number reaches the total number of paths between the source processor and the destination processor, it is determined that the aggregation unit has received the first barrier atomic requests sent by all the second port units.

12. The system according to claim 10, characterized in that Each of the second port units is further used to set a table entry, and is also used to set the current counting result to correspond to a current table entry when the write request of the associated data is counted for the first time; Among them, establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request includes: determining a current table entry and corresponding the current table entry to the destination address corresponding to the first barrier atomic request; the current table entry is: a currently unused table entry selected by the second port unit after receiving a write request for the first time in the current task, or after receiving the first barrier atomic request and establishing a correspondence between the current counting result and the destination address corresponding to the first barrier atomic request.

13. The system according to claim 12, characterized in that Each of the second port units is further configured to release the table entry corresponding to the current counting result after determining that the current counting result corresponding to the destination address corresponding to the first barrier atomic request is reduced to 0, and treat the table entry as an unused table entry.

14. The system according to claim 10, characterized in that The aggregation unit is further used to store the first atomic information at a destination address corresponding to the first barrier atomic request in the storage unit; In the polling unit, determining that the first atomic information is polled in the storage unit includes: An address space for storing atomic information is polled in the storage unit, and when information on a destination address corresponding to the first barrier atomic request is polled indicating that target data has been successfully received, it is determined that the first atomic information has been polled.

Citation Information

Patent Citations

  • A data synchronization method and device

    CN109710183A

  • Method and device for data communication among multiple processors

    CN110457251A