A Cholesky Decomposition Acceleration Method and System Based on Dataflow Architecture

By employing a Cholesky decomposition method based on a dataflow architecture, and optimizing data transfer between PE groups through iterative splitting and COPY instructions, the problem of CPU and GPU library function dependencies in existing technologies is solved, improving computational performance and resource utilization, and achieving more efficient Cholesky decomposition computation.

CN115391731BActive Publication Date: 2026-03-10INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the computational process of Cholesky decomposition is highly dependent on CPU and GPU library functions, which limits the computational process. Furthermore, the REVEL architecture is complex, wastes resources significantly, and has poor versatility.

Method used

The Cholesky decomposition method based on data flow architecture is adopted to divide the processing unit PE array into multiple PE groups. Irregular matrices are divided into regular matrix blocks through iterative splitting. Data transfer between PE groups is realized by using the COPY instruction, the matrix size is dynamically adjusted, memory access overhead is reduced, and the utilization rate of components is improved.

Benefits of technology

It achieves higher component utilization and computational efficiency, avoids resource waste, improves computing performance and architectural versatility, and reduces memory access overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115391731B_ABST
    Figure CN115391731B_ABST
Patent Text Reader

Abstract

This application discloses an accelerated Cholesky decomposition calculation method based on a dataflow architecture. The method includes: a data preparation step, a 2×2 matrix block calculation step, and a 1×1 matrix block calculation step. The dataflow architecture divides the processing unit (PE) array into multiple PE groups. The irregular matrix to be calculated is divided into multiple regular matrix blocks according to a predetermined partitioning rule. If the N of the N×N matrix to be calculated is greater than a predetermined threshold, a 2×2 block-based Cholesky splitting algorithm is used to iteratively calculate the matrix blocks in each PE group. Data transfer between PE groups is achieved through the data dependency relationship between different PE groups on the Cholesky decomposition calculation, and the size of the matrix to be calculated is dynamically adjusted and reduced. If the N of the N×N matrix to be calculated is less than or equal to a predetermined threshold, a 1×1 block-based Cholesky splitting algorithm is used to iteratively calculate until the calculation is completed and the calculation result is output, thus completing the accelerated Cholesky decomposition calculation based on the dataflow architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer architecture, and in particular to a Cholesky decomposition acceleration method and system based on a dataflow architecture. Background Technology

[0002] Currently, with the continuous development of application scenarios and computing technologies, matrix decomposition is widely used in scientific computing and engineering models. Among them, Cholesky decomposition decomposes a positive definite matrix into the product of a lower triangular matrix and its conjugate transpose. It is a fundamental decomposition problem in matrix operations and is often used to solve linear equation systems with symmetric positive definite coefficient matrices.

[0003] To improve the computational performance of Cholesky decomposition, various optimization methods, including scheduling schemes, multi-core designs, and accelerator architectures, have been proposed in recent years. This study presents a hybrid parallel algorithm based on Volkov computation of Cholesky decomposition, proposing a three-stage CPU-GPU hybrid scheduling scheme. This scheme optimizes the load balancing of the CPU and GPU hybrid computation process for Cholesky decomposition, achieving good performance on the CUDA platform.

[0004] Another study designed a new GPU core that improved the computational efficiency of Cholesky decomposition by optimizing the allocation of shared memory among multiple cores within the GPU, increasing data reuse, and reducing memory access overhead. REVEL designed a pulse-dataflow hybrid architecture based on matrix induction algorithms (including Cholesky decomposition), achieving a good balance between performance, power consumption, and functional flexibility.

[0005] However, existing three-stage CPU-GPU hybrid scheduling schemes rely on library functions within the CPU and GPU for implementation and are limited to running on GPUs manufactured by NVIDIA, resulting in poor flexibility. Furthermore, this scheme sacrifices some GPU performance to achieve load balancing between the GPU and CPU, thus leading to low utilization of the GPU's high-speed local memory.

[0006] Furthermore, the new high-performance GPU cores rely on shared memory for multi-core data interaction, which increases memory access overhead, data maintenance complexity, and power consumption compared to direct data transfer between cores.

[0007] Meanwhile, REVEL is a pulse-dataflow hybrid architecture based on inductive matrix algorithms, which is relatively complex in design and application. Furthermore, this architecture focuses on accelerating irregular inductive matrix operations with high data dependence, making it unsuitable for general-purpose computing and resulting in resource waste when deploying general-purpose computing.

[0008] Therefore, there is an urgent need to propose a novel Cholesky decomposition acceleration method based on a dataflow architecture. This method can solve the problem that the existing three-stage CPU-GPU hybrid algorithm relies heavily on CPU and GPU library functions, requiring computation to be performed on both CPU and GPU, thus limiting the computation process. It can also address the shortcomings of the REVEL architecture. Summary of the Invention

[0009] This application provides a Cholesky decomposition acceleration computation method based on a dataflow architecture, which can solve the problem that the existing three-stage CPU-GPU hybrid algorithm relies heavily on CPU and GPU library functions, and needs to rely on relevant library functions on the CPU and GPU respectively to complete the computation, thus limiting the computation process. At the same time, it can also solve the defects of the REVEL architecture.

[0010] In a first aspect, embodiments of this application provide a method for accelerating Cholesky decomposition based on a dataflow architecture, the method comprising:

[0011] Data preparation steps: Initialize each unit in the data flow architecture, divide the processing unit (PE) array in the data flow architecture into multiple PE groups, divide the irregular matrix to be calculated into multiple regular matrix blocks according to the predetermined partitioning rules, and each PE group downloads the corresponding matrix block data to complete the preparation of Cholesky decomposition calculation data.

[0012] The 2×2 block calculation steps of the matrix are as follows: If N of the matrix to be calculated is greater than a predetermined threshold, the Cholesky splitting algorithm based on 2×2 block is adopted to iteratively calculate the matrix blocks in each PE group. Data transfer between PE groups is realized through the data dependency relationship between different PE groups on the Cholesky decomposition calculation, and the size of the matrix to be calculated is dynamically adjusted and continuously reduced.

[0013] The 1×1 block calculation steps are as follows: If N is less than or equal to a predetermined threshold for the matrix to be calculated with a size of N×N, the Cholesky decomposition algorithm based on 1×1 block is adopted. Based on the data transfer between PE groups and the data transfer within PE groups, the remaining matrix blocks of the matrix to be calculated are iteratively calculated until the calculation is completed and the calculation result is output, thus completing the accelerated calculation of Cholesky decomposition based on the data flow architecture.

[0014] Preferably, the above data preparation steps include:

[0015] PE array grouping steps: Divide the PE array into multiple PE groups, including: G(0,0), G(0,1), G(1,0), G(1,1)..., G(0,y), G(x,0), G(x,y);

[0016] Matrix block partitioning steps: The matrix A to be calculated with size N×N is partitioned into: A11(2×2), A21((N-2)×2), A12(2×(N-2)), A22((N-2)×(N-2)), which corresponds to the matrix L(N×N) after Cholesky decomposition. Each block is: L11(2×2), L21((N-2)×2), L12 is the transpose of L21 block, and L22((N-2)×(N-2)).

[0017] Preferably, the above-mentioned 2×2 matrix block calculation step further includes:

[0018] 2×2 block decomposition, first step: G(0,0) calculates the decomposed matrix L11 and its inverse L11. -1 ;

[0019] The second step of 2×2 block partitioning: G(0,0) passes computation dependency data to G(0,y) and G(x,0), and G(0,y) and G(x,0) calculate L12 and L21;

[0020] The third step of 2×2 block division: G(0,y) and G(x,0) pass computation-dependent data to G(x,y) step by step, complete the intra-group computation of G(0,y), G(x,0) and G(x,y), and pass back the iterative data from G(x,y) to G(0,0);

[0021] The fourth step of 2×2 block partitioning: Iterative data from G(x,y) back to G(0,y) and G(x,0).

[0022] Preferably, the above-mentioned 1×1 matrix block calculation step further includes:

[0023] The first step of 1×1 block partitioning: Calculate the corresponding L11 and its inverse L11 for G(0,0) and G(x,0) respectively. -1 ;

[0024] The second step of 1×1 block decomposition: G(0,0) and G(x,0) pass computational dependency data to G(0,y) and G(x,y) respectively. G(0,y) and G(x,y) calculate the corresponding L21 and L12, update the matrix to be decomposed A', and return the data required for iteration to G(0,0) and G(x,0).

[0025] Secondly, embodiments of this application provide a Cholesky decomposition acceleration computing system based on a dataflow architecture, employing the above-described Cholesky decomposition acceleration computing method based on a dataflow architecture. The system includes:

[0026] Data preparation module: Initializes each unit in the data flow architecture, divides the processing unit PE array in the data flow architecture into multiple PE groups, divides the irregular matrix to be calculated into multiple regular matrix blocks according to the predetermined partitioning rules, and each PE group downloads the corresponding matrix block to complete the preparation of Cholesky decomposition calculation data.

[0027] Matrix 2×2 block calculation module: If the N of the matrix to be calculated is greater than a predetermined threshold, the Cholesky splitting algorithm based on 2×2 block is adopted to iteratively calculate the matrix blocks in each PE group. Data transfer between PE groups is realized through the data dependency relationship of different PE groups on Cholesky decomposition calculation, and the size of the matrix to be calculated is dynamically adjusted to continuously reduce the size.

[0028] The 1×1 block calculation module determines if N of the N×N matrix to be calculated is less than or equal to a predetermined threshold. It then uses the Cholesky decomposition algorithm based on 1×1 blocks, and performs iterative calculation of the remaining matrix blocks of the matrix to be calculated based on data transfer between PE groups and within PE groups, until the calculation is completed and the calculation result is output, thus completing the accelerated calculation of Cholesky decomposition based on the data flow architecture.

[0029] Preferably, the data preparation module includes:

[0030] PE array grouping module: Groups the PE array into multiple PE groups, including: G(0,0), G(0,1), G(1,0), G(1,1)..., G(0,y), G(x,0), G(x,y);

[0031] Matrix block partitioning module: The matrix A to be calculated with a size of N×N is divided into: A11(2×2), A21((N-2)×2), A12(2×(N-2)), A22((N-2)×(N-2)), which corresponds to the matrix L(N×N) after Cholesky decomposition. Each block is: L11(2×2), L21((N-2)×2), L12 is the transpose of L21 block, and L22((N-2)×(N-2)).

[0032] Preferably, the above-mentioned 2×2 matrix block calculation module further includes:

[0033] 2×2 block decomposition, first module: G(0,0) calculates the decomposed matrix L11 of the matrix to be calculated and the inverse L11 of L11. -1 ;

[0034] 2×2 block second module: G(0,0) passes computation dependency data to G(0,y) and G(x,0), and G(0,y) and G(x,0) calculate L12 and L21;

[0035] The third module of 2×2 block division: step-by-step transfer of computational dependency data from G(0,y) and G(x,0) to G(x,y), completes the intra-group computation of G(0,y), G(x,0) and G(x,y), and iterative data back from G(x,y) to G(0,0);

[0036] 2×2 block fourth module: Iterative data backpropagation from G(x,y) to G(0,y) and G(x,0).

[0037] Preferably, the above-mentioned 1×1 matrix block calculation module further includes:

[0038] 1×1 block first module: G(0,0) and G(x,0) respectively calculate the corresponding L11 and its inverse L11. -1 ;

[0039] The second module of 1×1 block: G(0,0) and G(x,0) pass computational dependency data to G(0,y) and G(x,y) respectively. G(0,y) and G(x,y) calculate the corresponding L21 and L12 respectively, update the matrix to be decomposed A', and return the data required for iteration to G(0,0) and G(x,0).

[0040] Thirdly, embodiments of this application provide a processing unit PE, which, when executing the computer program, implements the Cholesky decomposition acceleration computation method based on a data flow architecture as described above.

[0041] Fourthly, embodiments of this application provide a dataflow architecture, including a processing unit PE and a computer program stored on the processing unit PE and executable on the processing unit PE. When the processing unit PE executes the computer program, it implements the Cholesky decomposition acceleration computation method based on the dataflow architecture as described above.

[0042] Compared with existing technologies, it has the following outstanding advantages:

[0043] 1. This invention proposes a Cholesky computation method based on iterative decomposition; by iterative decomposition, the original irregular computation is transformed into a certain degree of regular computation, and the data computation within the PE masks the data loading and transmission overhead between PEs, thereby achieving higher component utilization.

[0044] 2. This invention proposes a method for dynamically adjusting the Cholesky splitting scheme based on the matrix size; by dynamically adjusting the splitting scheme according to the size of the matrix to be calculated, the load balancing of calculations among PE groups is achieved, resource waste is avoided, and the overall component utilization rate is improved.

[0045] 3. This invention proposes a data transfer method between PE groups based on Cholesky computation using a data flow structure; data transfer between PE groups is achieved through the COPY instruction, and the data transfer between groups is completed according to the data dependencies of different PE groups on Cholesky computation. Attached Figure Description

[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0047] Figure 1 This is a flowchart of the accelerated computation method for Cholesky decomposition based on a dataflow architecture according to the present invention.

[0048] Figure 2 A conceptual diagram of Cholesky's updated block computing technology;

[0049] Figure 3 This is a schematic diagram of the data flow architecture used in this invention;

[0050] Figure 4 This is a flowchart of the scheduling process based on the block-based Cholesky iterative splitting algorithm of this invention.

[0051] Figure 5 This is a flowchart illustrating the calculation process of the Cholesky iterative partitioning based on 2×2 blocks in this invention.

[0052] Figure 6 This is a flowchart illustrating the calculation process of the Cholesky iterative partitioning based on 1×1 blocks in this invention.

[0053] Figures 7a-7b A schematic diagram of the variables used in the Cholesky decomposition calculation process for a 16×16 matrix of the present invention;

[0054] Figures 8a-8b This is a schematic diagram of data transmission and matrix partitioning between PEs based on the 2×2 block-based Cholesky iterative splitting calculation of the present invention;

[0055] Figures 9a-9b This is a schematic diagram of data transmission and matrix partitioning between PEs based on the Cholesky iterative splitting calculation using 1×1 blocks;

[0056] Figure 10 This is a schematic diagram of the Cholesky decomposition acceleration computing system based on a dataflow architecture according to the present invention.

[0057] In the above image:

[0058] 10 Data Preparation Module; 20 Matrix 2×2 Block Calculation Module

[0059] 30-matrix 1×1 block calculation module. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0061] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0062] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent.

[0063] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0064] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0065] This invention aims to address the problems of low flexibility, high data sharing overhead between multi-core processors, and low processor versatility due to excessive coupling with algorithms in existing technologies. Based on a more general dataflow architecture, this invention proposes a Cholesky decomposition method and a data transfer method between Processing Entities (PEs). By iteratively splitting the Cholesky decomposition, the original irregular computation is transformed into a degree of regular computation. Data computation within each PE masks the data loading and transfer overhead between PEs. Simultaneously, the splitting scheme is dynamically adjusted according to the size of the matrix to be decomposed, achieving load balancing between PEs. Ultimately, while ensuring architectural versatility, this improves component utilization, thereby enhancing the computational performance of the Cholesky algorithm.

[0066] In its research on optimizing and accelerating Cholesky decomposition based on a relatively general dataflow architecture, this application found that the three-stage CPU-GPU hybrid algorithm heavily relies on CPU and GPU library functions. It requires separate computations on both the CPU and GPU, limiting optimization to data transfer and algorithm scheduling between the CPU and GPU. This results in limited optimization space, low flexibility, and restricted applicability. This research, based on a dataflow accelerator with a simple instruction set architecture, does not rely on existing library functions. It enables more refined iterative decomposition of the Cholesky algorithm and dynamically adjusts the block size in the block-based Cholesky decomposition algorithm according to the size of the matrix to be computed, maintaining load balance and high component utilization of the processing units.

[0067] During the research, this application discovered that the shortcomings of the new GPU core designed to improve the efficiency of Cholesky computation stemmed from the use of shared memory for data interaction between multiple cores. The Cholesky computation process requires data interaction between cores, and shared iteration depends on data. Although the new GPU core can reduce memory accesses by allocating optimal shared memory and improving data reuse, memory access load and storage maintenance still incur significant overhead. To address this issue, this research employs inter-core data transfer instead of establishing shared memory for data interaction. Data flow between processing units is achieved through the COPY instruction, replacing unnecessary data accesses and reducing memory access overhead. Furthermore, by iteratively decomposing the Cholesky algorithm, data computation within processing units masks the data loading and transfer overhead between processing units, thereby improving component utilization.

[0068] During the research process, this application discovered that the shortcomings of the REVEL architecture stemmed from its high coupling with the inductive matrix algorithm. This research is based on a more general dataflow architecture, aiming to ensure the architecture's versatility while implementing the Cholesky algorithm. Therefore, this research iteratively decomposes the Cholesky algorithm, transforming the original irregular computation into a degree of regular computation. This approach maintains the original versatility of the architecture and also facilitates the hardware implementation, data placement, and data transmission of the Cholesky algorithm.

[0069] like Figure 1 As shown, this invention provides a method for accelerating Cholesky decomposition based on a dataflow architecture, the method comprising:

[0070] Data preparation step S10: Initialize each unit in the data flow architecture, divide the processing unit PE array in the data flow architecture into multiple PE groups, divide the irregular matrix to be calculated into multiple regular matrix blocks according to the predetermined partitioning rules, and each PE group downloads the corresponding matrix block data to complete the preparation of Cholesky decomposition calculation data.

[0071] Matrix 2×2 block calculation step S20: If the N of the matrix to be calculated with a size of N×N is greater than a predetermined threshold, then the Cholesky splitting algorithm based on 2×2 block is adopted to iteratively calculate the matrix blocks in each PE group. Through the data dependency relationship between different PE groups on the Cholesky decomposition calculation, data transfer between PE groups is realized, and the size of the matrix to be calculated is dynamically adjusted and continuously reduced.

[0072] Matrix 1×1 block calculation step S30: Determine if N of the matrix to be calculated is less than or equal to a predetermined threshold, and use the Cholesky decomposition algorithm based on 1×1 block decomposition. Based on data transfer between PE groups and data transfer within PE groups, perform iterative calculation of the remaining matrix blocks of the matrix to be calculated until the calculation is completed and the calculation result is output, thus completing the accelerated calculation of Cholesky decomposition based on data flow architecture.

[0073] Preferably, the data preparation step S10 includes:

[0074] PE array grouping steps: Divide the PE array into multiple PE groups, including: G(0,0), G(0,1), G(1,0), G(1,1)..., G(0,y), G(x,0), G(x,y);

[0075] Matrix block partitioning steps: The matrix A to be calculated with size N×N is partitioned into: A11(2×2), A21((N-2)×2), A12(2×(N-2)), A22((N-2)×(N-2)), which corresponds to the matrix L(N×N) after Cholesky decomposition. Each block is: L11(2×2), L21((N-2)×2), L12 is the transpose of L21 block, and L22((N-2)×(N-2)).

[0076] Preferably, the above-mentioned 2×2 matrix block calculation step S20 further includes:

[0077] 2×2 block decomposition, first step: G(0,0) calculates the decomposed matrix L11 and its inverse L11. -1 ;

[0078] The second step of 2×2 block partitioning: G(0,0) passes computation dependency data to G(0,y) and G(x,0), and G(0,y) and G(x,0) calculate L12 and L21;

[0079] The third step of 2×2 block division: G(0,y) and G(x,0) pass computation-dependent data to G(x,y) step by step, complete the intra-group computation of G(0,y), G(x,0) and G(x,y), and pass back the iterative data from G(x,y) to G(0,0);

[0080] The fourth step of 2×2 block partitioning: Iterative data from G(x,y) back to G(0,y) and G(x,0).

[0081] Preferably, the above-mentioned 1×1 matrix block calculation step S30 further includes:

[0082] The first step of 1×1 block partitioning: Calculate the corresponding L11 and its inverse L11 for G(0,0) and G(x,0) respectively. -1 ;

[0083] The second step of 1×1 block decomposition: G(0,0) and G(x,0) pass computational dependency data to G(0,y) and G(x,y) respectively. G(0,y) and G(x,y) calculate the corresponding L21 and L12, update the matrix to be decomposed A', and return the data required for iteration to G(0,0) and G(x,0).

[0084] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings:

[0085] This invention proposes a Cholesky computation method based on iterative decomposition; by iteratively decomposing, the original irregular computation is transformed into a certain degree of regular computation, and the data computation within the PE masks the data loading and transmission overhead between PEs, thereby achieving higher component utilization.

[0086] The Cholesky decomposition method based on iterative partitioning proposed in this invention improves upon existing update-based block computation (such as...). Figure 2 Based on the above, the iterative process was broken down into more detailed steps (as shown in the figure). Figure 7b , Figure 8b (As shown). Through the intra-group calculations and inter-group interactions of 4 groups of PEG(0,0), G(0,1), G(1,0), and G(1,1), the iterative steps are executed in a loop to finally complete the Cholesky decomposition.

[0087] This invention proposes a method for dynamically adjusting the Cholesky splitting scheme based on the matrix size; by dynamically adjusting the splitting scheme according to the size of the matrix to be calculated, load balancing of calculations among PE groups is achieved, resource waste is avoided, and the overall component utilization rate is improved.

[0088] The Cholesky partitioning scheme proposed in this invention dynamically adjusts the size of the matrix to be computed. For matrices of size N×N, where N>4, a 2×2 block-based Cholesky partitioning algorithm is used, and the size of the matrix is ​​continuously reduced through iterative calculation. When the size of the matrix to be computed (or the initial matrix size) is N×N, where N≤4, a 1×1 block-based Cholesky partitioning algorithm is used for iterative calculation. Dynamically adjusting the Cholesky partitioning scheme according to the matrix size can achieve computational load balancing among PE groups while ensuring component utilization. In a specific embodiment of this invention, a predetermined threshold of 4 is set, but this invention is not limited to this and other predetermined thresholds can be set.

[0089] This invention proposes a data transfer method between PE groups based on Cholesky computation with a data flow structure; data transfer between PE groups is achieved through the COPY instruction, and the data transfer between groups is completed according to the data dependency relationship of different PE groups on Cholesky computation.

[0090] This invention achieves the sharing of computationally dependent data between PE groups through the COPY instruction, saving the overhead of PE memory access and storage maintenance compared to using shared storage. Taking step three of the Cholesky partitioning algorithm based on 2×2 blocks as an example... Figure 8a and 8b As shown, after G(0,1) and G(1,0) complete the calculation of data ①, they pass data ① to G(1,1) via the COPY instruction. After the transfer is completed, G(1,1) calculates the updated matrix to be decomposed A11' while G(0,1) and G(1,0) calculate data ②. Similarly, after G(0,1) and G(1,0) complete the calculation of data ②, they pass data ② to G(1,1) via the COPY instruction. After the transfer is completed, G(1,1) calculates the updated matrix to be decomposed A22' while G(0,1) and G(1,0) calculate A12' and A21' respectively. During the execution process, the flow of data between PE groups replaces unnecessary memory access interactions with on-chip memory, reducing memory access overhead.

[0091] In a specific embodiment of the present invention, the present invention is based on a relatively general data flow architecture, which iteratively splits the update-type block Cholesky decomposition, realizes the speed measurement of the Cholesky decomposition operation process, and increases the versatility of the data flow architecture chip.

[0092] The data flow architecture used in this invention is as follows: Figure 3As shown, it mainly includes an ARM core, main memory (Mem), direct memory access (DMA), bus, and acceleration unit (ACC). The ACC consists of a processing element (PE) array, a microcontroller (MicC), and scratch-pad memory (SPM). Communication between the host and the dataflow architecture is achieved via the PCIe bus. The size of the PE array can be adjusted as needed. This invention, based on implementation requirements, divides the PE array into four PE groups: G(0,0), G(0,1), G(1,0), and G(1,1). During computation, relevant data and instructions from the host application are loaded into memory during initialization. Subsequently, the ARM core executes the ARM program and configures the DMA and microcontroller (MicC). After configuration, the PE array is started to begin computation, and the computation results are transmitted back to the host after completion.

[0093] The updated block Cholesky decomposition calculation process is as follows. The original matrix is ​​A, and the decomposed matrix is ​​L.

[0094]

[0095] The inter-block dependency formula involved in block-based computation is:

[0096]

[0097] The flowchart of the block-based Cholesky iterative splitting operation based on the dataflow architecture of this invention is as follows: Figure 4 As shown, the method includes the following steps:

[0098] (1) The host uses a microcontroller to initialize and configure the PE group, on-chip storage, and transmission mode;

[0099] (2) The four PE groups G(0,0), G(0,1), G(1,0), and G(1,1) load the required data from the on-chip storage. In this specific embodiment of the invention, four PE groups are set, but the invention is not limited to this and other numbers of PE groups can be set according to actual needs.

[0100] (3) Determine whether the size of the matrix to be calculated is N×N and whether N is greater than 4. If it is greater than 4, proceed to step (4); otherwise, proceed to step (5).

[0101] (4) Perform the Cholesky iterative split calculation based on 2×2 blocks and return to step (3);

[0102] (5) Perform Cholesky iterative splitting calculation based on 1×1 blocks;

[0103] (6) Determine whether the size of the matrix to be calculated is N×N and whether N is greater than 1. If it is greater than 1, return to step (5); otherwise, execute step (7) to calculate the last block.

[0104] (7) Calculate the last block L11 corresponding to G(0,0) and G(1,0) respectively;

[0105] (8) Once the calculation is complete, write the calculation result back to the on-chip storage;

[0106] (9) The program execution has ended.

[0107] In the above process, by repeatedly executing step (4), the Cholesky iterative split calculation based on 2×2 blocks is performed on the matrix to be calculated with a matrix size exceeding 4×4. Each execution of step (4) reduces the number of rows and columns of the matrix to be calculated by 2. By repeatedly executing step (5), the Cholesky iterative split calculation based on 1×1 blocks is performed on the matrix to be calculated with a matrix size of 4×4 or smaller. Each execution of step (5) reduces the number of rows and columns of the matrix to be calculated by 1. Furthermore, during the calculation process, there are only memory access processes of PE to on-chip storage at the beginning and end of the calculation. The flow of calculation-dependent and iteration-dependent data between PE groups is realized through the COPY instruction, which reduces memory access overhead.

[0108] The specific process of the Cholesky iterative partitioning calculation based on 2×2 block partitioning is as follows: Figure 5 As shown, the specific steps are as follows:

[0109] (1) Calculate L11 and its inverse L11 from G(0,0). -1 ;

[0110] (2) G(0,0) passes computational dependency data to G(0,1) and G(1,0), and G(0,1) and G(1,0) compute L12 and L21;

[0111] (3) Step-by-step transfer of computation-dependent data from G(0,1) and G(1,0) to G(1,1), intra-group computation of G(0,1), G(1,0) and G(1,1), and iterative data backhaul from G(1,1) to G(0,0).

[0112] (4) Iterative data backpropagation from G(1,1) to G(0,1) and G(1,0);

[0113] The specific process of the Cholesky iterative partitioning calculation based on 1×1 blocks is as follows: Figure 6 As shown, the specific steps are as follows:

[0114] (1) Calculate the corresponding L11 and its inverse L11 for G(0,0) and G(1,0) respectively. -1 ;

[0115] (2) G(0,0) and G(1,0) pass computational dependency data to G(0,1) and G(1,1) respectively. G(0,1) and G(1,1) calculate the corresponding L21, L12 and A' respectively, and return the iteration data to G(0,0) and G(1,0);

[0116] The following section describes the implementation process of Cholesky decomposition in detail, using the data transmission and matrix partitioning diagrams of the block-based Cholesky iterative decomposition computation based on a data flow architecture (Figures 7, 8, and 9) as an example, taking a 16×16 initial matrix to be computed.

[0117] Various variables in the calculation process, such as Figure 7a and Figure 7b As shown. The matrix A to be calculated, with a size of 16×16, is divided into four blocks: A11 (2×2), A21 (14×2), A12 (i.e., A21...). T (2×14), A22(14×14), corresponding to the blocks of the Cholesky decomposition matrix L(16×16) as L11 (2×2 lower left triangular matrix block), L21(14×2), L12 (transpose of L21 block), and L22 (14×14 lower left triangular matrix block).

[0118] Because the original matrix A to be calculated is 16×16 (greater than 4×4), it is first divided into 2×2 blocks using the Cholesky algorithm. The parts of each PE group involved in the calculation during the 2×2 block Cholesky iteration are as follows: Figure 8b As shown. Before starting the calculation, the four PEs load the corresponding data from the on-chip memory according to the calculation requirements.

[0119] The specific 2×2 block Cholesky iterative calculation process consists of the following four steps:

[0120] Step 1: Calculate L11 and its inverse L11 for G(0,0) -1 After G(0,0) is loaded, a 2×2 Cholesky operation is performed on the data in A11 to obtain L11, and the inverse L11 of the L11 matrix is ​​calculated. -1 .

[0121] Step 2: G(0,0) passes computational dependency data to G(0,1) and G(1,0), and G(0,1) and G(1,0) calculate L12 and L21. G(0,0) then returns the calculated result L11. -1The data is passed to G(1,0) and G(0,1) via the COPY instruction; G(1,0) and G(0,1) are combined to calculate L21 and L12 respectively.

[0122] Step 3: Step-by-step transfer of computational dependency data from G(0,1) and G(1,0) to G(1,1), intra-group computation of G(0,1), G(1,0), and G(1,1), and iterative data backhaul from G(1,1) to G(0,0). Specifically, G(0,1) and G(1,0) sequentially complete data ① (e.g., Figure 8b As shown in the diagram, calculate and pass data ① to G(1,1), data ② (as shown in the diagram). Figure 9b As shown in the diagram, the calculations are performed, data ② is passed to G(1,1), and A12' (in G(0,1)) and A21' (in G(1,0)) are calculated. G(1,1) sequentially receives data ①, calculates A11', and uses the COPY instruction to send the calculated A11' back to G(0,0) for the next iteration, receives data ②, and calculates A22'.

[0123] Step 4: G(1,1) sends back the iterative data to G(0,1) and G(1,0). After G(1,1) calculates A22', it uses the COPY command to send back the data A21” and A12” required by G(1,0) and G(0,1) for the next iteration.

[0124] Steps 1-2-3-4 are executed sequentially in a loop, involving data transfer between PE groups as follows: Figure 8a As shown, after 6 iterations, the size of the matrix to be calculated in the original matrix A becomes 4×4. At this point, the Cholesky partitioning scheme is adjusted to adopt a Cholesky iterative partitioning calculation based on 1×1 blocks, and the PE grouping method is changed to achieve computational load balancing among PE groups, as follows: Figure 9a As shown. Unlike the Cholesky partitioning algorithm for calculating 2×2 blocks, the four PE groups are divided into two groups: one group consisting of G(0,0) and G(0,1), and the other group consisting of G(1,0) and G(1,1). Each group independently performs Cholesky decomposition calculation on a 4×4 matrix.

[0125] The 1×1 block Cholesky iterative computation process implemented on each PE group consists of the following two steps:

[0126] Step 1: Calculate the corresponding L11 and its inverse L11 for G(0,0) and G(1,0) respectively. -1 The four PE groups are loaded as follows: Figure 9b The required data, G(0,0) and G(1,0), are used to calculate the corresponding L11 and its inverse L11. -1 .

[0127] Step 2: Data transfer between PE groups and calculation within PE groups. G(0,0) and G(1,0) will transfer the calculation results to L11. -1 The data is passed to G(1,0) and G(1,1) respectively via the COPY command; G(1,0) and G(0,1) calculate the corresponding L21, L12 and A', and then return the data A11' required by G(0,0) and G(1,0) for the next iteration via the COPY command respectively.

[0128] Steps 1-2 are executed sequentially three times until only the last block remains. At this point, G(0,0) and G(1,0) calculate the L11 corresponding to the last block, completing all calculations. Finally, the PE group writes the calculation results back to on-chip storage.

[0129] Secondly, embodiments of this application provide a Cholesky decomposition acceleration computing system based on a dataflow architecture, employing the aforementioned Cholesky decomposition acceleration computing method based on a dataflow architecture, such as... Figure 10 As shown, the system includes:

[0130] Data Preparation Module 10: Initializes each unit in the data flow architecture, divides the processing unit PE array in the data flow architecture into multiple PE groups, divides the irregular matrix to be calculated into multiple regular matrix blocks according to the predetermined partitioning rules, and each PE group downloads the corresponding matrix block to complete the preparation of Cholesky decomposition calculation data.

[0131] Matrix 2×2 block calculation module 20: If the N of the matrix to be calculated with a size of N×N is greater than a predetermined threshold, the Cholesky splitting algorithm based on 2×2 block is adopted to iteratively calculate the matrix blocks in each PE group. Data transfer between PE groups is realized through the data dependency relationship of different PE groups on Cholesky decomposition calculation, and the size of the matrix to be calculated is dynamically adjusted to continuously reduce.

[0132] Matrix 1×1 block calculation module 30: If the N of the matrix to be calculated is less than or equal to a predetermined threshold, the Cholesky decomposition algorithm based on 1×1 block is adopted. Based on data transfer between PE groups and data transfer within PE groups, the remaining matrix blocks of the matrix to be calculated are iteratively calculated until the calculation is completed and the calculation result is output, thus completing the accelerated calculation of Cholesky decomposition based on data flow architecture.

[0133] Preferably, the data preparation module 10 includes:

[0134] PE array grouping module: Groups the PE array into multiple PE groups, including: G(0,0), G(0,1), G(1,0), G(1,1)..., G(0,y), G(x,0), G(x,y);

[0135] Matrix block partitioning module: The matrix A to be calculated with a size of N×N is divided into: A11(2×2), A21((N-2)×2), A12(2×(N-2)), A22((N-2)×(N-2)), which corresponds to the matrix L(N×N) after Cholesky decomposition. Each block is: L11(2×2), L21((N-2)×2), L12 is the transpose of L21 block, and L22((N-2)×(N-2)).

[0136] Preferably, the above-mentioned 2×2 matrix block calculation module 20 further includes:

[0137] 2×2 block decomposition, first module: G(0,0) calculates the decomposed matrix L11 of the matrix to be calculated and the inverse L11 of L11. -1 ;

[0138] 2×2 block second module: G(0,0) passes computation dependency data to G(0,y) and G(x,0), and G(0,y) and G(x,0) calculate L12 and L21;

[0139] The third module of 2×2 block division: step-by-step transfer of computational dependency data from G(0,y) and G(x,0) to G(x,y), completes the intra-group computation of G(0,y), G(x,0) and G(x,y), and iterative data back from G(x,y) to G(0,0);

[0140] 2×2 block fourth module: Iterative data backpropagation from G(x,y) to G(0,y) and G(x,0).

[0141] Preferably, the matrix 1×1 block calculation module 30 further includes:

[0142] 1×1 block first module: G(0,0) and G(x,0) respectively calculate the corresponding L11 and its inverse L11. -1 ;

[0143] The second module of 1×1 block: G(0,0) and G(x,0) pass computational dependency data to G(0,y) and G(x,y) respectively. G(0,y) and G(x,y) calculate the corresponding L21 and L12 respectively, update the matrix to be decomposed A', and return the data required for iteration to G(0,0) and G(x,0).

[0144] Thirdly, embodiments of this application provide a processing unit PE, which, when executing the computer program, implements the Cholesky decomposition acceleration computation method based on a data flow architecture as described above.

[0145] Fourthly, embodiments of this application provide a dataflow architecture, including a processing unit PE and a computer program stored on the processing unit PE and executable on the processing unit PE. When the processing unit PE executes the computer program, it implements the Cholesky decomposition acceleration computation method based on the dataflow architecture as described above.

[0146] Compared to existing technologies, this invention is based on a more general dataflow architecture and proposes a Cholesky iterative decomposition method and an inter-PE group data transmission method. Through iterative decomposition of the Cholesky decomposition, the originally irregular computation is transformed into a degree of regular computation. This allows data computation within a PE group to mask the data loading and transmission overhead between PE groups, reducing memory access overhead for PEs. Simultaneously, this invention dynamically adjusts the decomposition scheme according to the size of the matrix to be decomposed, achieving load balancing for computations between PE groups. Ultimately, while ensuring the generality of the architecture, it improves component utilization and enhances the computational performance of the Cholesky algorithm.

[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0148] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A Cholesky decomposition acceleration computation method based on a dataflow architecture, characterized in that, The method comprises: (1) The host end initializes and configures PE groups, on-chip storage and transmission modes through a microcontroller; (2) Each PE group loads required data from the on-chip storage to complete a data preparation step; (3) It is judged whether the size N*N of a matrix to be calculated is greater than a threshold value, if yes, step (4) is executed; otherwise, step (5) is executed; (4) A 2*2 block-based matrix calculation step is executed, and step (3) is returned; (5) A 1*1 block-based matrix calculation step is executed; (6) It is judged whether the size N*N of the matrix to be calculated is greater than 1, if yes, step (5) is returned; otherwise, step (7) is executed; (7) The last block is calculated; (8) The calculation result is written back to the on-chip storage after the calculation is completed; In the data preparation step, each unit in a data flow architecture is initialized, a PE array in the data flow architecture is divided into a plurality of PE groups, an irregular matrix to be calculated is divided into a plurality of regular matrix blocks according to a predetermined division rule, each PE group downloads corresponding matrix block data, and Cholesky decomposition calculation data preparation is completed; the data preparation step comprises: PE array grouping step: the PE array is grouped into a plurality of PE groups, and the PE groups comprise: G(0,0), G(0,1), G(1,0), G(1,1)..., G(0,y), G(x,0), G(x,y); Matrix block division step: the N*N-sized matrix to be calculated A is divided into A11(2*2), A21((N-2)*2), A12(2*(N-2)) and A22((N-2)*(N-2)) according to 2*2 block division, and each block of the matrix L after Cholesky decomposition is L11, L21, L12 and L22, wherein L12 is the transpose of the L21 block; 2*2 block calculation step comprises: First step: the G(0,0) calculates the decomposed matrix L11 of the matrix to be calculated and the inverse L11 of the L11 -1 ; Second step: the G(0,0) transmits calculation dependent data to the G(0,y) and the G(x,0), and the G(0,y) and the G(x,0) calculate the L12 and L21; Third step: the G(0,y) and the G(x,0) step-by-step transmit calculation dependent data to the G(x,y), complete the intragroup calculation of the G(0,y), the G(x,0) and the G(x,y), and the G(x,y) iteratively returns data to the G(0,0); Fourth step: the G(x,y) iteratively returns data to the G(0,y) and the G(x,0); and the 1*1 block-based matrix calculation step comprises: First step: G(0,0) and G(x,0) are calculated for L11 and its inverse L11 respectively -1 ; The second step: G(0, 0) and G(x, 0) respectively transmit calculation dependent data to G(0, y) and G(x, y), G(0, y) and G(x, y) respectively calculate corresponding L21, L12, update the to-be-decomposed matrix A', and return the iteration required data to G(0, 0) and G(x, 0); wherein, for 1*1 block, the to-be-calculated matrix A with a size of N*N is divided into: A11(1*1), A21((N-1)*1), A12(1*(N-1)), A22((N-1)*(N-1)); wherein, each block of the matrix L after Cholesky decomposition is: L11, L21, L12 and L22, and L12 is the transpose of L21 block.

2. A Cholesky decomposition acceleration computing system based on a data flow architecture, adopting the Cholesky decomposition acceleration computing method based on the data flow architecture according to claim 1, characterized in that, The system comprises: A data preparation module: initializing each unit in a data flow architecture, dividing a processing element (PE) array in the data flow architecture into a plurality of PE groups, dividing an irregular to-be-calculated matrix into a plurality of regular matrix blocks according to a predetermined division rule, and downloading corresponding matrix blocks by each PE group to complete Cholesky decomposition calculation data preparation; A matrix 2*2 block calculation module: judging whether N of the to-be-calculated matrix with a size of N*N is greater than a predetermined threshold value, and if yes, adopting a Cholesky splitting algorithm based on 2*2 block to cyclically and iteratively calculate the matrix blocks in each PE group, and realizing data transmission between the PE groups through data dependency of Cholesky decomposition calculation, and dynamically adjusting the size of the to-be-calculated matrix to continuously reduce the size; A matrix 1*1 block calculation module: judging whether N of the to-be-calculated matrix with a size of N*N is less than or equal to a predetermined threshold value, and if yes, adopting a Cholesky splitting algorithm based on 1*1 block to cyclically and iteratively calculate the remaining matrix blocks of the to-be-calculated matrix based on data transmission between the PE groups and data transmission in the PE groups, until the calculation is completed to output a calculation result, and completing acceleration calculation of Cholesky decomposition based on the data flow architecture.

3. The Cholesky decomposition accelerated computing system based on dataflow architecture of claim 2, wherein, The data preparation module comprises: A PE array grouping module: grouping the PE array into a plurality of PE groups, and the PE groups comprising: G(0, 0), G(0, 1), G(1, 0), G(1, 1)..., G(0, y), G(x, 0), G(x, y); A matrix block division module: for 2*2 block, the to-be-calculated matrix A with a size of N*N is divided into: A11(2*2), A21((N-2)*2), A12(2*(N-2)), A22((N-2)*(N-2)), and the matrix L after Cholesky decomposition is divided into: L11, L21, L12 and L22((N-2)*(N-2)), wherein, L12 is the transpose of L21 block.

4. The Cholesky decomposition accelerated computing system based on dataflow architecture according to claim 2, wherein, The matrix 2*2 block calculation module comprises: 2x2 block first module: the G(0,0) calculates the decomposed matrix L11 of the matrix to be calculated and the inverse L11 of the L11 -1 ; 2x2 block second module: the G(0,0) transmits calculation dependent data to the G(0,y) and the G(x,0), and the G(0,y) and the G(x,0) calculate the L12 and L21; 2x2 block third module: the G(0,y) and G(x,0) transmit calculation dependent data to G(x,y) in steps, complete the in-group calculation of G(0,y), G(x,0) and G(x,y), and the G(x,y) returns iteration data to G(0,0); 2x2 block fourth module: G(x,y) returns iteration data to G(0,y) and G(x,0).

5. The Cholesky decomposition accelerated computing system based on dataflow architecture according to claim 2, wherein, The matrix 1x1 block calculation module comprises: 1 x 1 block first module: G(0,0) and G(x,0) calculate corresponding L11 and its inverse L11 respectively -1 ; 1x1 block second module: G(0,0) and G(x,0) respectively transmit calculation dependent data to G(0,y) and G(x,y), G(0,y) and G(x,y) respectively calculate corresponding L21 and L12, update to obtain a to-be-decomposed matrix A', and return iteration required data to G(0,0) and G(x,0).

6. A processing element (PE) comprising: The processing unit PE realizes the Cholesky decomposition acceleration calculation method based on the data flow architecture as claimed in claim 1 when executing the computer program.

7. An apparatus based on a dataflow architecture comprising a processing element, PE, and a computer program stored on and operable on the processing element, PE, characterized in that, The processing unit PE realizes the Cholesky decomposition acceleration calculation method based on the data flow architecture as claimed in claim 1 when executing the computer program.

Citation Information

Patent Citations

  • Arbitrary-order matrix inversion hardware acceleration system based on cholesky decomposition, which adopts loop iteration mode

    CN111723336A

  • FPGA-based gene sequence assembly algorithm calculation acceleration method

    CN113012760A