PE structure for graph calculation accelerator and graph calculation accelerator

By designing a self-reconstructed PE structure for graph computing accelerator, using computing circuits and configuration information modules, flexible processing of various algorithms is realized, solving the problem of insufficient flexibility of graph computing accelerator in the prior art, and improving computing acceleration ability.

CN119066025APending Publication Date: 2024-12-03XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411096082.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art is difficult to realize self-reconstructed graph computing accelerator hardware, which limits the flexibility of graph computing and the computing acceleration capabilities of diversified applications.

Method used

A PE structure for graph computing accelerator is designed, including a computing circuit and configuration information module, and a variety of algorithms are processed through the instructions of an external controller, using multiple comparators, adders, multipliers, and distribution. The circuit components of the controller, selector, and register are physically connected to form data paths suitable for different algorithms.

Benefits of technology

It improves the flexibility of PE arrays, realizes data paths with multiple algorithm functions, expands application scenarios, and achieves the computing acceleration of diversified graph applications without adding circuit structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066025A_ABST
    Figure CN119066025A_ABST
Patent Text Reader

Abstract

The invention relates to a PE structure for a graph calculation accelerator and the graph calculation accelerator, the PE structure and a plurality of identical PE structures form a PE array for the graph calculation accelerator, the PE structure comprises an operational circuit and a configuration information module, and the configuration information module comprises a first configuration unit, a second configuration unit and a third configuration unit; the configuration information module receives configuration information and an instruction of an external controller of the PE array and distributes each field of the configuration information to the first configuration unit, the second configuration unit and the third configuration unit based on the instruction; the operational circuit is formed by physically connecting circuit components of a plurality of comparators, adders, multipliers, dispatchers, selectors and registers, all functions of at least one specified algorithm are processed in a self-reconfiguration mode according to instructions of an external controller in use, and self-reconfiguration sub-circuits are part of circuits in physical connection of the operational circuit. According to the structure, the flexibility is improved, and calculation acceleration of diversified graph application is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a hardware PE structure, and in particular to a PE structure for a graph computing accelerator and a graph computing accelerator. Background Art

[0002] In recent years, with the rise of new Internet applications, artificial intelligence and the popularization of various electronic devices, graph computing problems have received more and more attention in various fields. For graph computing, architectural innovation is imperative. Compared with dedicated graph computing accelerators, reconfigurable graph computing accelerators can improve flexibility and achieve computing acceleration for diversified graph applications.

[0003] Therefore, how to provide a PE structure that can realize a self-reconfigurable graphics computing accelerator from a hardware perspective has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a PE structure for a graph computing accelerator and a graph computing accelerator.

[0005] In order to achieve the above object, the main technical solutions adopted by the present invention include:

[0006] In a first aspect, an embodiment of the present invention provides a PE structure for a graph computing accelerator, characterized in that the PE structure and a plurality of identical PE structures form a PE array for a graph computing accelerator, and the PE structure includes:

[0007] An operation circuit and a configuration information module, wherein the configuration information module comprises: a first configuration unit conf0, a second configuration unit conf1 and a third configuration unit conf2;

[0008] The configuration information module receives configuration information and instructions from an external controller of the PE array, and distributes each field of the configuration information to the first configuration unit, the second configuration unit, and the third configuration unit based on the instructions;

[0009] The first configuration unit configures the input data source direction of the operation circuit according to the allocated field, the instruction of the external controller and the output direction of five adjacent PE structures;

[0010] The second configuration unit enables the operation circuit to select a sub-circuit that implements at least one function to form a signal path according to the assigned field and the instruction of the external controller;

[0011] The third configuration unit is used to configure the output direction of the operation circuit;

[0012] The operation circuit is physically connected using circuit components such as multiple comparators, adders, multipliers, distributors, selectors, and registers. During use, it processes all functions of at least one specified algorithm in a self-reconstruction manner according to the instructions of an external controller, and the self-reconstructed sub-circuit is part or all of the circuits in the physical connection of the operation circuit.

[0013] Optionally, the operation circuit includes:

[0014] The zeroth selector MUX0 is used to receive data of the PE structures in four adjacent directions and / or external input data; the zeroth selector MUX0 is connected to the first configuration unit conf0;

[0015] The tenth distributor DEMUX10 connected to the second configuration unit conf1 has its input connected to the zeroth selector MUX0, and its output is distributed into five-way data, which are respectively connected to the first selector MUX1, the seventh selector MUX7, the eighth selector MUX8, the eleventh selector MUX11, and the first multiplier (mul0);

[0016] The output of the first selector MUX1 is connected to the first comparator, and the output of the first comparator is connected to the second distributor DEMUX2; the first selector MUX1 is connected to the second configuration unit conf1, and receives external input data, data of the first register reg1, and data of the second register reg2;

[0017] The output of the first comparator is connected to the second distributor DEMUX2, and the second distributor DEMUX2 divides the comparison result of the first comparator into three data paths, which are respectively connected and input to the third selector MUX3, the fourth selector MUX4 and the triangle counting logic! R&&C;

[0018] The input of the third selector MUX3 is connected to the first selector MUX1 and the first register reg1, and the second distributor DEMUX2, receives the input data for selection processing, and the output is connected to the first register reg1; the first register reg1 stores the result of the output of the third selector MUX3;

[0019] The fourth selector MUX4 receives one channel of data from the second distributor DEMUX2, and receives instructions from the external controller for processing. The output of the fourth selector MUX4 is connected to MUX5 in the fifth selector and the triangle counting logic! R&&C.

[0020] Optionally, the operation circuit further includes:

[0021] The fifth selector MUX5 receives the output result of the fourth selector MUX4, and receives the signal of 0, 1 (it can be understood that the 0, 1 here can be the signal stored in the memory / cache structure of the operation circuit), processes and outputs the enable signal to be sent to the external controller;

[0022] Triangle counting logic! R&&C receives one channel of data from the second distributor DEMUX2 and performs logic operation with the output of the fourth selector MUX4, and the output is connected to the sixth selector MUX6;

[0023] The sixth selector MUX6 receives the output of the triangle counting logic! R&&C, and receives the signal of the external controller (such as ch_y, ch_c and other signals) for processing, and outputs and connects to the seventh selector MUX7, and the sixth selector MUX6 is connected to the second configuration unit conf1;

[0024] The seventh selector MUX7 receives data from the tenth distributor DEMUX10, as well as signals of 0 and 1 (it can be understood that 0 and 1 here can be signals stored in the memory / cache structure of the operation circuit), and the output is connected to the first adder add0;

[0025] The first adder add0 receives the output data of the seventh selector MUX7 and the data in the second register reg2 to perform an addition operation, and stores the data in the second register reg2;

[0026] The eighth selector MUX8 receives the data of the first register reg1, the data of the second register reg2, one channel of data of the tenth distributor DEMUX10, and the output data of the twelfth selector MUX12 for processing, and outputs the data to be connected to the ninth distributor DEMUX9;

[0027] The eighth selector MUX8 is connected to the second configuration unit conf1, the ninth distributor DEMUX9 is connected to the third configuration unit conf2, and the output of the ninth distributor DEMUX9 is the output data of the PE structure, that is, it is sent to the adjacent four-directional PE structures and / or external output;

[0028] The first multiplier mul0 receives the output data of the tenth distributor DEMUX10 for multiplication operation; the output is connected to the eleventh selector MUX11;

[0029] The eleventh selector MUX11 receives one channel of data from the tenth distributor DEMUX10 and the output result of the first multiplier mul0 for processing, and the output is connected to the second adder add1;

[0030] The second adder add1 receives the output data of the eleventh selector MUX11 and performs an addition operation on the data in the third register reg3, and the operation result is stored in the third register reg3;

[0031] The second multiplier mul1 receives data from the third register reg3 and performs multiplication with pre-configured fixed data, and the output is connected to the third adder add2;

[0032] The third adder add2 performs an addition operation on the output data received from the second multiplier mul1 and the pre-configured fixed data, and the output is connected to the twelfth selector MUX12;

[0033] The twelfth selector MUX12 receives data from the third adder add2 and the data from the third register reg3 for processing, and the output is connected to the eighth selector MUX8;

[0034] The twelfth selector MUX12 receives data from the eighth selector MUX8 and sends the data to four adjacent directions PE and external output.

[0035] Optionally, during use, all functions of at least one specified algorithm are processed in a self-reconstruction manner according to instructions of an external controller, and the at least one specified algorithm includes: operating a BFS algorithm, a CC algorithm, a Prim algorithm, a TC algorithm and / or a PR algorithm.

[0036] Optionally, the electronic circuit for operating the BFS algorithm includes: a zeroth selector MUX0, a tenth distributor DEMUX10, a first selector MUX1, a first comparator, a second distributor DEMUX2, a fourth selector MUX4, a fifth selector MUX5, a sixth selector MUX6, a seventh selector MUX7, a first adder add0, a second register reg2, an eighth selector MUX8 and a ninth distributor DEMUX9;

[0037] When the algorithm is executed, data (data output by other PE structures / external data) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the fourth selector MUX4 through the second distributor DEMUX2 as the driver of the fifth selector MUX5, and the output signal is sent to the controller through the fifth selector MUX5. Then the signal sent by the receiving controller to PE is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, and after calculation, it is sent to the second register reg2 and then to the eighth selector MUX8 for output through the ninth distributor DEMUX9;

[0038] And / or, the electronic circuit for operating the CC algorithm comprises:

[0039] The zeroth selector MUX0, the first selector MUX1, the tenth distributor DEMUX10, the first comparator, the second distributor DEMUX2, the fourth selector MUX4, the fifth selector MUX5, the sixth selector MUX6, the seventh selector MUX7, the first adder add0, the second register reg2, the eighth selector MUX8 and the ninth distributor DEMUX9.

[0040] In the first stage of CC algorithm execution, data (data output by other PE structures / external data) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the fourth selector MUX4 through the second distributor DEMUX2 as the driver of the fifth selector MUX5, and the output signal is sent to the controller through the fifth selector MUX5. Then the signal sent by the receiving controller to PE is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, and after calculation, it is sent to the second register reg2 and then to the eighth selector MUX8 and output through the ninth distributor DEMUX9. In the second stage of CC algorithm execution, data (data output by other PE structures / external data) is added to enter from the zeroth selector MUX0, is sent to the eighth selector MUX8 through the tenth distributor DEMUX10, and then enters the ninth distributor DEMUX9 for output.

[0041] Optionally, the electronic circuit for operating the Prim algorithm includes: a zeroth selector MUX0, a first selector MUX1, a tenth distributor DEMUX10, a first comparator, a second distributor DEMUX2, a third selector MUX3, a first register reg1, a fourth selector MUX4, a fifth selector MUX5, an eighth selector MUX8 and a ninth distributor DEMUX9;

[0042] When the Prim algorithm is executed, data (data output by other PE structures / external data) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the third selector MUX3 through the second distributor DEMUX2. The signal from the controller is output to the fifth selector through the fourth selector MUX4 to send the output signal to the controller. The third selector MUX3 selects the incoming data and the data in the first register reg1, and then sends it to the first selector MUX1 and the eighth selector MUX8 and outputs it through the ninth distributor DEMUX9.

[0043] And / or, the electronic circuit for operating the TC algorithm includes: the zeroth selector MUX0, the first selector MUX1, the tenth distributor DEMUX10, the first comparator, the second distributor DEMUX2, the fourth selector MUX4, the fifth selector MUX5, the triangle counting logic! R&&C, the sixth selector MUX6, the seventh selector MUX7, the first adder add0, the second register reg2, the eighth selector MUX8 and the ninth distributor DEMUX9;

[0044] In the first stage of the TC algorithm execution, data (data output by other PE structures / external data) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. After that, the comparison result is sent to the triangle counting logic! R&&C through the second distributor DEMUX2 and the signal from the controller through the fourth selector MUX4. Then the result is sent to the controller through the fifth selector MUX5. The triangle counting logic! R&&C is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, and is sent to the second register reg2 after calculation. In the second stage of the TC algorithm execution, data (data output by other PE structures / external data) is added from the zeroth selector MUX0, and is selected to enter the first adder add0 through the tenth distributor DEMUX10 and the seventh selector MUX7. After calculation, it is sent to the second register reg2 and then to the eighth selector MUX8, and then enters the ninth distributor DEMUX9 for output.

[0045] And / or, the electronic circuit for operating the PR algorithm includes: a zeroth selector MUX0, a tenth distributor DEMUX10, a first multiplier mul0, an eleventh selector MUX11, a second adder add1, a third register reg3, a second multiplier mul1, a third adder add2, a twelfth selector MUX12, an eighth selector MUX8 and a ninth distributor DEMUX9;

[0046] In the first stage of the PR algorithm execution, data (data output by other PE structures / external data) first enters PE from the zeroth selector MUX0, is sent to the first multiplier mul0 through the tenth distributor DEMUX10, is calculated through the eleventh selector MXU11, is sent to the third register reg3 after calculation through the second adder add1, and is output through the twelfth selector MUX12 through the eighth selector MUX8 and the ninth distributor DEMUX9. In the second stage of the PR algorithm execution, the added data (data output by other PE structures / external data) enters PE from the zeroth selector MUX0, is sent to the eleventh selector MXU11 through the tenth distributor DEMUX10, is calculated through the second adder add1, is sent to the third register reg3, and is sent to the second multiplier mul1 and the third adder add2 for calculation, and then is output through the twelfth selector MUX12 through the eighth selector MUX8 and the ninth distributor DEMUX9.

[0047] In a second aspect, the present invention further provides a PE array for a graph computing accelerator, comprising: 4n*4n PE structures, wherein the PE structure is any one of the PE structures described in the first aspect; the value range of n is n>=1;

[0048] The number of PEs in the horizontal and vertical directions of the PE array is the same, and the non-edge PE structures of the PE array are all connected to adjacent PE structures.

[0049] In a third aspect, the present invention further provides a graph computing accelerator, comprising the PE array for the graph computing accelerator described in the second aspect and an external controller, wherein each PE structure in the PE array communicates with the external controller.

[0050] Optionally, an external controller of the graph computing accelerator monitors the overall circuit execution status of the PE array, generates control signals for components in the current and next stage circuits of different circuits according to different execution states, and sends configuration information for realizing reconstruction to the PE array; each PE structure in the PE array is reconstructed based on the control signal and the respective configuration information to obtain an electronic circuit for executing a specified algorithm.

[0051] The PE structure of the present invention can reconstruct the corresponding functions of at least one algorithm according to the instructions and configuration information of the external controller, obtain the reconstructed electronic circuit, and then realize the functions of multiple algorithms. When it is applied to the PE array, it can improve the flexibility of the PE array and expand the application scenarios. Without increasing the circuit structure, the data path of multiple algorithm functions can be realized.

[0052] In the present invention, by analyzing the requirements of different algorithms for data organization forms, further optimization is performed on the basis of the CSCI compression format to make the data format more applicable, and a corresponding PE structure of the graph computing accelerator of the present invention is proposed. The graph computing accelerator composed of multiple PE structures efficiently implements the BFS algorithm, CC algorithm, TC algorithm, PR algorithm and Prim algorithm in graph computing. According to the analysis of the operation steps of different algorithms, the graph computing accelerator can complete the operation processing of different operator operations. The external controller sends configuration information to the reconfigurable array according to different execution stages and different operations in the same stage, so that each PE structure is reconstructed, and then the reconstructed multiple PE structures construct the data path (i.e., electronic circuit) inside the PE and the interconnection method between the PE structures; the flexibility of the PE array is improved, and the computational acceleration of diversified graph applications is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a structural schematic diagram of a self-reconfiguration graph computing accelerator PE provided by an embodiment of the present invention;

[0054] Figure 2 yes Figure 1 A schematic diagram of the structure of all physical connections of the PE structure;

[0055] Figure 3 yes Figure 2 The data path diagram of the electronic circuit reconstructed when the PE structure executes the BFS algorithm;

[0056] Figure 4 yes Figure 2 The data path diagram of the electronic circuit in the PE structure executing the first stage of the CC algorithm;

[0057] Figure 5 yes Figure 2 The data path diagram of the electronic circuit in the PE structure executing the second stage of the CC algorithm;

[0058] Figure 6 yes Figure 2 The data path diagram of the electronic circuit in the PE structure executing the first stage of the TC algorithm;

[0059] Figure 7 yes Figure 2 The data path diagram of the electronic circuit in the PE structure executing the second stage of the TC algorithm;

[0060] Figure 8 yes Figure 2 The data path diagram of the electronic circuit that executes Prim's algorithm in the PE structure;

[0061] Fig. 9 yes Figure 2The data path diagram of the electronic circuit in the PE structure executing the first stage of the PR algorithm;

[0062] Fig.10 yes Figure 2 Data path diagram of the electronic circuit that executes the second stage of the PR algorithm in the PE structure. DETAILED DESCRIPTION

[0063] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.

[0064] Currently, the management of large-scale graph data can adopt a variety of data models, which are divided into simple graph models and hypergraph models according to the number of vertices that can be connected by an edge. The present invention is oriented to simple graph models, that is, an edge can only connect two vertices, and loops can exist. Simple graph models can be represented in the form of sparse adjacency matrices. Due to the large scale of graph data, it is mostly stored in a compressed form in the memory. The compression formats include CSC (Compressed Sparse Column), CSR (Compressed Sparse Row), COO (Coordinate List), DCSC (Doubly Compressed Sparse Column), and CSCI (Compressed Sparse Column Independently). The PE structure, PE array, and graph computing accelerator of the present invention can process graph data in the above-mentioned various compressed formats.

[0065] In addition, the PE structure, PE array, and graph computing accelerator of the present invention can all execute Breadth First Search (BFS), Connected Components (CC), Triangle Counting (TC), Page Rank (PR), and Prim's algorithm from a hardware perspective. In the conception of the PE array in the self-reconfigurable graph computing accelerator of the present invention, the storage compression format of graph data, the parallelism, reconfigurability, efficiency, and difficulty of graph computing are taken into consideration, and the above compression formats and algorithms are applicable from the hardware circuit connection.

[0066] The following is a brief description of the existing algorithms.

[0067] Breadth First Search (BFS) is an algorithm that searches for the minimum number of edges that need to be traversed from a source vertex to all other vertices in a systematic way. BFS is a widely used graph search algorithm and the basis of many graph computing applications, especially in solving the shortest path or finding a certain target.

[0068] The basic idea of ​​the BFS algorithm is to assign a traversal flag to each active vertex. This value represents the number of edges that need to be traversed from the current vertex to the initial root node. During initialization, the given root node is used as the active vertex, its traversal flag is set to 1, and the attribute values ​​of other active vertices are set to infinity. In the first iteration, the adjacent points are searched and calculated according to the set starting vertex. In the subsequent process, the adjacent points of the active vertices in the previous round are processed. The layer attribute of the vertex is used to determine whether the current vertex has been traversed. If it has been traversed, its layer attribute remains unchanged. If it has not been traversed, its vertex attribute is modified to the vertex layer number processed in the previous round plus one. All current active vertices can be processed in parallel. Since the current active vertex may be the adjacent point of multiple active vertices in the previous round, there will be repeated processing problems when the current active vertices are processed in parallel, but BFS only processes one layer of adjacent points at a time, so the processing results are the same.

[0069] The connected components algorithm (CC) is to find the maximal connected subgraph in an undirected graph, i.e., the connected component, where each node can be accessed from any other node in the same set. Given an undirected graph G = (V, E), all vertices in each connected component are connected to all other vertices in the subgraph through paths, and no vertex in the subgraph is connected to any other vertex outside the subgraph. No stage division is made in the algorithm description.

[0070] The specific implementation process of the CC algorithm uses the BFS algorithm to start traversal operations from a given point. When the traversal of the connected component where the point is located is completed, the graph data is traversed to find the vertex that has not been traversed by the breadth-first traversal, and then the BFS algorithm is executed with this vertex as the initial point.

[0071] Triangle Counting (TC) is a common community discovery algorithm, mainly used for understanding social networks, graph analysis, and calculating clustering coefficients. Triangle counting counts the number of triangles in a given graph. In the matrix multiplication-based algorithm, a triangle is a closed path of length 3, that is, a path consisting of three vertices, with the starting and ending points at the same vertex. In an undirected graph, a triangle has three vertices, and the number of triangles in the graph is obtained by counting the number of triangles divided by 6, where the number of triangles counted in the graph is the sum of the elements on the main diagonal of the matrix. In the set intersection-based algorithm, it traverses each edge and finds the common elements from the adjacency lists of the head node and the tail node. The algorithm works as follows: In an undirected graph, when two vertices are connected and there is another vertex connected to these two vertices, there is a triangle. The implementation idea of ​​the algorithm is: given vertex k as the source vertex, find the adjacent vertex set q of k, then find the adjacent point set m of q in sequence, and finally find the adjacent vertex set v of m in sequence, and judge whether k is equal to and in the adjacent node set v for the adjacent vertices in the vertex set v. After the judgment, count the total number of triangles for each vertex.

[0072] Prim's algorithm is used to find the minimum spanning tree. The algorithm operates with a point as the center, also known as the "point adding method". First, the source vertex is defined, and the adjacent vertices adjacent to the source vertex are searched from the source vertex, and the weights of the adjacent vertices are compared. Each iteration selects the vertex connected by the edge with the smallest weight and adds the point to the minimum spanning tree.

[0073] PageRank (PR) is a technique for ranking web pages based on the hyperlinks between them. Given a directed graph with n nodes, the transition matrix is ​​M, and the values ​​of the non-zero elements in M ​​are the same and sum to 1. The PageRank ranking of the directed graph is determined by the limit vector R of the iterative formula (1). The iterative algorithm of PageRank is to perform iterations according to this general definition until convergence.

[0074] Input of the PR algorithm: directed graph with n nodes, transfer matrix M, damping factor d, initial vector R0, number of iterations t;

[0075] Output of the PR algorithm: PageRank vector R of the directed graph.

[0076] (1) Let t=0.

[0077] (2) Calculation.

[0078]

[0079] (3) If Rt is sufficiently close to Rt-1 or reaches the pre-required number of iterations, set R=Rt and stop the iteration.

[0080] (4) Otherwise, let t = t + 1 and execute (2).

[0081] In order to better understand the PE structure and the algorithm of the PE array reconfigurable execution in the present invention, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.

[0082] This embodiment provides a PE structure for a graph computing accelerator. The PE structure and a plurality of identical PE structures form a PE array for a graph computing accelerator. The PE structure includes:

[0083] An operation circuit and a configuration information module, wherein the configuration information module comprises: a first configuration unit conf0, a second configuration unit conf1 and a third configuration unit conf2;

[0084] The configuration information module receives configuration information and instructions from an external controller of the PE array, and distributes each field of the configuration information to the first configuration unit, the second configuration unit, and the third configuration unit based on the instructions;

[0085] The first configuration unit configures the input data source direction of the operation circuit according to the allocated field, the instruction of the external controller and the output direction of five adjacent PE structures;

[0086] The second configuration unit enables the operation circuit to select a sub-circuit that implements at least one function to form a signal path according to the assigned field and the instruction of the external controller;

[0087] The third configuration unit is used to configure the output direction of the operation circuit;

[0088] The operation circuit is physically connected using circuit components such as multiple comparators, adders, multipliers, distributors, selectors, and registers. During use, it processes all functions of at least one specified algorithm in a self-reconstruction manner according to the instructions of an external controller, and the self-reconstructed sub-circuit is part or all of the circuits in the physical connection of the operation circuit.

[0089] like Figure 1 and Figure 2 As shown, the operation circuit includes:

[0090] The zeroth selector MUX0 is used to receive data of the PE structures in four adjacent directions and / or external input data; the zeroth selector MUX0 is connected to the first configuration unit conf0;

[0091] The tenth distributor DEMUX10 connected to the second configuration unit conf1 has its input connected to the zeroth selector MUX0, and its output is distributed into five-way data, which are respectively connected to the first selector MUX1, the seventh selector MUX7, the eighth selector MUX8, the eleventh selector MUX11, and the first multiplier mul0;

[0092] The output of the first selector MUX1 is connected to the first comparator, and the output of the first comparator is connected to the second distributor DEMUX2; the first selector MUX1 is connected to the second configuration unit conf1, and receives external input data, data of the first register reg1, and data of the second register reg2;

[0093] The output of the first comparator is connected to the second distributor DEMUX2, and the second distributor DEMUX2 divides the comparison result of the first comparator into three data paths, which are respectively connected and input to the third selector MUX3, the fourth selector MUX4 and the triangle counting logic! R&&C;

[0094] The input of the third selector MUX3 is connected to the first selector MUX1 and the first register reg1, and the second distributor DEMUX2, receives the input data for selection processing, and the output is connected to the first register reg1; the first register reg1 stores the result of the output of the third selector MUX3;

[0095] The fourth selector MUX4 receives one channel of data from the second distributor DEMUX2, and receives instructions from the external controller for processing. The output of the fourth selector MUX4 is connected to MUX5 in the fifth selector and the triangle counting logic! R&&C.

[0096] The fifth selector MUX5 receives the output result of the fourth selector MUX4, and receives the signal of 0, 1 (it can be understood that the 0, 1 here can be the signal stored in the memory / cache structure of the operation circuit), processes and outputs and enables to send to the external controller;

[0097] Triangle counting logic! R&&C receives one channel of data from the second distributor DEMUX2 and performs logic operation with the output of the fourth selector MUX4, and the output is connected to the sixth selector MUX6;

[0098] The sixth selector MUX6 receives the output of the triangle counting logic! R&&C, and receives the signal of the external controller for processing, and the output is connected to the seventh selector MUX7, and the sixth selector MUX6 is connected to the second configuration unit conf1;

[0099] The seventh selector MUX7 receives data from the tenth distributor DEMUX10, as well as signals of 0 and 1, and its output is connected to the first adder add0;

[0100] The first adder add0 receives the output data of the seventh selector MUX7 and the data in the second register reg2 to perform an addition operation, and stores the data in the second register reg2;

[0101] The eighth selector MUX8 receives the data of the first register reg1, the data of the second register reg2, one channel of data of the tenth distributor DEMUX10, and the output data of the twelfth selector MUX12 for processing, and outputs the data to be connected to the ninth distributor DEMUX9;

[0102] The eighth selector MUX8 is connected to the second configuration unit conf1, the ninth distributor DEMUX9 is connected to the third configuration unit conf2, and the output of the ninth distributor DEMUX9 is the output data of the PE structure, that is, it is sent to the adjacent four-directional PE structures and / or external output;

[0103] The first multiplier mul0 receives the output data of the tenth distributor DEMUX10 for multiplication operation; the output is connected to the eleventh selector MUX11;

[0104] The eleventh selector MUX11 receives one channel of data from the tenth distributor DEMUX10 and the output result of the first multiplier mul0 for processing, and the output is connected to the second adder add1;

[0105] The second adder add1 receives the output data of the eleventh selector MUX11 and performs an addition operation on the data in the third register reg3, and the operation result is stored in the third register reg3;

[0106] The second multiplier mul1 receives data from the third register reg3 and performs multiplication with pre-configured fixed data, and the output is connected to the third adder add2;

[0107] The third adder add2 performs an addition operation on the output data received from the second multiplier mul1 and the pre-configured fixed data, and the output is connected to the twelfth selector MUX12;

[0108] The twelfth selector MUX12 receives data from the third adder add2 and the data from the third register reg3 for processing, and the output is connected to the eighth selector MUX8;

[0109] The twelfth selector MUX12 receives data from the eighth selector MUX8 and sends the data to four adjacent directions PE and external output.

[0110] The operation circuit of this embodiment processes all functions of at least one specified algorithm in a self-reconstruction manner according to the instructions of an external controller during use. The at least one specified algorithm includes: operating BFS algorithm, CC algorithm, Prim algorithm, TC algorithm and / or PR algorithm.

[0111] For example, if Figure 3 As shown, the electronic circuit for operating the BFS algorithm includes: a zeroth selector MUX0, a tenth distributor DEMUX10, a first selector MUX1, a first comparator, a second distributor DEMUX2, a fourth selector MUX4, a fifth selector MUX5, a sixth selector MUX6, a seventh selector MUX7, a first adder add0, a second register reg2, an eighth selector MUX8 and a ninth distributor DEMUX9;

[0112] When the BFS algorithm is executed, data (external data or data output by other PEs) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the fourth selector MUX4 through the second distributor DEMUX2 as the driver of the fifth selector MUX5, and the output signal is sent to the controller through the fifth selector MUX5. Then the signal sent by the receiving controller to PE is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, and after calculation, it is sent to the second register reg2 and then to the eighth selector MUX8 for output through the ninth distributor DEMUX9.

[0113] like Figure 4 and Figure 5 As shown, the electronic circuit operating the CC algorithm may include: a zeroth selector MUX0, a first selector MUX1, a tenth distributor DEMUX10, a first comparator, a second distributor DEMUX2, a fourth selector MUX4, a fifth selector MUX5, a sixth selector MUX6, a seventh selector MUX7, a first adder add0, a second register reg2, an eighth selector MUX8 and a ninth distributor DEMUX9.

[0114] In the first stage of CC algorithm execution, data (external data or data output by other PEs) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the fourth selector MUX4 through the second distributor DEMUX2 as the driver of the fifth selector MUX5, and the output signal is sent to the controller through the fifth selector MUX5. Then the signal sent by the receiving controller to PE is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, which is sent to the second register reg2 after calculation and then to the eighth selector MUX8 and output through the ninth distributor DEMUX9. In the second stage, data addition enters from the zeroth selector MUX0, is sent to the eighth selector MUX8 through the tenth distributor DEMUX10, and then enters the ninth distributor DEMUX9 for output.

[0115] like Figure 6 and Figure 7 As shown, the electronic circuit for operating the TC algorithm includes: the zeroth selector MUX0, the first selector MUX1, the tenth distributor DEMUX10, the first comparator, the second distributor DEMUX2, the fourth selector MUX4, the fifth selector MUX5, the triangle counting logic! R&&C, the sixth selector MUX6, the seventh selector MUX7, the first adder add0, the second register reg2, the eighth selector MUX8 and the ninth distributor DEMUX9.

[0116] In the first stage of the TC algorithm, data first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. After that, the comparison result is sent to the triangle counting logic! R&&C through the second distributor DEMUX2 and the signal from the controller through the fourth selector MUX4. Then the result is sent to the controller through the fifth selector MUX5. The triangle counting logic! R&&C is sent to the seventh selector MUX7 through the sixth selector MUX6 to select the data entering the first adder add0, and is sent to the second register reg2 after calculation. In the second stage, the added data enters from the zeroth selector MUX0, and is selected by the seventh selector MUX7 through the tenth distributor DEMUX10 to enter the first adder add0. After calculation, it is sent to the second register reg2 and then to the eighth selector MUX8, and then enters the ninth distributor DEMUX9 for output.

[0117] like Figure 8As shown, the electronic circuit for operating the Prim algorithm includes: a zeroth selector MUX0, a first selector MUX1, a tenth distributor DEMUX10, a first comparator, a second distributor DEMUX2, a third selector MUX3, a first register reg1, a fourth selector MUX4, a fifth selector MUX5, an eighth selector MUX8 and a ninth distributor DEMUX9.

[0118] When the Prim algorithm is executed, data (external data or other PE data) first enters PE from the zeroth selector MUX0, is sent to the first selector MUX1 through the tenth distributor DEMUX10, and then enters the first comparator for comparison operation. The comparison result is then sent to the third selector MUX3 through the second distributor DEMUX2. The signal from the controller is output to the fifth selector through the fourth selector MUX4 to send the output signal to the controller. The third selector MUX3 selects the incoming data and the data in the first register reg1, and then sends it to the first selector MUX1 and the eighth selector MUX8 and outputs it through the ninth distributor DEMUX9.

[0119] like Fig. 9 and Fig.10 As shown, the electronic circuit for operating the PR algorithm includes: a zeroth selector MUX0, a tenth distributor DEMUX10, a first multiplier mul0, an eleventh selector MUX11, a second adder add1, a third register reg3, a second multiplier mul1, a third adder add2, a twelfth selector MUX12, an eighth selector MUX8 and a ninth distributor DEMUX9.

[0120] In the first stage of the PR algorithm, data (external data or other PE data) first enters the PE from the zeroth selector MUX0, is sent to the first multiplier mul0 through the tenth distributor DEMUX10, is calculated through the eleventh selector MXU11, is sent to the third register reg3 through the second adder add1, and is output through the twelfth selector MUX12, the eighth selector MUX8, and the ninth distributor DEMUX9. In the second stage, the additional data enters the PE from the zeroth selector MUX0, is sent to the eleventh selector MXU11 through the tenth distributor DEMUX10, is sent to the third register reg3 after calculation by the second adder add1, and is sent to the second multiplier mul1 and the third adder add2 for calculation, and then is output through the twelfth selector MUX12, the eighth selector MUX8, and the ninth distributor DEMUX9.

[0121] exist Figures 3 to 10 In the figure, the black lines are the reconstructed electronic circuits that execute the specified algorithm, and the light lines are the components that do not execute the specified algorithm.

[0122] In addition, an embodiment of the present invention further provides a PE array for a graph computing accelerator, the PE array may include: 4n*4n PE structures, the PE structure is the PE structure described in any embodiment; the value range of n is n>=1;

[0123] The number of PEs in the horizontal and vertical directions of the PE array is the same, and the non-edge PE structures of the PE array are all connected to adjacent PE structures.

[0124] In a specific implementation, a graph computing accelerator can be formed based on the above-mentioned PE structure or PE array. The graph computing accelerator also includes an external controller, and each PE structure in the PE array communicates with the external controller.

[0125] The external controller can monitor the overall circuit execution status of the PE array, generate control signals for components in the current and next stage circuits of different circuits according to different execution states, and send configuration information for realizing reconstruction to the PE array; each PE structure in the PE array is reconstructed based on the control signal and the respective configuration information to obtain an electronic circuit for executing a specified algorithm.

[0126] In order to further understand the processing process of the operation circuit in detail, a further detailed description is given below.

[0127] like Figure 1 As shown, the PE array of this embodiment may include 16 PE structures (hereinafter referred to as PE may be the abbreviation of PE structure), and each PE includes a computing circuit and a configuration information module.

[0128] Figure 1 The zero selector MUX0 is used to select the input data source. The PE is connected to the adjacent PEs in the southeast, northwest and northeast directions in the reconstructed array. The input data can come from the four adjacent PEs and external circuits, with a total of five data source directions. The selection of the data source is determined by the first configuration unit conf0 of the configuration information. The configuration information is stored inside the PE. The controller (i.e., the external controller) selects the corresponding configuration information according to different execution tasks and sends different fields of the configuration information to the input selection, functional circuit, and output selection. The internal functional circuit implements different functional paths according to the configuration information. Figure 1 The eighth selector MUX8 is for output data selection. Since PE implements different functions, the calculation results come from different data paths.

[0129] There are three sources for the output data of the functional circuit in this embodiment (i.e., the electronic circuit reconstructed by each PE). The first one can output the number of vertex layers in the vertex attributes when the BFS algorithm is executed, the vertex count in the connected component flag when the CC algorithm is executed, and the intermediate result of the triangle count when the TC algorithm is executed. The second one can output the minimum value obtained after traversing the edge data when the Prim algorithm is executed. The third one can output the results of two vector operations when the PR algorithm is executed. The specific type of output data is determined by the configuration information selected by the controller according to different execution tasks (the configuration information issued by the third configuration unit conf2), and the configuration information determines the output direction of the PE, and the output direction also includes adjacent PEs and external circuits. Figure 2 en_out is the valid flag of PE's output data.

[0130] like Figure 2 The figure shows the internal structure of all components of PE that are physically connected. During the execution of the algorithm, all algorithm operations include comparison operations. When executing the BFS algorithm, the two comparison data of the comparator between the first selector MUX1 and the second distributor DEMUX2 are the externally input vertex attributes and the fixed value zero, respectively, and the output is used to control the output data valid signal of PE; when executing the CC algorithm, it is the same as BFS, the comparison data is the externally input vertex attributes and the fixed value zero, and the output is used to control the output data valid signal of PE; when executing the TC algorithm, the comparison data is two different vertices, and the output is used to control the count of the number of triangles and the output data valid signal; when executing the PR algorithm, the comparator is used to compare the number of times a set of vectors perform accumulation operations with the number of non-zero elements of the transfer matrix vector, and the output is used to control the output data valid signal; when executing the Prim algorithm, the comparison data is the externally input vertex data and the data stored in the first register reg1 in the previous comparison, and the comparison result is used to control the selection of storing the smaller data in the first register reg1.

[0131] The first adder, integer adder add0, is used to execute the BFS algorithm, CC algorithm, TC algorithm, and PR algorithm. In the BFS algorithm, integer adder add0 is used to count the number of traversed layers; in the CC algorithm, integer adder add0 is used to count the traversed connected components; in the TC algorithm, integer adder add0 is used to count the number of triangles and to sum the intermediate results between different PEs, one of which comes from the output of an adjacent PE; in the PR algorithm, integer adder add0 is used to count the number of accumulations.

[0132] The first multiplier, i.e. the fixed-point multiplier mul0, and the second adder, i.e. the fixed-point adder add1, jointly complete the vector operation of the PR algorithm. The second multiplier mul1, the third adder add2 and the eleventh selector MUX11 are not included in all PEs. Only in the last summation PE that completes the calculation of the PR vector operation, the data in the third register reg3 of other PEs are directly output to the eighth selector MUX8.

[0133] The lower left corner is the configuration information storage unit inside the PE. The controller selects the corresponding configuration information conf according to the different operations required by the algorithm and sends it to the input and output selectors of the PE and the internal functional path construction selector.

[0134] Reference Figure 3 , Figure 3 The data path construction of the BFS algorithm is given. The zeroth selector MUX0 selects external input data according to the configuration information (configuration information sent by the first configuration unit conf0), and the tenth distributor DEMUX10 sends the external input vertex attribute data to the first selector MUX1 according to the configuration information. The first selector MUX1 selects 32-bit layer data and 32-bit high level data according to the configuration information (configuration information sent by the second configuration unit conf1) and sends them to the comparator for comparison. The second distributor DEMUX2 sends the comparison result to the fourth selector MUX4 according to the configuration information. At this time, the output of the fourth selector MUX4 selects the comparison result for output according to the configuration information (configuration information sent by the second configuration unit conf1), that is, the output enable signal is controlled by the comparison result. At the same time, the second register reg2 stores the current number of layers, and outputs the current number of vertex layers. When executing the BFS algorithm, MUX6 selects the layer change flag ch_y as the output item. Whenever the number of layers changes, the controller switches to ch_y, causing MUX7 to select 1 as the input option of the adder, and add one to the number of layers in the second register reg2. When the number of layers does not change, the seventh selector MUX7 selects 0 as one of the input signals of the adder, and the number of layers does not change.

[0135] Reference Figure 4, the black part (i.e. the reconstructed electronic circuit) gives the data path of the first stage of the CC algorithm. Since the search of each connected component of the CC algorithm is implemented by the BFS algorithm, when traversing a connected component, the construction of its data path is similar to that of the BFS algorithm. The difference is that when executing the CC algorithm, the sixth selector MUX6 selects the connected component change flag as ch_c as the control signal of the seventh selector MUX7. Every time a connected component is traversed, the controller controls the connected component change signal to increase the connected component count by one. When the CC algorithm searches for the traversal starting point of the next connected component, it traverses all vertex attributes and searches for the traversed vertex as the starting point of a new round of traversal. The data path at this time is as follows Figure 5 As shown. The comparator mainly determines whether the vertex has been traversed. When a vertex that has not been traversed is found, the comparison result will pull up the output limited enable signal, output the vertex attribute of the vertex, and serve as the starting vertex for the next round of traversal.

[0136] Reference Figure 6 The black part (i.e. the reconstructed electronic circuit) shows the data path when PE executes the first stage of the TC algorithm. The input signal selects external data, and the vertex to be compared is sent to the comparator for comparison with the current number of columns. The comparison result R is sent to the count plus one control logic. The control logic also determines whether to perform the count plus one operation based on the output enable signal. The output enable at this time is controlled by the signal crtl_en sent by the controller. When a triangle is detected and no output operation is performed at this time, the control logic result is sent to the seventh selector MUX7 via the sixth selector MUX6. The seventh selector MUX7 sends 1 to the adder to add one to the triangle count value. The second register reg2 now stores the triangle value counted by the current PE.

[0137] When traversing the count, the PE cache is empty and the two points read out are both 0. At this time, the vertices are the same, but since the traversal is completed, the count should not be performed anymore and is controlled by the controller signal.

[0138] When all column values ​​are compared, the reconfigurable array has finished counting triangles, but at this time each PE stores the 16 intermediate counting results respectively. At this time, the intermediate counting results should be summed. PE receives the intermediate counting value from the adjacent PE and sums it with the intermediate value stored in the PE. The data path at this time is as follows: Figure 7 As shown. At this time, the zeroth selector MUX0 selects the data sent by the adjacent PE as input data. Send it to the seventh selector MUX7, and the seventh selector MUX7 sends the value to the first adder add0, and sums it with the intermediate result counted by the current PE. The controller controls the output enable, and the output result is sent to the external output or the adjacent PE according to different PEs.

[0139] Reference Figure 8 The black part (i.e., the reconstructed electronic circuit) shows the data path for PE to execute Prim's algorithm. The zeroth selector MUX0 selects the vertex attribute data of the external input and sends the data to the comparator. The comparator performs two comparison operations. One is to determine whether the vertex has been added to the minimum spanning tree based on the vertex attributes. The other is to compare the weight of the current vertex with the minimum weight stored in the third selector MUX3 after the last comparison. According to the comparison result, the smaller weight is stored in the first register reg1 again to complete the search for the minimum adjacent point of the current minimum tree.

[0140] Reference Fig. 9 The black part (i.e., the reconstructed electronic circuit) shows the data path when the PE executes the PR algorithm. The zeroth selector MUX0 selects the external input data, which contains the row number and a set of vector elements. The tenth distributor DEMUX10 sends the data to the first multiplier mul0, and sends the product to the adder to perform a sum operation with the previous multiplication and summation results. When the accelerator finishes calculating the current set of vectors, 16 intermediate results are stored in each of the 16 PEs. At this time, the intermediate results of the PEs are summed. The data path at this time is as follows: Fig.10 As shown. The zeroth selector MUX0 selects the intermediate result sent by the adjacent PE as input data, and sends the intermediate result to the second adder add1 to perform a sum operation with the intermediate result of the current PE. There are two subsequent output paths. One is directly output through MUX11, and then output to the adjacent PE to continue the sum operation. The other path is to perform the multiplication coefficient and fixed value operation in the PR operation formula. This operation only exists in the last level PE of the sum operation. After completing this operation, a set of vector operations are completed.

[0141] According to the internal structure of PE, the interconnection mode within the reconfigurable array, and the different execution operations of the BFS algorithm, CC algorithm, TC algorithm, PR algorithm, and Prim algorithm, this embodiment defines the width of the total configuration information as 13 bits, and divides it into three different fields, namely, the configuration information of the first configuration unit conf0, the configuration information of the second configuration unit conf1, and the configuration information of the third configuration unit conf2.

[0142] The configuration information of the first configuration unit conf0 is the high four bits of the total configuration information, i.e., conf[12:9], which controls the source of the data processed by the PE. There are five data input channels for the PE, which can be the data sent by the four adjacent PEs in the southeast, northwest, and northeast of the reconstructed array, and the data sent by the corresponding input buffer of the PE outside the reconstructed array. The PE only selects one data input channel for each calculation, i.e., it realizes the five-choice operation. The minimum required bit width is three bits, and one redundant bit is set.

[0143] Table 1 Configuration information of input data: Table 1:

[0144] Input data source Configuration Information East 0001 South 0010 West 0011 north 0100 outside 0101

[0145] The configuration information of the third configuration unit conf2 is the lower four bits of the total configuration information, i.e., conf[3:0]. There are five types of PE data output channels, similar to the input data channels. The first is the data transmission channel from the reconfigurable array to the four adjacent PEs in the southeast, northwest, and northeast. The second is the data output channel that sends the calculation results to the PE output cache outside the array. The minimum required configuration data width is three bits, and one redundant bit is also preset. The output direction configuration information occupies a total of four bits.

[0146] Table 2 Output data configuration information: Table 2:

[0147] Output data source Configuration Information East 0001 South 0010 West 0011 north 0100 outside 0101

[0148] PE implements calculation operations for five algorithms. In all operator operations, the data sources of the comparator inside PE include the maximum or minimum value in the last comparison, the integer adder result, the external input data, the temporary storage of the external input data, and the fixed value 0; the addition of zero and one operations of the integer adder inside PE exist in three operator operations. According to different operator operations, the input data of the integer adder is one of the summation results of the last integer addition calculation, which is fixedly input into the adder each time, and two is three different data from MUX7, which are 0, 1, and PE external input data MUX7 performs a three-choice operation; there are two different situations for the control of output enable: one is to determine the output based on the calculation result of PE, and the other is that the controller determines whether to output the data generated by PE according to the different execution stages during the execution of the entire algorithm.

[0149] The configuration information for building the internal data path of the PE is shown in Table 3.

[0150] Table 3 Configuration information for different operations performed within PE:

[0151] Different subtasks Configuration Information Remark <![CDATA[S BFS1 ]]> 00001 Determine and modify the number of layers <![CDATA[S BFS2 ]]> 00010 redundancy <![CDATA[S CC1 ]]> 00011 Determine and modify connected components <![CDATA[S CC2 ]]> 00100 Find the starting point of the traversal <![CDATA[S CC3 ]]> 00101 redundancy <![CDATA[S TC1 ]]> 00110 Finding triangles <![CDATA[S TC2 ]]> 00111 Sum <![CDATA[S TC3 ]]> 01000 redundancy <![CDATA[S PR1 ]]> 01001 Vector operations <![CDATA[S PR2 ]]> 01010 Sum <![CDATA[S Prim1 ]]> 01011 Minimum edge intermediate result search <![CDATA[S Prim2 ]]> 01100 Minimum edge search <![CDATA[S Prim3 ]]> 01101 redundancy

[0152] It has been verified through experiments that the PE structure and PE array of this embodiment can meet the expected goals and can work reliably.

[0153] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.

[0154] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0155] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.

[0156] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.

Claims

1. A PE structure for a graph computing accelerator, characterized in that: The PE structure and a plurality of identical PE structures form a PE array for a graph computing accelerator, wherein the PE structure includes: An operation circuit and a configuration information module, wherein the configuration information module comprises: a first configuration unit (conf0), a second configuration unit (conf1) and a third configuration unit (conf2); The configuration information module receives configuration information and instructions from an external controller of the PE array, and distributes each field of the configuration information to the first configuration unit, the second configuration unit, and the third configuration unit based on the instructions; The first configuration unit configures the input data source direction of the operation circuit according to the allocated field, the instruction of the external controller and the output direction of five adjacent PE structures; The second configuration unit enables the operation circuit to select a sub-circuit that implements at least one function to form a signal path according to the assigned field and the instruction of the external controller; The third configuration unit is used to configure the output direction of the operation circuit; The operation circuit is physically connected using circuit components such as multiple comparators, adders, multipliers, distributors, selectors, and registers. During use, it processes all functions of at least one specified algorithm in a self-reconstruction manner according to the instructions of an external controller, and the self-reconstructed sub-circuit is part or all of the circuits in the physical connection of the operation circuit.

2. The PE structure according to claim 1, characterized in that: The operation circuit comprises: The zeroth selector (MUX0) is used to receive data of the PE structures in four adjacent directions and / or external input data; the zeroth selector (MUX0) is connected to the first configuration unit (conf0); The tenth distributor (DEMUX10) connected to the second configuration unit (conf1) has its input connected to the zeroth selector (MUX0), and its output is distributed into five data paths, which are respectively connected to the first selector (MUX1), the seventh selector (MUX7), the eighth selector (MUX8), the eleventh selector (MUX11), and the first multiplier (mul0); The output of the first selector (MUX1) is connected to the first comparator, and the output of the first comparator is connected to the second distributor (DEMUX2); the first selector (MUX1) is connected to the second configuration unit (conf1), and receives external input data, data of the first register (reg1), and data of the second register (reg2); The output of the first comparator is connected to the second distributor (DEMUX2), and the second distributor (DEMUX2) divides the comparison result of the first comparator into three data paths, which are respectively connected and input to the third selector (MUX3), the fourth selector (MUX4) and the triangle counting logic (!R&&C); The input of the third selector (MUX3) is connected to the first selector (MUX1), the first register (reg1), and the second distributor (DEMUX2), receives input data for selection processing, and the output is connected to the first register (reg1); the first register (reg1) stores the result of the output of the third selector (MUX3); The fourth selector (MUX4) receives one channel of data from the second distributor (DEMUX2) and receives instructions from an external controller for processing. The output of the fourth selector (MUX4) is connected to the fifth selector (MUX5) and the triangle counting logic (!R&&C).

3. The PE structure according to claim 2, characterized in that: The operation circuit also includes: The fifth selector (MUX5) receives the output result of the fourth selector (MUX4), as well as the signal of 0 or 1, processes and outputs an enable signal to be sent to the external controller; The triangle counting logic (!R&&C) receives one channel of data from the second distributor (DEMUX2) and performs a logic operation with the output of the fourth selector (MUX4), and the output is connected to the sixth selector (MUX6); The sixth selector (MUX6) receives the output of the triangle counting logic (!R&&C), and receives the signal of the external controller for processing, and the output is connected to the seventh selector (MUX7), and the sixth selector (MUX6) is connected to the second configuration unit (conf1); The seventh selector (MUX7) receives data from the tenth distributor (DEMUX10) and receives signals of 0 and 1, and the output is connected to the first adder (add0); The first adder (add0) receives the output data of the seventh selector (MUX7) and the data in the second register (reg2) to perform an addition operation; and stores the result in the second register (reg2); The eighth selector (MUX8) receives the data of the first register (reg1), the data of the second register (reg2), one channel of data of the tenth distributor (DEMUX10), and the output data of the twelfth selector (MUX12) for processing, and outputs the data to be connected to the ninth distributor (DEMUX9); The eighth selector (MUX8) is connected to the second configuration unit (conf1), the ninth distributor (DEMUX9) is connected to the third configuration unit (conf2), and the output of the ninth distributor (DEMUX9) is the output data of the PE structure, that is, it is sent to the adjacent four-directional PE structures and / or external output; The first multiplier (mul0) receives the output data of the tenth distributor (DEMUX10) for multiplication operation; the output is connected to the eleventh selector (MUX11); The eleventh selector (MUX11) receives one channel of data from the tenth distributor (DEMUX10) and the output result of the first multiplier mul0 for processing, and the output is connected to the second adder (add1); The second adder (add1) receives the output data of the eleventh selector (MUX11) and the data in the third register (reg3) to perform an addition operation, and the operation result is stored in the third register (reg3); The second multiplier (mul1) receives data from the third register (reg3) and performs multiplication with pre-configured fixed data, and the output is connected to the third adder (add2); The third adder (add2) performs an addition operation on the output data received from the second multiplier (mul1) and the pre-configured fixed data, and the output is connected to the twelfth selector (MUX12); The twelfth selector (MUX12) receives data from the third adder (add2) and data from the third register (reg3) for processing, and the output is connected to the eighth selector (MUX8); The twelfth selector (MUX12) receives data from the eighth selector (MUX8) and sends it to four adjacent direction PEs and external output.

4. The PE structure according to claim 3, characterized in that: In use, all functions of at least one specified algorithm are processed in a self-reconstruction manner according to instructions of an external controller, and the at least one specified algorithm includes: operating a BFS algorithm, a CC algorithm, a Prim algorithm, a TC algorithm and / or a PR algorithm.

5. The PE structure according to claim 4, characterized in that: The electronic circuit for operating the BFS algorithm includes: a zeroth selector (MUX0), a tenth distributor (DEMUX10), a first selector (MUX1), a first comparator, a second distributor (DEMUX2), a fourth selector (MUX4), a fifth selector (MUX5), a sixth selector (MUX6), a seventh selector (MUX7), a first adder (add0), a second register (reg2), an eighth selector (MUX8) and a ninth distributor (DEMUX9); And / or, the electronic circuit for operating the CC algorithm comprises: The zeroth selector (MUX0), the first selector (MUX1), the tenth distributor (DEMUX10), the first comparator, the second distributor (DEMUX2), the fourth selector (MUX4), the fifth selector (MUX5), the sixth selector (MUX6), the seventh selector (MUX7), the first adder (add0), the second register (reg2), the eighth selector (MUX8) and the ninth distributor (DEMUX9).

6. The PE structure according to claim 4, characterized in that: The electronic circuit for operating the Prim algorithm includes: a zeroth selector (MUX0), a first selector (MUX1), a tenth distributor (DEMUX10), a first comparator, a second distributor (DEMUX2), a third selector (MUX3), a first register (reg1), a fourth selector (MUX4), a fifth selector (MUX5), an eighth selector (MUX8) and a ninth distributor (DEMUX9); And / or, the electronic circuit for operating the TC algorithm includes: a zeroth selector (MUX0), a first selector (MUX1), a tenth distributor (DEMUX10), a first comparator, a second distributor (DEMUX2), a fourth selector (MUX4), a fifth selector (MUX5), a triangle counting logic (!R&&C), a sixth selector (MUX6), a seventh selector (MUX7), a first adder (add0), a second register (reg2), an eighth selector (MUX8) and a ninth distributor (DEMUX9); And / or, the electronic circuit for operating the PR algorithm includes: a zeroth selector (MUX0), a tenth distributor (DEMUX10), a first multiplier (mul0), an eleventh selector (MUX11), a second adder (add1), a third register (reg3), a second multiplier (mul1), a third adder (add2), a twelfth selector (MUX12), an eighth selector (MUX8) and a ninth distributor (DEMUX9).

7. A PE array for a graph computing accelerator, characterized in that: include: 4n*4n PE structures, wherein the PE structure is the PE structure described in any one of claims 1 to 7; the value range of n is n>=1; The number of PEs in the horizontal and vertical directions of the PE array is the same, and the non-edge PE structures of the PE array are all connected to adjacent PE structures.

8. A graph computing accelerator, characterized in that: It comprises the PE array for graph computing accelerator as described in claim 7 above, and an external controller, wherein each PE structure in the PE array communicates with the external controller.

9. The graph computing accelerator according to claim 8, characterized in that: The external controller monitors the overall circuit execution state of the PE array, generates control signals for components in the current and next stage circuits of different circuits according to different execution states, and sends configuration information for realizing reconstruction to the PE array; Each PE structure in the PE array is reconfigured based on the control signal and the respective configuration information to obtain an electronic circuit for executing a designated algorithm.