Networked computer with two built-in rings
A computer network with layered processing nodes and symmetrical bandwidth improves data exchange and computation efficiency by implementing two simultaneous one-dimensional paths, addressing inefficiencies in existing Allreduce functions.
Patent Information
- Application Number
- JP2022507331
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-30
- Filing Date
- 2021-03-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-03-24
AI Technical Summary
Existing collectives, such as Allreduce functions, in machine learning applications are not optimized for symmetrical or asymmetrical toruses, leading to inefficiencies in data exchange and computation.
A computer network topology with interconnected processing nodes arranged in layers, forming two built-in one-dimensional paths that operate simultaneously without sharing links, utilizing symmetrical bandwidth and efficient data transmission through intralayer and interlayer links.
Enhances data exchange efficiency and computation performance by ensuring simultaneous operation of two embedded rings without link conflicts, optimizing bandwidth utilization and reducing power consumption.
Smart Images

Figure 0007551731000009 
Figure 0007551731000022 
Figure 0007551731000016
Abstract
Description
[Technical field]
[0001] The present disclosure relates particularly, but not exclusively, to the exchange of data between connected processing nodes in a computer to optimize data exchange and machine learning / artificial intelligence applications. [Background technology]
[0002] Collectives are routines commonly used in processing data within a computer. They are routines that allow sharing and processing of data between multiple different processes, which may run on the same processing node or on different processing nodes. For example, if a process reads data from a data store, it can share that data with other processes using a "broadcast" operation. Another example is when multiple processes require the results of a particular function. "Reduction" is the result of requesting the application of a computational function to data values from each of multiple processes. "Gather" and "scatter" collectives handle multiple data items. Certain collectives are becoming more important in machine learning processing applications.
[0003] MPI (Message Passing Interface) is a message passing standard applicable to many parallel computing architectures. MPI defines many collectives applicable to machine learning. Two such collectives are called "Reduce" and "Allreduce". The reduce operation allows the result of a computational function acting on multiple data values from different source processes to be provided in a single receiving operation. Note that the receiving operation can be one of the source processes. The Allreduce collective aggregates data values from multiple source processes and delivers the result to all source processes (which act as receiving operations of the aggregated (reduced) result). For either the Reduce or Allreduce operation, the aggregation function can be any desired combinatorial function, such as summation, taking a maximum or minimum value. According to the MPI standard, the Allreduce collective can be executed by aggregating data values from all source processes in a reduce collective (e.g., in one of the multiple operations) and then broadcasting the result to each source process.
[0004] FIG. 1 is a schematic block diagram of a distributed architecture for training a neural network. A source of training data 100 is provided. This may be a database or any other type of data storage capable of maintaining training data in a state that is applicable to the neural network model being trained. The processing by the neural network model itself is distributed across multiple processing units 110a, 110b, 110c, etc. Although only three units are shown in FIG. 1, it will be readily appreciated that any number of processing units may be used. Each processing unit 110a, 110b, 110c receives a batch of training data from a training data source 100. Each processing unit 100a, 100b, 100c holds a set of parameters 112a, 112b, 112c that define the model. The input batch of training data is processed using the current set of parameters in a computation function 114, and the results of the computation function are used to generate so-called deltas that represent the difference between the original parameters and the new parameters resulting from the application of the computation function to the batch of training data and the current set of parameters. In many neural networks, these parameters are called "weights" and therefore the delta values are referred to as "delta weights." In Figure 1, the weights are labeled 112a, 112b, 112c and the delta weights are labeled 116a, 116b, 116c. It will be appreciated that in practice the weights and delta weights are stored in suitable storage accessible to the processing unit. If the weights and delta weights can be kept in local memory, the efficiency of the training process is improved.
[0005] The objective of the architecture of FIG. 1 is to train a single model in a distributed manner, rather than training three separate models. Thus, the objective is to converge the model parameters (or weights) to a single common set in each processing unit. Starting from any particular set of weights, and assuming that the batches of training data received at each processing unit are not the same, it is clear that there will be variations in the delta weights generated by each computational function of each processing unit. Thus, what is needed is a way to combine and distribute the delta weights across multiple processing units after each iteration of the batched training data. This is shown diagrammatically in FIG. 1, where a combining function 118 receives the delta weights from each processing unit and performs a mathematical function, such as an averaging function, that aggregates the delta weights. The output of the combining function 118 is then fed back to combining circuits 120a, 120b, and 120c in each processing unit, respectively. Thus, a new set of weights is generated as a combination of the original weights and the combined output from the combining function 118, and the new weights 118a, 118b, 118c are stored back in local memory. The next batch of training data is then fed to each processing unit and the process is repeated multiple times. It is clear that if the starting weights of the processing units are the same, they will be reset again to the same new values after each iteration. It will be readily apparent that the above is an example in which the Allreduce function is particularly useful. The delta weights may be fed to a combination function 118a where they are aggregated and then returned in aggregated form to each processing unit to be combined with the original weights.
[0006] FIG. 1A is a schematic diagram showing how an Allreduce collective may be implemented as a linearly connected topology of six processing nodes N0...N5. These processing nodes may correspond to the processing units of FIG. 1, and since the combinatorial function is distributed among the nodes, there is no common combinatorial node as in FIG. 1. The processing nodes are connected in such a way that each processing node has a "forward" link L F and the "reverse" link L B1A. As shown in this figure, forward links connect the processing nodes from the left to the right of FIG. 1A, and reverse links connect the processing nodes from the right to the left of FIG. 1A, as the directional phrases suggest. Each processing node has a processing capability designated as 200 and a storage capability designated as 202. The processing and storage capabilities may be implemented in any of a number of ways. In one particular implementation, a processing node may include multiple tiles, with each tile having its processing capability and associated memory capabilities. Each processing node is connected in a line configuration in which it is connected to adjacent nodes by links L. F / L B Each of the 1000 Series routers also has one or more link interfaces that allow it to be connected to its neighbors via a
[0007] To understand the implementation of the Allreduce collective, assume that a first node N0 generates a "part" vector, denoted Δ0. A "part" can be a data structure that includes an array of delta weights, e.g., a vector or a tensor. A part vector is an array of parts, each corresponding to a computation for a processing node. Each "part" can be a set of delta weights. The parts are stored in the storage capability 202 so that they are immediately exchangeable within the Allreduce collective. In a simple "streaming" line Allreduce algorithm, the forward link is used for "aggregation (reduce)" and the reverse link is used for "broadcasting". The algorithm starts at one end processing node N0 (the left node in FIG. 1A) by sending its part Δ0 to its neighboring node N1. At the node, the input part (in this case Δ0) is aggregated by the corresponding part Δ1 generated by the computation function 200 in processing node N1. The result of this aggregation (shown as an ADD function in FIG. 1A) is then sent from processing node N1 to the next connected node N2. As will be described in more detail below, the ADD function can be replaced by any combination function that can be used to aggregate the portions. Processing continues at each processing node until aggregation of the portions is completed at the last processing node, shown as N5 in FIG. 1A. At this point, the aggregated result (the sum of Δ) is applied to the reverse link LB The aggregated result is received by each node, stored in the memory function of that node, and then transmitted to the next node. In this way, each processing node ends up with an aggregated result.
[0008] FIG. 1B shows a timing diagram of the aggregation and broadcast phase. Note that a processing node cannot transmit the aggregation result to the next node until it has received input data from the previous node. Therefore, for each output transmission on the forward link, Δ R There is an inherent waiting time, denoted as
[0009] Furthermore, the reverse links are not used for broadcast until the complete aggregated result is obtained at the end node. However, due to pipeline effects, if the partial vectors are large, there may be significant overlap of activity on all forward and reverse links, as the first data item of the result, which is the aggregation of the first portion from the partial vectors at each node, returns to the start node well before that node has finished sending its partial data items.
[0010] In a slight improvement, a variation of this algorithm allows the processing nodes at each end of the line to start sending their portions to the central node once the aggregation is completed at the central node. The result is then broadcast back to the end node. Note that in this scenario, the direction of travel is reversed, for example at node N2, on both the forward and reverse links. If the line were closed into a ring (by connecting the final node N5 to the first node N0 on both the forward and reverse links), the pipeline algorithm would be able to serialize the aggregation and broadcast in the same direction, so that the two logical rings formed by the bidirectional links could each operate independently on their half of the data. That is, each partial vector is split in two, and the first half, ΔA, is aggregated on the forward link (as in FIG. 1A) and broadcast to the connected leg between N5 and N0. The other half of the vector, ΔB, is aggregated on the reverse link and then broadcast to the connected ring on the reverse link, so that each node receives a copy of the Allreduce result.
[0011] FIG. 1D shows a timing diagram corresponding to the forward and reverse links.
[0012] The principle of the one-dimensional ring shown in Figures 1C and 1D can be extended to two-dimensional rings, such as torus or toroid connected computers.
[0013] An alternative approach using rings in two dimensions is to use a reduce-scatter collective and perform an Allreduce followed by an Allgather collective. The paper "Optimal Bucket Algorithms for Large MPI Collectives on Torus Interconnects" by Nikhil Jain and Yogish Sabharwal (ICS', June 2-4, Tsukuba) presents bucket-based algorithms for Allgather, reduce-scatter and Allreduce collectives, assuming bidirectional links between processing nodes in a circular interconnect processor. This approach works on the basis that there are multiple data values (fragments) that are handled at each step. These fragments can be parts in a partial vector as described above. In a reduce-scatter collective, each process starts with an initial partial vector. We assume that the reference to a process here is a reference to a process executed on a processing node. The partial vector can be divided into multiple elements or fragments. The corresponding elements of all processes are aggregated, and these aggregated elements are then distributed across multiple processes. In an Allgather collective, another process receives all elements from all other processes. A reduce-scatter collective aggregates all the parts and stores each aggregation on each node (see Figure 2). An Allreduce collective can be executed by performing a reduce-scatter collective followed by an Allgather collective operation.
[0014] As discussed in Jain's paper, ring interconnects are an attractive interconnect architecture for distributed memory supercomputers. In the above discussion, collectives have been described in terms of inter-process communication. In a distributed supercomputer, processing nodes are interconnected and each processing node may be responsive to one or more processes for a collective. A ring interconnect is a type of mesh interconnect with processing nodes arranged in an N-dimensional array, with each node connected to its nearest neighbor and corresponding nodes at both ends of the array. Bidirectional communication links may exist between the interconnected processing nodes.
[0015] The algorithm for performing collectives discussed in the above-mentioned paper by Jain and Sabharwal is applied to a circularly connected architecture. This allows the collective to simultaneously process different fragments of a vector in rings of different dimensions, making it efficient in processing bandwidth. However, the inventors have determined that, despite accepted wisdom in the field, the technique presented by Jain and Sabharwal is not optimal for symmetric or asymmetric rings. A symmetric ring is understood to be a ring in which the number of nodes in a non-axial ring matches the number of nodes in an axial ring of the ring. An asymmetric ring is understood to be a ring in which the number of nodes in a non-axial ring does not match the number of nodes in an axial ring. It should be noted that in either case, the number of axial rings is equal to the number of nodes in the non-axial ring. Summary of the Invention [Problem to be solved by the invention]
[0016] It is an objective of the present disclosure to present improved topologies and methods for performing collectives, such as Allreduce functions, particularly but not exclusively for use in processing functions in machine learning. [Means for solving the problem]
[0017] Although embodiments of the present invention are described in terms of collectives, such as an Allreduce function, it will be appreciated that the improved topologies and methods described herein have broader application.
[0018] According to one aspect of the invention, there is provided a computer including a plurality of interconnected processing nodes arranged in a configuration having a plurality of layers arranged along an axis, each layer including at least four processing nodes connected in a ring with respective intra-layer links between each pair of adjacent processing nodes, the processing nodes in each layer being connected to corresponding nodes in one or more adjacent layers by inter-layer links, the computer being programmed to transmit data around two embedded one-dimensional paths, each logical path utilizing all processing nodes of the computer such that the embedded one-dimensional paths operate simultaneously without sharing links.
[0019] According to another aspect of the invention, there is provided a computer including a plurality of interconnected processing nodes arranged in a configuration in which multiple layers of interconnected nodes are arranged along an axis, each layer including at least four processing nodes connected in a non-axial ring with at least respective intra-layer links between each pair of adjacent processing nodes, each of the at least four processing nodes in each layer being connected to a respective corresponding node in one or more adjacent layers by respective inter-layer links, the computer being programmed in that configuration to provide two embedded one-dimensional paths and to transmit data around each of the two embedded one-dimensional paths, each embedded one-dimensional path utilizing all processing nodes of the computer such that the two embedded one-dimensional paths operate simultaneously without sharing links.
[0020] Embodiments of the present invention may provide one or more of the following, either alone or in combination: A computer, wherein the multiple layers include first and second terminal layers and at least one intermediate layer between the first and second terminal layers, each processing node of the first terminal layer being connected to a corresponding one of the processing nodes in the second terminal layer. The computer of claim 1 , wherein the configuration is a toroidal configuration in which corresponding nodes of the multiple layers form at least four axial rings. A computer, wherein the multiple layers include first and second terminal layers and at least one intermediate layer between the first and second terminal layers, and each processing node in the first terminal layer is connected to non-adjacent nodes in addition to adjacent nodes in the first terminal layer, and each processing node in the second terminal layer is connected to non-adjacent nodes in addition to adjacent nodes in the second terminal layer. A computer, wherein each processing node is configured to output data on each of the processing node's intra-layer and inter-layer links at the same bandwidth. Each layer of the multiple layers has exactly four nodes, the computers. A computer that contains tiers arranged along an axis with a number of tiers greater than the number of processing nodes in each tier. A computer that contains layers arranged along an axis, with the same number of layers as there are nodes in each layer. The intra-tier and inter-tier links include fixed connections between processing nodes of a computer. A computer, wherein at least one of the inter-tier and intra-tier links includes switching circuitry operable to selectively connect one of the processing nodes to one of a plurality of other processing nodes. A computer, wherein at least one of the inter-layer and intra-layer links of a processing node in a first terminal layer includes switching circuitry operable to disconnect the processing node from its corresponding node in the second terminal layer and connect it to a non-adjacent node in the first terminal layer. A computer, wherein at least one of the inter-layer links of a processing node in a first terminal layer includes switching circuitry operable to disconnect the processing node from an adjacent node in the first terminal layer and connect it to a corresponding node in a second terminal layer. Each embedded one-dimensional path includes an alternating sequence of one of the inter-layer links and one of the intra-layer links. A computer that is programmed to transmit data at each layer in a transmission direction that is the same for all layers in each one-dimensional path. 10. A computer according to any preceding claim, wherein each one-dimensional embedded path comprises a sequence of processing nodes traversed in each layer that is the same for all layers in each one-dimensional path. A computer programmed to transmit data in successive transmission layers around each one-dimensional path, with each layer transmitting data in a different transmission direction. 13. A computer according to any preceding claim, wherein each one-dimensional embedded path comprises a sequence of processing nodes that are traversed within each layer in different directions in successive layers within each one-dimensional path. A computer containing six tiers, each with four processing nodes connected in a ring. A computer containing eight tiers, each with eight processing nodes connected in a ring. A computer containing eight tiers, each with four processing nodes connected in a ring. A computer that contains four tiers, each with four processing nodes connected in a ring. The rings in each layer to which the processing nodes are connected are non-axial,computers. A computer, wherein each processing node is programmed to split the processing node's corresponding subvector into fragments and transmit the data around each one-dimensional path in the form of contiguous fragments. A computer programmed to operate each path as a set of logical rings, with successive fragments being transmitted around each logical ring in simultaneous transmission steps. A computer in which each link of a processing node has the same bandwidth as the other links at each data transmission step, i.e., has symmetric bandwidth. A computer, wherein each processing node is configured to simultaneously output a respective fragment on each of two links, the fragments output on each of the links having the same or approximately the same size. A computer, wherein each processing node is configured to aggregate a plurality of input fragments with a plurality of locally stored fragments. A computer, wherein each processing node is configured to simultaneously transmit fully aggregated fragments on each of its intra-tier and inter-tier links in an Allgather phase of an Allreduce collective.
[0021] Another aspect of the invention is a method for generating a set of programs to be executed in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of axially arranged layers, each layer including at least four processing nodes connected in a non-axial ring with respective intra-layer links between each pair of adjacent processing nodes, and the processing nodes in each layer are connected to corresponding nodes in adjacent layers by inter-layer links, the method comprising: generating, for each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing that program, the data transmission instruction including a link identifier defining an output link along which data is transmitted from that processing node along that data transmission stage; determining link identifiers for transmitting data around each of two embedded one-dimensional paths provided by the arrangement, each path using all processing nodes of the computer such that the embedded one-dimensional logical paths operate simultaneously without sharing links; The present invention provides a method comprising:
[0022] In some embodiments of the method, each program includes one or more instructions for disabling any of its inter-tier and intra-tier links that are not used in the data transmission step.
[0023] In some embodiments of the method, each program includes one or more instructions for dividing the respective sub-vectors of the processing nodes on which the program is executed into fragments and transmitting data in the form of contiguous fragments over respectively defined links.
[0024] In some embodiments, each link of a processing node has the same bandwidth as the other links of that processing node at each data transmission step, ie, the arrangement operates with symmetric bandwidth.
[0025] A further aspect of the invention is a method of executing a set of programs in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of layers arranged along an axis, each layer including at least four processing nodes connected in a ring with intra-layer links between each pair of adjacent processing nodes, and the processing nodes in each layer are connected to corresponding nodes in adjacent layers by inter-layer links, the method comprising: executing, in each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing that program, the data transmission instruction including a link identifier defining an output link along which data is transmitted in that data transmission stage; Link identifiers are determined for sending data around each of the two embedded one-dimensional paths, and each logical ring provides a way for the embedded one-dimensional paths to use all processing nodes of the computer to operate simultaneously without sharing links.
[0026] For a better understanding of the present invention, reference will now be made, by way of example, to the accompanying drawings which show how the same may be carried into effect. [Brief description of the drawings]
[0027] [Figure 1] FIG. 1 is a schematic diagram illustrating distributed training of a neural net. [Figure 1A]FIG. 1 is a schematic diagram showing a series of processing nodes implementing a simple “streaming” line Allreduce algorithm. [Figure 1B] FIG. 13 is a timing diagram for the “streaming” line Allreduce algorithm. [Figure 1C] FIG. 2 is a schematic diagram of a line with an end node connected to a ring. [Figure 1D] FIG. 1 is a timing diagram of the Ring Allreduce algorithm. [Diagram 2] FIG. 1 is a schematic diagram showing the execution of the Allreduce function by an Allgather step following a reduce-scatter step. [Figure 3A] We present a bucket-based Allreduce algorithm. [Figure 3B] We present a bucket-based Allreduce algorithm. [Figure 4A] A computer network in the form of a 4 × 6 toroid incorporating two isomorphic rings is shown. [Figure 4B] 1 illustrates a homogeneous mounting ring according to one embodiment. [Figure 4C] 1 illustrates a homogeneous mounting ring according to one embodiment. [Figure 4D] FIG. 4B is a three-dimensional view of one of the two embedded rings of the computer network of FIG. 4A. [Figure 4E] FIG. 4B is a 3D schematic diagram showing the other of the two embedded rings of the computer network of FIG. 4A. [Figure 5A] Two identical embedded rings are shown that can be embedded into a circularly connected 4x4 computer network. [Figure 5B] Two identical embedded rings are shown that can be embedded into a circularly connected 4x4 computer network. [Figure 6A] Each of the two identical embedded rings of a 4x8 computer network connected in a circular fashion is shown. [Figure 6B]Two identical embedded rings of a 4x8 computer network connected in a circular fashion are shown. [Figure 7A] The figures show two isomorphic rings that can be incorporated into an 8x8 computer network connected in a circular fashion. [Figure 7B] Two isomorphic rings are shown that can be incorporated into an 8x8 computer network connected in a circular fashion. [Figure 8A] This shows a computer network in the form of a 4x6 oblique closed prism. [Figure 8B] 8B shows two homomorphic rings incorporated into the network of FIG. 8A. [Figure 8C] 8B shows two homomorphic rings incorporated into the network of FIG. 8A. [Figure 8D] FIG. 8B is a three-dimensional view of one of the two embedded rings of the computer network of FIG. 8A. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] Aspects of the invention have been developed in the context of a multi-tile processor designed to act as an accelerator for a learning machine workload. The accelerator includes multiple interconnected processing nodes. Each processing node may be a single multi-tile chip, a package of multiple chips, or a rack of multiple packages. The objective here is to devise a machine that is highly efficient at deterministic (repeatable) computations. The processing nodes are interconnected in a way that allows collectives, particularly but not limited to broadcast and allreduce, to be performed efficiently. However, it should be noted that the embodiments of the invention described herein may have other applications.
[0029] One particular application of using distributed processing to train neural networks is to update models. In this context, distributed processing utilizes multiple processing nodes that are different physical entities, such as chips or packages or racks. That is, transmission of data between processing nodes requires exchanging messages over physical links.
[0030] The challenges in developing topologies dedicated to machine learning are different from those in the general field of High Performance Computing (HPC) networks. HPC networks are typically focused on on-demand asynchronous all-to-all personal communications, which is why dynamic routing and overprovisioning of bandwidth is common. Excess bandwidth may be provided to HPC networks for the purpose of reducing latency rather than providing bandwidth. Overprovisioning of active communication links can waste power and impact computational performance. The most common types of links used in computing today consume power during operation, whether or not they are used to transmit data.
[0031] The inventors have developed a machine topology that is specifically adapted to ML workloads and addresses the following attributes of ML workloads: The present embodiment provides a different structure in which two rings are incorporated into an m×n computer network, where m is the number of nodes in each of multiple layers of the network, n is the number of layers, and each ring traverses all the nodes in the network.
[0032] In ML workloads, inter-chip communication is currently dominated by broadcast and all-reduce collectives. A broadcast collective can be performed by a scatter collective followed by an all-gather collective, and an all-reduce collective can be performed by a reduce-scatter collective followed by an all-gather collective. In this context, the term inter-chip refers to any communication between processing nodes connected via external communication links. As mentioned above, these processing nodes can be chips, packages, or racks.
[0033] It should be noted that the communications links can be between chips on a printed circuit board or between chips on different printed circuit boards.
[0034] The workloads can be compiled within individual Intelligent Processing Unit (IPU) machines such that all-to-all communication is essentially chip-to-chip.
[0035] The Allreduce collective is described above and is illustrated in FIG. 2. FIG. 2 shows the set of partial values or "partial" vectors P0, P1, P2, P3 for each of the four nodes in the starting state S1. In this context, a node is a processing node in a network of multiple processing nodes. Note that each node N0, N1, N2, N3 has four "corresponding" parts marked accordingly (large diamond grid, wide downward diagonal stripes, large square grid, wide upward diagonal stripes). That is, each part has a position in its own partial vector, such that, for example, node n in the vector of P0(n) has the same position as node n+1 in the vector of P0(n+1). The subscript (n) is used to indicate the node in which the part resides, so that P0(0) is part P0 of node N0. In the reduce-scatter pass, the corresponding parts are aggregated and the aggregation is applied to one of the multiple nodes. For example, parts P0(0), P0(1), P0(2), P0(3) are aggregated (to r0) and placed in node N0. Similarly, parts P1(0), P1(1), P1(2) and P1(3) are aggregated (to r1) and placed in node N1, and so on, with each node being subjected to one of multiple aggregations r0, r1, r2 and r3 in intermediate state S2. As explained, the aggregation can be any combinatorial function f(Pi0), which can include an independent operator (e.g., maximization) or an association operator = P1(0) * P1(1) * P1(2) * P1(3).
[0036] Then, in the Allgather pass, each aggregate is applied to all nodes, activating state S3, where all four aggregates are applied to each node. In S1, the "corresponding" parts, e.g., P0(0), P0(1), P0(2), and P0(3), can all be different, whereas in state S3, each aggregate, e.g., r0, is the same for all nodes, except for r i =f{(P i (0), P i (1), P i (2) and P i (3))}. In machine learning, the set of parts P0, P1, P2, P3 is a vector. A vector of parts (e.g., updated weights) is generated for each pass of the model during training. The aggregates r0, r1, r2, r3, indicated by the diamond grid, downward diagonal stripes, square grid, and upward diagonal stripes on each node in state S3, are full aggregate vectors, i.e., "results" or vectors of fully aggregated parts. In the context of machine learning, each part may be an update delta to a parameter of the model. Alternatively, each part may be an updated parameter (in a configuration not detailed herein).
[0037] 3A and 3B show a bucket-based algorithm for reduce-scatter / Allgather assuming six "virtual" rings, also referred to herein as "logical" rings. FIG. 3A is a schematic diagram showing the aggregation of parts in multiple virtual rings. Each part is divided into six fragments. In FIG. 3A, capital letters R, Y, G, B, P, and L refer to different fragments of parts stored at each node, shown as hatched diamond grid, upward diagonal stripes, square grid, horizontal stripes, downward diagonal stripes, and vertical stripes, respectively. The letters indicate corresponding fragments that are aggregated together and define a "virtual" or "logical" ring of fragments. Referring to FIG. 3A, the "R" fragments in each of the parts P0, P1, P2, P3, and P4 are aggregated into a single fragment of the result vector (RΣ). Similarly for the Y, G, B, P, and L fragments.
[0038] 3B shows a timing diagram with time on the horizontal axis showing data exchange and calculation at each step of the Allreduce process. In Figures 3A and B, the Allreduce process is realized by a reduce-scatter phase followed by an Allgather phase.
[0039] In FIG. 3B, each fragment is shown with different hatching as follows: R - diamond grid, Y - upward diagonal stripes, G - square grid, B - horizontal stripes, P - downward diagonal stripes, L - vertical stripes.
[0040] The notation in Figures 3A and 3B is as follows: The parts are denoted as P0, P1, P2, P3, P4, P5, respectively. At the start of the process, each part is stored in each node N0, N1, N2, N3, N4, N5. Each fragment is denoted according to its definition and position in the virtual ring in which it is considered to be aggregated. For example, RA0 denotes the R fragment of part P0, since it is the top fragment of the virtual ring formed by nodes N0-N1-N2-N3-N4-N0.
[0041] RA1 denotes the R fragment of node N1, which is in the second position in the virtual ring. YA0 denotes the Y fragment of node N1. The subscript "0" indicates that this is the top fragment of the virtual ring, and the Y-ring is N1-N2-N3-N4-N0-N1. Note in particular that the A subscript reflects the virtual ring and does not correspond to a physical node (or portion). Note that FIG. 3A only shows the virtual ring of the forward link. FIG. 3B shows that equal processing occurs on the reverse link, and the fragment is labeled B.
[0042] In step 1, the head fragment (A0) of each virtual ring is transported from the node to the next adjacent node and aggregated with the corresponding fragment at that node. That is, RA0 travels from N0 to N1 and is aggregated to R(A0+A1). Again, the symbol "+" is used here as an abbreviation for any combination function. Note that in the same step, the 10 A0 fragments of each virtual ring are transmitted simultaneously. That is, the link between N1 and N2 is used to transmit YA0, the link between N2 and N3 is used to transmit GA0, and so on. In the next step, the corresponding aggregated fragment is transmitted to the next adjacent node over the forward link. For example, R(A0+A1) is transmitted from N1 to N2, and Y(A0+A1) is transmitted from N2 to N3. Note that for clarity, not all 15 fragments are numbered in FIG. 3A, and not all transmissions are numbered. The complete set of fragments and numbers is shown in FIG. 3B. The process is performed in five steps. After five steps, all fragments are aggregated at each node. At the end of the fifth step, aggregation is performed at the last node of each ring corresponding to the fragment. For example, R-aggregation is performed at node N5.
[0043] The start of the Allgather phase begins with the transmission from the end to the first node of each virtual ring. Thus, the final aggregation of the R fragment is finished at node N5, which is ready for the first step of the Allgather phase. The final aggregation of the Y fragment is correspondingly finished at node N0. In the next step of the Allgather phase, the aggregated fragments are again transmitted to their next neighbors. Thus, the fully aggregated R fragment is now also present at N2, the fully aggregated Y fragment is now also present at N3, and so on. Thus, each node ends up with all fragments R, Y, G, B, P, L of its partial vectors fully aggregated at the end of the Allgather phase.
[0044] The algorithm is efficient when the computation required for aggregation can be hidden in pipeline latency. The inventors recognize that, in forming a suitable ring within a computer for the execution of Allreduce, cycling through the ring is most efficient if each node in the ring is traversed exactly once.
[0045] Therefore, the natural ring formed by a line with bidirectional links (FIG. 1A) is not the most efficient ring.
[0046] We now describe an improved topology for an interconnected network of processing nodes that enables efficient passing of parts and results between processing nodes for executing an Allreduce collective.
[0047] FIG. 4A is a schematic diagram showing a topology in which multiple processing nodes are connected. In FIG. 4A, there are 24 processing nodes connected in a circular ring, but it will be understood that the principles can be extended to different numbers of nodes, some of which are illustrated in the following description. Furthermore, the principles described herein can be extended to different topologies of diagonal closed square prisms, as described below. Other configurations employing these principles are also contemplated. Each processing node is labeled with a number for ease of reference. In the following description, the subscript N is added when referring to a node. For example, N0 represents the upper left processing node. The processing nodes are connected by links in a manner described below. Each link is bidirectional, i.e., capable of transmitting data in both directions over the link. The links can operate such that this bidirectional function is simultaneous (i.e., the link can be utilized in both directions simultaneously). It is noted that there is a physical interconnectivity and a logical connectivity. The logical connectivity is used to form two consecutive embedded rings. It is noted that the embedded rings are also referred to as "paths" in this specification. These terms are interchangeable, but it is important to realize that the term "virtual ring" provides for the scenario already outlined above, where multiple fragments may operate with each embedded ring or virtual ring on a path. In some embodiments, each embedded ring (or path) can operate in two directions. First, the physical connectivity is described. The processing nodes are connected in a circular ring configuration. The processing nodes along the y-axis are each connected to its neighbors by a single bidirectional link. For clarity, not all links are labeled in FIG. 4A. However, a link from node N0 is shown. Link L04 connects processing node N0 to the processing node N4 below it in the y-axis direction. Note that "below" refers to a particular orientation of the computer network. In practice, in computer networks, no orientation is implied and any description of orientation is merely for illustration purposes when referring to the figures. The network includes multiple layers organized along the y-axis. In each layer, there are four processing nodes connected in a ring by respective bidirectional links.The rings in each layer are considered non-axial because they do not extend along the y-axis. For example, processing node N0 has link L01 connecting it to one adjacent node in that layer. Node N0 also has link L03 connecting it to the other adjacent node N3 in the layer. The ring structure is completed by corresponding processing nodes in the "terminal" layers being connected by bidirectional links. Note that the term "terminal" is for convenience in referencing the drawings. In fact, in a toroid, corresponding connected nodes of adjacent layers form a continuous axial ring. For example, node N0 in the first terminal layer is connected to node N20 in the second terminal layer by link L020. Note that in the drawings, the terminal layers are distinguished from those formed by the intermediate layers (nodes N4-N7, N8-N11, N12-N15, and N16-N19, which are connected together with corresponding processing nodes; in reality, these would be part of a continuous ring.
[0048] The links shown in FIG. 4A may be implemented in different ways. Some specific examples are described below. It is of particular note, however, that each link may be a single physical link structure providing a bidirectional communication path through that physical link structure. Alternatively, each direction of the link structure may be a separate physical implementation. It is also noted that the links may be fixed links. That is, when a link connects two processing nodes together, it is fixed in place after the network is constructed and configured. Alternatively, the links may be attached to or include switching circuitry that allows their connectivity to be changed after the network is constructed.
[0049] According to the new principles described herein, the physical connectivity shown in FIG. 4A allows two logical embedded rings (each ring may be bidirectional) to be embedded in the network. FIG. 4B shows a first such ring R1. For clarity, not all nodes are numbered in FIG. 4B, but it will be recognized that they are the same nodes as shown in FIG. 4A. Ring R1 in FIG. 4B extends through the following nodes in one continuous path along which data can be transmitted: Ring R1 extends through the sequence of nodes N0→N1→N5→N6→N10→N11→N15→N12→N16→N17→N21→N22→N2→N3→N7→N4→N8→N9→N13→N14→N18→N19→N23→N20→back to N0. Ring R2 extends through each node in order from N0 to N3 to N23 to N22 to N18 to N17 to N13 to N12 to N8 to N11 to N7 to N6 to N2 to N1 to N21 to N20 to N16 to N19 to N15 to N14 to N10 to N9 to N5 to N4, before returning to N0.
[0050] Each ring contains a total of 24 processing nodes. Note also that the two rings can be used simultaneously because no links are used in the same ring. Thus, there are no collisions on any single path between the processing nodes. This is referred to herein as no shared connections between the rings. These rings are referred to as isomorphic rings because each has the same length and passes through the same number of processing nodes.
[0051] Figure 4D shows a three-dimensional schematic diagram of ring R1. Note that the other ring is the same if rotated 90 degrees around the y-axis. Consider using the structure shown in Figure 4D as a program executes the Allreduce ring algorithm mentioned earlier. Each node has
number
[0052] However, it should be noted that this need not be the case. That is, the direction of traversing the nodes around a particular layer may be the same at each layer or different at each layer. In some embodiments, it may be the same at each layer, and in other embodiments, it may be different at different layers, e.g., successive layers. It should be noted that data may be transmitted in either direction around each path if the links are simultaneously bidirectional. The following description describes one direction of data transmission to explain the sequence of traversing the nodes in each embedded path. For example, in the embodiment of FIG. 4E, data is transmitted from node N0 to node N1 to node N5 in the ring, and then transmitted counterclockwise along the intra-layer links in the intermediate layer. The data then passes through the inter-layer links to the next intermediate layer, and then in a clockwise direction to the intra-layer links in the next intermediate layer.
[0053] It will become apparent that symmetric bandwidth utilization can be achieved in both symmetric and asymmetric architectures, where the symmetry of the architecture is defined as the relative number of processing nodes within a layer to the number of layers of the architecture.
[0054] Figures 5A and 5B show two embedding paths for a 4x4 network configuration. The node numbers in Figures 5A and 5B are taken from the network configuration in Figure 4A (four rows from the top). This is for illustrative purposes only. It is possible to provide a 4x4 configuration by disconnecting and reconnecting the nodes of the 4x6 configuration in Figure 4A, in which case the nodes would match. However, it is also possible to build a 4x4 configuration with that node. The interconnections between the nodes in Figures 5A and 5B show two embedding paths for the configuration, respectively.
[0055] Figures 6A and 6B show two embedded paths for a 4x8 network configuration. The node numbers are the same as in Figure 4A, with the addition of nodes N24-N31 in the bottom two rows. As already mentioned, the 4x6 configuration of Figure 4A can be extended to build a 4x8 configuration as shown in Figures 6A and 6B, but it is also possible to build a 4x8 configuration from that network node.
[0056] The node-to-node interconnections in each of Figures 6A and 6B represent each of the configuration's two built-in paths.
[0057] With reference to Figures 7A and 7B, two embedding paths for an 8x8 network configuration are shown. The nodes in Figures 7A and 7B are labeled according to the nodes in Figure 6A, and four additional columns of nodes N32-N63 are added to the configuration. By adding nodes, the configuration of Figure 6A can be extended to construct the configuration shown in Figures 7A and 7B. Alternatively, the configuration of Figures 7A and 7B can be constructed from its original nodes.
[0058] The node-to-node interconnections in each of Figures 7A and 7B each show two embedded rings of network configurations.
[0059] FIG. 8A shows another embodiment of a computer network of 24 processing nodes arranged in a 4×6 diagonal square prism. The computer network is similar to the circular ring structure shown in FIG. 4A. However, there are some differences. The nodes are again arranged in successive layers arranged along an axis, with each layer including four nodes connected in a ring by respective connections between the processing nodes. The structure and behavior of the links may be as described above with respect to FIG. 4A. Corresponding processing nodes are respectively connected to their neighbors in the next layer by respective layer links. Note that in FIG. 8A, the nodes are denoted as N′1, N′2, etc. to distinguish them from the nodes in FIG. 4A. However, in practice, the processing nodes may be the same type of processing nodes as the nodes in FIG. 4A.
[0060] The structure of the network in Figure 8A differs from that of Figure 4A in the way that the nodes in the terminal layers are connected. In Figure 4A, each node in a terminal layer is connected to its corresponding node in the other terminal layer. This forms a ring. In contrast, in Figure 8A, diagonally opposite processing nodes in a first terminal layer are connected to each other. That is, node N'0 is connected to node N'2, N'1 is connected to node N'3, and so on.
[0061] Correspondingly, in the other end layer, node N'20 is connected to node N'22, and node N'21 is connected to node N'23.
[0062] The network of Figure 8A can be configured to incorporate two isomorphic rings R'1 and R'2, as shown in Figures 8B and 8C, respectively. Ring R'1 passes through nodes N'0→N'1→N'5→N'4→N'8→N'9→N'13→N'12→N'16→N'17→N'21→N'20→N'23→N'19→N'18→N'14→N'15→N'11→N'10→N'6→N'7→N'3→N'2 and back to N'0.
[0063] Ring R'2 extends from node N'0 to N'3 → N'1 → N'2 → N'6 → N'5 → N'9 → N'10 → N'14 → N'13 → N'17 → N'18 → N'22 → N'21 → N'23 → N'20 → N'16 → N'19 → N'15 → N'12 → N'8 → N'11 → N'7 → N'4 → N'0.
[0064] Again, note that for clarity, not all links are labeled in FIGS. 8B and 8C.
[0065] As with the network shown in Figure 4A, the bandwidth of each processing node is symmetric. For example, consider processing node N'3, which has four links, each with a bandwidth of B / 4, where B is the total node bandwidth.
[0066] FIG. 8D is a schematic three-dimensional view of ring R'1. The other ring is the same if rotated 90 degrees around the y-axis. Again, the arrows on the links indicate the direction of data transmission along the ring. Data can be transmitted in the opposite direction. In this case, data is transmitted from N'0 to node N'1, via the diagonal connecting link to node N'3, and then clockwise within the layer to node N'4. Data is then transmitted counterclockwise along the layer on the intra-layer links before extending into the inter-layer link to connect to the next layer via the inter-layer link. Thus, again, the path includes successive intra-layer and inter-layer links. In the next layer, data is shown being transmitted in a clockwise direction. However, it should be noted that, as with the ring of FIG. 4A, the direction in which the nodes can be traced around the layer can change. For example, it can be the same for all layers or different for different layers.
[0067] The capacity of the computer can be expanded by adding additional processing nodes. These can be added in the form of additional layers in the y-axis or additional nodes in each layer in the x-axis. Note that the term x-axis is used here to refer to the "non-axial" ring mentioned earlier. To do this, the interconnectivity of the processing nodes can be modified. For example, with reference to FIG. 4A, consider the addition of an additional layer added to the bottom terminal layer. The links from nodes N20, N21, N22, N23 are disconnected and connected to corresponding processing nodes in the additional layer, respectively. These nodes are not shown in FIG. 4A, but the principle should be clear. The additional nodes would then have links connecting them back to the top terminal layers N0, N1, N2, N3. Intra-layer links between the additional processing nodes connect the additional processing nodes in the ring. Note that the connectivity of the rest of the configuration remains the same.
[0068] The ring configurations can be reconnected as diagonal closed square prisms. To achieve this, the links connecting the terminal layers to each other are disconnected. With reference to FIG. 4A, link L020 is disconnected and instead connected between nodes N0 and N2. The link extending between nodes N23 and N3 is disconnected and instead node N3 is connected to node N1. Similarly, in the lower terminal layer, node N23 is connected to node N21 and node N22 is connected to node N20.
[0069] Therefore, by reconnecting these links, a diagonal closed square prism can be generated from the torus.
[0070] In some embodiments described herein, the computer network has a 4×n structure, where 4 represents the number of processing nodes in each layer and n represents the number of layers. In each case, two homogeneous data transmission rings are incorporated, each passing through every processing node in the network.
[0071] There is symmetric bandwidth utilization at each processing node, i.e., each link from a processing node utilizes the same bandwidth as other links from that processing node.
[0072] The two embedded homogeneous rings utilize all of their bandwidth and there is no link sharing between the two rings, i.e. each ring is allowed to have the full link bandwidth since there is no link sharing.
[0073] As mentioned above, in one embodiment, the computer network is hardwired in a fixed configuration. In other embodiments, the links are switchable; that is, each link may have a switch attached to it or forming part of the link. In particular, if the links at the top and bottom layers are switchable, they can be used to expand the network or to switch between rings or diagonal prisms. Note that one can switch between the hardwired configurations by manually disconnecting the wires. If a switch is used, one can automatically switch between the configurations.
[0074] The diagonal closed square prism configuration has the advantage that the maximum cable length required between processing nodes can be shorter than in a circular torus. It can be immediately seen that the cable length required to close between processing nodes in the same layer (the top and bottom layers in FIG. 8A) is shorter than the "wrap around" links required to connect nodes in the top terminal layer to nodes in the bottom layer as in the circular torus configuration. However, by employing a folded structure, the cable length in the toroid can be reduced.
[0075] However, the annular configuration has the advantage that the worst-case path for data exchange between any two processing nodes is shorter than in the case of an oblique closed rectangular prism.
[0076] It should be noted that the network can be made fault tolerant in different ways: for example, there can be two physical links for each link path between processing nodes.
[0077] In another example, each physical link may have multiple lanes (e.g., in the case of PCI Express) so that the link automatically adapts to a failure on one lane of the link. The link may operate more slowly, but still continue to operate.
[0078] Note that by incorporating two rings in the structure, each passing through all processing nodes of the structure, the other processing ring may still be in an operational position if one ring fails completely (e.g., due to a broken link). In the context of implementing machine learning algorithms such as Allreduce, operation of one ring may still provide a certain amount of data to the Allreduce operation. In some training situations, this is sufficient to aid in the ongoing operation of the algorithm until the failing ring can be repaired.
[0079] Each node can perform processing or compute functions. Each node can be implemented as a single processor. However, it is more likely that each node is implemented as a single chip or package of chips, with each chip including multiple processors. There are many different ways to embody each of the individual nodes. In one example, the nodes may be comprised of intelligent processing units of the type described in the UK applications with application numbers GB 1816891.4, GB 1816892.2, and GB 1717299.0, the contents of which are incorporated herein by reference. However, the techniques described herein may be used with any type of processor comprising a node. Outlined herein are ways to efficiently exchange data to perform certain exchange patterns useful in machine learning models. Furthermore, the links may be embodied in any suitable manner. It is advantageous for the links to be bidirectional, and preferably capable of operating in both directions at the same time, although this is not a requirement. One particular category of communication links is the SERDES link, which has power requirements independent of the amount of data carried over the link or the time spent carrying that data. SERDES is an abbreviation for Serializer / Deserializer, and such links are well known. To transmit a signal over the conductors of such a link, power must be applied to the conductors to vary the voltage to generate the signal. SERDES links are characterized by the fact that power is continuously applied to the conductors to maintain a certain voltage level, so that variations in that voltage level (from 0 to variations in the applied voltage level) carry the signal. Thus, there is a fixed power to maintain the bandwidth capacity of the SERDES link, whether it is used or not. SERDES links are implemented at each end by circuitry that connects link layer devices to a physical link, such as a copper wire. This circuitry is sometimes referred to as a PHY (physical layer). PCIe (Peripheral Component Interconnect Express) is an interface standard for connecting high-speed computers.
[0080] The link can be dynamically disabled while not in use so that it consumes little power. However, the startup time and non-deterministic nature of machine learning applications generally make dynamic startup during program execution problematic. As a result, the inventors have determined that it may be better to take advantage of the fact that the power consumption of the inter-chip link is essentially constant for any particular configuration, and therefore the best optimization is to maximize the utilization of the physical link by keeping the inter-chip traffic as synchronous as possible with the IPU operation.
[0081] Since the SERDES PHY is full-duplex (i.e., a 16Gbit / s PHY supports 16Gbit / s in each direction simultaneously), utilization of the bandwidth of all links implies balanced bidirectional traffic. Additionally, it is noted that the use of direct chip-to-chip communication has important advantages over indirect communication, such as via a switch. Direct chip-to-chip communication is more power efficient than switched communication.
[0082] Another factor to consider is the bandwidth requirements between nodes: one goal is to have enough bandwidth to cloak inter-node communication with the computations performed on each node for distributed machine learning.
[0083] When optimizing machine architectures for machine learning, the Allreduce collective can be used as a measure of bandwidth required. An example of the Allreduce collective was given above for handling parameter updates for model averaging. Other examples include gradient averaging and metric calculations.
[0084] As an example, one can consider the Allreduce requirement of residual learning networks. Residual learning networks are a class of deep convolutional neural networks. In deep convolutional neural networks, multiple layers are used to learn individual features within each layer. In residual learning, residuals can be learned instead of features. A particular residual learning network, known as a ResNet, implements direct connections between different layers of the network. It has been shown that training such residual networks can be easier than traditional deep convolutional neural networks in some situations.
[0085] ResNet50 is a 50-layer residual network. ResNet50 has 25M weights, so an Allreduce of all weight gradients in single-position floating-point format F16 contains a 50-megabyte portion. To illustrate the bandwidth requirements, assume that one full Allreduce is required per full batch. This is likely (but not required) to be an Allreduce of the gradients. To achieve this, each node must output 100 megabits per full aggregation. ResNet50 requires 250 gigaflops per training image. With a sub-batch size of 16 images per processing node, each processor performs 400 gigaflops for each Allreduce collective. If the processor achieves 100 teraflops per second, approximately 25 gigabits per second are required between all links to maintain the computation parallelism with the Allreduce communication. With sub-batches of 8 images per processor, the required bandwidth nominally doubles, partially mitigated by the fact that it takes fewer teraflops per second to process the smaller batches.
[0086] Executing an Allreduce collective among p processors, each starting with a piece of size m megabytes (equal to the aggregate size), requires sending at least 2m·(p-1) megabytes over the links. Thus, if each processor has l links capable of simultaneous transmission, the asymptotic shortest aggregation time is 2m·(p-1)·(p-1) / (p·l).
[0087] The concepts and techniques described above can be used in a number of different examples.
[0088] In one example, a fixed configuration is provided for use as a computer, in which multiple processing nodes are interconnected as described and illustrated in the various embodiments above, in which only essential intra-layer and inter-layer links are disposed between the processing nodes.
[0089] A fixed configuration may be constructed with the exact number of processing nodes in that configuration. Alternatively, it may be provided by splitting from a larger structure, i.e., a set of processing nodes arranged in stacks may be provided. The processing nodes in each stack may have inter-tier links to corresponding processing nodes in adjacent stacks and intra-tier links between adjacent processing nodes within a stack.
[0090] A fixed configuration of a desired number of stacks is obtained by disconnecting each inter-layer link in a designated stack of the original set of stacks and connecting it to an adjacent processing node in the designated stack to provide an intra-layer link. In this manner, a designated stack of the original set of stacks can be formed into one of the first and second terminal layers of the structure. It should be noted that the original set of multiple layers can be divided into multiple fixed structures in this manner.
[0091] The inter-layer and intra-layer links are physical links provided by suitable buses or conductors as described above. In one embodiment, each processing node has a set of conductors that connect it to another processing node. This can be done, for example, by one or more interfaces on each processing node having one or more ports to which one or more physical conductors are connected.
[0092] In another embodiment, the links may be constructed by on-board conductors. For example, a single board may support a group of chips, e.g., four chips. Each chip has an interface with a port that can be connected to the other chips. The connections between the chips may be made by soldering the conductors to the board according to a predetermined method. It is noted that the concepts and techniques described herein are particularly useful in this context because they maximize the utilization of pre-soldered links between chips on a printed circuit board.
[0093] The concepts and techniques described with respect to some embodiments may be particularly useful because they allow for optimal use of non-switchable links. Configurations may be constructed by connecting processing nodes as described herein using fixed, non-switchable links between the nodes. In some implementations, if such links are not used, then there is no need to provide additional links between the processing nodes.
[0094] To use this configuration, a set of parallel programs is generated. The set of parallel programs includes node level programs, i.e., programs designated to operate on a particular processing node in the configuration. A set of parallel programs operating on a particular configuration can be generated by a compiler. The compiler is responsible for generating node level programs that correctly define the links to be used in each data transmission step for a particular data. These programs include one or more instructions for performing data transmission in that data transmission stage, using a link identifier to identify the link to be used in the transmission stage. For example, a processing node may have four active links at any one time (twice that if the links are simultaneously bidirectional). The link identifiers allow the selection of the correct link for the data item for that transmission stage. Note that each processing node may be agnostic about the operation of its neighboring nodes, i.e., the exchange operations are pre-compiled for each exchange stage.
[0095] It should also be noted that there is no need to switch links, i.e., to dynamically route data items or change link connectivity at the time of transmission, although switches may be provided in some embodiments as described above.
[0096] As mentioned above, the computer network configuration described herein enhances computational parallelism. In this context, parallelism is achieved by loading the processing nodes of the configuration with node-level programs that are intended to execute in parallel, e.g., to train an artificial intelligence model in a distributed manner as described above. However, it will be readily appreciated that this is only one application of the parallelism enabled by the configuration described herein. One scheme for achieving parallelism is known as "bulk synchronous parallel" (BSP) computation. According to the BSP protocol, each processing node performs a computation phase and an exchange phase following the computation phase. During the computation phase, each processing node performs its computational tasks locally but does not exchange results of the computation with other processing nodes. In the exchange phase, each processing node is allowed to exchange computation results from a previous computation phase with other processing nodes of the configuration. A new computation phase is not started in this configuration until the exchange phase is completed. In this form of BSP protocol, barrier synchronization is performed at the branch points transitioning from the computation phase to the exchange phase and / or transitioning from the exchange phase to the computation phase.
[0097] In this embodiment, when an exchange phase is initiated, each processing node executes instructions to exchange data with its neighboring nodes using link identifiers determined by the compiler for that exchange phase. The nature of the exchange phase can be determined using the MPI message passing standard described above. For example, a collective such as the Allreduce collective can be taken from a library. Thus, the compiler has precompiled node-level programs that control the links along which the partial vectors are sent (or along which each fragment of a partial vector is sent).
[0098] It will be readily apparent that other synchronization protocols may be used.
[0099] While specific embodiments have been described, other applications and modifications of the disclosed technology will become apparent to those skilled in the art in light of this disclosure, and the scope of the disclosure is limited only by the appended claims, and not by the described embodiments.
Claims
1. 1. A computer including a plurality of interconnected processing nodes arranged in a configuration in which multiple layers of interconnected nodes are arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with at least a respective intra-tier link between each pair of adjacent processing nodes; each of the at least four processing nodes in each layer is connected to a corresponding node in one or more adjacent layers by an inter-layer link; said computer being programmed in said configuration to provide two embedded one-dimensional paths and to transmit data around each of said two embedded one-dimensional paths, each embedded one-dimensional path using all processing nodes of said computer such that said two embedded one-dimensional paths operate simultaneously without sharing a link; a number of layers arranged along said axis greater than the number of processing nodes in each layer; computer.
2. A computer including a plurality of interconnected processing nodes arranged in a configuration in which multiple layers of interconnected nodes are arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with at least a respective intra-tier link between each pair of adjacent processing nodes; each of the at least four processing nodes in each layer is connected to a corresponding node in one or more adjacent layers by an inter-layer link; said computer being programmed in said configuration to provide two embedded one-dimensional paths and to transmit data around each of said two embedded one-dimensional paths, each embedded one-dimensional path using all processing nodes of said computer such that said two embedded one-dimensional paths operate simultaneously without sharing a link; a number of layers arranged along said axis equal to the number of nodes in each layer; computer.
3. 3. The computer of claim 1, wherein the configuration is an annular configuration in which connected corresponding nodes of the multiple layers form at least four axial rings.
4. the plurality of layers includes first and second end layers and at least one intermediate layer between the first and second end layers; each processing node in the first terminal tier is connected to adjacent nodes as well as non-adjacent nodes in the first terminal tier; 3. The computer of claim 1, wherein each processing node in the second end tier is connected to adjacent nodes as well as non-adjacent nodes in the second end tier.
5. 5. A computer according to claim 1, wherein each processing node is configured on each intra-layer and inter-layer link to output data at the same bandwidth on each of the intra-layer and inter-layer links of the processing node.
6. The computer according to any one of claims 1 to 5, wherein each layer of the plurality of layers has four nodes.
7. The computer of any preceding claim, wherein the intra-layer and inter-layer links comprise fixed connections between the processing nodes.
8. 7. A computer as claimed in any preceding claim, wherein at least one of the inter-tier and intra-tier links includes switching circuitry operable to selectively connect one of the processing nodes to one of a plurality of other processing nodes.
9. 5. The computer of claim 4, wherein at least one of the inter-layer and intra-layer links of a processing node in the first terminal layer includes switching circuitry operable to disconnect the processing node from its corresponding node in the second terminal layer and connect it to a non-adjacent node in the first terminal layer.
10. 5. The computer of claim 4, wherein at least one of the inter-layer links of a processing node in the first terminal layer includes switching circuitry operable to disconnect the processing node from an adjacent node in the first terminal layer and connect it to a corresponding node in the second terminal layer.
11. The computer of any preceding claim, wherein each embedded one-dimensional path comprises an alternating sequence of one of the inter-layer links and one of the intra-layer links.
12. A computer according to any preceding claim, wherein each one-dimensional embedded path comprises a sequence of processing nodes traversed in each layer in a direction that is the same for all layers in each one-dimensional path.
13. A computer according to any preceding claim, wherein each one-dimensional embedded path comprises a sequence of processing nodes that are traversed in each layer in different directions in successive layers within each one-dimensional path.
14. A computer according to claim 1 or any one of claims 3 to 13 depending therefrom, comprising six layers, each layer having four processing nodes connected in a non-axial ring.
15. A computer according to claim 2 or any one of claims 3 to 13 depending on claim 2, comprising eight layers each having eight processing nodes connected in a non-axial ring.
16. A computer according to claim 1 or any one of claims 3 to 13 depending on claim 1, comprising eight layers each having four processing nodes connected in a ring.
17. A computer according to claim 2 or any one of claims 3 to 13 depending on claim 2, comprising four layers each having four processing nodes connected in a ring.
18. 18. The computer of claim 1, wherein each processing node is programmed to split the corresponding sub-vector of the processing node into fragments and transmit the data in the form of contiguous fragments around each embedded one-dimensional path.
19. 20. The computer of claim 18, programmed to operate each path as a set of logical rings, and wherein the successive fragments are transmitted around each logical ring in simultaneous transmission steps.
20. 20. A computer according to claim 18 or 19, wherein each processing node is arranged to output a respective fragment on each of two links simultaneously, the fragments output on each of said links having the same size.
21. A computer according to any one of claims 18 to 20, wherein each processing node is configured to aggregate a number of input fragments with a number of locally stored fragments.
22. 22. The computer of claim 21, wherein each processing node is configured to simultaneously transmit fully aggregated fragments on each of its intra-tier and inter-tier links in an Allgather phase of an Allreduce collective.
23. 1. A method for generating a set of programs to be executed in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of tiers arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with respective intra-tier links between each pair of adjacent processing nodes; The method includes layers arranged along the axis, the processing nodes in each layer being connected to corresponding nodes in adjacent layers by inter-layer links, the number of layers being greater than the number of processing nodes in each layer, the method comprising: generating, for each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing said program, said data transmission instruction including a link identifier defining an output link along which data is transmitted from said processing node along said data transmission stage; determining the link identifiers for transmitting data around each of two embedded one-dimensional paths provided by the arrangement, each embedded one-dimensional path using all processing nodes of the computer such that the embedded one-dimensional logical paths operate simultaneously without sharing links; A method comprising:
24. A method for generating a set of programs to be executed in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of layers arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with respective intra-tier links between each pair of adjacent processing nodes; The method includes layers arranged along the axis, the number of layers being equal to the number of nodes in each layer, the processing nodes in each layer being connected to corresponding nodes in adjacent layers by inter-layer links, the method comprising: generating, for each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing said program, said data transmission instruction including a link identifier defining an output link along which data is transmitted from said processing node along said data transmission stage; determining the link identifiers for transmitting data around each of two embedded one-dimensional paths provided by the arrangement, each embedded one-dimensional path using all processing nodes of the computer such that the embedded one-dimensional logical paths operate simultaneously without sharing links; A method comprising:
25. 25. A method according to claim 23 or 24, wherein each program includes one or more instructions for disabling any inter-layer and intra-layer links not used in the step of transmitting data.
26. A method according to any of claims 23 to 25, wherein each program comprises one or more instructions for splitting the respective partial vectors of the processing nodes on which the program is executed into fragments and for transmitting the data in the form of consecutive fragments via respectively defined links.
27. 1. A method for executing a set of programs in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of tiers arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with intra-tier links between each pair of adjacent processing nodes; a number of layers arranged along the axis greater than the number of processing nodes in each layer, the processing nodes in each layer being connected to respective corresponding nodes in respective adjacent layers by inter-layer links, the method comprising: executing, in each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing said program, said data transmission instruction including a link identifier defining an output link along which data is transmitted in said data transmission stage; the link identifiers are determined for transmitting data around each of two embedded one-dimensional paths, each logical ring using all processing nodes of the computer such that the embedded one-dimensional paths operate simultaneously without sharing links; method.
28. A method for executing a set of programs in parallel on a computer including a plurality of processing nodes connected in a configuration having a plurality of tiers arranged along an axis, comprising: each tier includes at least four processing nodes connected in a non-axial ring with intra-tier links between each pair of adjacent processing nodes; The method includes layers arranged along the axis, the number of layers being equal to the number of nodes in each layer, the processing nodes in each layer being connected to respective corresponding nodes in respective adjacent layers by inter-layer links, the method comprising: executing, in each program, at least one data transmission instruction for defining a data transmission stage along which data is transmitted from the processing node executing said program, said data transmission instruction including a link identifier defining an output link along which data is transmitted in said data transmission stage; the link identifiers are determined for transmitting data around each of two embedded one-dimensional paths, each logical ring using all processing nodes of the computer such that the embedded one-dimensional paths operate simultaneously without sharing links; method.
29. A method according to any one of claims 23 to 28, comprising the step of transmitting said data in a data transmitting step, each link of a processing node having the same bandwidth as other links of said processing node in each data transmitting step.
30. A computer according to any preceding claim, programmed to transmit data in data transmission steps, whereby each link of a processing node has the same bandwidth as other links of said processing node in each data transmission step.
Citation Information
Patent Citations
Reconstructible torus network system
JP1994290158A
Maintenance method for multiprocessor computer system
JP2004118855A
Information processing system and its control method
JP2006215816A
Collective communication operation
US20190045003A1
Distributed processing system and method of node distribution in distributed processing system
WO2012042658A1
