Acceleration device, heterogeneous computing architecture, and data processing method
Through optical port technology and routing module design, efficient data transmission between devices is achieved in heterogeneous computing architecture, the bandwidth limitation of traditional PCIe technology is solved, and the efficiency of collaborative completion of computing tasks is improved.
Patent Information
- Application Number
- PCT/CN2024/122153
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-04
- Filing Date
- 2024-09-29
- Publication Date
- 2025-08-07
AI Technical Summary
In the existing heterogeneous computing architecture, data transmission between accelerator cards is inefficient, and it is difficult to achieve efficient data transmission in multiple cards or multi-server environments.
The optical port technology and routing module design are adopted, and the connection between the local optical port and the remote optical port is connected to the local optical port, which accelerates the routing and forwarding of data frames in the device, uses the high bandwidth of the optical port for data transmission, and uses the internal routing module and external routing module for data processing and storage management.
It realizes efficient data transmission between multiple acceleration devices, improves the efficiency of collaborative completion of computing tasks, and solves the problem of bandwidth limitation of traditional PCIe technology.
Smart Images

Figure CN2024122153_07082025_PF_FP_ABST
Abstract
Description
Acceleration device, heterogeneous computing architecture and data processing method
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 4, 2024, with application number 202410154212.9 and application name “An acceleration device, heterogeneous computing architecture and data processing method”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of data processing, and in particular to an acceleration device, a heterogeneous computing architecture, and a data processing method. Background Art
[0004] With the continuous development of artificial intelligence (AI), the conflict between the computing power provided by CPUs (Central Processing Units) and the computing power demanded by AI (Artificial Intelligence) has become increasingly prominent. Traditional single-CPU computing architectures suffer from insufficient computing power, leading to the emergence of heterogeneous computing architectures. Heterogeneous computing architectures are a combination of CPUs with any one or more of the following: GPUs (Graphics Processing Units), FPGAs (Field Programmable Gate Arrays), and ASICs (Application Specific Integrated Circuits).
[0005] To achieve sufficient computing power, a single server is typically equipped with multiple accelerator cards to jointly complete computing tasks, often expanding to multiple servers to jointly complete inference and computing tasks for large AI models. Achieving efficient data transmission between multiple cards, or even multiple services, is a significant challenge. Currently, communication between accelerator cards can be achieved using host memory. That is, when data from accelerator card A needs to be transferred to accelerator card B, the CPU first retrieves the data from accelerator card A and stores it in host memory. The data is then transferred from host memory to accelerator card B. This approach is clearly inefficient. Another more efficient approach is to use PCIe (Peripheral Component Interconnect Express) peer-to-peer (P2P) technology. P2P communication is a feature of PCIe that allows direct data transmission between two PCIe devices without requiring temporary storage in host memory. However, because P2P is based on PCIe technology, its transmission bandwidth is also limited by PCIe technology. Furthermore, multiple accelerator cards share the PCIe bus in a time-sharing manner, so data transmission between multiple cards cannot be performed simultaneously.
[0006] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present.
[0007] Summary of the Invention
[0008] The present application provides an acceleration device, comprising:
[0009] Storage module;
[0010] At least one local optical port, each of which is connected to a remote optical port, where the remote optical port is an optical port on another acceleration device;
[0011] An external routing module connected to each local optical port, configured to receive a data frame to be processed transmitted by the local optical port and / or the internal routing module, and output a data frame to be output based on the data frame to be processed to the corresponding local optical port in response to the data frame to be processed meeting an outward forwarding condition, and output the data frame to be processed to the internal routing module in response to the data frame to be processed meeting an inward writing condition;
[0012] an internal routing module, configured to write the data to be calculated in the data frame to be processed into the storage module and generate a first trigger instruction; in response to receiving a forwarding instruction, read result data corresponding to the forwarding instruction from the storage module; and transmit the data frame to be processed obtained based on the result data to the external routing module; and
[0013] The computing module is used to calculate the data to be calculated in the storage module based on the target trigger instruction, write the result data into the storage module after obtaining it, and generate a forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task.
[0014] In an exemplary embodiment, the number of local optical ports is multiple, the external routing module includes external routing modules corresponding to the multiple local optical ports one by one, and the multiple external routing modules are connected in sequence;
[0015] Each external routing module is used to receive the data frames to be processed transmitted by the local optical port connected to itself and / or the upper routing module, and in response to the data frames to be processed meeting the outward forwarding conditions, output the data frames to be processed obtained based on the data frames to be processed to the corresponding local optical port, and in response to the data frames to be processed meeting the inward writing conditions, output the data frames to be processed to the internal routing module, and when the data frames to be processed meet the inward forwarding conditions, output the data frames to be processed to the lower routing module; in response to the upper routing module being an internal routing module, the lower routing module is other external routing modules, and in response to the lower routing module being an internal routing module, the upper routing module is other external routing modules.
[0016] In an exemplary embodiment, each external routing module includes a first receiving port, a second receiving port, a first forwarding port, and a second forwarding port, wherein the first forwarding port and the first receiving port are connected to their own local optical ports in a one-to-one correspondence, the second forwarding port is connected to the second receiving port of the lower-level routing module, and the second receiving port is connected to the second forwarding port of the upper-level routing module;
[0017] The external routing module is specifically used to receive the data frame to be processed through the first receiving port and / or the second receiving port, and in response to the data frame to be processed meeting the outward forwarding condition, output the data frame to be processed obtained based on the data frame to be processed through the first forwarding port, and in response to the data frame to be processed meeting the inward writing condition, output the data frame to be processed to the internal routing module, and in response to the data frame to be processed meeting the inward forwarding condition, output the data frame to be processed through the second forwarding port.
[0018] In an exemplary embodiment, the external routing module is also used to parse the data frame to be processed, obtain routing information, and determine whether the data frame to be processed meets the outward forwarding conditions based on the routing information, and / or determine whether the data frame to be processed meets the inward forwarding conditions based on the routing information, and / or determine whether the data frame to be processed meets the inward writing conditions based on the routing information.
[0019] In an exemplary embodiment, the process of determining whether a data frame to be processed meets the outward forwarding condition based on routing information includes:
[0020] Matching routing information with rules in a pre-set routing table; and
[0021] In response to the existence of a matching valid rule, determining that the data frame to be processed meets the outward forwarding condition;
[0022] The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. A valid rule is a rule whose forwarding state is valid.
[0023] In an exemplary embodiment, the process of determining whether a data frame to be processed meets an inward forwarding condition based on routing information includes:
[0024] Matching routing information with rules in a pre-set routing table; and
[0025] In response to the absence of a matching valid rule, determining that the data frame to be processed meets an inward forwarding condition;
[0026] The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. A valid rule is a rule whose forwarding state is valid.
[0027] In an exemplary embodiment, the process of determining whether a data frame to be processed meets an inward writing condition based on routing information includes:
[0028] Determine whether the routing information is local routing information;
[0029] In response to the routing information being local routing information, determining whether the lower-level routing module connected to the self is an internal routing module; and
[0030] In response to determining that the lower-level routing module connected to the self is an internal routing module, determining that the data frame to be processed meets the inward writing condition;
[0031] The process of determining whether a data frame to be processed meets the inbound forwarding conditions based on routing information includes:
[0032] Determine whether the routing information is local routing information;
[0033] In response to the routing information being local routing information, determining whether the lower-level routing module connected to the self is an internal routing module; and
[0034] In response to the lower-level routing module connected to itself not being an internal routing module, it is determined that the data frame to be processed meets the inward forwarding condition.
[0035] In an exemplary embodiment, the external routing module includes:
[0036] Multiple external forwarding ports;
[0037] a first arbitration unit configured to, when receiving a data frame to be processed outputted by the local optical port alone, output the data frame to be processed outputted by the local optical port to the first parsing unit; and, when receiving a data frame to be processed outputted by the superior routing module alone, output the data frame to be processed outputted by the superior routing module to the first parsing unit; and, when receiving a data frame to be processed outputted by the local optical port and a data frame to be processed transmitted by the superior routing module simultaneously, arbitrate the two data frames to be processed and output the data frame to be processed that succeeds in arbitration to the first parsing unit; and the first parsing unit is configured to extract routing information and data packets from the data frame to be processed;
[0038] a first table lookup unit, configured to use the routing information as a keyword to perform a match in a preset routing table, and determine forwarding information based on the matching result;
[0039] A first cache unit, configured to cache data packets;
[0040] a first reassembly unit, configured to take out a data packet from the first cache unit, and reassemble the forwarding information and the data packet to obtain a data frame to be forwarded; and
[0041] The second arbitration unit is used to output the data frame to be forwarded to the external forwarding port corresponding to the forwarding information for forwarding. When the external forwarding port corresponding to the forwarding information is the external forwarding port connected to the local optical port, the data frame to be forwarded is a data frame to be output.
[0042] In an exemplary embodiment, the process of determining forwarding information based on the matching result includes:
[0043] In response to a matching result that a valid rule corresponding to the routing information exists in the preset routing table, determining that the forwarding information is first forwarding information, and the forwarding port corresponding to the first forwarding information is the forwarding port connected to the local optical port; and
[0044] In response to the matching result that there is no valid rule corresponding to the routing information in the preset routing table, the forwarding information is determined to be second forwarding information, and the forwarding port corresponding to the second forwarding information is the forwarding port connected to the next-level routing module.
[0045] In an exemplary embodiment, the process of writing the data to be calculated in the data frame to be processed into the storage module and generating the first trigger instruction includes:
[0046] Writing the data to be calculated in the data frame to be processed into the storage module;
[0047] Determine whether all the data to be calculated required for the next round of computing tasks are written into the storage module;
[0048] In response to writing all to-be-calculated data required for the next round of computing tasks into the storage module, generating a first trigger instruction; and
[0049] In response to not writing all the data to be calculated required for the next round of calculation tasks into the storage module, the operation of writing the data to be calculated in the data frame to be processed into the storage module is repeated until all the data to be calculated required for the next round of calculations are written into the storage module.
[0050] In an exemplary embodiment, the internal routing module is further configured to record the actual number of received data frames to be processed;
[0051] The process of determining whether all the data to be calculated required for the next round of calculation tasks are written into the storage module includes:
[0052] Determine whether the actual quantity reaches the preset quantity;
[0053] In response to the actual number reaching the preset number, determining to write all the to-be-calculated data required for the next round of computing tasks into the storage module; and
[0054] In response to the actual number not reaching the preset number, it is determined that not all the to-be-calculated data required for the next round of computing tasks are written into the storage module.
[0055] In an exemplary embodiment, the computing module is further configured to generate an interrupt instruction upon completing a preset number of rounds of computing tasks, so that the host can obtain result data of the last round of computing tasks from the storage module after receiving the interrupt instruction.
[0056] In an exemplary embodiment, the internal routing module includes:
[0057] a deframing unit configured to, upon receiving a forwarding instruction, obtain first frame header information from the forwarding instruction and output the information to the instruction generation unit; and, in response to receiving a data frame to be processed transmitted by an external routing module, obtain second frame header information and data to be calculated from the data frame to be processed, and output the second frame header information to the instruction generation unit;
[0058] an instruction generating unit, configured to generate a first access instruction according to the first frame header information, and generate a second access instruction according to the second frame header information;
[0059] an interface conversion unit, configured to, in response to receiving a first access instruction, read initial result data corresponding to the first access instruction from the storage module, perform a first protocol conversion on the initial result data, in response to receiving a second access instruction, perform a second protocol conversion on the data to be calculated, and write the data to be calculated after the second protocol conversion into the storage module according to the second access instruction; and
[0060] The framing unit is used to encapsulate the result data after the first protocol conversion into a data frame to be processed and output it to the external routing module.
[0061] In an exemplary embodiment, the internal routing module further includes an internal routing module, the internal routing module including: a plurality of internal forwarding ports; the plurality of internal forwarding ports including a first internal forwarding port connected to the deframing unit, and a second internal forwarding port connected to the external routing module;
[0062] a third arbitration unit, configured to, in response to receiving a data frame to be processed outputted by the external routing module alone, output the data frame to be processed outputted by the external routing module to the second parsing unit; in response to receiving a data frame to be processed outputted by the framing unit alone, output the data frame to be processed outputted by the framing unit to the second parsing unit; and, in response to receiving both the data frame to be processed outputted by the external routing module and the data frame to be processed outputted by the framing unit, arbitrate the two data frames to be processed, and output the successfully arbitrated data frame to be processed to the second parsing unit;
[0063] A second parsing unit, configured to extract routing information and data packets from the data frame to be processed;
[0064] a second table lookup unit, configured to use the routing information as a keyword to perform a match in a preset routing table, and determine forwarding information based on the matching result;
[0065] A second cache unit, configured to cache data packets;
[0066] A second reassembly unit is configured to take out a data packet from the second cache unit and reassemble the forwarding information and the data packet to obtain a data frame to be forwarded;
[0067] a fourth arbitration unit, configured to send the data frame to be forwarded to a forwarding port corresponding to the forwarding information for forwarding; and
[0068] The deframing unit is specifically used to obtain the first frame header information in the forwarding instruction and output it to the instruction generation unit in response to receiving a forwarding instruction; obtain the second frame header information and the data to be calculated in the data frame to be forwarded in response to receiving a data frame to be forwarded, and output the second frame header information to the instruction generation unit.
[0069] In an exemplary embodiment, the first protocol conversion converts the memory map of the AEI into the stream protocol of the AEI, and the second protocol conversion converts the stream protocol of the AEI into the memory map of the AEI.
[0070] In an exemplary embodiment, the deframing unit is further configured to record the actual number of data frames to be processed received from the external routing module, generate a first trigger instruction in response to the actual number reaching a preset number, and output the first trigger instruction to the computing module.
[0071] In an exemplary embodiment, the frame header information of the data frame to be output and the data frame to be processed both include a frame header identification field, a routing information field, an address information field, a data length field, a transaction type field, and a frame sequence number field;
[0072] The external routing module is further used to determine whether the data frame to be processed meets the outward forwarding condition based on the routing information in the data frame to be processed, and to determine whether the data frame to be processed meets the inward writing condition based on the routing information in the data frame to be processed;
[0073] The process of writing the data to be calculated in the data frame to be processed into the storage module includes:
[0074] The data to be calculated in the data frame to be processed is written into the storage module based on the frame header identification field, address information field, data length field, transaction type field and frame sequence number field in the data frame to be processed.
[0075] In an exemplary embodiment, the acceleration device further includes:
[0076] The direct access engine module is used to output the second trigger instruction output by the host to the computing module, and write the data to be calculated output by the host into the storage module.
[0077] This application also provides a heterogeneous computing architecture, including:
[0078] At least one acceleration device as described above;
[0079] The central processing unit provided on the host side is used to send a second trigger instruction generated based on the computing task to the computing module of the acceleration device, write the initial data to be calculated to the storage module in the acceleration device, and obtain the result data corresponding to the computing task from the storage module.
[0080] The present application also provides a data processing method, which is applied to any of the acceleration devices described above. The data processing method includes:
[0081] receiving, through the external routing module, a data frame to be processed transmitted by the local optical port and / or the internal routing module, and outputting, to a corresponding local optical port, a data frame to be output based on the data frame to be processed in response to the data frame to be processed meeting an outward forwarding condition; and outputting, to the internal routing module, the data frame to be processed in response to the data frame to be processed meeting an inward writing condition;
[0082] Writing the data to be calculated in the data frame to be processed into the storage module through the internal routing module and generating a first trigger instruction, reading result data corresponding to the forwarding instruction from the storage module in response to receiving the forwarding instruction, and transmitting the data frame to be processed obtained based on the result data to the external routing module; and
[0083] The computing module calculates the data to be calculated in the storage module based on the target trigger instruction, writes the result data into the storage module after obtaining it, and generates a forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0085] FIG1 is a schematic structural diagram of an acceleration device provided by one or more embodiments of the present application;
[0086] FIG2 is a schematic diagram of routing between multiple acceleration devices provided by one or more embodiments of the present application;
[0087] FIG3 is a schematic diagram of data flow between an external routing module and an internal routing module provided by one or more embodiments of the present application;
[0088] FIG4 is a schematic diagram of an external routing module provided by one or more embodiments of the present application;
[0089] FIG5 is a schematic diagram of an internal routing module provided by one or more embodiments of the present application;
[0090] FIG6 is a schematic diagram of an internal routing module provided by one or more embodiments of the present application;
[0091] FIG7 is a schematic diagram of a data frame structure provided by one or more embodiments of the present application;
[0092] FIG8 is a schematic structural diagram of another acceleration device provided by one or more embodiments of the present application;
[0093] FIG9 is a schematic diagram of a one-dimensional data transmission architecture provided by one or more embodiments of the present application;
[0094] FIG10 is a schematic diagram of a heterogeneous computing architecture provided by one or more embodiments of the present application;
[0095] FIG11 is a schematic diagram of a two-dimensional data transmission architecture provided by one or more embodiments of the present application;
[0096] FIG12 is a schematic diagram of a three-dimensional data transmission architecture provided by one or more embodiments of the present application;
[0097] FIG13 is a flowchart of the steps of a data processing method provided by one or more embodiments of the present application. DETAILED DESCRIPTION
[0098] The core of this application is to provide an acceleration device, a heterogeneous computing architecture and a data processing method, which can simultaneously transmit data between multiple acceleration devices. The data transmission bandwidth of the optical port is relatively high. Using the optical port for data transmission can improve the efficiency of collaborative completion of computing tasks.
[0099] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0100] In the first aspect, please refer to FIG1 , which is a schematic structural diagram of an acceleration device provided by the present application, the acceleration device comprising:
[0101] Storage module 1;
[0102] At least one local optical port 2, each local optical port 2 is connected to each remote optical port, and the remote optical port is an optical port on other acceleration devices;
[0103] The external routing module 3 connected to each local optical port 2 is used to receive the data frame to be processed transmitted by the local optical port 2 and / or the internal routing module 4. When the data frame to be processed meets the outward forwarding condition, the data frame to be output based on the data frame to be processed is output to the corresponding local optical port 2. When the data frame to be processed meets the inward writing condition, the data frame to be processed is output to the internal routing module 4.
[0104] The internal routing module 4 is configured to write the data to be calculated in the data frame to be processed into the storage module 1 and generate a first trigger instruction. Upon receiving a forwarding instruction, the internal routing module 4 reads the result data corresponding to the forwarding instruction from the storage module 1 and transmits the data frame to be processed obtained based on the result data to the external routing module 3.
[0105] The computing module 5 is used to calculate the data to be calculated in the storage module 1 based on the target trigger instruction, write the result data into the storage module 1 after obtaining it, and generate a forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task.
[0106] In this embodiment, the acceleration device includes a storage module 1, which is used to store the data to be calculated required for the computing task and the result data after the calculation is completed. As an optional embodiment, a portion of the storage module 1 can be divided into an area, denoted as area A, for storing the data to be calculated, and another portion of the area, denoted as area B, for storing the result data. Specifically, the storage module 1 can be a high-bandwidth memory.
[0107] At least one local optical port 2 is provided on the acceleration device. Each acceleration device communicates with the optical ports of other acceleration devices through the local optical port 2. For ease of distinction, this embodiment refers to the optical ports provided on other acceleration devices as remote optical ports. The data transmission bandwidth of a single optical port can reach 100Gb / s or above, thereby improving data transmission efficiency. Furthermore, when the acceleration device is provided with multiple local optical ports 2, the enable status of each local optical port 2 can be set according to the current system architecture of the acceleration device. Assuming that the current system architecture is a one-dimensional architecture, one local optical port 2 can be enabled. If the current system architecture is a two-dimensional architecture, two local optical ports 2 can be enabled. If the current system architecture is a three-dimensional architecture, three local optical ports 2 can be enabled, and so on.
[0108] The acceleration device includes an internal routing module 4 and an external routing module 3. The external routing module 3 is connected to each local optical port 2 to process the data frames to be processed transmitted through the local optical port 2. For example, the data frames to be processed that meet the inward writing conditions and are output by other acceleration devices received through the local optical port 2 are forwarded to the internal routing module 4 so that the internal routing module 4 can write the data to be calculated in the data frames to be processed into the storage module. The data frames to be processed that meet the outward forwarding conditions and are output by other acceleration devices received through a certain local optical port 2 can also be forwarded to other local optical ports 2 so that they can be transmitted to other acceleration devices through other local optical ports 2. The data frames to be processed that meet the outward forwarding conditions and are output by the internal routing module 4 can also be forwarded out through the corresponding local optical port 2 connected to itself.
[0109] After receiving the data frame to be processed output by the external routing module 3, the internal routing module 4 extracts the data to be calculated in the data frame to be processed, writes it to the corresponding position in the storage module 1, and generates a first trigger instruction to trigger the calculation module 5 to calculate the data to be calculated in the storage module 1. After obtaining the result data, the calculation module 5 writes the result data to the storage module 1 and generates a forwarding instruction to trigger the internal routing module 4 to obtain the corresponding result data from the storage module 1, encapsulate it into a data frame to be processed, and output it to the external routing module 3 so that the external routing module 3 can forward it.
[0110] In this embodiment, each accelerator device needs to achieve traffic balance as much as possible when performing route selection, that is, all paths have similar traffic, so all data frames are transmitted in the same direction. In this embodiment, data routing is selected according to the right-hand rule. Referring to Figure 2, in a system with eight cards in one machine, that is, including eight accelerator devices, the routing table of the first accelerator device 00 is shown in Table 1. When data from the first accelerator device 00 needs to be sent to the second accelerator device 01, the third accelerator device 02, and the fifth accelerator device 04, data is transmitted through the direct connection path of the external routing module 3 in the corresponding direction. When data needs to be transmitted across accelerator devices, such as when data needs to be transmitted to the fourth accelerator device 03, the sixth accelerator device 05, and the seventh accelerator device 06, the data transmission path is selected according to the direction of the right-hand rule in physics. When data needs to be transmitted across multiple accelerator device nodes, the source accelerator device is placed at the origin of the coordinate axis, and the target accelerator device that needs to cross multiple accelerator devices is diagonally opposite to it. The data frame is first transmitted to the accelerator device directly below the target accelerator device, and then transmitted to the target accelerator device. For the first acceleration device 00, the acceleration device diagonally opposite it is the eighth acceleration device 07. If the first acceleration device 00 is placed at the coordinate origin, the acceleration device directly below the eighth acceleration device 07 is the fourth acceleration device 03. Therefore, the data transmission path from the first acceleration device 00 to the eighth acceleration device 07 is 0→1→3→7.
[0111] Table 1 Routing table of the first acceleration device 00 in one machine with eight cards
[0112] In this embodiment, the acceleration device and the host are connected via a PCIe bus. When the application in the host starts a computing task, the central processing unit in the host passes the computing instruction to the computing module 5 in the acceleration device, and stores the original data to be calculated required for the computing task in the storage module 1 of the acceleration device. The storage module 1 in the acceleration device may specifically include a high-bandwidth memory. After receiving the computing instruction, the computing module 5 retrieves the original data from the high-bandwidth memory and starts the calculation. After processing the specified steps, the processed result data is stored in the high-bandwidth memory, and the internal routing module 4 is notified to retrieve the data from the high-bandwidth memory, add routing information and other frame headers to form a data frame to be processed. The internal routing module 4 transmits the data frame to be processed to the external routing module 3. The external routing module 3 transmits the data frame to be processed from the corresponding local optical port to the specified acceleration device, i.e., the target acceleration device, according to the routing information in the frame header of the data frame to be processed. Similarly, when data is transmitted from another acceleration device, external routing module 3 transmits the data frame to be processed to internal routing module 4. After processing the data frame, internal routing module 4 stores the data to be calculated in the high-bandwidth memory. Computing module 5 then retrieves the data to be calculated from the high-bandwidth memory for subsequent calculations. After computing module 5 completes the entire computation task, it stores the final result in the high-bandwidth memory and notifies the host of the task completion via an interrupt. The host then retrieves the final result from the high-bandwidth memory, completing the computation task. This embodiment uses only one acceleration device as an example for illustration; the data processing process for all other acceleration devices is similar.
[0113] It can be seen that in this embodiment, each acceleration device is provided with an optical port, and data transmission between other acceleration devices is carried out through the optical port. The data transmission bandwidth of the optical port is relatively high. The routing logic is implemented in the acceleration device through the internal routing module 4 and the external routing module 3 to realize the writing and forwarding processing of the corresponding data frames. It can simultaneously carry out data transmission between multiple acceleration devices, thereby improving the efficiency of collaborative completion of computing tasks.
[0114] Based on the above embodiment:
[0115] In an exemplary embodiment, there are multiple local optical ports 2, and the external routing module 3 includes external routing modules 31 corresponding to the multiple local optical ports 2 one by one, and the multiple external routing modules 31 are connected in sequence;
[0116] Each external routing module 31 is used to receive the data frames to be processed transmitted by the local optical port 2 connected to itself and / or the upper-level routing module. When the data frames to be processed meet the outward forwarding conditions, the data frames to be output based on the data frames to be processed are output to the corresponding local optical port 2. When the data frames to be processed meet the inward writing conditions, the data frames to be processed are output to the internal routing module 4. When the data frames to be processed meet the inward forwarding conditions, the data frames to be processed are output to the lower-level routing module. When the upper-level routing module is the internal routing module 4, the lower-level routing module is other external routing modules 31. When the lower-level routing module is the internal routing module 4, the upper-level routing module is other external routing modules 31.
[0117] In this embodiment, the external routing module 3 includes multiple external routing modules 31, and the multiple external routing modules 31 are connected one-to-one with the multiple local optical ports 2 of the acceleration device. As shown in Figure 3, taking the three-dimensional computing framework as an example, the external routing module 3 includes an X-direction external routing module 31x, a Y-direction external routing module 31y, and a Z-direction external routing module 31z, wherein the X-direction external routing module 31x, the Y-direction external routing module 31y, and the Z-direction external routing module 31z are connected in sequence, and the other end of the X-direction external routing module 31x is connected to the internal routing module 4, and the other end of the Z-direction external routing module 31z is connected to the internal routing module 4.
[0118] Each external routing module 31 is used to transmit the data frame from the corresponding local optical port 2 to other acceleration devices according to the routing information in the frame header, or pass it to the next-level routing module for processing. Referring to Figure 3, for the X-direction external routing module 31x, its upper-level routing module is the internal routing module 4, and its lower-level routing module is the Y-direction external routing module 31y. For the Y-direction external routing module 31y, its upper-level routing module is the X-direction external routing module 31x, and its lower-level routing module is the Z-direction external routing module 31z. For the Z-direction external routing module 31z, its upper-level routing module is the Y-direction external routing module 31y, and its lower-level routing module is the internal routing module 4. It can be understood that data is transmitted unidirectionally among the internal routing module 4, the X-direction external routing module 31x, the Y-direction external routing module 31y, and the Z-direction external routing module 31z.
[0119] Taking the X-direction external routing module 31x as an example, when the X-direction external routing module 31x receives a data frame to be processed through the local optical port 2 connected to it, it determines whether the data frame to be processed meets the outward forwarding condition. If the outward forwarding condition is met, the data frame to be processed is transmitted to the local optical port 2 connected to itself. If not, it determines whether the data frame to be processed meets the inward writing condition. If the inward writing condition is met and its own lower-level routing module is not the internal routing module 4, it is determined that the inward forwarding condition is met. At this time, the data frame to be processed is transmitted to the Y-direction external routing module 31y. Correspondingly, if the Z-direction external routing module 31z receives a data frame that meets the inward writing condition, since the lower-level routing module of the Z-direction external routing module 31z is the internal routing module 4, the Z-direction external routing module 31z forwards the data frame to the internal routing module 4.
[0120] In an exemplary embodiment, each external routing module 31 includes a first receiving port, a second receiving port, a first forwarding port, and a second forwarding port. The first forwarding port and the first receiving port are connected to their own local optical port 2 in a one-to-one correspondence. The second forwarding port is connected to the second receiving port of the lower-level routing module, and the second receiving port is connected to the second forwarding port of the upper-level routing module.
[0121] The external routing module 31 is specifically used to receive the data frame to be processed through the first receiving port and / or the second receiving port. When the data frame to be processed meets the outward forwarding condition, the data frame to be output based on the data frame to be processed is output through the first forwarding port. When the data frame to be processed meets the inward writing condition, the data frame to be processed is output to the internal routing module 4. When the data frame to be processed meets the inward forwarding condition, the data frame to be processed is output through the second forwarding port.
[0122] In this embodiment, each external routing module 31 includes multiple forwarding ports, including a first forwarding port connected to the local optical port 2, and a second forwarding port connected to the lower-level routing module. Based on the conditions satisfied by the data frame to be processed, the data frame to be processed is output through the corresponding forwarding port, thereby realizing outward forwarding or inward forwarding.
[0123] In an exemplary embodiment, the external routing module 31 is also used to parse the data frame to be processed, obtain routing information, and determine whether the data frame to be processed meets the outward forwarding conditions based on the routing information, and / or determine whether the data frame to be processed meets the inward forwarding conditions based on the routing information, and / or determine whether the data frame to be processed meets the inward writing conditions based on the routing information.
[0124] In an exemplary embodiment, the process of determining whether a data frame to be processed meets the outward forwarding condition based on routing information includes:
[0125] Match the routing information with the rules in the preset routing table;
[0126] If there is a matching valid rule, it is determined that the data frame to be processed meets the conditions for outward forwarding;
[0127] The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. A valid rule is a rule whose forwarding state is valid.
[0128] In an exemplary embodiment, the process of determining whether a data frame to be processed meets an inward forwarding condition based on routing information includes:
[0129] Match the routing information with the rules in the preset routing table;
[0130] If there is no matching valid rule, it is determined that the data frame to be processed meets the inward forwarding conditions;
[0131] The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. A valid rule is a rule whose forwarding state is valid.
[0132] In an exemplary embodiment, the process of determining whether a data frame to be processed meets an inward writing condition based on routing information includes:
[0133] Determine whether the routing information is local routing information;
[0134] If yes, determine whether the lower-level routing module connected to itself is the internal routing module 4;
[0135] If so, it is determined that the data frame to be processed meets the inward writing condition;
[0136] The process of determining whether a data frame to be processed meets the inbound forwarding conditions based on routing information includes:
[0137] Determine whether the routing information is local routing information;
[0138] If yes, determine whether the lower-level routing module connected to itself is the internal routing module 4;
[0139] If not, it is determined that the data frame to be processed meets the inward forwarding condition.
[0140] In an exemplary embodiment, as shown in FIG4 , the external routing module 31 includes:
[0141] Multiple external forwarding ports;
[0142] The first arbitration unit 311 is configured to, when receiving a data frame to be processed outputted by the local optical port 2 alone, output the data frame to be processed outputted by the local optical port 2 to the first parsing unit 312; when receiving a data frame to be processed outputted by the superior routing module alone, output the data frame to be processed outputted by the superior routing module to the first parsing unit 312; and when receiving a data frame to be processed outputted by the local optical port 2 and a data frame to be processed transmitted by the superior routing module simultaneously, arbitrate the two data frames to be processed and output the data frame to be processed that succeeds in arbitration to the first parsing unit 312; the first parsing unit 312 is configured to extract routing information and data packets from the data frame to be processed;
[0143] A first table lookup unit 313 is configured to use the routing information as a keyword to perform a match in a preset routing table and determine forwarding information based on the matching result;
[0144] A first cache unit 314, configured to cache data packets;
[0145] A first reassembly unit 315 is configured to retrieve a data packet from the first buffer unit 314 and reassemble the forwarding information with the data packet to obtain a data frame to be forwarded;
[0146] The second arbitration unit 316 is used to output the data frame to be forwarded to the external forwarding port corresponding to the forwarding information for forwarding. When the external forwarding port corresponding to the forwarding information is the external forwarding port connected to the local optical port 2, the data frame to be forwarded is a data frame to be output.
[0147] In an exemplary embodiment, the process of determining whether a data frame to be processed meets an inward writing condition based on routing information includes:
[0148] Determine whether the routing information is local routing information;
[0149] If yes, determine whether the lower-level routing module connected to itself is the internal routing module 4;
[0150] If so, it is determined that the data frame to be processed meets the inward writing condition;
[0151] The process of determining whether a data frame to be processed meets the inbound forwarding conditions based on routing information includes:
[0152] Determine whether the routing information is local routing information;
[0153] If yes, determine whether the lower-level routing module connected to itself is the internal routing module 4;
[0154] If not, it is determined that the data frame to be processed meets the inward forwarding condition.
[0155] In an exemplary embodiment, the process of determining forwarding information based on the matching result includes:
[0156] When the matching result is that there is a valid rule corresponding to the routing information in the preset routing table, the forwarding information is determined to be the first forwarding information, and the forwarding port corresponding to the first forwarding information is the forwarding port connected to the local optical port 2;
[0157] When the matching result is that there is no valid rule corresponding to the routing information in the preset routing table, the forwarding information is determined to be the second forwarding information, and the forwarding port corresponding to the second forwarding information is the forwarding port connected to the next-level routing module.
[0158] The first arbitration unit 311 is connected to the first and second receiving ports and receives pending data frames transmitted via local optical port 2 and outputted by the upper-level routing module. When receiving either a pending data frame transmitted via local optical port 2 or a pending data frame outputted by the upper-level routing module, the first arbitration unit 311 directly outputs the received pending data frame to the first parsing unit 312. When the first arbitration unit 311 simultaneously receives a pending data frame outputted via local optical port 2 and a pending data frame outputted by the upper-level routing module, it arbitrates the two received pending data frames and outputs the successfully arbitrated pending data frame to the first parsing unit 312. The first parsing unit 312 parses routing information from the frame header of the pending data frame and uses it as a key for subsequent table lookup. The first table lookup unit 313 is a key unit in the external routing module 31. Based on the key obtained by the first parsing unit 312, it searches the preset routing table for matching rules and obtains the corresponding action, i.e., the forwarding port. The preset routing table is shown in Table 2, where entries consist of matching items, actions, and states. The matching item is the object of keyword matching, which is the number of the target acceleration device to which the data frame to be processed is destined. The action is the port to which the data frame to be processed is forwarded. The above-mentioned local routing information is specifically the number of this acceleration device.
[0159] In this embodiment, there are two forwarding ports. The first forwarding port is used to forward to the physical layer to send to other acceleration devices (the action is 0x0), and the second forwarding port is used to forward to the next routing module for processing. The rules stored in the preset routing table are for sending to other acceleration devices through the physical layer. The status represents whether the corresponding rules in the preset routing table are valid. When the data frame arrives at the external routing module 31, the first parsing unit 312 extracts the routing information from the frame header, that is, the number of the target acceleration device. The first table lookup unit 313 matches the extracted number of the target acceleration device with all the rules in the preset routing table. If there is a matching valid rule, that is, the data frame needs to be sent to other acceleration devices through the physical layer, the first reassembly unit 315 takes out the data frame from the first cache unit 314, and the second arbitration unit 316 sends the data frame to the physical layer. If there is no matching rule, the second arbitration unit 316 defaults to sending the data frame to be processed to the lower-level routing module for processing.
[0160] Table 2 Preset routing table
[0161] In an exemplary embodiment, the process of writing the data to be calculated in the data frame to be processed into the storage module 1 and generating the first trigger instruction includes:
[0162] Writing the data to be calculated in the data frame to be processed into storage module 1;
[0163] Determine whether all the data to be calculated required for the next round of calculation tasks are written into storage module 1;
[0164] If so, generate a first trigger instruction;
[0165] If not, the operation of writing the data to be calculated in the data frame to be processed into the storage module 1 is repeated until all the data to be calculated required for the next round of calculation is written into the storage module 1 .
[0166] In this embodiment, considering that a certain computing task may require the data of multiple acceleration devices to be completed in collaboration, the internal routing module 4 in this embodiment also determines whether the data required for each round of acceleration tasks has been received. If all the data to be calculated required for the next round of computing tasks are obtained, a first trigger instruction is generated to trigger the computing module 5 to execute the next round of computing tasks. It can be understood that the data to be calculated for the next round of computing tasks includes the result data of the current round of computing tasks.
[0167] In an exemplary embodiment, the internal routing module 4 is further configured to record the actual number of received data frames to be processed;
[0168] The process of determining whether all the data to be calculated required for the next round of calculation tasks are written into the storage module 1 includes:
[0169] Determine whether the actual quantity reaches the preset quantity;
[0170] If so, it is determined that all the data to be calculated required for the next round of calculation tasks are written into the storage module 1;
[0171] If not, it is determined that not all the to-be-calculated data required for the next round of computing tasks are written into the storage module 1 .
[0172] In this embodiment, the internal routing module 4 judges the actual number of received data frames to be processed. When the actual number reaches the preset number corresponding to the next round of computing tasks, it determines that all the data to be calculated required for the next round of computing tasks are written into the storage module 1. Otherwise, it continues to wait until all the data to be calculated required for the next round of computing tasks are written into the storage module 1.
[0173] In an exemplary embodiment, referring to FIG. 5 , the internal routing module 4 includes:
[0174] The deframing unit 41 is configured to, upon receiving a forwarding instruction, obtain first frame header information from the forwarding instruction and output the information to the instruction generation unit 42; and upon receiving a data frame to be processed transmitted by the external routing module 3, obtain second frame header information and data to be calculated from the data frame to be processed and output the second frame header information to the instruction generation unit 42;
[0175] An instruction generating unit 42 is configured to generate a first access instruction according to the first frame header information and generate a second access instruction according to the second frame header information;
[0176] The interface conversion unit 43 is configured to, upon receiving a first access instruction, read initial result data corresponding to the first access instruction from the storage module 1 and perform a first protocol conversion on the initial result data; upon receiving a second access instruction, perform a second protocol conversion on the data to be calculated and write the data to be calculated after the second protocol conversion into the storage module 1 according to the second access instruction;
[0177] The framing unit 44 is configured to encapsulate the result data after the first protocol conversion into a data frame to be processed and output it to the external routing module 3 .
[0178] In an exemplary embodiment, the internal routing module 4 further includes an internal routing module 45. As shown in FIG6 , the internal routing module 45 includes: a plurality of internal forwarding ports; the plurality of internal forwarding ports includes a first internal forwarding port connected to the deframing unit 41, and also includes a second internal forwarding port connected to the external routing module 3;
[0179] The third arbitration unit 451 is configured to, upon receiving a data frame to be processed output by the external routing module 3 alone, output the data frame to be processed output by the external routing module 3 to the second parsing unit 452; upon receiving a data frame to be processed output by the framing unit 44 alone, output the data frame to be processed output by the framing unit 44 to the second parsing unit 452; and upon receiving both the data frame to be processed output by the external routing module 3 and the data frame to be processed output by the framing unit 44 simultaneously, arbitrate the two data frames to be processed, and output the successfully arbitrated data frame to be processed to the second parsing unit 452.
[0180] The second parsing unit 452 is used to extract routing information and data packets from the data frame to be processed;
[0181] A second table lookup unit 453 is configured to use the routing information as a keyword to perform a match in a preset routing table and determine forwarding information based on the matching result;
[0182] A second cache unit 454, configured to cache data packets;
[0183] The second reassembly unit 455 is configured to retrieve the data packet from the second buffer unit 454 and reassemble the forwarding information with the data packet to obtain a data frame to be forwarded;
[0184] The fourth arbitration unit 456 is configured to send the data frame to be forwarded to the forwarding port corresponding to the forwarding information for forwarding;
[0185] The deframing unit 41 is specifically used to obtain the first frame header information in the forwarding instruction and output it to the instruction generation unit 42 when a forwarding instruction is received; and to obtain the second frame header information and the data to be calculated in the data frame to be forwarded when a data frame to be forwarded is received, and output the second frame header information to the instruction generation unit 42.
[0186] In an exemplary embodiment, the deframing unit 41 is further configured to record the actual number of data frames to be processed received from the external routing module 3 , generate a first trigger instruction when the actual number reaches a preset number, and output the first trigger instruction to the computing module 5 .
[0187] In this embodiment, the internal routing module 4, the computing module 5, and the host are all connected to the corresponding communication interfaces on the high-bandwidth memory to achieve data interaction with the high-bandwidth memory. Specifically, the high-bandwidth memory is provided with multiple AXI MM (Advanced eXtensible Interface Memory Map) interfaces, and the computing module 5 and the host can both be directly connected to the AXI MM interfaces to achieve data interaction with the high-bandwidth memory. When starting to process a computing task, the host first stores the initial data to be calculated corresponding to the current computing task into the high-bandwidth memory, and at the same time notifies the computing module 5 that the computing task has started. The computing module 5 retrieves the initial data to be calculated from the high-bandwidth memory for the first round of processing. After the processing is completed, the processed result data is written into the high-bandwidth memory, and a forwarding instruction is sent to the internal routing module 4. The deframing unit 41 in the internal routing module 4 extracts the frame header information from the forwarding instruction and passes it to the instruction generation unit 42. The instruction generation unit 42 generates a first access instruction based on the information in the frame header and passes it to the interface conversion unit 43. The interface conversion unit 43 is connected to an AXI MM interface of the high-bandwidth memory and retrieves the corresponding result data from the high-bandwidth memory according to the first access instruction. Considering that the data frame to be processed transmitted to the external routing module 3 needs to meet the AXI Stream (Advanced eXtensible Interface Stream) interface protocol, the interface conversion unit 43 needs to convert the result data that meets the AXI MM interface protocol into the result data that meets the AXI Stream interface protocol, and then combines the routing information and the result data that meets the AXI through the framing unit 44. The result data of the stream interface protocol is encapsulated as data to be processed, and the data to be processed is transmitted to the third arbitration unit 451 in the internal routing module 45. After being processed by each unit in the internal routing module 45, the data to be processed is transmitted to the external routing module 3.
[0188] After the acceleration device receives data sent to the acceleration device by other acceleration devices, the external routing module 3 passes the data frame to be processed to the internal routing module 4. The third arbitration unit 451 in the internal routing module 45 outputs the data frame to be processed output by the external routing module 3 to the second parsing unit 452. The second parsing unit 452 extracts routing information and data packets from the data frame to be processed. The second table lookup unit 453 uses the routing information as a keyword to match the preset routing table and determines forwarding information based on the matching result. The second reassembly unit 455 retrieves the data packet from the second cache unit 454 and reassembles the forwarding information with the data packet to obtain a data frame to be forwarded. The fourth arbitration unit 456 forwards the data frame to be forwarded to the deframing unit 41 through the corresponding port. The deframing unit 41 extracts the frame header and data from the data frame and passes the frame header to the instruction generation unit 42. The instruction generation unit 42 generates a second access instruction based on the information in the frame header. The interface conversion unit 43 converts the data from the AXI Stream interface protocol to the AXI MM interface protocol based on the second access instruction and stores it in the high-bandwidth memory. The deframing unit 41 records all received data frames. After receiving all the data required for the next round of calculations, it sends a message to the computing module 5 to notify it that the next round of calculations can begin. The computing module 5 then retrieves the data required for the next round of calculations from the high-bandwidth memory and begins the next round of calculations. After performing multiple rounds of calculations required by the algorithm as described above, the computing module 5 stores the final calculation results in the high-bandwidth memory and then sends an interrupt message to notify the host computer of the completion of the calculation task. The host then retrieves the final calculation results from the high-bandwidth memory, completing the entire calculation task.
[0189] In an exemplary embodiment, the frame header information of the data frame to be output and the data frame to be processed both include a frame header identification field, a routing information field, an address information field, a data length field, a transaction type field, and a frame sequence number field;
[0190] The external routing module 3 is further used to determine whether the data frame to be processed meets the outward forwarding condition based on the routing information in the data frame to be processed, and to determine whether the data frame to be processed meets the inward writing condition based on the routing information in the data frame to be processed;
[0191] The process of writing the data to be calculated in the data frame to be processed into the storage module 1 includes:
[0192] The data to be calculated in the data frame to be processed is written into the storage module 1 based on the frame header identification field, address information field, data length field, transaction type field and frame sequence number field in the data frame to be processed.
[0193] The data frame format is shown in Figure 7. The frame header consists of a frame header identifier, routing information, address information, data length, transaction type, and frame sequence number. The frame header identifier indicates that this is a new frame of data. The routing information is the destination acceleration device number, that is, which acceleration device this frame of data needs to be sent to. The address information gives the starting address where this frame of data needs to be stored in or read from the high-bandwidth memory. The data length gives the length of this frame of data. The transaction type indicates whether the data is written to the high-bandwidth memory or read from the high-bandwidth memory. The frame sequence number gives the sequence number of the data frame. The routing information is used by the external routing module 31 to forward the data frame to the corresponding acceleration device according to the routing information. Other information in the frame header is used by the internal routing module 4 to write or read data from the high-bandwidth memory according to the information in the frame header.
[0194] In an exemplary embodiment, as shown in FIG8 , the acceleration device further includes:
[0195] The direct access engine module 6 is used to output the second trigger instruction output by the host to the computing module 5 , and write the data to be calculated output by the host into the storage module 1 .
[0196] In summary, the data transmission between the acceleration devices in this application is realized through optical ports, and the physical layer protocol is implemented by selecting Ethernet protocol or point-to-point communication protocols such as Aurora. An acceleration device can be connected to multiple acceleration devices through multiple optical ports for data transmission, and the data transmission bandwidth of a single optical port can reach 100Gb / s and above. The host transfers the data to the high-bandwidth memory of the acceleration card by directly accessing the engine module, and the computing module 5 then takes out the data from the high-bandwidth memory to complete the computing task issued by the host. The acceleration device has routing logic, which can transmit the data packet to the designated acceleration device through different optical ports according to the routing information carried by the data frame header. The data transmission architecture proposed in this application based on the acceleration device has good scalability, and can flexibly expand the number of acceleration cards according to the needs of actual application scenarios to meet the needs of different computing power scenarios.
[0197] In the second aspect, as shown in FIG9 , the present application also provides a heterogeneous computing architecture, including
[0198] At least one acceleration device 91 as described in any of the above embodiments;
[0199] The central processing unit 92 provided on the host side is used to send a second trigger instruction generated based on the computing task to the computing module of the acceleration device 91, write the initial data to be calculated to the storage module in the acceleration device 91, and obtain the result data corresponding to the computing task from the storage module.
[0200] In an exemplary embodiment, the acceleration device is any one of a field programmable gate array device, a graphics processor device, or an application specific integrated circuit device.
[0201] In a heterogeneous computing architecture, a server includes but is not limited to supporting 8 PCIe devices. This embodiment uses a server equipped with 8 FPGA acceleration devices as an example to illustrate the technical implementation of this application in detail. The situation with more acceleration devices can be expanded in a similar manner. The 8 acceleration devices are connected to the host CPU via the PCIe bus, and each acceleration device is connected to other acceleration devices via a local optical port. According to the requirements of different application scenarios, the connection method between the acceleration devices can be diverse, such as the one-dimensional architecture shown in Figure 10, which is suitable for multi-core serial computing task scenarios. The external routing module is connected to the adjacent acceleration device through the optical port, and the internal routing module transmits the data to the computing module for processing or stores it in the high-bandwidth memory according to the routing information. Figure 10 only shows the connection diagram of the first acceleration device 00, the second acceleration device 01, the third acceleration device 02 and the fourth acceleration device 03. The connection method of other numbers of acceleration devices is similar. After the computing module completes the processing task, the internal routing module takes out the processed data from the high-bandwidth memory and sends it to other acceleration devices. Alternatively, they can be connected to form a two-dimensional architecture as shown in Figure 11. Each accelerator device has two external routing modules in the X and Y directions, which are connected to the accelerator devices in the corresponding directions via optical ports, forming a loop. This is suitable for scenarios with cyclic computing tasks. Figure 11 only shows the connection diagram of the first accelerator device 00 to the sixth accelerator device 05. The connection method for the other number of accelerator devices is similar. In application scenarios with more frequent data exchange, a three-dimensional architecture can be built as shown in Figure 12. Each accelerator device has three external routing modules. The external routing modules in the X, Y, and Z directions are connected to the accelerator devices in the corresponding directions via optical ports. Data packets are forwarded from the corresponding optical ports to the destination accelerator device based on the routing information carried in the data frame header. Figure 12 only shows the connection diagram of the first accelerator device 00 to the eighth accelerator device 07. The connection method for the other number of accelerator devices is similar.
[0202] In a third aspect, referring to FIG. 13 , FIG. 13 is a flowchart of steps of a data processing method provided by the present application, which is applied to any of the acceleration devices described above. The data processing method includes:
[0203] S101: receiving a data frame to be processed transmitted by a local optical port and / or an internal routing module through an external routing module, and outputting a data frame to be output based on the data frame to be processed to a corresponding local optical port when the data frame to be processed meets an outward forwarding condition; and outputting the data frame to be processed to the internal routing module when the data frame to be processed meets an inward writing condition;
[0204] S102: Writing the data to be calculated in the data frame to be processed into the storage module through the internal routing module and generating a first trigger instruction. When a forwarding instruction is received, reading the result data corresponding to the forwarding instruction from the storage module, and transmitting the data frame to be processed obtained based on the result data to the external routing module;
[0205] S103: The computing module calculates the data to be calculated in the storage module based on the target trigger instruction, writes the result data into the storage module after obtaining it, and generates a forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task.
[0206] For an introduction to a data processing method provided in this application, please refer to the above embodiment, and this application will not go into details here.
[0207] The data processing method provided in this application has the same beneficial effects as the above-mentioned data processing system.
[0208] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0209] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An acceleration device, characterized in that: include: Storage module; At least one local optical port, each of the local optical ports being connected to each remote optical port, each of the remote optical ports being an optical port on another acceleration device; an external routing module connected to each of the local optical ports, configured to receive a data frame to be processed transmitted by the local optical port and / or the internal routing module, and output a data frame to be output based on the data frame to be processed to the corresponding local optical port in response to the data frame to be processed meeting an outward forwarding condition, and output the data frame to be processed to the internal routing module in response to the data frame to be processed meeting an inward writing condition; The internal routing module is configured to write the data to be calculated in the data frame to be processed into the storage module and generate a first trigger instruction; in response to receiving a forwarding instruction, read result data corresponding to the forwarding instruction from the storage module; and transmit the data frame to be processed obtained based on the result data to the external routing module; and A computing module is used to calculate the data to be calculated in the storage module based on a target trigger instruction, write the result data into the storage module after obtaining it, and generate the forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task.
2. The acceleration device according to claim 1, characterized in that There are multiple local optical ports, and the external routing module includes external routing modules corresponding to the multiple local optical ports one by one, and the multiple external routing modules are connected in sequence; Each of the external routing modules is configured to receive data frames to be processed transmitted by the local optical port and / or the upper-level routing module connected to itself, and in response to the data frames to be processed meeting the outward forwarding condition, output the data frames to be processed obtained based on the data frames to be processed to the corresponding local optical port; in response to the data frames to be processed meeting the inward writing condition, output the data frames to be processed to the internal routing module; in response to the data frames to be processed meeting the inward forwarding condition, output the data frames to be processed to the lower-level routing module; in response to the upper-level routing module being the internal routing module, the lower-level routing module is another external routing module; in response to the lower-level routing module being the internal routing module, the upper-level routing module is another external routing module.
3. The acceleration device according to claim 2, characterized in that Each of the external routing modules includes a first receiving port, a second receiving port, a first forwarding port, and a second forwarding port, wherein the first forwarding port and the first receiving port are connected to their own local optical ports in a one-to-one correspondence, the second forwarding port is connected to the second receiving port of the lower-level routing module, and the second receiving port is connected to the second forwarding port of the upper-level routing module; The external routing module is specifically used to receive the data frame to be processed through the first receiving port and / or the second receiving port, and in response to the data frame to be processed meeting the outward forwarding condition, output the data frame to be processed obtained based on the data frame to be processed through the first forwarding port; in response to the data frame to be processed meeting the inward writing condition, output the data frame to be processed to the internal routing module; in response to the data frame to be processed meeting the inward forwarding condition, output the data frame to be processed through the second forwarding port.
4. The acceleration device according to claim 2, characterized in that The external routing module is further used to parse the data frame to be processed to obtain routing information, and determine whether the data frame to be processed meets the outward forwarding condition based on the routing information, and / or determine whether the data frame to be processed meets the inward forwarding condition based on the routing information, and / or determine whether the data frame to be processed meets the inward writing condition based on the routing information.
5. The acceleration device according to claim 4, characterized in that The process of judging whether the data frame to be processed meets the outward forwarding condition based on the routing information includes: Matching the routing information with the rules in a preset routing table; and In response to the existence of a matching valid rule, determining that the data frame to be processed meets the outward forwarding condition; The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. The valid rule is a rule in which the forwarding state is valid.
6. The acceleration device according to claim 4, characterized in that The process of judging whether the data frame to be processed meets the inward forwarding condition based on the routing information includes: Matching the routing information with the rules in a preset routing table; and In response to the absence of a matching valid rule, determining that the data frame to be processed meets the inbound forwarding condition; The preset routing table includes a correspondence between forwarding actions, forwarding states, and target acceleration device numbers. Each forwarding action, forwarding state, and target acceleration device number constitutes a rule. The valid rule is a rule in which the forwarding state is valid.
7. The acceleration device according to claim 4, characterized in that The process of judging whether the data frame to be processed meets the inward writing condition based on the routing information includes: Determining whether the routing information is local routing information; In response to the routing information being local routing information, determining whether the lower-level routing module connected to the self is the internal routing module; and In response to determining that the lower-level routing module connected to the self is the internal routing module, determining that the to-be-processed data frame meets the inward writing condition; The process of judging whether the data frame to be processed meets the inward forwarding condition based on the routing information includes: Determining whether the routing information is local routing information; In response to the routing information being local routing information, determining whether the lower-level routing module connected to the self is the internal routing module; and In response to the lower-level routing module connected to itself not being the internal routing module, it is determined that the to-be-processed data frame meets the inward forwarding condition.
8. The acceleration device according to any one of claims 2 to 7, characterized in that: The external routing module includes: Multiple external forwarding ports; a first arbitration unit, configured to, when receiving a data frame to be processed output by the local optical port alone, output the data frame to be processed output by the local optical port to the first parsing unit; when receiving a data frame to be processed output by the upper-level routing module alone, output the data frame to be processed output by the upper-level routing module to the first parsing unit; and, when receiving a data frame to be processed output by the local optical port and a data frame to be processed transmitted by the upper-level routing module at the same time, arbitrate the two data frames to be processed, and output the data frame to be processed that has successfully been arbitrated to the first parsing unit; A first parsing unit, configured to extract routing information and data packets from the data frame to be processed; a first table lookup unit, configured to use the routing information as a keyword to perform a match in a preset routing table, and determine forwarding information based on a matching result; A first cache unit, configured to cache the data packet; a first reassembly unit, configured to retrieve the data packet from the first cache unit, and reassemble the forwarding information and the data packet to obtain a data frame to be forwarded; and The second arbitration unit is used to output the data frame to be forwarded to the external forwarding port corresponding to the forwarding information for forwarding. When the external forwarding port corresponding to the forwarding information is the external forwarding port connected to the local optical port, the data frame to be forwarded is the data frame to be output.
9. The acceleration device according to claim 8, characterized in that The process of determining forwarding information based on matching results includes: In response to the matching result being that a valid rule corresponding to the routing information exists in the preset routing table, determining that the forwarding information is first forwarding information, and the forwarding port corresponding to the first forwarding information is the forwarding port connected to the local optical port; and In response to the matching result that there is no valid rule corresponding to the routing information in the preset routing table, the forwarding information is determined to be second forwarding information, and the forwarding port corresponding to the second forwarding information is the forwarding port connected to the next-level routing module.
10. The acceleration device according to claim 1, characterized in that The process of writing the data to be calculated in the data frame to be processed into the storage module and generating a first trigger instruction includes: Writing the data to be calculated in the data frame to be processed into the storage module; Determining whether all the to-be-calculated data required for the next round of computing tasks are written into the storage module; In response to writing all the to-be-calculated data required for the next round of computing tasks into the storage module, generating a first trigger instruction; and In response to not writing all the data to be calculated required for the next round of calculation tasks into the storage module, repeatedly writing the data to be calculated in the to-be-processed data frame into the storage module until all the data to be calculated required for the next round of calculation tasks are written into the storage module. Group.
11. The acceleration device according to claim 10, characterized in that The internal routing module is further configured to record the actual number of received data frames to be processed; The process of determining whether all the to-be-calculated data required for the next round of computing tasks are written into the storage module includes: Determining whether the actual quantity reaches a preset quantity; In response to the actual number reaching the preset number, determining to write all the to-be-calculated data required for the next round of computing tasks into the storage module; and In response to the actual number not reaching the preset number, it is determined that not all of the to-be-calculated data required for the next round of computing tasks are written into the storage module.
12. The acceleration device according to claim 11, characterized in that The computing module is further configured to generate an interrupt instruction upon completing a preset number of rounds of computing tasks, so that the host can obtain result data of the last round of computing tasks from the storage module after receiving the interrupt instruction.
13. The acceleration device according to any one of claims 10 to 12, characterized in that: The internal routing module includes: a deframing unit, configured to, upon receiving the forwarding instruction, obtain first frame header information from the forwarding instruction and output the information to the instruction generation unit; and, in response to receiving a data frame to be processed transmitted by an external routing module, obtain second frame header information and data to be calculated from the data frame to be processed, and output the second frame header information to the instruction generation unit; The instruction generating unit is configured to generate a first access instruction according to the first frame header information, and generate a second access instruction according to the second frame header information; an interface conversion unit, configured to, in response to receiving the first access instruction, read initial result data corresponding to the first access instruction from the storage module, perform a first protocol conversion on the initial result data, perform a second protocol conversion on the data to be calculated in response to receiving the second access instruction, and write the data to be calculated after the second protocol conversion into the storage module according to the second access instruction; and The framing unit is configured to encapsulate the result data after the first protocol conversion into a data frame to be processed and output the frame to the external routing module.
14. The acceleration device according to claim 13, characterized in that The internal routing module further includes an internal routing module, and the internal routing module includes: a plurality of internal forwarding ports; the plurality of internal forwarding ports include a first internal forwarding port connected to the deframing unit, and a second internal forwarding port connected to the external routing module; a third arbitration unit, configured to, in response to receiving a data frame to be processed output by the external routing module alone, output the data frame to be processed output by the external routing module to the second parsing unit; in response to receiving a data frame to be processed output by the framing unit alone, output the data frame to be processed output by the framing unit to the second parsing unit; and, in response to receiving both the data frame to be processed output by the external routing module and the data frame to be processed output by the framing unit, arbitrate the two data frames to be processed, and output the successfully arbitrated data frame to be processed to the second parsing unit; The second parsing unit is used to extract routing information and data packets from the data frame to be processed; a second table lookup unit, configured to use the routing information as a keyword to perform a match in a preset routing table, and determine forwarding information based on a matching result; A second cache unit, configured to cache the data packet; a second reassembly unit, configured to take the data packet from the second cache unit, and reassemble the forwarding information with the data packet to obtain a data frame to be forwarded; a fourth arbitration unit, configured to send the data frame to be forwarded to a forwarding port corresponding to the forwarding information for forwarding; and The deframing unit is specifically used to, in response to receiving the forwarding instruction, obtain the first frame header information in the forwarding instruction and output it to the instruction generation unit; in response to receiving the data frame to be forwarded, obtain the second frame header information and the data to be calculated in the data frame to be forwarded, and output the second frame header information to the instruction generation unit.
15. The acceleration device according to claim 13, characterized in that The first protocol conversion converts the memory map of the advanced extensible interface into the stream protocol of the advanced extensible interface, and the second protocol conversion converts the stream protocol of the advanced extensible interface into the memory map of the advanced extensible interface.
16. The acceleration device according to claim 13, characterized in that The deframing unit is further configured to record the actual number of data frames to be processed received from the external routing module, generate a first trigger instruction in response to the actual number reaching a preset number, and output the first trigger instruction to the computing module.
17. The acceleration device according to claim 1, wherein: The frame header information of the data frame to be output and the data frame to be processed both include a frame header identification field, a routing information field, an address information field, a data length field, a transaction type field, and a frame sequence number field; The external routing module is further configured to determine whether the data frame to be processed meets the outward forwarding condition based on the routing information in the data frame to be processed, and determine whether the data frame to be processed meets the inward writing condition based on the routing information in the data frame to be processed; The process of writing the data to be calculated in the data frame to be processed into the storage module includes: The data to be calculated in the data frame to be processed is written into the storage module based on the frame header identification field, the address information field, the data length field, the transaction type field and the frame sequence number field in the data frame to be processed.
18. The acceleration device according to claim 1, wherein: The acceleration device further includes: The direct access engine module is used to output the second trigger instruction output by the host to the computing module, and write the data to be calculated output by the host into the storage module.
19. A heterogeneous computing architecture, characterized in that: include: At least one acceleration device according to any one of claims 1 to 18; The central processing unit provided on the host side is used to send a second trigger instruction generated based on the computing task to the computing module of the acceleration device, write the initial data to be calculated to the storage module in the acceleration device, and obtain the result data corresponding to the computing task from the storage module.
20. A data processing method, characterized in that: Applied to the acceleration device according to any one of claims 1 to 18, the data processing method comprises: receiving, through an external routing module, a data frame to be processed transmitted by a local optical port and / or an internal routing module, and outputting, to a corresponding local optical port, a data frame to be output based on the data frame to be processed in response to a condition for forwarding the data frame to be processed; and outputting, to the internal routing module, a data frame to be processed in response to a condition for writing the data frame to be processed. writing the data to be calculated in the data frame to be processed into a storage module through the internal routing module and generating a first trigger instruction; in response to receiving a forwarding instruction, reading result data corresponding to the forwarding instruction from the storage module, and transmitting the data frame to be processed obtained based on the result data to the external routing module; and The computing module calculates the data to be calculated in the storage module based on the target trigger instruction, writes the result data into the storage module after obtaining it, and generates the forwarding instruction. The target trigger instruction is the first trigger instruction or the second trigger instruction generated by the host based on the current computing task.
Citation Information
Patent Citations
Multichannel high-speed data distribution device
CN108415870A
Data processing method and device, distributed data flow programming framework and related components
CN111324558A
Data transmission method and FPGA cloud platform
CN112087471A
Acceleration device, heterogeneous computing architecture and data processing method
CN117687943A
Highspeed shared-memory optical network interfaces and topology
US11698878B1