Multi-level interconnection network and related control method
By using a multi-level interconnection network in the spatial DNN accelerator, combined with plane and destination routing networks, the problem of data movement overhead and high energy consumption is solved, and low energy consumption and efficient data transmission are achieved.
Patent Information
- Application Number
- CN202410333970.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-03-22
- Publication Date
- 2024-10-01
AI Technical Summary
Typical spatial DNN accelerators do not consider the type of data movement and lack multicast/broadcast functions, resulting in additional overhead and high energy consumption of on-chip data movement, and fail to effectively utilize data reuse opportunities.
Adopt a multi-level interconnection network, combine M-level plane routing network and N-level destination routing network, adopt non-blocking network topology, support multicast/broadcast function to achieve data reuse, and achieve data reuse through configurable plane coding table and fixed purpose The local coding table ensures the constraint of plane routing paths and the efficiency of destination routing.
It effectively reduces the number of memory accesses, achieves low energy consumption, and supports low-power multicast mode, reducing power consumption while avoiding the data movement overhead faced by typical spatial DNN accelerators.
Smart Images

Figure CN118740642A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to interconnection architecture, and more particularly, to a multi-level interconnection network using a planar routing network and a destination routing network and a related control method. Background Art
[0002] Certain applications (e.g., image processing, speech recognition, and classification) rely heavily on neural network-based algorithms that have shown promising results in terms of accuracy. However, these algorithms involve a large number of computations that cannot be managed by general-purpose processors. To address this challenge, accelerators based on spatial architectures have emerged, which include arrays of computing engines (CEs). For example, due to the highly parallel nature of DNN computations, spatial deep neural network (DNN) accelerators can be used. However, typical spatial DNN accelerators suffer from high overhead due to the movement of on-chip data between on-chip memory and multiple CEs. For example, the interconnect network of a typical spatial DNN accelerator does not take into account the type of data movement, resulting in additional overhead for on-chip data movement due to the lack of multicast / broadcast capabilities; and / or does not know the characteristics of data reuse, resulting in high energy consumption due to massive memory access.
[0003] Therefore, it is necessary to innovate an interconnected network that can fully exploit data reuse opportunities. Summary of the invention
[0004] One of the purposes of the present invention is to provide a multi-level interconnect network using a planar routing network and a destination routing network and a related control method. In one application, the multi-level interconnect network can be part of a spatial deep neural network (DNN) accelerator. In another application, the multi-level interconnect network can be part of an artificial intelligence (AI) cloud server based on a chip network (network-on-chip, NoC).
[0005] According to a first aspect of the present invention, an exemplary multi-stage interconnection network is disclosed. The exemplary multi-stage interconnection network includes an M-level plane routing network and an N-level destination routing network. The M-level plane routing network is used to route a data packet received by an input port of the multi-stage interconnection network to a switching plane according to an M-bit entry selected from a plane coding table, wherein the M bits of the M-bit entry respectively control the M levels of the M-level plane routing network. The N-level destination routing network is used to route the data packet from the switching plane to at least one output port of the multi-stage interconnection network according to at least one N-bit entry selected from a destination coding table, wherein the N bits of each N-bit entry in the at least one N-bit entry respectively control the N levels of the N-level destination routing network. The multi-stage interconnection network adopts a non-blocking network topology, and the sum of M and N is a positive integer not less than two.
[0006] In some embodiments, the plane code table is configurable and the destination code table is fixed.
[0007] In some embodiments, the non-blocking network topology is a Benes topology.
[0008] In some embodiments, the plane encoding table has a plurality of M-bit entries, and the plurality of M-bit entries respectively correspond to a plurality of input ports of the multi-level interconnection network.
[0009] In some embodiments, all plane routing paths specified by the plane encoding table are constrained to ensure that each 2x2 switch included in any one of the all plane routing paths complies with one of the bypass mode and the crossover mode.
[0010] In some embodiments, the destination encoding table has a plurality of N-bit entries, and the plurality of N-bit entries respectively correspond to a plurality of output ports of the multi-stage interconnection network.
[0011] In some embodiments, the N-stage destination routing network routes the data packet from the switching plane to multiple output ports of the multi-stage interconnect network according to multiple N-bit entries selected from the destination encoding table.
[0012] In some embodiments, in response to the plurality of output ports being adjacent ports, at least one stage of the N-stage destination routing network is skipped and the data packet is bypassed by the at least one stage.
[0013] In some embodiments, the plurality of output ports are all output ports of the multi-stage interconnection network, and the number of the at least one stage is equal to N.
[0014] In some embodiments, the multi-level interconnect network is part of a spatial deep neural network (DNN) accelerator.
[0015] In some embodiments, the multi-level interconnect network is part of a router used in a network-on-chip (NoC) based artificial intelligence (AI) cloud server.
[0016] According to a second aspect of the present invention, an exemplary control method for a multi-stage interconnection network is disclosed. The exemplary control method includes: selecting an M-bit entry for controlling an M-level plane routing network included in the multi-stage interconnection network from a plane coding table to route a data packet received by an input port of the multi-stage interconnection network to a switching plane, wherein the M bits of the M-bit entry respectively control the M levels of the M-level plane routing network; and selecting at least one N-bit entry for controlling an N-level destination routing network included in the multi-stage interconnection network from a destination coding table to route the data packet from the switching plane to at least one output port of the multi-stage interconnection network, wherein the N bits of each N-bit entry in the at least one N-bit entry respectively control the N levels of the N-level destination routing network. The multi-stage interconnection network adopts a non-blocking network topology, and the sum of M and N is a positive integer not less than two.
[0017] In some embodiments, the plane code table is configurable and the destination code table is fixed.
[0018] In some embodiments, the non-blocking network topology is a Benes topology.
[0019] In some embodiments, the plane encoding table has a plurality of M-bit entries, and the plurality of M-bit entries respectively correspond to a plurality of input ports of the multi-level interconnection network.
[0020] In some embodiments, the method further includes: setting the plane coding table, wherein all plane routing paths specified by the plane coding table are constrained to ensure that each 2x2 switch included in any one of the all plane routing paths satisfies one of a bypass mode and a crossover mode.
[0021] In some embodiments, the destination encoding table has a plurality of N-bit entries, and the plurality of N-bit entries respectively correspond to a plurality of output ports of the multi-stage interconnection network.
[0022] In some embodiments, the step of selecting the at least one N-bit entry from the destination encoding table for controlling the N-level destination routing network includes: controlling the N-level destination routing network according to multiple N-bit entries selected from the destination encoding table to route the data packet from the switching plane to multiple output ports of the multi-level interconnection network.
[0023] In some embodiments, the step of selecting the at least one N-bit entry from the destination encoding table for controlling the N-stage destination routing network also includes: in response to the multiple output ports being adjacent ports, skipping at least one level of the N-stage destination routing network so that the data packet is bypassed by the at least one level.
[0024] In some embodiments, the plurality of output ports are all output ports of the multi-stage interconnection network, and the number of the at least one stage is equal to N.
[0025] In some embodiments, the multi-level interconnect network is part of a spatial deep neural network (DNN) accelerator.
[0026] In some embodiments, the multi-level interconnect network is part of a router used in a network-on-chip (NoC) based artificial intelligence (AI) cloud server.
[0027] Those skilled in the art will no doubt understand these and other objects of the present invention after reading the following detailed description of the preferred embodiments shown in the accompanying drawings. The detailed description will be given in the following embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings (wherein like numbers represent like components) illustrate embodiments of the present invention. The drawings are included to provide a further understanding of the embodiments of the present disclosure, and the drawings are incorporated into and constitute a part of the embodiments of the present disclosure. The drawings illustrate implementation methods of the embodiments of the present disclosure and are used together with the description to explain the principles of the embodiments of the present disclosure. It is understood that the drawings are not necessarily drawn to scale, as some components may be shown to be out of proportion to the dimensions in actual implementation to clearly illustrate the concepts of the embodiments of the present disclosure.
[0029] FIG. 1 is a block diagram of a spatial deep neural network (DNN) accelerator according to an embodiment of the present invention.
[0030] FIG. 2 is a schematic diagram illustrating an example of the multi-stage interconnection network shown in FIG. 1. FIG.
[0031] FIG. 3 is a schematic diagram illustrating a 2x2 switch supporting up and down routing according to an embodiment of the present invention.
[0032] FIG. 4 is a schematic diagram illustrating a 2x2 switch operating in a first multicast mode according to an embodiment of the present invention.
[0033] FIG. 5 is a schematic diagram illustrating the operation of a 2x2 switch in a second multicast mode according to an embodiment of the present invention.
[0034] FIG. 6 is a schematic diagram illustrating a 2x2 switch operating in a first unicast mode according to an embodiment of the present invention.
[0035] FIG. 7 is a schematic diagram illustrating a 2x2 switch operating in a second unicast mode according to an embodiment of the present invention.
[0036] FIG. 8 is a schematic diagram illustrating an example of a destination code table according to an embodiment of the present invention.
[0037] FIG. 9 is a schematic diagram illustrating an example of a plane coding table according to an embodiment of the present invention.
[0038] FIG. 10 is a schematic diagram illustrating a design rule of a plane coding table according to an embodiment of the present invention.
[0039] FIG. 11 is a schematic diagram illustrating another design rule of a plane coding table according to an embodiment of the present invention.
[0040] FIG. 12 is a schematic diagram illustrating another design rule of a plane coding table according to an embodiment of the present invention.
[0041] FIG. 13 is a flow chart illustrating an up / down routing method according to an embodiment of the present invention.
[0042] FIG. 14 is a schematic diagram illustrating a multicast routing operation implemented through a multi-stage interconnected network according to an embodiment of the present invention.
[0043] FIG. 15 is a schematic diagram illustrating a unicast routing operation implemented through a multi-stage interconnected network according to an embodiment of the present invention.
[0044] FIG. 16 is a schematic diagram illustrating another unicast routing operation implemented through a multi-stage interconnected network according to an embodiment of the present invention.
[0045] FIG. 17 is a schematic diagram illustrating a first low power multicast mode of a multi-level interconnection network according to an embodiment of the present invention.
[0046] FIG. 18 is a schematic diagram illustrating a second low power multicast mode of a multi-level interconnection network according to an embodiment of the present invention.
[0047] FIG. 19 is a schematic diagram illustrating a third low power multicast mode of a multi-level interconnection network according to an embodiment of the present invention.
[0048] FIG. 20 is a schematic diagram illustrating an AI cloud server based on NoC according to an embodiment of the present invention.
[0049] In the following detailed description, for the purpose of illustration, many specific details are set forth so that those skilled in the art can more thoroughly understand the embodiments of the present invention. However, it is apparent that one or more embodiments may be implemented without these specific details, and different embodiments may be combined as needed, and should not be limited to the embodiments listed in the accompanying drawings. DETAILED DESCRIPTION
[0050] The following description is a preferred embodiment of the present invention, which is only used to illustrate the technical features of the present invention, and is not used to limit the scope of the present invention. Certain words are used throughout the specification and claims to refer to specific components. It should be understood by those skilled in the art that manufacturers may use different names to refer to the same components. Therefore, the present specification and claims do not use the difference in name as a way to distinguish components, but use the difference in function of the components as a basis for distinction. The terms "component", "system" and "device" used in the present invention can be entities related to computers, wherein the computer can be hardware, software, or a combination of hardware and software. The terms "including" and "comprising" mentioned in the following description and claims are open-ended terms, so they should be interpreted as "including, but not limited to...". In addition, the term "coupled" means an indirect or direct electrical connection. Therefore, if a device is described as coupled to another device, it means that the device can be directly electrically connected to the other device, or indirectly electrically connected to the other device through other devices or connection means.
[0051] Corresponding numbers and symbols in the various figures of the drawings generally refer to corresponding parts unless otherwise indicated. The drawings are drawn to clearly illustrate the relevant parts of the embodiments and are not necessarily drawn to scale.
[0052] The term "substantially" or "approximately" as used herein means that within an acceptable range, a person skilled in the art can solve the technical problem to be solved and basically achieve the technical effect to be achieved. For example, "approximately equal to" means that a certain error from "completely equal to" is acceptable to a person skilled in the art without affecting the correctness of the result.
[0053] FIG. 1 is a block diagram of a spatial deep neural network (DNN) accelerator according to an embodiment of the present invention. The spatial DNN accelerator 100 includes an on-chip memory, a multi-level interconnection network 104, a plurality of computing engines (CEs), and a control circuit 106. For example, the on-chip memory may be a tightly coupled memory (TCM) 102. For another example, the plurality of computing engines may be processor cores Core_0, Core_1, Core_2, and Core_3. Local traffic between processor cores Core_0-Core_3 (i.e., communication traffic between CEs) may be implemented through a ring network 111. It should be noted that FIG. 1 shows four processor cores for illustration purposes only. However, in practice, the number of processor cores in the spatial DNN accelerator 100 may be adjusted according to actual application requirements. Regarding the multi-level interconnection network 104, it is responsible for on-chip data movement between TCM 102 and processor cores Core_0-Core_3. The multi-stage interconnection network 104 proposed by the present invention includes an M-stage plane routing network 108 and an N-stage destination routing network 110, wherein M and N are positive integers, and the sum of M and N is not less than 2. The control circuit 106 is used to manage the plane route of the M-stage plane routing network 108 according to the plane encoding table LUT_PR, and to manage the destination route of the N-stage destination routing network 110 according to the destination encoding table LUT_DR. For example, the M-level plane routing network 108 routes a data packet received at an input port of the multi-stage interconnection network 108 to a switching plane (which is regarded as an intermediate plane during packet forwarding) according to an M-bit entry selected from the plane coding table LUT_PR, wherein the M bits of each M-bit entry respectively control the M stages of the M-level plane routing network 108; and the N-level destination routing network 110 routes the data packet from the switching plane to at least one output port of the multi-stage interconnection network 104 according to at least one N-bit entry selected from the destination coding table LUT_DR, wherein the N bits of each N-bit entry respectively control the N stages of the N-level destination routing network 110. For example, but not limited to, the plane coding table LUT_PR is configurable, while the destination coding table LUT_DR is fixed (e.g., predefined).In the following text, the terms "switch plane" and "intermediate plane" are used interchangeably.
[0054] Regarding on-chip data movement of DNN dataflow, the multi-stage interconnection network 104 adopts a non-blocking network topology and supports multicast / broadcast (one-to-many) functions to achieve spatial data reuse and supports unicast (one-to-one) functions to achieve parallel data access. FIG. 2 is a schematic diagram illustrating an example of the multi-stage interconnection network 104 shown in FIG. 1. In this example, the multi-stage interconnection network 104 adopts a Benes topology and thus has a distributed 2x2 switch architecture. As shown in FIG. 2, the multi-stage interconnection network 104 has eight input ports IN_1 to IN_8 and eight output ports OUT_1 to OUT_8, the planar routing network 108 has two stages, shown as Stage 1 and Stage 2 (M=2), and the destination routing network 110 has three stages, shown as Stage 3, Stage 4, and Stage 5 (N=3). Each stage of the planar routing network 108 includes four 2x2 switches 202 , and each stage of the destination routing network 110 includes four 2x2 switches 204 .
[0055] For example, each of the 2x2 switches 202 and 204 can be implemented by the 2x2 switch 300 shown in FIG. 3. As shown in FIG. 3, the 2x2 switch 300 includes two multiplexers 302 and 304, which are labeled M0 and M1, respectively. By appropriately setting the multiplexers 302 and 304, the 2x2 switch 300 can support four possible switching modes. In this example, when the control bit of the 2x2 switch 300 is set to "0", the upstream route is selected; when the control bit of the 2x2 switch 300 is set to "1", the downstream route is selected.
[0056] As shown in FIG. 4 , when multiplexer 302 is instructed to use input in0 as its output out0 and multiplexer 304 is instructed to use the same input in0 as its output out1, 2x2 switch 300 may operate in a first multicast mode. As shown in FIG. 5 , when multiplexer 302 is instructed to use input in1 as its output out0 and multiplexer 304 is instructed to use the same input in1 as its output out1, 2x2 switch 300 may operate in a second multicast mode. As shown in FIG. 6 , when multiplexer 302 is instructed to use input in0 as its output out0 and multiplexer 304 is instructed to use input in1 as its output out1, 2x2 switch 300 may operate in a first unicast mode (hereinafter also referred to as “bypass mode”). As shown in FIG. 7 , when the multiplexer 302 is instructed to use the input in1 as its output out0 and the multiplexer 304 is instructed to use the input in0 as its output out1 , the 2x2 switch 300 may operate in the second unicast mode (hereinafter also referred to as “crosslink mode”).
[0057] In this example, each 2x2 switch 204 included in the destination routing network 110 shown in FIG. 2 is allowed to operate in any one of the four switching modes shown in FIG. 4 to FIG. 7. With respect to each 2x2 switch 202 included in the planar routing network 108 shown in FIG. 2, it is restricted / constrained to operate in only one of the two switching modes shown in FIG. 6 and FIG. 7. That is, each 2x2 switch 202 is required to operate in the pass mode shown in FIG. 6 or the cross mode shown in FIG. 7 according to the routing algorithm.
[0058] FIG8 is a schematic diagram of an example of a destination coding table LUT_DR according to an embodiment of the present invention. The destination coding table LUT_DR is a fixed table that defines fixed up-down routes for different destinations (i.e., output ports OUT_1 to OUT_8). Since a fixed destination coding table is used, the complexity of the routing algorithm of the multi-stage interconnection network 104 can be reduced. In this example, a 3-level destination routing network is used. Therefore, each entry of the destination coding table LUT_DR is indexed by a destination identifier, and each entry includes 3 control bits S3, S4, and S5, wherein the control bit S3 is used to control the 2x2 switch of the third stage Stage3, the control bit S4 is used to control the 2x2 switch of the fourth stage Stage4, and the control bit S5 is used to control the 2x2 switch of the fifth stage Stage5. Regarding the 2x2 switch, when the control bit is set to "0", the up route is selected (marked as Up); when the control bit is set to "1", the down route is selected (marked as Down). Specifically, each 2x2 switch of the destination routing network 110 is allowed to operate in any of the four switch modes shown in Figures 4 to 7. The destination route specified by the destination routing network 110 can support unicast and multicast. Regarding each destination, any switching plane can reach it through the destination route specified by the destination routing network 110.
[0059] For example, when a data packet is forwarded to any of the switching planes Plane0, Plane1, Plane2, or Plane3 through the plane routing network 108, in response to (S3, S4, S5) = (0, 0, 0) selected when the destination is the output port OUT_1, the data packet is further forwarded to the output port OUT_1 through the destination route (Up, Up, Up) provided by the 2x2 switches of the 3rd, 4th, and 5th levels in the destination routing network 110; in response to (S3, S4, S5) = (0, 0, 1) selected when the destination is the output port OUT_2, the data packet is further forwarded to the output port OUT_3 through the destination route (Up, Up, Up) provided by the 2x2 switches of the 3rd, 4th, and 5th levels in the destination routing network 110; In response to the destination route (Up, Up, Down) provided by the 2x2 switches of the 3rd, 4th and 5th levels in the destination routing network 110, the data packet is further forwarded to the output port OUT_2; in response to the selection of (S3, S4, S5) = (1, 0, 0) when the destination is the output port OUT_3, the data packet is further forwarded to the output port OUT_3 through the destination route (Down, Up, Up) provided by the 2x2 switches of the 3rd, 4th and 5th levels in the destination routing network 110; in response to the selection of (S3, S4, S5) = (1, 0, 0) when the destination is the output port OUT_4, the data packet is further forwarded to the output port OUT_5. =(1,0,1), the data packet is further forwarded to the output port OUT_4 through the destination routes (Down,Up,Down) provided by the 2x2 switches of the 3rd, 4th and 5th levels in the destination routing network 110; in response to (S3,S4,S5)=(0,1,0) selected when the destination is the output port OUT_5, the data packet is further forwarded to the output port OUT_5 through the destination routes (Up,Down,Up) provided by the 2x2 switches of the 3rd, 4th and 5th levels in the destination routing network 110; in response to (S3,S4,S5)=(0,1,0) selected when the destination is the output port OUT_5, the data packet is further forwarded to the output port OUT_5; In response to (S3, S4, S5) = (0, 1, 1) selected when the destination is output port OUT_6, the data packet is further forwarded to the output port OUT_6 through the destination route (Up, Down, Down) provided by the 2x2 switches of the consecutive 3rd, 4th and 5th levels in the destination routing network 110; in response to (S3, S4, S5) = (1, 1, 0) selected when the destination is output port OUT_7, the data packet is further forwarded to the output port OUT_7 through the destination route (Down, Down, Up) provided by the 2x2 switches of the consecutive 3rd, 4th and 5th levels in the destination routing network 110;And, in response to (S3, S4, S5)=(1, 1, 1) being selected when the destination is the output port OUT_8, the data packet is further forwarded to the output port OUT_8 through the destination route (Down, Down, Down) provided by the 2x2 switches of the 3rd, 4th and 5th levels in the destination routing network 110. ;
[0060] FIG. 9 is a schematic diagram of a plane coding table LUT_PR according to an embodiment of the present invention. The plane coding table LUT_PR is a configurable table that assigns switching planes to different source ends (i.e., input ports IN_1 to IN_8). Since the plane coding table LUT_PR is configurable, the plane routing network 108 can provide path diversity as needed. For example, since the data packet forwarding path provided by the plane routing network 108 can be adjusted by appropriately changing the settings of the configurable plane coding table LUT_PR, the multi-level interconnection network can benefit from the path diversity characteristics of the plane routing network 108 to avoid path contention. In this example, a 2-level plane routing network is adopted. Therefore, each entry of the plane coding table LUT_PR is indexed by a source identifier, and each entry includes 2 control bits S1 and S2, wherein the control bit S1 is used to control the 2x2 switch of the first level, and the control bit S2 is used to control the 2x2 switch of the second level. For a 2x2 switch, when the control bit is set to "0", the upstream route is selected, and when the control bit is set to "1", the downstream route is selected. According to the routing algorithm, each 2x2 switch of the planar routing network 108 is constrained to operate in one of the two switching modes (i.e., bypass mode and crossover mode) as shown in Figures 6 and 7.
[0061] In order to meet the constraints of the switching mode (i.e., bypass mode and cross mode), the configuration of the plane coding table LUT_PR can follow the design rules shown in Figures 10 to 11. Regarding the control bit S1 contained in each of the dotted boxes 1002, 1004, 1006 and 1008 in Figure 10, they should be mutually exclusive, i.e., "0" and "1". It should be noted that the order of "0" and "1" in the same dotted boxes 1002 / 1004 / 1006 / 1008 can be exchanged according to actual design considerations. Regarding the control bit pairs (S1, S2) contained in the dotted boxes 1102 and 1104 in Figure 11, they should be mutually exclusive, i.e., "00", "10", "01" and "11". It should be noted that the order of "00", "10", "01" and "11" in the dotted boxes 1102 and 1104 can be adjusted according to actual design considerations. Regarding the control bit pairs (S1, S2) contained in the dashed boxes 1202 and 1204 in FIG. 12, they should be mutually exclusive, i.e., "00", "10", "01" and "11". It should be noted that the order of "00", "10", "01" and "11" in the dashed boxes 1202 and 1204 can be adjusted according to actual design considerations.
[0062] Plane coding assigns the switching plane to the input plane. Taking the plane coding table LUT_PR shown in FIG. 9 as an example, the input port IN_1 is assigned with (S1, S2) = (0, 0), the input port IN_2 is assigned with (S1, S2) = (1, 0), the input port IN_3 is assigned with (S1, S2) = (0, 0), the input port IN_4 is assigned with (S1, S2) = (1, 0), the input port IN_5 is assigned with (S1, S2) = (0, 1), the input port IN_6 is assigned with (S1, S2) = (1, 1), the input port IN_7 is assigned with (S1, S2) = (0, 1), and the input port IN_8 is assigned with (S1, S2) = (1, 1). Therefore, when any of the input ports IN_1 and IN_3 receives a data packet, in response to (S1, S2) = (0, 0) selected when the source end is the input port IN_1 / IN_3, the data packet is forwarded to the switching plane Plane0 through the plane routing (Up, Up) provided by the 2x2 switches of the consecutive first and second levels in the plane routing network 108; when any of the input ports IN_5 and IN_7 receives a data packet, in response to (S1, S2) = (0, 1) selected when the source end is the input port IN_5 / IN_7, the data packet is forwarded to the switching plane Plane1 through the plane routing (Up, Down) provided by the 2x2 switches of the consecutive first and second levels in the plane routing network 108; When any of the input ports IN_2 and IN_4 receives a data packet, in response to (S1, S2) = (1, 0) being selected when the source end is the input port IN_2 / IN_4, the data packet is forwarded to the switching plane Plane2 through the plane routing (Down, Up) provided by the consecutive 1st and 2nd level 2x2 switches in the plane routing network 108; and, when any of the input ports IN_6 and IN_8 receives a data packet, in response to (S1, S2) = (1, 1) being selected when the source end is the input port IN_6 / IN_8, the data packet is forwarded to the switching plane Plane3 through the plane routing (Down, Down) provided by the consecutive 1st and 2nd level 2x2 switches in the plane routing network 108.
[0063] FIG. 13 is a flow chart of an up-down routing method according to an embodiment of the present invention. As long as the results are substantially the same, there is no need to perform the steps in the exact order shown in FIG. 13. In step 1302, the plane routing is set by configuring the plane coding table LUT_PR. Therefore, the designer / user can manually set the plane coding table LUT_PR to meet the requirements of the application. In step 1304, the plane coding table LUT_PR is checked to determine whether the constraints of the switch mode are met. If the constraints of the switch mode are not met, the plane coding table LUT_PR is updated (step 1306). If the constraints of the switch mode are met, the destination routing is directly set using a fixed (predefined) destination coding table LUT_DR (step 1308). Therefore, the designer / user needs to manually set the plane coding table LUT_PR, but does not need to spend time manually setting the destination coding table LUT_DR.
[0064] The multi-stage interconnection network 104 adopts a non-blocking network topology (e.g., Benes topology), and the multi-stage interconnection network 104 supports multicast / broadcast (one-to-many) functions for spatial data reuse, and supports unicast (one-to-one) functions for parallel data access. Please refer to FIG. 14 together with FIG. 8 and FIG. 9. FIG. 14 is a schematic diagram of a multicast routing operation implemented by the multi-stage interconnection network 104 according to an embodiment of the present invention. Assume that the same data packet received by the input port IN_1 of the multi-stage interconnection network 104 needs to be forwarded to multiple output ports OUT_1, OUT_2, OUT_5, and OUT_6 of the multi-stage interconnection network 104. Since the plane coding table LUT_PR allocates table entry (S1, S2) = (0, 0) to the source end (i.e., input port IN_1), the data packet received by the input port IN_1 is forwarded to the switching plane Plane0 through the plane routing (UP, UP) provided by the plane routing network 108. Since the destinations are output ports OUT_1 , OUT_2 , OUT_5 , OUT_6 , the table entries associated with the output ports OUT_1 , OUT_2 , OUT_5 , OUT_6 are selected from the destination encoding table LUT_DR. Therefore, in response to (S3, S4, S5) = (0, 0, 0), the data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_1 through the destination route (Up, Up, Up) provided by the destination routing network 110; in response to (S3, S4, S5) = (0, 0, 1), the data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_2 through the destination route (Up, Up, Down) provided by the destination routing network 110; in response to (S3, S4, S5) = (0, 1, 0), the data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_5 through the destination route (Up, Down, Up) provided by the destination routing network 110, and, in response to (S3, S4, S5) = (0, 1, 1), the data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_6 through the destination route (Up, Down, Down) provided by the destination routing network 110.
[0065] Please refer to Figure 15 together with Figures 8 and 9. Figure 15 is a schematic diagram of a unicast routing operation implemented by a multi-stage interconnection network 104 according to an embodiment of the present invention. Assume that the first data packet received by the input port IN_1 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_8 of the multi-stage interconnection network 104, the second data packet received by the input port IN_2 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_1 of the multi-stage interconnection network 104, the third data packet received by the input port IN_3 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_3 of the multi-stage interconnection network 104, and the fourth data packet received by the input port IN_4 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_4 of the multi-stage interconnection network 104. Since the plane coding table LUT_PR allocates table entry (S1, S2) = (0, 0) to the first source end (i.e., input port IN_1), allocates table entry (S1, S2) = (1, 0) to the second source end (i.e., input port IN_2), allocates table entry (S1, S2) = (1, 0) to the third source end (i.e., input port IN_3), and allocates table entry (S1, S2) = (0, 0) to the fourth source end (i.e., input port IN_4), the first data packet received by the input port IN_1 is routed to the plane routing network 108 through the plane routing (UP, The first data packet received by the input port IN_1 is forwarded to the switching plane Plane0 through the plane routing (Down, UP) provided by the plane routing network 108, the second data packet received by the input port IN_2 is forwarded to the switching plane Plane2 through the plane routing (Down, UP) provided by the plane routing network 108, the third data packet received by the input port IN_3 is forwarded to the switching plane Plane2 through the plane routing (Down, UP) provided by the plane routing network 108, and the fourth data packet received by the input port IN_4 is forwarded to the switching plane Plane0 through the plane routing (UP, UP) provided by the plane routing network 108.
[0066] Since the destinations are output ports OUT_8, OUT_1, OUT_3, OUT_4, table entries associated with output ports OUT_8, OUT_1, OUT_3, OUT_4 are selected from the destination encoding table LUT_DR. Therefore, in response to (S3, S4, S5) = (1, 1, 1), the first data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_8 through the destination route (Down, Down, Down) provided by the destination routing network 110; in response to (S3, S4, S5) = (0, 0, 0), the second data packet arriving at the switching plane Plane2 is forwarded to the output port OUT_1 through the destination route (Up, Up, UP) provided by the destination routing network 110; in response to (S3, S4, S5) = (1, 0, 0), the third data packet arriving at the switching plane Plane2 is forwarded to the output port OUT_3 through the destination route (Down, Up, Up) provided by the destination routing network 110; and, in response to (S3, S4, S5) = (1, 0, 1), the fourth data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_4 through the destination route (Down, Up, Down) provided by the destination routing network 110.
[0067] As shown in FIG. 15 , the first data packet arriving at input port IN_1 and the fourth data packet arriving at input port IN_4 are forwarded to the same plane Plane0, and the destination route from switching plane Plane0 to output port OUT_8 and the destination route from switching plane Plane0 to output port OUT_4 must compete for access to the down route of the 2x2 switch at the third stage Stage3, because (S3, S4, S5) = (1, 1, 1) and (S3, S4, S5) = (1, 0, 0), which have the same setting for control bit S3 (i.e., S3 = 1). Since the plane routing table LUT_PR is configurable, the plane routing network 108 can benefit from the path diversity feature to avoid contention. That is, the plane routing table LUT_PR can be adjusted to assign switching planes that have no contention in subsequent destination routing. For example, the control bit pairs assigned to input ports IN_4 and IN_7 can be swapped while still complying with all design rules as shown in FIGS. 10 to 12 .
[0068] Please refer to FIG. 16 together with FIG. 8 and FIG. 9. FIG. 16 is a schematic diagram illustrating another unicast routing operation implemented by the multi-stage interconnection network 104 according to an embodiment of the present invention. Assume that the first data packet received by the input port IN_1 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_8 of the multi-stage interconnection network 104, the second data packet received by the input port IN_2 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_1 of the multi-stage interconnection network 104, the third data packet received by the input port IN_3 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_3 of the multi-stage interconnection network 104, and the fourth data packet received by the input port IN_4 of the multi-stage interconnection network 104 needs to be forwarded to the output port OUT_4 of the multi-stage interconnection network 104. Since the updated plane coding table LUT_PR assigns the table entry (S1, S2) = (0, 0) to the first source end (i.e., input port IN_1), assigns the table entry (S1, S2) = (1, 0) to the second source end (i.e., input port IN_2), assigns the table entry (S1, S2) = (1, 0) to the third source end (i.e., input port IN_3), and assigns the table entry (S1, S2) = (0, 1) to the fourth source end (i.e., input port IN_4), the first data packet received by the input port IN_1 is transmitted to the plane routing network 108 through the plane routing network 108. The first data packet is forwarded to the switching plane Plane0 by (UP, UP), the second data packet received by the input port IN_2 is forwarded to the switching plane Plane2 by the plane routing (Down, UP) provided by the plane routing network 108, the third data packet received by the input port IN_3 is forwarded to the switching plane Plane2 by the plane routing (Down, UP) provided by the plane routing network 108, and the fourth data packet received by the input port IN_4 is forwarded to the switching plane Plane1 by the plane routing (UP, Down) provided by the plane routing network 108.
[0069] Since the destinations are output ports OUT_8, OUT_1, OUT_3, OUT_4, table entries associated with output ports OUT_8, OUT_1, OUT_3, OUT_4 are selected from the destination encoding table LUT_DR. Therefore, in response to (S3, S4, S5) = (1, 1, 1), the first data packet arriving at the switching plane Plane0 is forwarded to the output port OUT_8 through the destination route (Down, Down, Down) provided by the destination routing network 110; in response to (S3, S4, S5) = (0, 0, 0), the second data packet arriving at the switching plane Plane2 is forwarded to the output port OUT_1 through the destination route (Up, Up, UP) provided by the destination routing network 110; in response to (S3, S4, S5) = (1, 0, 0), the third data packet arriving at the switching plane Plane2 is forwarded to the output port OUT_3 through the destination route (Down, Up, Up) provided by the destination routing network 110; and, in response to (S3, S4, S5) = (1, 0, 1), the fourth data packet arriving at the switching plane Plane1 is forwarded to the output port OUT_4 through the destination route (Down, Up, Down) provided by the destination routing network 110. It should be noted that by properly configuring the configurable plane coding table LUT_PR, the contention between the destination route from the switching plane Plane0 to the output port OUT_8 and the destination route from the switching plane Plane1 to the output port OUT_4 can be avoided. In short, the configurable plane coding table LUT_PR can be set to ensure that each plane route satisfies the constraints of the switch pattern and no contention occurs in the subsequent destination route.
[0070] As described above, the proposed multi-level interconnection network 104 supports multicast / broadcast (one-to-many) functions for spatial data reuse. When the proposed multi-level interconnection network 104 is used by a spatial DNN accelerator, low energy consumption can be achieved because the number of memory accesses can be effectively reduced. In some embodiments of the present invention, the proposed multi-level interconnection network 104 (used by a spatial DNN accelerator) may further support a low-power multicast mode to reduce power consumption. In addition, since the proposed multi-level interconnection network 104 adopts a Benes topology, the number of switches can be reduced. In addition, the DNN accelerator 100 using the proposed multi-level interconnection network 104 is not affected by the problems of a typical spatial DNN accelerator described in the background section above.
[0071] FIG. 17 is a schematic diagram illustrating a first low power multicast mode according to an embodiment of the present invention. When the same data packet received by an input port (e.g., IN_1) is forwarded to two adjacent cores through two adjacent output ports (e.g., OUT_1 and OUT_2, or, OUT_5 and OUT_6), the 2x2 switch of the fifth stage can be skipped, and the data packet is bypassed by the 2x2 switch of the fifth stage. For example, the multiplexers 302 and 303 shown in FIG. 3 can be disabled (powered off) to save power, and the data packet is transmitted from the input in0 / in1 to the two outputs out0 and out1 through a fixed bypass path. Since the multiplexers 302 and 303 are disabled (powered off), the power consumption of the 2x2 switch 300 in the low power multicast mode can be reduced.
[0072] FIG. 18 is a schematic diagram illustrating a second low power multicast mode according to an embodiment of the present invention. When the same data packet received by an input port (e.g., IN_1) is forwarded to four adjacent cores through four adjacent output ports (e.g., OUT_1, OUT_2, OUT_3, and OUT_4), the 2x2 switches of the 3rd and 5th stages can be skipped, and the data packet is bypassed by the 2x2 switches of the 3rd and 5th stages.
[0073] FIG. 19 is a schematic diagram illustrating a third low power multicast mode according to an embodiment of the present invention. When the same data packet received by an input port (e.g., IN_1) is broadcast to all cores through all output ports (e.g., OUT_1 to OUT_8), the 2x2 switches of the 3rd, 4th and 5th stages are skipped, and the data packet is bypassed by the 2x2 switches of the 3rd, 4th and 5th stages.
[0074] In the above embodiment, the proposed multi-level interconnection network 104 is used as a high-energy-efficiency interconnection network for the spatial DNN accelerator 100. However, this is for illustrative purposes only and does not mean a limitation of the present invention. For example, the proposed multi-level interconnection network can be used for a router in an artificial intelligence (AI) cloud server based on a chip network (network-on-chip, NoC). In this way, the router inherits the advantages of the proposed multi-level interconnection network architecture and the proposed non-blocking up and down routing.
[0075] FIG. 20 is a schematic diagram of an AI cloud server based on NoC according to an embodiment of the present invention. The AI cloud server 2000 based on NoC includes a plurality of Benes-based multicast routers 2002, each of which includes a routing unit 2004, an arbitration unit 2006, an input buffer 2008, and a Benes switch 2010. Compared with a typical router using a crossbar switch, the Benes-based multicast router 2002 uses a Benes switch 2010 that can be implemented by the proposed multi-stage interconnection network 104, wherein the proposed multi-stage interconnection network 104 is controlled by a configurable plane coding table LUT_PR and a fixed destination coding table LUT_DR. Compared with a typical crossbar switch, the Benes switch 2010 has lower complexity. In addition, by using the Benes switch 2010, the Benes-based multicast router 2002 supports multicast / broadcast (one-to-many) functions for data reuse and unicast (one-to-one) functions for parallel data access, and is suitable for AI cloud computing.
[0076] The use of ordinal terms such as "first", "second", "third", etc. in the claims to modify claim elements does not in itself indicate any priority, precedence or order of one claim element relative to another claim element, or a temporal order of performing method actions, but is merely used as a marker to distinguish one claim element with the same name from another element with the same name using ordinal numbers.
[0077] Although the present invention has been described by way of example and in terms of preferred embodiments, it should be understood that the present invention is not limited to the disclosed embodiments. Instead, it is intended to cover various modifications and similar structures (as will be apparent to those skilled in the art), for example, combinations or replacements of different features in different embodiments. Therefore, the scope of the appended claims should be given the broadest interpretation to cover all such modifications and similar structures.
Claims
1. A multi-level interconnection network comprising: an M-level plane routing network for routing data packets received at an input port of the multi-level interconnection network to a switching plane according to an M-bit entry selected from a plane coding table, wherein the M bits of the M-bit entry respectively control the M levels of the M-level plane routing network; and an N-stage destination routing network for routing the data packet from the switching plane to at least one output port of the multi-stage interconnect network according to at least one N-bit entry selected from the destination encoding table, wherein the N bits of each N-bit entry in the at least one N-bit entry respectively control N stages of the N-stage destination routing network; The multi-level interconnection network adopts a non-blocking network topology, and the sum of M and N is a positive integer not less than 2.
2. The multi-level interconnection network as claimed in claim 1, wherein: The plane code table is configurable, and the destination code table is fixed.
3. The multi-level interconnection network as claimed in claim 1, wherein: The non-blocking network topology is the Benes topology.
4. The multi-level interconnection network as claimed in claim 1, wherein: The plane coding table has a plurality of M-bit entries, and the plurality of M-bit entries respectively correspond to a plurality of input ports of the multi-level interconnection network.
5. The multi-level interconnection network as claimed in claim 1, wherein: All plane routing paths specified by the plane encoding table are constrained to ensure that each 2x2 switch included in any one of the all plane routing paths complies with one of the bypass mode and the crossover mode.
6. The multi-level interconnection network as claimed in claim 1, wherein: The destination encoding table has a plurality of N-bit entries, and the plurality of N-bit entries respectively correspond to a plurality of output ports of the multi-stage interconnection network.
7. The multi-level interconnection network as claimed in claim 1, wherein: The N-stage destination routing network routes the data packet from the switching plane to a plurality of output ports of the multi-stage interconnect network according to a plurality of N-bit entries selected from the destination encoding table.
8. The multi-level interconnection network as claimed in claim 7, wherein: In response to the plurality of output ports being adjacent ports, at least one stage of the N-stage destination routing network is skipped, and the data packet is bypassed by the at least one stage.
9. The multi-level interconnection network as claimed in claim 8, wherein: The plurality of output ports are all output ports of the multi-stage interconnection network, and the number of the at least one stage is equal to N.
10. The multi-level interconnection network as claimed in claim 1, wherein: The multi-level interconnected network is part of a spatial deep neural network (DNN) accelerator.
11. The multi-level interconnection network as claimed in claim 1, wherein: This multi-level interconnection network is part of a router used in an artificial intelligence (AI) cloud server based on a chip network (NoC).
12. A control method for a multi-level interconnection network, comprising: Selecting an M-bit entry from the plane coding table for controlling the M-level plane routing network included in the multi-level interconnection network to route a data packet received by an input port of the multi-level interconnection network to a switching plane, wherein the M bits of the M-bit entry respectively control the M levels of the M-level plane routing network; and Selecting at least one N-bit entry from the destination encoding table for controlling N-stage destination routing networks included in the multi-stage interconnection network to route the data packet from the switching plane to at least one output port of the multi-stage interconnection network, wherein N bits of each N-bit entry in the at least one N-bit entry respectively control N stages of the N-stage destination routing networks; The multi-level interconnection network adopts a non-blocking network topology, and the sum of M and N is a positive integer not less than 2.
13. The control method according to claim 12, wherein: The plane code table is configurable, and the destination code table is fixed.
14. The control method according to claim 12, wherein: The non-blocking network topology is the Benes topology.
15. The control method according to claim 12, wherein: The plane coding table has a plurality of M-bit entries, and the plurality of M-bit entries respectively correspond to a plurality of input ports of the multi-level interconnection network.
16. The control method according to claim 12, wherein: The method further includes: The plane coding table is set, wherein all plane routing paths specified by the plane coding table are constrained to ensure that each 2x2 switch included in any one of the all plane routing paths satisfies one of a bypass mode and a crossover mode.
17. The control method according to claim 12, wherein: The destination encoding table has a plurality of N-bit entries, and the plurality of N-bit entries respectively correspond to a plurality of output ports of the multi-stage interconnection network.
18. The control method according to claim 12, wherein: The step of selecting the at least one N-bit entry for controlling the N-level destination routing network from the destination encoding table comprises: The N-stage destination routing network is controlled according to a plurality of N-bit entries selected from the destination encoding table to route the data packet from the switching plane to a plurality of output ports of the multi-stage interconnection network.
19. The control method according to claim 18, wherein: The step of selecting the at least one N-bit entry from the destination encoding table for controlling the N-level destination routing network also includes: In response to the plurality of output ports being adjacent ports, at least one stage of the N-stage destination routing network is skipped so that the data packet is bypassed by the at least one stage.
20. The control method according to claim 19, wherein: The plurality of output ports are all output ports of the multi-stage interconnection network, and the number of the at least one stage is equal to N.
21. The control method according to claim 12, wherein: The multi-level interconnected network is part of a spatial deep neural network (DNN) accelerator.
22. The control method according to claim 12, wherein: This multi-level interconnection network is part of a router used in an artificial intelligence (AI) cloud server based on a chip network (NoC).
