System and method for converting sparse elements to dense matrices
The sparse-to-dense conversion unit with a network of sparse element access units addresses the inefficiencies in processing large matrices by parallel processing, enhancing computational bandwidth and CPU performance.
Patent Information
- Application Number
- JP2022191957
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2016-02-05
- Filing Date
- 2022-11-30
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2036-12-26
AI Technical Summary
High-performance computing systems face challenges in processing large matrices that exceed the capacity of a single data storage, leading to inefficient sparse data fetching and computational bandwidth underutilization due to varying latencies in accessing sparse elements from multiple locations, which affects performance.
A system utilizing a sparse-to-dense conversion unit with a network of sparse element access units, arranged in a two-dimensional mesh or torus configuration, to independently fetch and convert sparse elements from distributed data storage, reducing CPU overhead and enhancing computational bandwidth.
The system efficiently generates dense matrices by parallel processing of sparse elements, improving computational bandwidth and reducing latency issues, thereby optimizing CPU performance and resource utilization.
Smart Images

Figure 0007797365000001 
Figure 0007797365000002 
Figure 0007797365000003
Abstract
Description
[Technical Field]
[0001] Detailed Description of the Invention background This specification relates generally to processing matrices using circuitry. Summary of the Invention [Problem to be solved by the invention]
[0002] overview According to one innovative aspect of the subject matter described herein, a matrix processor can be used to perform sparse-to-dense or dense-to-sparse matrix transformations. Generally, high-performance computing systems may use linear algebra routines to process matrices. In some instances, the size of a matrix may be too large to fit into a single data storage, and different portions of the matrix may be sparsely stored in different locations in a distributed data storage system. To load a matrix, a central processing unit of the computing system may instruct separate circuitry to access different portions of the matrix. This circuitry may include multiple memory controllers configured according to a network topology, and the sparse data may be partitioned and stored based on a set of predetermined rules. Each memory controller may aggregate the sparse data based on a set of predetermined rules, perform concurrent calculations on the sparse data, and generate dense matrices that the central processing unit can concatenate together for subsequent processing. [Means for solving the problem]
[0003] In general, one innovative aspect of the subject matter described herein can be embodied in a system for converting sparse elements to a dense matrix, the system including a first group of sparse element access units configured to fetch sparse elements associated with a first dense matrix and a second group of sparse element access units configured to fetch sparse elements associated with a second dense matrix different from the first dense matrix. The system is configured to receive a request for an output matrix based on the sparse elements, including the sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix, obtain the sparse elements associated with the first dense matrix fetched by the first group of sparse element access units, obtain the sparse elements associated with the second dense matrix fetched by the second group of sparse element access units, and convert the sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix to generate an output dense matrix including the sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix.
[0004] These and other implementations may each optionally include one or more of the following features. For example, the first group of sparse element access units may include a first sparse element access unit and a second sparse element access unit. The first sparse element access unit may be configured to fetch a first subset of sparse elements associated with the first dense matrix. The second sparse element access unit may be configured to fetch a second, different subset of sparse elements associated with the first dense matrix.
[0005] The first sparse element access unit is configured to receive a request for a plurality of sparse elements, including sparse elements associated with a first dense matrix and sparse elements associated with a second dense matrix, and to transmit the request to the second sparse element access unit, wherein the first sparse element access unit determines that an identity of a particular sparse element of the plurality of sparse elements matches an identity of one of a first subset of sparse elements associated with the first dense matrix. In response to determining that an identity of a particular sparse element of the plurality of sparse elements matches an identity of one of a first subset of sparse elements associated with the first dense matrix, the first sparse element access unit may be configured to fetch a first subset of sparse elements associated with the first dense matrix that includes the particular sparse element.
[0006] The first sparse element access unit may be configured to fetch a first subset of sparse elements associated with the first dense matrix from a first piece of data, and the second sparse element access unit may be configured to fetch a second different subset of sparse elements associated with the first dense matrix from a second different piece of data. The first sparse element access unit may be configured to transform the first subset of sparse elements associated with the first dense matrix to generate a third dense matrix, and the second sparse element access unit may be configured to receive the third dense matrix and transform the second subset of sparse elements associated with the second dense matrix to generate a fourth dense matrix, and transform the third dense matrix together with the fourth dense matrix to generate a fifth dense matrix including the first subset of sparse elements associated with the first dense matrix and the second subset of sparse elements associated with the first dense matrix.
[0007] The first group of sparse element access units and the second group of sparse element access units may be arranged in a two-dimensional mesh configuration. The first group of sparse element access units and the second group of sparse element access units may be arranged in a two-dimensional torus configuration. The sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix may be multidimensional matrices, and the output dense matrix may be a vector.
[0008] The subject matter described in this specification can be implemented in particular embodiments to achieve one or more of the following advantages: Connecting memory controller units according to a network topology allows for partitioning of sparse data storage according to a predetermined set of rules. Shifting sparse data loading tasks from the central processing unit to separate circuitry increases the computational bandwidth of the central processing unit and reduces the processing overhead of the system. Using specialized circuitry can avoid using processors specialized for dense linear algebra to fetch sparse data. By using multiple memories simultaneously in a distributed system, the union bandwidth available in the distributed system is higher than the bandwidth for a single memory bank with a single memory cap, which requires serialization, on the union bandwidth.
[0009] Other implementations of this and other aspects include corresponding systems, devices, and computer programs encoded on computer storage devices and configured to perform the actions of the methods. One or more computer systems may be so configured by software, firmware, hardware, or a combination thereof that is installed on the system and that, when executed by a data processing device, causes the system to perform the actions. One or more computer programs may be so configured by having instructions that, when executed by a data processing device, cause the device to perform the actions.
[0010] The details of one or more implementations of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other potential features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. [Brief explanation of the drawings]
[0011] [Figure 1] FIG. 1 is a block diagram of an example computing system. [Figure 2A] FIG. 2 illustrates an exemplary sparse-to-fine transform unit. [Figure 2B]FIG. 2 illustrates an exemplary sparse-to-fine transform unit. [Figure 2C] FIG. 2 illustrates an exemplary sparse-to-fine transform unit. [Figure 2D] FIG. 2 illustrates an exemplary sparse-to-fine transform unit. [Figure 3A] FIG. 2 illustrates an exemplary sparse element access unit. [Figure 3B] FIG. 2 illustrates an exemplary sparse element access unit. [Figure 4] FIG. 1 is a flowchart illustrating an example of a process for generating a dense matrix. [Figure 5] FIG. 1 is a flowchart illustrating an example of a process for converting sparse elements into a dense matrix. DETAILED DESCRIPTION OF THE INVENTION
[0012] Like reference numbers and designations in the various drawings indicate like elements. Detailed Description Generally, data can be represented in the form of matrices, and a computing system can manipulate the data using linear algebra algorithms. A matrix can be a one-dimensional vector or a multidimensional matrix. A matrix may be represented by a data structure such as a database table or a variable. However, if the size of a matrix is too large, it may not be possible to store the entire matrix in a single data storage. A dense matrix can be converted into multiple sparse elements, and each sparse element can be stored in a different data storage. The sparse elements of a dense matrix may be matrices, and only a small submatrix (e.g., single-valued elements, rows, columns, or submatrices) of the matrix have nonzero values. When a computing system needs to access a dense matrix, a central processing unit (CPU) may start a thread that reaches each of the data storages to fetch the stored sparse elements, and then apply the sparse-to-dense transformation to return the dense matrix. However, the amount of time it takes to fetch all the sparse elements may be long, and the CPU's computing bandwidth may be underutilized as a result. In some cases, a computing system may need to access the sparse elements of several dense matrices to form a new dense matrix, and these dense matrices may not have equal dimensions. The CPU idle time associated with threads reaching each of the data storages to fetch sparse elements of different dense matrices may experience different latencies and may further affect the performance of the computing device in an undesirable manner. In some cases, a computing system may need to access sparse elements of several dense matrices to form a new dense matrix, and the sparse elements may not have equal dimensions. The CPU idle time associated with threads reaching each of the data storages to fetch sparse elements of different dense matrices may experience different latencies and may further affect the performance of the computing device in an undesirable manner. A hardware sparse-to-dense conversion unit separate from the CPU may increase the computational bandwidth of the processor by collecting sparse elements and converting the sparse elements to dense matrices independent of CPU operation.
[0013] FIG. 1 shows a block diagram of an example computing system 100 for converting sparse elements from one or more dense matrices to generate a dense matrix. The computing system 100 includes a processing unit 102, a sparse-to-dense conversion unit 104, and data pieces 106a-106k, where k is an integer greater than or equal to 1. Generally, the processing unit 102 processes instructions for accessing a target dense matrix and sends instructions 110 to the sparse-to-dense conversion unit 104 to generate the target dense matrix. The sparse-to-dense conversion unit 104 accesses corresponding sparse elements 108a-108n from one or more of the data pieces 106a-106k, where n is an integer greater than or equal to 1. The sparse-to-dense conversion unit 104 generates a target dense matrix 112 using the corresponding sparse elements 108a-108n and provides the target dense matrix 112 to the processing unit 102 for further processing. For example, the sparse elements 108a-108n may be two-dimensional matrices having different sizes, and the sparse-to-dense conversion unit 104 may generate the target dense matrix 112 by converting each of the sparse elements 108a-108n into a vector and concatenating the n vectors into a single vector.
[0014] In some implementations, the processing unit 102 may process instructions for updating the target dense matrix and send the updated dense matrix to the sparse-to-fine conversion unit 104. 4 may convert the updated dense matrix into corresponding sparse elements, thus updating one or more sparse elements stored in the data pieces 106a-106k.
[0015] The processing unit 102 is configured to process instructions for execution within the computing system 100. The processing unit 102 may include one or more processors. In some implementations, the processing unit 102 is configured to process the target dense matrix 112 generated by the sparse-to-fine conversion unit 104. In other implementations, the processing unit 102 may be configured to request the sparse-to-fine conversion unit 104 to generate the target dense matrix 112, and another processing unit may be configured to process the target dense matrix 112. The data pieces 106a-106k store data including the sparse elements 108a-108n. In some implementations, the data pieces 106a-106k may be one or more volatile storage devices. In other implementations, the data pieces 106a-106k may be one or more non-volatile storage devices. The data pieces 106a-106k may also be in the form of another computer-readable medium, such as a device in a storage area network or other configuration. The data pieces 106a-106k may be coupled to the coarse-to-fine conversion unit 104 using electrical, optical, or wireless connections. In some implementations, the data pieces 106a-106k may be part of the coarse-to-fine conversion unit 104.
[0016] The sparse-to-fine conversion unit 104 is configured to determine a dense matrix based on the sparse elements. In some implementations, the sparse-to-fine conversion unit 104 may be configured to determine the location of the sparse elements based on the dense matrix. In some implementations, the sparse-to-fine conversion unit 104 may include multiple interconnected sparse element access units, as described in more detail below with reference to Figures 2A-2D.
[0017] 2A illustrates an exemplary sparse-to-fine transform unit 200. The sparse-to-fine transform unit 200 may correspond to the sparse-to-fine transform unit 104. The sparse-to-fine transform unit 200 includes M×N sparse element access units X 1,1 ~X M,N, which are physically or logically arranged into M rows and N columns, where M and N are integers greater than or equal to 1. In some implementations, the sparse-to-fine conversion unit 200 may include additional circuitry configured to process data. In general, the sparse-to-fine conversion unit 200 receives a request for a dense matrix and accesses a sparse element access unit X 1,1 ~X M,N , and determining a dense matrix based on corresponding sparse elements accessible by the sparse element access unit. Generally, each sparse element access unit is configured to access a specified set of sparse elements, as described in more detail below with reference to Figures 3A-3B. In some implementations, the sparse element access unit may be a single instruction, multiple data (SIMD) processing unit.
[0018] In some implementations, a sparse element access unit X 1,1 ~X M,N may be physically or logically arranged in a two-dimensional mesh configuration. For example, sparse element access units X 1,1 is a sparse element access unit X 1,2 and X 2,1 As another example, the sparse element access unit X 2,2 is a sparse element access unit X 2,1 , X 3,1 , X 2,3 and X 1,2 The coupling between the two sparse element access units may be an electrical connection, an optical connection, a wireless connection or any other suitable connection.
[0019] In some other implementations, the sparse element access unit X 1,1 ~X M,N may be physically or logically arranged in a two-dimensional torus configuration. For example, the sparse element access units X 1,1 is a sparse element access unit X 1,2 , X 2,1 , X 1,N and X M,1 As another example, the sparse element access unit X M,N is a sparse element access unit XM,N-1 , X M-1,N , X M,1 and X 1,N is directly bonded to
[0020] In some implementations, the sparse-to-fine conversion unit 200 may be configured to convert the The sparse element access unit X may be configured to partition the sparse elements converted from the dense matrix. 1,1 ~X M,N Each row of the sparse element access unit 202 may be configured to access sparse elements converted from a particular dense matrix. For example, the sparse-to-dense conversion unit 200 may be configured to access sparse elements converted from dense matrices corresponding to 1,000 different database tables of a computer model, where one or more of the database tables may have different sizes. The first row 202 of the sparse element access unit may be configured to access sparse elements converted from database tables 1 through 100, the second row 204 of the sparse element access unit may be configured to access sparse elements converted from database tables 101 through 300, and the Mth row 206 of the sparse element access unit may be configured to access sparse elements converted from database tables 751 through 1,000. In some implementations, the partitioning may be configured by hardware instructions before a processor accesses the sparse elements using the sparse-to-dense conversion unit 200.
[0021] Sparse element access unit X 1,1 ~X M,N Each column of may be partitioned to access a subset of sparse elements converted from a particular dense matrix. For example, the dense matrix corresponding to database table 1 may be converted into 1,000 sparse elements, which are accessible by the first row 202 as described above. The sparse element access unit X 1,1 accesses sparse elements 1 to 200 of database table 1 and the sparse element access unit X1,2 is the database table The first sparse element access unit X may be configured to access sparse elements 201 through 500. As another example, a dense matrix corresponding to database table 2 may be converted into 500 sparse elements, and the 500 sparse elements may be accessed by the first row 202 as described above. 1,1 may be configured to access sparse elements 1 to 50 of database table 2, and sparse element access unit X 1,2 may be configured to access sparse elements 51 through 200 of database table 2. As another example, a dense matrix corresponding to database table 1,000 may be converted into 10,000 sparse elements, which are accessible by the Mth row 206 as described above. M,1 may be configured to access sparse elements 1 to 2,000 of database table 1,000, and the sparse element access unit X M,N may be configured to access sparse elements 9,000 to 10,000 of database table 1,000.
[0022] 2B shows an example of how the sparse-to-fine conversion unit 200 may request sparse elements using a two-dimensional mesh network of sparse element access units. As an example, the processing unit may execute an instruction to the sparse-to-fine conversion unit 200 to request a dense one-dimensional vector generated using sparse elements 1-50 of database table 1, sparse elements 100-200 of database table 2, and sparse elements 9,050-9,060 of database table 1,000. After receiving the request from the processing unit, the sparse-to-fine conversion unit 200 sends the request to the sparse element access unit X. 1、1 to broadcast a request for a sparse element to other sparse element access units in the mesh network. 1,1 is a sparse element access unit X 1,2 request 222 to the sparse element access unit X2,1 After receiving the request 222, the sparse element access unit X 1,2 sends request 226 to sparse element access unit X 1,3 In some implementations, a sparse element access unit may be configured to broadcast a request to other sparse element access units based on a routing scheme. For example, sparse element access unit X 1,2 is a sparse element access unit X 2,2 sparse element access unit X may not be configured to broadcast the request to 2,2 is a sparse element access unit X 2、1 The routing scheme can be static or For example, the routing scheme may be a lookup table. In some implementations, the sparse element access unit may be configured to broadcast the request 224 to other sparse element access units based on the request 224. For example, the request 224 may include an identification of the requested sparse element (e.g., database table 1, sparse elements 1-50), and the sparse element access unit X may 1,2 sends request 224 to sparse element access unit X 2,2 and / or sparse element access unit X 1,3 Based on the identification, the broadcasting process may propagate through the mesh network and determine whether to broadcast to the sparse element access unit X M,N is a sparse element access unit X M,N-1 Receives request 230 from.
[0023] 2C shows an example of how the sparse-to-fine conversion unit 200 may generate a requested dense matrix using a two-dimensional mesh network of sparse element access units. In some implementations, after a sparse element access unit receives a broadcast request, the sparse element access unit is configured to determine whether it is configured to access any of the requested sparse elements. For example, sparse element access unit X1,1 may determine that it is configured to access sparse elements 1-50 of database table 1, but not configured to access sparse elements 100-200 of database table 2 or sparse elements 9,050-9,060 of database table 1,000. In response to determining that it is configured to access sparse elements 1-50 of database table 1, sparse element access unit X 1,1 may fetch sparse elements 1 to 50 of database table 1 from the data fragment in which these sparse elements are stored, and generate a dense matrix 242 based on these sparse elements.
[0024] As another example, a sparse element access unit X 2,1 may determine that it is not configured to access any of sparse elements 1-50 of database table 1, sparse elements 100-200 of database table 2, or sparse elements 9,050-9,060 of database table 1,000. In response to determining that it is not configured to access any of the requested sparse elements, sparse element access unit X 2,1 may take no further action.
[0025] As another example, a sparse element access unit X 1,2 may determine that it is configured to access sparse elements 100-200 of database table 2, but not configured to access sparse elements 1-50 of database table 1 or sparse elements 9,050-9,060 of database table 1,000. In response to determining that it is configured to access sparse elements 100-200 of database table 2, sparse element access unit X 1,2may fetch these sparse elements from the data piece in which they are stored and generate a dense matrix 244 based on these sparse elements. In some implementations, after a sparse element access unit generates a dense matrix, the sparse element access unit may be configured to forward the dense matrix to the sender of the broadcast request. Here, the sparse element access unit X 1,2 is a dense matrix 244 in sparse element access unit X 1,1 Transfer to.
[0026] As another example, a sparse element access unit X M,N may determine that it is configured to access sparse elements 9,050 to 9,060 of database table 1,000, but is not configured to access sparse elements 1 to 50 of database table 1 or sparse elements 100 to 200 of database table 2. In response to determining that it is configured to access sparse elements 9,050 to 9,060 of database table 1,000, sparse element access unit X M,N may fetch these sparse elements from the data piece in which they are stored and generate a dense matrix 246 based on these sparse elements. In some implementations, a sparse element access unit may After generating the dense matrix, the sparse element access unit may be configured to forward the dense matrix to the sender of the broadcasted request. Here, the sparse element access unit X M,N is a dense matrix 246 in sparse element access unit X M,N-1 In the next cycle, the sparse element access unit X M,N-1 converts the dense matrix 246 into a sparse element access unit X M,N-1 This process is configured to transfer the sparse element access unit X 2,1 The dense matrix 246 is stored in the sparse element access unit X 1,1 This continues until the transfer is complete.
[0027] In some implementations, the sparse-to-dense conversion unit 200 is configured to convert dense matrices generated by the sparse element access unit to generate dense matrices for the processor unit. Here, the sparse-to-dense conversion unit 200 converts dense matrices 242, 244, and 246 into dense matrices for the processor unit. For example, dense matrix 242 may have dimensions of 100×10, dense matrix 244 may have dimensions of 20×100, and dense matrix 246 may have dimensions of 3×3. The sparse-to-dense conversion unit 200 may convert dense matrices 242, 244, and 246 into vectors with dimensions of 1×3009. Advantageously, row partitioning according to a dense matrix (e.g., a database table) allows the sparse-to-dense conversion unit 200 to obtain all requested sparse elements after the generated dense matrix propagates from column N to column 1. The column partitioning reduces bandwidth bottlenecks caused by accessing too many sparse elements using only one of the sparse element access units.
[0028] 2D shows an example of how the sparse-to-fine conversion unit 200 may update a sparse element based on a dense matrix using a two-dimensional mesh network of sparse element access units. As an example, the processing unit may execute an instruction requesting the sparse-to-fine conversion unit 200 to update a stored sparse element using a dense one-dimensional vector generated using sparse elements 1-50 of database table 1 and sparse elements 9,050-9,060 of database table 1,000. After receiving the request from the processing unit, the sparse-to-fine conversion unit 200 updates the sparse element based on a dense matrix using a two-dimensional mesh network of sparse element access units X. 1,1 may instruct the sparse element access unit X to broadcast a sparse element update request to other sparse element access units in the mesh network, and the sparse element update request may include a dense one-dimensional vector provided by the processing unit. In some implementations, the sparse element access unit X 1,1may determine whether it is assigned to access sparse elements contained in a dense one-dimensional vector. In response to determining that it is assigned to access sparse elements contained in a dense one-dimensional vector, 1,1 may update the sparse elements stored in the data fragment, where sparse element access unit X 1,1 determines that it is assigned to sparse elements 1 to 50 of database table 1, and assigns it to sparse element access unit X 1,1 executes instructions to update these sparse elements in the data piece.
[0029] Sparse element access unit X 1,1 is a sparse element access unit X 1,2 sparse element update request 252 to sparse element access unit X 2,1 After receiving the sparse element update request 252, the sparse element access unit X 1,2 may determine that it is not allocated to access sparse elements contained in a dense one-dimensional vector. 1,2 Request 256 to sparse element access unit X 1,3 The broadcasting process propagates through the mesh network and is transmitted to the sparse element access unit X M,N is a sparse element access unit X M,N-1 Here, a sparse element access unit X M,N determines that it is assigned to sparse elements 9,050 to 9,060 of database table 1,000, and assigns it to sparse element access unit X M、N executes instructions to update these sparse elements in the data piece.
[0030] 3A shows an example sparse element access unit 300. Sparse element access unit 300 is a sparse element access unit X 1,1 ~X M,N2B , the sparse element access unit 300 may be any one of the following: Generally, the sparse element access unit 300 is configured to receive a request 342 from the node network 320 to fetch sparse elements stored in one or more data pieces and convert the fetched sparse elements into a dense matrix. In some implementations, the processing unit 316 sends a request to a sparse element access unit in the node network 320 for a dense matrix generated using the sparse elements. The sparse element access unit may broadcast the request 342 to the sparse element access unit 300. Routing of the broadcasted request 342 may be similar to that described in FIG. 2B . The sparse element access unit 300 includes a request identification unit 302, a data fetching unit 304, a sparse reduction unit 306, a concatenation unit 308, a compression / decompression unit 310, and a segmentation unit 312. The node network 320 may be a two-dimensional mesh network. The processing unit 316 may be similar to the processing unit 102.
[0031] In general, the request identification unit 302 is configured to receive a request 342 to fetch a sparse element stored in one or more data pieces 330 and to determine whether the sparse element access unit 300 is assigned to access the sparse element indicated by the request 342. In some implementations, the request identification unit 302 may determine whether the sparse element access unit 300 is assigned to access the sparse element indicated by the request 342 by using a lookup table. If the identification of the particular requested sparse element (e.g., number 1 in database table 1) is included in the lookup table, the request identification unit 302 may send a signal 344 to the data fetch unit 304 to fetch the particular requested sparse element. If the identification of the particular requested sparse element (e.g., number 1 in database table 1) is not included in the lookup table, the request identification unit 302 may discard the received request. In some implementations, the request identification unit 302 may be configured to broadcast the received request to other sparse element access units on the node network 320.
[0032] The data fetch unit 304 is configured to fetch one or more requested sparse elements from the data pieces 330 in response to receiving the signal 344. In some implementations, the data fetch unit 304 includes one or more processors 322a-322k, where k is an integer. The processors 322a-322k may be vector processing units (VPUs), array processing units, or any suitable processing units. In some implementations, the processors 322a-322k are located near the data pieces 330 to reduce latency between the processors 322a-322k and the data pieces 330. Based on the number of requested sparse elements that the sparse element access unit 300 is assigned to fetch, the data fetch unit 304 may be configured to generate one or more requests to be distributed among the processors 322a-322k. In some implementations, each of the processors 322a-322k may be assigned to a particular sparse element based on the identification of the sparse element, and the data fetch unit 304 may be configured to generate one or more requests to the processors 322a-322k based on the identification of the sparse element. In some implementations, the data fetch unit 304 may determine the processor assignments by using a lookup table. In some implementations, the data fetch unit 304 may generate multiple batches for the processors 322a-322k, each batch being a request for a subset of the requested sparse elements. The processors 322a-322k are configured to independently fetch the assigned sparse elements from the data pieces 330 and forward the fetched sparse elements to the sparse reduction unit 306.
[0033] The sparse reduction unit 306 is configured to reduce the dimension of the fetched sparse elements 346. For example, each of the processors 322a-322k may generate a sparse element having a dimension of 100x1. The sparse reduction unit 306 generates a fetched sparse element having a dimension of 100xk. The sparse reduction unit 306 may receive the fetched sparse elements 346 and generate sparse reduced elements 348 by reducing the dimensions of the fetched sparse elements 346 to 100×1 by logical operations, arithmetic operations, or a combination of both. The sparse reduction unit 306 is configured to output the sparse reduced elements 348 to the concatenation unit 308.
[0034] The concatenation unit 308 is configured to rearrange and concatenate the sparse reduction elements 348 to generate a concatenated element 350. For example, the sparse element access unit X 1,1 may be configured to access sparse elements 1-200 of database table 1. Processor 322a may return fetched sparse element 10 to sparse reduction unit 306 earlier than processor 322b, which is configured to return fetched sparse element 5. Concatenation unit 308 is configured to rearrange the subsequently received sparse element 5 so that it is ordered before the earlier received sparse element 10, and to concatenate sparse elements 1-200 as concatenated element 350.
[0035] The compression / decompression unit 310 is configured to compress the concatenated elements 350 to generate a dense matrix 352 for the node network 320. For example, the compression / decompression unit 310 may be configured to compress zero values in the concatenated elements 350 to improve the bandwidth of the node network 320. In some implementations, the compression / decompression unit 310 may decompress a received dense matrix. For example, the sparse element access unit 300 may receive a dense matrix from a neighboring sparse element access unit via the node network 320. The sparse element access unit 300 may decompress the received dense matrix and concatenate the decompressed dense matrix with the concatenated elements 350 to form an updated concatenated element, which can be compressed and then output to the node network 320.
[0036] 3B shows an example of how the sparse element access unit 300 may update a sparse element based on a dense matrix received from the node network 320. As an example, the processing unit may execute an instruction to request the sparse-to-fine conversion unit to update a stored sparse element with a dense one-dimensional vector generated using sparse elements 1-50 of database table 1 and sparse elements 9,050-9,060 of database table 1,000. After receiving the request from the processing unit, the sparse-to-fine conversion unit may send a request 362 to instruct the sparse element access unit 300 to determine whether it is assigned to access a sparse element included in the dense one-dimensional vector. The request identification unit 302 is configured to determine whether the sparse element access unit 300 is assigned to access a sparse element included in the dense one-dimensional vector. In response to determining that the sparse element access unit 300 is assigned to access a sparse element contained in a dense one-dimensional vector, the request identification unit 302 may send an instruction 364 to the splitting unit 312 to update the sparse element stored in the data fragment.
[0037] The split unit 312 is configured to convert the received dense matrix into sparse elements that can be updated by the data fetch unit 304 in the data pieces 330. For example, the split unit 312 may be configured to convert a dense one-dimensional vector into multiple sparse elements and instruct the data fetch unit 304 to update the sparse elements stored in the data pieces 330 that the sparse element access unit 300 is assigned to fetch.
[0038] 4 is a flow chart illustrating an example of a process 400 for generating a dense matrix. The process 400 may be performed by a system such as the sparse-to-fine conversion unit 104 or the sparse-to-fine conversion unit 200. The system may include a first group of sparse element access units and a second group of sparse element access units. For example, referring to FIG. 2A, The dense transformation unit 200 includes M×N sparse element access units X 1,1 ~X M,N , which are physically or logically arranged in M rows and N columns. 1,1 ~X M,N Each row of x may be partitioned to access sparse elements to be transformed from a particular dense matrix. In some implementations, the first group of sparse element access units may include a first sparse element access unit and a second sparse element access unit. For example, the first row of sparse-to-dense transformation unit 200 may include sparse element access unit X 1,1 and X 1,2 In some implementations, the first group of sparse element access units and the second group of sparse element access units may be arranged in a two-dimensional mesh configuration. In some implementations, the first group of sparse element access units and the second group of sparse element access units may be arranged in a two-dimensional torus configuration.
[0039] The system receives 402 a request for an output matrix based on sparse elements, including sparse elements associated with a first dense matrix and sparse elements associated with a second dense matrix. For example, referring to FIG. 2B , the processing unit may execute instructions to the sparse-to-dense conversion unit 200 to request a dense, one-dimensional vector generated using sparse elements 1-50 of database table 1, sparse elements 100-200 of database table 2, and sparse elements 9,050-9,060 of database table 1,000.
[0040] In some implementations, a first sparse element access unit may receive a request for a plurality of sparse elements, including a sparse element associated with a first dense matrix and a sparse element associated with a second dense matrix. The first sparse element access unit may send the request to a second sparse element access unit. For example, referring to FIG. 2B , after receiving the request from the processing unit, the sparse-to-fine conversion unit 200 may access a sparse element access unit X 1、1to broadcast a request for a sparse element to other sparse element access units in the mesh network. 1、1 sends request 222 to sparse element access unit X 1、2 It may also be broadcast to
[0041] The system obtains sparse elements associated with the first dense matrix fetched by a first group of sparse element access units (404). In some implementations, the first sparse element access unit may determine that the identity of a particular sparse element of the plurality of sparse elements matches the identity of one of a first subset of sparse elements associated with the first dense matrix. For example, with reference to FIG. 2C , sparse element access unit X 1,1 may be configured to access sparse elements 1 to 200 of database table 1. 1,1 may determine that it is configured to access sparse elements 1-50 of database table 1, but not sparse elements 100-200 of database table 2 or sparse elements 9,050-9,060 of database table 1,000. In response to determining that the identity of a particular sparse element of the plurality of sparse elements matches the identity of one of the first subset of sparse elements associated with the first dense matrix, the first sparse element access unit may fetch the first subset of sparse elements associated with the first dense matrix that includes the particular sparse element. For example, in response to determining that it is configured to access sparse elements 1-50 of database table 1, sparse element access unit X 1,1 may fetch sparse elements 1 to 50 of database table 1 from the data fragment in which these sparse elements are stored.
[0042] A second sparse element access unit may fetch a second, different subset of sparse elements associated with the first dense matrix. For example, with reference to FIG. 2C, sparse element access unit X 1,2may be configured to access sparse elements 51-200 of database table 2. In response to determining that it is configured to access sparse elements 100-200 of database table 2, sparse element access unit X 1,2 teeth, These sparse elements may be fetched from the piece of data in which they are stored.
[0043] The system obtains sparse elements associated with the second dense matrix fetched by a second group of sparse element access units (406). For example, with reference to FIG. 2C, the second group sparse element access unit may be the Mth row of M×N sparse element access units, where sparse element access unit X M,N may be configured to access sparse elements numbered 9,000 to 10,000 of database table number 1,000. In response to determining that it is configured to access sparse elements numbered 9,050 to 9,060 of database table number 1,000, sparse element access unit X M,N may fetch these sparse elements from the data fragment in which they are stored and generate a dense matrix 246 based on these sparse elements.
[0044] In some implementations, a first sparse element access unit may fetch a first subset of sparse elements associated with the first dense matrix from a first piece of data, and a second sparse element access unit may fetch a second, different subset of sparse elements associated with the first dense matrix from a second, different piece of data. For example, with reference to FIG. 1 , a first sparse element access unit may fetch a first subset of sparse elements associated with the first dense matrix from data piece 106a, and a second sparse element access unit may fetch a second, different subset of sparse elements associated with the first dense matrix from data piece 106b.
[0045] The system converts the sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix to generate an output dense matrix that includes sparse elements associated with the first dense matrix and sparse elements associated with the second dense matrix (408). For example, with reference to FIG. 2C , sparse-to-dense conversion unit 200 may convert dense matrices 242, 244, and 246 into dense matrices for the processor unit.
[0046] In some implementations, the sparse elements associated with the first dense matrix and the sparse elements associated with the second dense matrix may be multidimensional matrices, and the output dense matrix may be a vector. For example, dense matrix 242 may have dimensions of 100×10, dense matrix 244 may have dimensions of 20×100, and dense matrix 246 may have dimensions of 3×3. Sparse-to-dense conversion unit 200 may convert dense matrices 242, 244, and 246 into vectors with dimensions of 1×3009.
[0047] 5 is a flow chart illustrating an example of a process 500 for generating a dense matrix. The process 500 may be performed by a system such as the sparse-to-fine transformation unit 104 or the sparse element access unit 300.
[0048] The system receives instructions for accessing a particular subset of sparse elements (502). For example, with reference to FIG. 3A , the data fetching unit 304 may be configured to receive a signal 344 to fetch one or more requested sparse elements from the data fragment 330. In some implementations, a request for a particular sparse element stored in one or more data fragments may be received over a node network. For example, with reference to FIG. 3A , the request identification unit 302 may be configured to receive a request 342 over the node network 320 to fetch a sparse element stored in the data fragment 330. The system may determine that the data fetching unit is assigned to handle the particular subset of sparse elements. For example, the request identification unit 302 may be configured to determine whether the sparse element access unit 300 is assigned to access the sparse element indicated by the request 342. In response to determining that the data fetching unit is assigned to handle the particular subset of sparse elements, the instructions may be generated for accessing the particular subset of sparse elements. For example, the identification of the particular requested sparse element (e.g., data fragment 330) may be configured to determine whether the sparse element access unit 300 is assigned to access the sparse element indicated by the request 342. If the database table number 1) is included in the lookup table, the request identification unit 302 may send a signal 344 to the data fetching unit 304 to fetch the specific requested sparse element.
[0049] The system determines 504 a processor assignment for fetching the particular subset of sparse elements based on the identification of the particular subset of sparse elements. For example, with reference to FIG. 3A , the data fetch unit 304 includes one or more processors 322 a-322 k. Each of the processors 322 a-322 k may be assigned to a particular sparse element based on the identification of the sparse element, and the data fetch unit 304 may be configured to generate one or more requests to the processors 322 a-322 k based on the identification of the sparse element. In some implementations, the system may determine that the system is assigned to handle the particular subset of sparse elements, including determining that the system is assigned to handle the particular subset of sparse elements based on a lookup table. For example, the data fetch unit 304 may determine the processor assignment by using the lookup table.
[0050] The system fetches, based on the specification and by a first processor of the plurality of processors, a first sparse element of the particular subset of sparse elements (506). For example, with reference to FIG. 3A, the data fetch unit 304 may instruct the processor 322a to fetch the sparse element included in the signal 344.
[0051] The system fetches 508, based on the designation and by a second processor of the plurality of processors, a second sparse element of the subset of sparse elements. For example, with reference to FIG. 3A, data fetch unit 304 may instruct processor 322b to fetch a different sparse element included in signal 344.
[0052] In some implementations, the system may receive a first matrix including first sparse elements from a first processor, where the first matrix may have a first dimension. The system may generate a second matrix including the first sparse elements, where the second matrix has a second dimension smaller than the first dimension. For example, the sparse reduction unit 306 may be configured to reduce the dimension of the fetched sparse elements 346. Each of the processors 322a through 322k may generate sparse elements having dimensions of 100×1. The sparse reduction unit 306 may receive the fetched sparse elements 346 having dimensions of 100×k and generate the sparse reduced elements 348 by reducing the dimensions of the fetched sparse elements 346 to 100×1 using logical operations, arithmetic operations, or a combination of both. The system may generate an output dense matrix, where the output dense matrix may be generated based on the second matrix. For example, the concatenation unit 308 may be configured to rearrange and concatenate the sparse reduction elements 348 to generate concatenated elements 350 .
[0053] In some implementations, the first sparse element may be received at a first point in time, and the second sparse element may be received at a second, different point in time. The system may determine the order of the first and second sparse elements for the output dense matrix. For example, with reference to FIG. 3A , processor 322a may return fetched sparse element #10 to sparse reduction unit 306 earlier than processor 322b, which is configured to return fetched sparse element #5. Concatenation unit 308 is configured to rearrange the subsequently received sparse element #5 so that it is ordered before the earlier received sparse element #10, and to concatenate sparse elements #1 through #200 as concatenated element 350.
[0054] The system generates 510 an output dense matrix based on a transformation applied to at least the first sparse element and the second sparse element. In some implementations, the system may compress the output dense matrix to generate a compressed output dense matrix. The system may provide the compressed output dense matrix to a node network. For example, the compression / decompression unit 310 may The elements 350 may be configured to be compressed to generate a dense matrix 352 for the node network 320 .
[0055] In some implementations, the system may receive a first dense matrix representing a dense matrix to be transmitted over the node network and may generate an output dense matrix based on the first dense matrix, the first sparse element, and the second sparse element. For example, the sparse element access unit 300 may receive a dense matrix from a neighboring sparse element access unit via the node network 320. The sparse element access unit 300 may decompress the received dense matrix and concatenate the decompressed dense matrix with the concatenated element 350 to form updated concatenated elements, which may be compressed and then output to the node network 320.
[0056] In some implementations, one or more of the sparse elements of a particular sparse element is a multidimensional matrix, and the output dense matrix is a vector. Embodiments of the subject matter and functional operations described herein may be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer software including the structures disclosed herein and their structural equivalents, or one or more combinations thereof. Embodiments of the subject matter described herein may be implemented as one or more computer programs, i.e., as one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by or to control the operation of a data processing apparatus. Alternatively, or in addition, the program instructions may be encoded on an artificially generated, propagated signal, such as, for example, a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to a receiving device suitable for execution by the data processing apparatus. The computer storage medium may be a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory device, or one or more combinations thereof.
[0057] The term "data processing apparatus" encompasses all kinds of apparatus, devices, and machines for processing data, including, by way of example, a programmable processor, a computer, or multiple processors or computers. Such apparatus may include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, such apparatus may further include code that creates an execution environment for the computer program, such as code comprising processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof.
[0058] A computer program (which may also be referred to as or described as a program, software, software application, module, software module, script, or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and may be deployed in any form, whether as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in a single file dedicated to that program, or in multiple coordinated files (e.g., one or more files of code). The computer program may be deployed to run on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communications network. obtain.
[0059] The processes and logic flows described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may be implemented as special purpose logic circuitry such as, for example, an FPGA (field programmable gate array), an ASIC (application specific integrated circuit), or as a GPGPU (general purpose graphics processing unit).
[0060] A processor suitable for executing a computer program may be based, for example, on a general-purpose microprocessor, a special-purpose microprocessor, or both, or on any type of central processing unit. Generally, the central processing unit receives instructions and data from a read-only memory, a random-access memory, or both. The essential elements of a computer are a central processing unit for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer also includes one or more mass storage devices for storing data, such as magnetic, magneto-optical, or optical disks, or is operatively coupled to receive or transfer data from or to the one or more mass storage devices, or both. However, a computer need not have such devices. Furthermore, a computer may be embedded in another device, such as, for example, a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive).
[0061] Computer-readable media suitable for storing computer program instructions and data include, by way of example, all forms of non-volatile memory, media, and memory devices, including, by way of example, semiconductor memory devices such as, for example, EPROM, EEPROM, and flash memory elements, magnetic disks such as, for example, internal hard disks or removable disks, magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[0062] To provide for interaction with a user, embodiments of the subject matter described herein may be implemented on a computer having a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to a user, and a keyboard and pointing device, such as a mouse or trackball, by which a user can provide input to the computer. Other types of devices may be used to provide for interaction with a user as well; for example, feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; input from the user may be received in any form, including acoustic input, voice input, or tactile input. Additionally, a computer may interact with a user by sending documents to and receiving documents from a device used by the user, for example, by sending a web page to a web browser on a user's client device in response to a request received from the web browser.
[0063] Embodiments of the subject matter described herein may be implemented in a computing system that includes a back-end component, e.g., a data server, or may be implemented in a computing system that includes a middleware component, e.g., an application server, or may be implemented in a graphics system that allows a user to interact with an implementation of the subject matter described herein. The system may be implemented in a computing system that includes a front-end component, such as a client computer having a digital user interface or web browser, or in any combination of one or more such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication, such as a communication network. Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), such as the Internet.
[0064] A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
[0065] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of possible features specific to particular embodiments of particular inventions. Certain features described herein in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, while features may be described above as operative in a combination and initially claimed as such, one or more features of a claimed combination may in some cases be deleted from the combination, and the claimed combination may relate to a subcombination or a variation of a subcombination.
[0066] Similarly, while operations are shown in a particular order in the figures, it should not be understood that such operations need to be performed in the particular order shown, or sequential order, or that all of the shown operations need to be performed, to achieve desirable results. In some situations, multitasking and parallel processing may be advantageous. Furthermore, it should be understood that the separation of various system modules and components in the above-described embodiments does not require such separation in all embodiments, and that the described program components and systems may generally be integrated together in a single software product or packaged into multiple software products.
[0067] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. By way of example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous. [Explanation of symbols]
[0068] 100 computing system, 102 processing unit, 104 sparse-to-dense conversion unit, 106a to 106k data pieces, 200 sparse-to-dense conversion unit, 300 sparse element access unit, 302 request identification unit, 304 data fetch unit, 306 sparse reduction unit, 308 concatenation unit, 310 compression / decompression unit, 312 division unit, 330 data pieces, 320 node network, 322a to 322k processors.
Claims
1. 1. A system for converting data elements into matrices, comprising: a plurality of data element accessing units physically or logically arranged in rows and columns, each data element accessing unit of the plurality of data element accessing units including a corresponding plurality of processors, each row or each column of the plurality of data element accessing units being partitioned for accessing data elements to be transformed from a dense matrix, each data element accessing unit comprising: Receive each control signal, accessing a plurality of data elements among a plurality of data elements corresponding to the data element accessing unit based on the respective control signals; generating an output matrix based on the plurality of data elements obtained from the plurality of data elements corresponding to the data element access unit; configured to output the output matrix to another component of the system; accessing a plurality of data elements of the plurality of data elements includes accessing a subset of data elements transformed from a dense matrix; a subset of data elements accessed by a first data element accessing unit of the plurality of data element accessing units that is different from a subset of data elements accessed by a second data element accessing unit of the plurality of data element accessing units.
2. a coarse-to-fine conversion unit configured to receive instructions corresponding to the respective control signals; The system of claim 1 , wherein the plurality of data element access units are located in the coarse-to-fine conversion unit.
3. The system of claim 2 , wherein the sparse-to-dense transform unit is a multidimensional sparse-to-dense transform unit including a row dimension and a column dimension.
4. The system of claim 3 , wherein the plurality of data element access units are arranged along respective dimensions of the multidimensional coarse-dense transformation unit.
5. 3. The system of claim 2, wherein each data element accessing unit includes a respective first unit configured to apply a transform to the plurality of data elements to generate the output matrix.
6. each first unit is a linkage unit; The system of claim 5 , wherein the transformation is based on a concatenation operation.
7. each first unit is a compression / decompression unit; The system of claim 5 , wherein the transformation is based on an operation that compresses the plurality of data elements.
8. 1. A method for converting elements into a matrix using a system comprising a plurality of data element accessing units physically or logically arranged in rows and columns, each data element accessing unit of the plurality of data element accessing units including a corresponding plurality of processors, each row or each column of the plurality of data element accessing units being partitioned for accessing data elements to be converted from a dense matrix, the method comprising: a first data element accessing unit receiving a control signal; accessing, by the first data element accessing unit, a plurality of data elements among a plurality of data elements corresponding to the first data element accessing unit based on the control signal; generating an output matrix based on the plurality of data elements obtained from the plurality of data elements corresponding to the first data element access unit; providing the output matrix to another component of the system; accessing the plurality of data elements comprises accessing a subset of data elements transformed from a dense matrix; 10. A method according to claim 9, wherein a subset of data elements accessed by a first data element accessing unit of said plurality of data element accessing units is different from a subset of data elements accessed by a second data element accessing unit of said plurality of data element accessing units.
9. The system includes a coarse-to-fine conversion unit configured to receive instructions; the plurality of data element access units are located in the coarse-to-fine conversion unit; 9. The method of claim 8, further comprising the coarse-to-fine conversion unit receiving an instruction corresponding to the control signal for the first data element accessing unit.
10. The method of claim 9 , wherein the sparse-to-dense transform unit is a multidimensional sparse-to-dense transform unit including a row dimension and a column dimension.
11. The method of claim 10 , wherein the plurality of data element access units are arranged along respective dimensions of the multidimensional sparse-to-dense transform unit.
12. each of the plurality of data element accessing units includes a respective first unit configured to transform a data element; 10. The method of claim 9, wherein the method further comprises the respective first ones of the first data element accessing units applying a transform to the plurality of data elements to generate the output matrix.
13. each first unit is a linkage unit; Applying the transformation applying a concatenation operation to the plurality of data elements; and concatenating the plurality of data elements based on the concatenation operation to generate the output matrix.
14. each first unit is a compression / decompression unit; Applying the transformation applying a compression operation to the plurality of data elements; and compressing the plurality of data elements based on the compression operation to generate the output matrix.
15. A program for causing a system to execute the method according to any one of claims 8 to 14.
Citation Information
Patent Citations
Computer system
JP1994052125A
class network routing
JP2004533035A
Program, parallel operation method, and information processor
JP2014199545A
Sparse matrix data structure
US20150067009A1