A computing device and a computing method
By designing a parallel computing device in the deep learning network model, and using the allocation and connection of multiple computing modules and storage units, the problems of high bandwidth and energy consumption of traditional systems are solved, and cost reduction and efficiency improvement are achieved.
Patent Information
- Application Number
- CN201810782174.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-17
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-05-11
AI Technical Summary
In parallel computing of deep learning network models, traditional systems have cost and efficiency problems due to high bandwidth requirements and huge energy consumption overhead.
A computing device is designed, including multiple parallel computing modules and storage units. By allocating computing commands and data through the control module, the data access bandwidth of each module to the storage unit is reduced, and the computing module is selectively connected to the computing module to reduce the memory device's need.
The cost and bandwidth requirements of the computing device are reduced, the data transmission speed is improved, and the scalability of the computing device is improved by extending the computing function.
Smart Images

Figure CN110728364B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a computing device, a data processing chip, an electronic device and a computing method. Background Art
[0002] In the prior art, there are usually a large number of operations in the network models involved in deep learning. For example, some calculations in neural network calculations need to be processed in parallel, such as forward operations, reverse operations, and weight updates. In traditional parallel computing systems, the processing unit needs to read and write data from storage units with too high memory access overhead. Due to the large number of parallel operations, Zhejiang will lead to high bandwidth requirements and huge energy consumption. Summary of the invention
[0003] The embodiments of the present disclosure propose a technical solution that can reduce costs and bandwidth requirements, wherein a computing device, a data processing chip, an electronic device and a computing method are proposed.
[0004] According to a first aspect of the present disclosure, a computing device is provided, comprising: a plurality of computing modules, wherein the plurality of computing modules complete computing operations of a network model by executing corresponding computing subcommands in parallel; wherein the computing modules include:
[0005] at least one operation unit configured to execute a first operator command using the first operator data;
[0006] a storage unit, which is at least used to store the first operator data, the first operator data including data for executing the first operator command;
[0007] In an embodiment of the present disclosure, there is a data connection between at least two operation modules, and one of the operation modules is configured to execute the first operation sub-command using the first operation sub-data and the second operation sub-data of another operation module, wherein the second operation sub-data includes data stored in a storage unit in the other operation module and / or data generated by an operation unit in the other operation module.
[0008] In the embodiment of the present disclosure, a control module is further included, which is configured to allocate corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation commands and operation data;
[0009] The operation command includes a plurality of operation sub-commands, and the operation data includes operation sub-data required to execute each of the operation sub-commands.
[0010] In the embodiment of the present disclosure, the control module includes:
[0011] A first allocation unit is configured to divide the operation command into a plurality of operation sub-commands according to the operation logic relationship in the operation command, and allocate the plurality of operation sub-commands to different operation modules for operation;
[0012] The second allocation unit is configured to determine the operator data required to execute each of the operator commands, and allocate the operator data to the corresponding operation module for storage.
[0013] In the embodiment of the present disclosure, the control module is further configured to selectively connect each of the operation modules according to the operation logic relationship between each operation sub-command.
[0014] In the embodiment of the present disclosure, the computing unit includes a network processor or a computer device.
[0015] In the embodiment of the present disclosure, the storage unit includes at least one of a register, a register file, and a memory array.
[0016] According to a second aspect of the present disclosure, a data processing chip is provided, which includes the computing device as described in the above embodiment.
[0017] According to a third aspect of the present disclosure, an electronic device is provided, which includes the data processing chip as described in the above embodiment.
[0018] According to a fourth aspect of the present disclosure, a computing method is provided. The method is applied in a computing device, wherein the computing device includes a plurality of computing modules, and the plurality of computing modules complete computing operations of a network model by executing corresponding computing subcommands in parallel, and the method includes:
[0019] storing first operator data by a storage unit of each operation module, the first operator data including data for executing a first operator command;
[0020] The first operator command is executed by the operation unit of each operation module using the first operator data.
[0021] In the embodiment of the present disclosure, the step of executing the first operator command by using the first operator data through the operation units of each operation module further includes:
[0022] executing a first operator command using the first operator data and second operator data of another operation module;
[0023] The second operation sub-data include data stored in a storage unit in the other operation module and / or data generated by an operation unit in the other operation module.
[0024] In an embodiment of the present disclosure, the method further includes:
[0025] Allocating corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation commands and operation data;
[0026] The operation command includes a plurality of operation sub-commands, and the operation data includes operation sub-data required to execute each of the operation sub-commands.
[0027] In the embodiment of the present disclosure, the allocating corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation command and operation data includes:
[0028] Using the first allocation unit to divide the operation command into a plurality of operation sub-commands according to the operation logic relationship in the operation command, and correspondingly allocate the plurality of operation sub-commands to different operation modules for operation;
[0029] The second allocation unit is used to determine the operator data required to execute each of the operator commands, and allocate the operator data to the corresponding operation module for storage.
[0030] In an embodiment of the present disclosure, the method further includes:
[0031] The operation modules are selectively connected according to the operation logic relationship between the operation sub-commands.
[0032] In the embodiment of the present disclosure, the data required for the operation is stored in the storage unit in each operation module, and the data required by each operation module does not need to be stored in one memory. This configuration can reduce the data access bandwidth of each operation module to the storage unit and improve the data transmission speed. At the same time, since a large storage device is not required to store and read and write the data of all operation modules, it is not necessary to set up a storage device with large capacity and high data reading and writing speed, thereby reducing the cost of the storage device;
[0033] In addition, the embodiments of the present disclosure can also improve the expansibility of the computing device. The computing function of the computing device can be conveniently expanded by adding computing modules with corresponding computing functions.
[0034] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0036] Figure 1 A block diagram of a computing device according to an embodiment of the present disclosure is shown;
[0037] Figure 2 A block diagram showing a computing device according to an embodiment of the present disclosure;
[0038] Figure 3 A block diagram of a control module according to an embodiment of the present disclosure is shown;
[0039] Figure 4 A flowchart showing a calculation method according to an embodiment of the present disclosure;
[0040] Figure 5 A block diagram showing a computing module constructed as an H-type structure according to an embodiment of the present disclosure;
[0041] Figure 6 A block diagram showing a computing module of a pulse array machine structure according to an embodiment of the present disclosure;
[0042] Figure 7 A block diagram showing a computing module constructed in a tree structure according to an embodiment of the present disclosure;
[0043] Figure 8 A block diagram showing that the operation unit in the embodiment of the present disclosure is constructed as a binary tree structure. DETAILED DESCRIPTION
[0044] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0045] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0046] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0047] The embodiments of the present disclosure provide a computing device that can be used to calculate relevant operations of a deep learning network model, and can reduce the cost of the computing device while reducing the bandwidth requirement for accessing data.
[0048] Figure 1A block diagram of a computing device according to an embodiment of the present disclosure is shown, wherein the computing device may include: multiple computing modules 100, and the multiple computing modules 100 can complete the computing operations of the network model by executing corresponding computing sub-commands in parallel, that is, the computing modules 100 in the embodiment of the present disclosure can execute different computing sub-commands in parallel, and the computing sub-commands executed by each computing module 100 are used to complete the computing of the network model. Figure 1 An embodiment including four operation modules is shown. The operation modules may be interconnected, or some of the operation modules may be interconnected, which is not limited in the present disclosure.
[0049] The network model in the embodiment of the present disclosure may include a neural network model, or may also include other network models for machine learning, the network model may be used for machine learning or the above-mentioned neural network learning, and the computing device may be used to perform computing operations on the network model. The computing device may receive a computing command about the network model, and may generate a plurality of computing sub-commands corresponding to the computing command, and the plurality of computing sub-commands may be respectively assigned to a plurality of computing modules 100, that is, each computing module 100 may execute one or more computing sub-commands correspondingly, so as to complete the relevant computing of the network model correspondingly. Among them, the computing command includes computing operations that need to be performed by the computing device.
[0050] When the network model includes an artificial neural network model, the operation command may include: operation information, input neuron data, weight data and output neuron data. The above operation information includes but is not limited to: forward operation instructions or reverse training instructions, or other neural network operation instructions, such as convolution operation instructions, etc. The specific implementation of this application does not limit the specific form of the above calculation instructions.
[0051] As described above, the computing device in the embodiment of the present disclosure can generate multiple computing sub-commands based on the received computing command, and assign corresponding computing sub-commands to each computing module 100 to perform corresponding computing operations. Each computing module 100 includes: at least one computing unit 101, and a storage unit 102 connected to each computing unit 101. The number and type of computing units 101 in each computing module can be the same or different, and can be set according to different computing requirements. The computing unit 101 may include: at least one or more of one or more multipliers, one or more adders, an addition tree composed of adders, an activation function unit, a vector processing unit, etc., and other computing devices may also be included in other embodiments. The multiplier can multiply the input data 1 (in1) and the input data 2 (in2) to obtain the output (out) after the multiplication, and the process is: out = in1 * in2. The adder can add the input data in1 through the adder to obtain the output data (out). The addition tree can add the input data in1 step by step through the addition tree to obtain the output data (out), where in1 is a vector of length N, N is greater than 1, and the operation process is: out = in1 [1] + in1 [2] + ... + in1 [N], and / or the input data (in1) is accumulated through the addition tree and then added to the input data (in2) to obtain the output data (out), the process is: out = in1 [1] + in1 [2] + ... + in1 [N] + in2, or the input data (in1) and the input data (in2) are added to obtain the output data (out), which is called: out = in1 + in2. The function activation unit can operate the input data (in) through the activation function (active) to obtain the activated output data (out), the process is: out = active (in), the activation function active can include sigmoid, tanh, relu or softmax, etc., or it can be other activation functions. In addition to activation operations, the function activation unit can also implement other nonlinear functions, which can obtain output data (out) by operation (f) on input data (in), and the process is: out = f (in). The vector processing unit can process vector operations and / or pooling operations. The pooling operation can obtain output data (out) after pooling operation by pooling input data (in), and the process is out = pool (in), where pool is a pooling operation function, and the pooling operation includes but is not limited to: average pooling, maximum pooling, median pooling, and input data in is data in a pooling core related to output out.
[0052] Alternatively, in the embodiment of the present disclosure, the operation unit 101 may also include an electronic device or device with operation functions such as a network processor (NPU) or a computer device to execute the corresponding operation subcommand, but this is not a limitation of the embodiment of the present disclosure. In the embodiment of the present disclosure, the operation unit and the storage unit in the operation module may be electronic devices arranged in one device or device to facilitate data transmission between the two.
[0053] Each operation module 100 in the embodiment of the present disclosure may include at least one operation unit 101 for performing different operations to complete the corresponding operation subcommand. That is, each operation module 100 can control different operation units 101 to perform corresponding operation operations according to the received operation subcommand, such as using an adder to perform an addition operation when the operation subcommand includes an addition instruction, etc. The embodiment of the present disclosure will not be described in detail here. As long as the operation program to be executed can be identified through the operation subcommand and the corresponding operation unit 101 can be used to execute the corresponding operation program, it can be regarded as an embodiment of the present disclosure.
[0054] In addition, the operation unit 101 may need to call operation data when executing a corresponding operation sub-command. For example, the operation unit 101 in the embodiment of the present disclosure can use the first operation sub-data to execute the first operation sub-command, where the first operation sub-command is the instruction assigned to the operation unit 101 to enable it to perform the corresponding operation, and the first operation sub-data is the data required to execute the first operation sub-command.
[0055] Here, when executing the corresponding operation command through the network model, the operation data related to the operation command can be received, and the operation module in the embodiment of the present disclosure can correspondingly transmit the operation data to the storage unit 102 of each operation module, or can also allocate the operation sub-data to the operation module according to the operation sub-command required to be executed by each operation module 100, and the operation sub-data is at least a part of the operation data. That is, the storage unit 102 in the embodiment of the present disclosure is at least used to store the first operation sub-data required by the operation unit in its group, and the first operation sub-data includes data for executing the first operation sub-command. Among them, the operation sub-commands executed by each operation module 100 can be the same or different, and can be specifically allocated according to different operation requirements. The storage unit 102 in the embodiment of the present disclosure may include at least one of a buffer, a register, a register stack, and a memory array for performing data storage.
[0056] Based on the above configuration of the embodiment of the present disclosure, the data required for the operation can be stored in the storage unit in each operation module, without the need to store the data required by each operation module in one memory. This configuration can reduce the data access bandwidth of each operation module to the storage unit and improve the data transmission speed. At the same time, since there is no need for a large storage device to store and read and write data of all operation modules, there is no need to set up a storage device with large capacity and high data reading and writing speed, thereby reducing the cost of the storage device.
[0057] In the embodiment of the present disclosure, each operation unit 101 in the operation module 100 can be constructed as one of an H-type structure, a pulse array machine structure and a tree structure. The structure of the operation unit in each operation module 100 can be the same or different, and those skilled in the art can set it according to the needs, and the present disclosure does not limit this. The structure of each operation unit in the operation module is described below with respect to the above structure.
[0058] in, Figure 5 FIG. 2 shows a block diagram of a computing module configured as an H-type structure according to an embodiment of the present disclosure. Figure 5 As shown, when each operation unit 101 in the operation module 100 is constructed as an H-type structure, each operation unit may include a main operation unit 1001, at least one branch operation unit 1002, and a plurality of slave operation units 1003. The main operation unit 1001 may be connected to each branch operation unit 1002, and the branch operation unit 1002 may be connected to at least one of the slave operation units 1003. Figure 5 As shown, it includes four branch operation units 1002, each branch operation unit 1002 is connected to four slave operation units 1003, and the branch operation unit 1002 can be used to transmit data, instructions and intermediate results between the main operation unit 1001 and the slave operation unit 1003. When each branch operation unit 1002 executes an operation sub-command, it can perform operations through the data stored in the storage unit 102 in the module.
[0059] The main operation unit 1001 is configured to divide the received operation operator into multiple operation instructions and divide the operation data into multiple data blocks, and transmit the operation instructions and data blocks to the corresponding slave operation unit 1003 through the branch operation unit 1002 for operation to obtain intermediate results, and is configured to obtain the final operation result based on the intermediate results, wherein the branch operation unit is configured to forward the data blocks, operation instructions, weights and other information between the main operation unit and the slave operation unit.
[0060] After completing the corresponding operation instruction, the slave operation unit 1003 can generate the corresponding intermediate result, and then transmit the intermediate result back to the main operation unit 1001 through the branch operation unit 1002. That is, each slave operation unit can perform multiplication and accumulation operations of 8 sub-matrices and the weight matrix w in parallel, and can obtain 8 intermediate results, and send the 8 intermediate results to the main operation unit 1001.
[0061] The main operation unit 1001 can sort the 8 intermediate results to obtain the corresponding operation results, perform the operation of bias b on the operation results and then perform an activation operation to obtain the final result y, and send the final result y to the storage module 100 for storage or transmit it to other electronic devices for subsequent processing, that is, the final result y can be output or stored in the storage unit 102.
[0062] in addition, Figure 6 A block diagram of an operation module constructed as a pulse array machine structure according to an embodiment of the present disclosure is shown. Wherein, when each operation unit 101 in the operation module 100 is constructed as a pulse array machine structure, each operation unit may include a master operation unit 1001 and a plurality of slave operation units 1003. Wherein, the plurality of slave operation units 1003 are distributed in an array, and the plurality of slave operation units are constructed as m rows and n columns of slave operation units, wherein m and n are positive integers greater than 1, and each slave operation unit 1003 is connected to other adjacent slave operation units 1003, and the master operation unit 1001 is connected to k slave operation units 1003 of the plurality of slave operation units 1003, and the k slave operation units 1003 are: n slave operation units 1003 in the first row, n slave operation units 1003 in the mth row, and m slave operation units 1003 in the first column. It should be noted that, as Figure 6 The K slave operation units 1003 shown only include n slave operation units 1003 in the first row, n slave operation units 1003 in the mth row, and m slave operation units 1003 in the first column, that is, the k slave operation units 1003 are the slave operation units 1003 directly connected to the main operation unit 1001 among the multiple slave operation units 1003. The K slave operation units 1003 can be used for forwarding data and instructions between the main operation unit 1001 and the multiple slave operation units 1003. The remaining slave operation units except the K slave operation units are configured to perform operations on the received data blocks according to the operation instructions to obtain intermediate results, and transmit the operation results to the K slave operation units.
[0063] Among them, the main operation unit 1001 can transmit the assigned operation operator to K slave operation units 1003 for operation, and can obtain intermediate results through the remaining slave operation units 1003 by connecting with the remaining slave operation units 1003. The main operation unit 1001 can be used to process the intermediate results sent by the multiple remaining slave operation units 1003 to obtain the final operation result, and send the operation result to the storage unit 102 for storage.
[0064] in addition, Figure 7 A block diagram of a computing module constructed as a tree structure according to an embodiment of the present disclosure is shown. Wherein, when each computing unit in the large computing module 100 is constructed as a tree structure, each computing unit may include a main computing unit 1001 and multiple slave computing units 1003, and a tree module 1004 connected between the main computing unit 1001 and the slave computing unit. . Wherein, the tree module 1004 includes: a root port 1 and multiple branch ports 2, the root port of the tree module is connected to the main computing unit 1001, and the multiple branch ports of the tree module are respectively connected to one of the multiple slave computing units; the above-mentioned tree module has a sending and receiving function, as shown in 7, the tree module is a sending function, and in other embodiments it may also have a receiving function, which is not limited here. The tree module 1004 can be used to forward data blocks, weights and computing instructions between the main computing unit and the multiple slave computing units. The main operation unit 1004 can divide the received operation operator into multiple operation instructions and the operation data into multiple data blocks, and transmit them to the tree module 1004. The tree module 1004 then transmits the corresponding data, operation instructions and weights to the corresponding slave operation unit 1003, and receives the intermediate results from the slave operation unit 1003 and transmits them to the main operation unit 1001. Then, the main operation unit 1001 can process the intermediate results to obtain the final operation results, and send the operation results to the storage unit 102 for storage.
[0065] In the embodiment of the present disclosure, the tree module may include at least one layer of nodes, which are line structures with forwarding functions, and the nodes themselves may not have computing functions. If the tree module has zero-layer nodes, the tree module is not needed.
[0066] The tree module 1004 may be an n-ary tree structure, for example, Figure 8A block diagram showing that the operation unit in the embodiment of the present disclosure is constructed as a binary tree structure, wherein in other embodiments, each operation unit may also be constructed as a ternary tree structure, or other n-ary tree structures, where n may be an integer greater than or equal to 2. The specific implementation of the present application does not limit the specific value of the above n, and the above number of layers may also be 2, or other numbers of layers. The slave operation unit may be connected to nodes of other layers except the second-to-last layer nodes, for example, the nodes of the first-to-last layer may be connected.
[0067] In addition, the operation unit in the embodiment of the present disclosure may carry a separate cache, for example, may include: a neuron cache unit, which caches the input neuron vector data and output neuron value data of the operation unit.
[0068] In the embodiment of the present disclosure, each operation module can be connected to each other, or a connection relationship between at least two operation modules can be selectively established. For example, there is a data connection between at least two operation modules, and one of the operation modules can use the first operation sub-data and the second operation sub-data of another operation module to execute the first operation sub-command, wherein the second operation sub-data includes the data stored in the storage unit in the other operation module and / or the data generated by the operation unit in the other operation module. In other words, there can be a data connection relationship between each operation module 100 in the embodiment of the present disclosure, such as a wired connection or a wireless connection, and a data transmission channel between the two operation modules can be established through the connection relationship. When executing the first operation sub-command, the operation module 100 may need the data generated by other operation modules 100, and at this time, the data transmission can be realized through the connection relationship between the two operation modules.
[0069] Figure 2 A block diagram of a computing device according to an embodiment of the present disclosure is shown, which includes, in addition to a plurality of computing modules 100, a control module 200. The control module 200 can be used to control the computing module to execute a corresponding computing subcommand and control the memory to store a corresponding computing subdata. The control module 200 can also control the connection status between the computing modules.
[0070] Among them, the control module 200 in the embodiment of the present disclosure can receive operation commands about the network model, wherein the operation commands or other information can be received and transmitted through the communication module, and the operation commands or other information can also be directly received through the control module 200. The communication module may include a wired communication unit and / or a wireless communication unit, and the wired communication unit can perform information transmission through a wired cable, and the wired cable may include an optical fiber, a twisted pair or a coaxial cable. The wireless communication unit can perform information transmission by wireless communication, and the wireless communication unit may include a wifi module, an NFC module, etc. Similarly, data connection can also be performed between each operation module 100 in a wired or wireless manner, for example, the connection can be performed through an optical fiber.
[0071] The control module 200 can allocate corresponding operation subcommands and operation subdata to each of the operation modules 100 according to the received operation commands and operation data. The operation command includes a plurality of operation subcommands for performing network model operations, and the operation data includes the operation subdata required to execute each of the operation subcommands. The control module 200 in the disclosed embodiment can determine each operation subcommand and operation subdata according to the operation logic relationship in the received operation command. For example, the control module 200 can establish a directed graph according to the logical relationship of the operation command, and the nodes of the directed graph can be used to distinguish each operation subcommand, that is, the operation command corresponding to the operation operation between each two nodes can be used as an operation subcommand. At this time, the required operation subdata can also be determined according to the input data of the operation subcommand, so that the operation module can be allocated to execute the operation subcommand, and the operation subdata can be allocated to the storage unit in the operation module.
[0072] In addition, the control module 200 can also determine whether each operation module needs data from other operation modules when executing the corresponding operation sub-command. If necessary, the connection between the two operation modules is connected. If not, the connection between the two operation modules is not established. For example, the embodiment of the present disclosure can execute the connection or disconnection between each operation module through a switching component, wherein each operation module can be connected to the switching component respectively, and the connection between the corresponding operation modules can be realized by controlling the connection of the corresponding line of the switching component. This configuration can simplify the internal structure of the operation device.
[0073] Figure 3 A block diagram of a control module according to an embodiment of the present disclosure is shown, wherein the control module 200 in the embodiment of the present disclosure may include: a first allocation unit 201 and a second allocation unit 202 .
[0074] The first allocation unit 201 can divide the received operation command into multiple operation subcommands according to the operation logic relationship in the received operation command, and allocate the multiple operation subcommands to different operation modules 100 for operation. The second allocation unit 202 can be used to determine the operation subdata required to execute each of the operation subcommands, and allocate the operation subdata to the corresponding operation module for storage.
[0075] That is, the embodiment of the present disclosure can execute the allocation of operation commands through the first allocation unit 201 and execute the allocation of operation data through the second allocation unit 202, so that each operation module can complete the operation by using the data stored in the storage unit in the operation module when executing its own operation sub-command.
[0076] In order to clearly reflect the structural configuration in the embodiment of the present disclosure, the following example illustrates the computing device in the embodiment of the present disclosure. The computing device in the embodiment of the present disclosure may include 4 computing modules 100, each computing module 100 includes 1 storage unit 102 and 4 computing units 101. For example, the first computing module 100 includes a storage unit A0 and computing units B0, B1, B11, B10; the second computing module 100 may include a storage unit A1 and computing units B2, B9, B12, B15; the third computing module 100 may include a storage unit A2 and computing units B4, B5, B6, B7; the fourth computing module 100 may include a storage unit A3 and computing units B3, B8, B13, B14. The computing units in each computing module 100 may be connected to each other, and each computing module 100 may be selectively connected according to the control of the control module 200.
[0077] Furthermore, the control module 200 can also assign corresponding operation sub-commands to each operation module according to the received operation command and operation data, and assign corresponding operation sub-data to the storage unit. Through the above configuration, the scalability of the operation device is guaranteed, and the Numa architecture of the operation device is realized through the setting of each operation module.
[0078] In summary, the disclosed embodiment can store the data required for its operation through the storage unit in each operation module, without the need to store the data required by each operation module in one memory. This configuration can reduce the data access bandwidth of each operation module to the storage unit and improve the data transmission speed. At the same time, since there is no need for a large storage device to store and read and write data of all operation modules, there is no need to set up a storage device with large capacity and high data reading and writing speed, thereby reducing the cost of the storage device. In addition, the disclosed embodiment can also improve the scalability of the operation device, and the operation function of the operation device can be conveniently expanded by adding operation modules with corresponding operation functions.
[0079] It can be understood that the above-mentioned various embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.
[0080] In addition, the present disclosure also provides a data processing chip, an electronic device, and a computing method applied in the computing device including the computing device in the above-mentioned embodiments. The corresponding technical solutions and descriptions refer to the corresponding records in the method part and will not be repeated here.
[0081] The embodiments of the present disclosure also provide a data processing chip, which includes a computing device as described in any one of the above embodiments.
[0082] In some embodiments, the present disclosure provides a chip packaging structure, which includes the above-mentioned data processing chip.
[0083] In some embodiments, the present disclosure provides a board card, which includes the above-mentioned chip packaging structure.
[0084] The embodiments of the present disclosure also provide an electronic device, which includes a computing device or a chip as described in any one of the above embodiments, or the above board.
[0085] Electronic devices include data processing devices, robots, computers, printers, scanners, tablet computers, smart terminals, mobile phones, driving recorders, navigators, sensors, cameras, servers, cloud servers, cameras, camcorders, projectors, watches, headphones, mobile storage, wearable devices, vehicles, household appliances, and / or medical devices.
[0086] The transportation means include airplanes, ships and / or vehicles; the household appliances include televisions, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, electric lights, gas stoves, and range hoods; the medical equipment includes magnetic resonance imaging, ultrasound machines and / or electrocardiographs.
[0087] In addition, the embodiment of the present disclosure also provides a computing method, which is applied in the computing device of the above embodiment, and the computing device includes multiple computing modules, and the multiple computing modules complete the computing operation of the network model by executing corresponding computing sub-commands in parallel. Figure 4 A flowchart showing a calculation method according to an embodiment of the present disclosure may include:
[0088] S100: storing first operator data in a storage unit of each operation module, where the first operator data includes data for executing a first operator command;
[0089] S200: Execute a first operation subcommand using first operation subdata through the operation units of each operation module; wherein the operation subcommand executed by each operation module may be different.
[0090] In the embodiment of the present disclosure, the step of executing the first operator command by using the first operator data through the operation units of each operation module further includes:
[0091] executing a first operator command using the first operator data and second operator data of another operation module;
[0092] The second operation sub-data include data stored in a storage unit in the other operation module and / or data generated by an operation unit in the other operation module.
[0093] In an embodiment of the present disclosure, the method further includes:
[0094] Allocating corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation commands and operation data;
[0095] The operation command includes a plurality of operation sub-commands, and the operation data includes operation sub-data required to execute each of the operation sub-commands.
[0096] In the embodiment of the present disclosure, the allocating corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation command and operation data includes:
[0097] Using the first allocation unit to divide the operation command into a plurality of operation sub-commands according to the operation logic relationship in the operation command, and correspondingly allocate the plurality of operation sub-commands to different operation modules for operation;
[0098] The second allocation unit is used to determine the operator data required to execute each of the operator commands, and allocate the operator data to the corresponding operation module for storage.
[0099] In an embodiment of the present disclosure, the method further includes:
[0100] The operation modules are selectively connected according to the operation logic relationship between the operation sub-commands.
[0101] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0106] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0107] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0108] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A computing device, characterized in that: include: A plurality of operation modules, wherein the plurality of operation modules are in a parallel relationship, and the plurality of operation modules complete the operation operation of the network model by executing corresponding operation subcommands in parallel; wherein the operation modules include: At least one operation unit configured to execute the first operation subcommand using the first operation subdata, each operation unit comprising a main operation unit and a plurality of slave operation units, the plurality of slave operation units being used to perform multiplication and accumulation operations of the plurality of sub-matrices and the weight matrix w in parallel to obtain a plurality of intermediate results, and send the intermediate results to the main operation unit; a storage unit, which is at least used to store the first operator data, the first operator data including data for executing the first operator command; Wherein, the at least one computing unit is connected to the storage unit; At least some of the multiple operation modules are interconnected, and at least two operation modules are data connected; The computing modules are interconnected; Also included is a control module, which is configured to allocate corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation commands and operation data; The operation command includes a plurality of operation sub-commands, and the operation data includes operation sub-data required to execute each of the operation sub-commands.
2. The computing device according to claim 1, wherein: There is a data connection between at least two operation modules, and one of the operation modules is configured to execute the first operation sub-command using the first operation sub-data and the second operation sub-data of the other operation module, wherein the second operation sub-data includes data stored in a storage unit in the other operation module and / or data generated by an operation unit in the other operation module.
3. The computing device according to claim 1, wherein: The control module comprises: A first allocation unit is configured to divide the operation command into a plurality of operation sub-commands according to the operation logic relationship in the operation command, and allocate the plurality of operation sub-commands to different operation modules for operation; The second allocation unit is configured to determine the operator data required to execute each of the operator commands, and allocate the operator data to the corresponding operation module for storage.
4. The computing device according to claim 1, wherein: The control module is further configured to selectively connect the operation modules according to the operation logic relationship between the operation sub-commands.
5. The computing device according to claim 1, wherein: The computing unit includes a network processor or a computer device.
6. The computing device according to claim 1, wherein: The storage unit includes at least one of a register, a register file, and a memory array.
7. A data processing chip, characterized in that: The method comprises a computing device as claimed in any one of claims 1 to 6.
8. An electronic device comprising the data processing chip according to claim 7.
9. A computing method, characterized in that: The method is applied in a computing device, the computing device comprising a plurality of computing modules, the plurality of computing modules being in a parallel relationship, and further comprising a control module, which is configured to allocate corresponding computing subcommands and computing subdata to each computing module according to received computing commands and computing data; the computing commands comprising a plurality of computing subcommands, and the computing data comprising computing subdata required for executing each computing subcommand; The multiple operation modules complete the operation of the network model by executing corresponding operation subcommands in parallel, and the method includes: The first operator data is stored in the storage unit of each operation module, and the first operator data includes data for executing the first operator command, and the first operator data includes: a plurality of sub-matrices and a weight matrix w, and a plurality of intermediate results obtained by performing multiplication and accumulation operations of the plurality of sub-matrices and the weight matrix w in parallel; Executing the first operator command by using the first operator data through the operation units of each operation module; Wherein, the computing units are all connected to the storage unit; The operation modules are interconnected.
10. The method according to claim 9, characterized in that The step of executing the first operator command by using the first operator data through the operation units of each operation module further comprises: executing a first operator command using the first operator data and second operator data of another operation module; The second operation sub-data include data stored in a storage unit in the other operation module and / or data generated by an operation unit in the other operation module.
11. The method according to claim 9, characterized in that The allocating corresponding operation sub-commands and operation sub-data to each of the operation modules according to the received operation command and operation data includes: Using the first allocation unit to divide the operation command into a plurality of operation sub-commands according to the operation logic relationship in the operation command, and correspondingly allocate the plurality of operation sub-commands to different operation modules for operation; The second allocation unit is used to determine the operator data required to execute each of the operator commands, and allocate the operator data to the corresponding operation module for storage.
12. The method according to claim 9, characterized in that The method further comprises: The operation modules are selectively connected according to the operation logic relationship between the operation sub-commands.
Citation Information
Cited By
On-chip code breakpoint debugging method, on-chip processor, and chip breakpoint debugging system
EP3798850B1
Method and device for parallel computation of a network model
EP3825841A1
