Computation processing device and computation processing method

By dividing the standard eigenvalue problem calculations into units with asynchronous execution based on dependency relationships, the method addresses inefficiencies in tridiagonalization and improves computational efficiency, particularly in large-scale symmetric matrix calculations.

WO2024185271A1PCT designated stage expired Publication Date: 2024-09-12FUJITSU LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/046850
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-08
Filing Date
2023-12-27
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

The standard eigenvalue problem for symmetric matrices, particularly when using the divide-and-conquer method, faces inefficiencies due to tridiagonalization calculations with DSYTRD, which struggle with cache hits and decreasing parallelism, leading to bottlenecks in computational efficiency.

Method used

The proposed solution involves dividing the calculation of standard eigenvalue problems into multiple units with asynchronous execution based on dependency relationships, allowing for parallel processing of tasks without dependencies and sequential processing of dependent tasks, thereby improving cache efficiency and overall performance.

Benefits of technology

This approach enhances the computational efficiency of standard eigenvalue problems by optimizing task execution and utilizing parallel processing effectively, even when cache hits are difficult, leading to significant performance improvements in large-scale matrix calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023046850_12092024_PF_FP_ABST
    Figure JP2023046850_12092024_PF_FP_ABST
Patent Text Reader

Abstract

[Problem] To provide a computation processing device and a computation processing method that improve the calculation efficiency for a standard eigenvalue problem. [Solution] For a plurality of calculation units which each perform a different calculation and which were generated by dividing the calculations in a standard eigenvalue problem for a prescribed symmetrical matrix, if there is no dependency relationship between a first task and a second task, among a plurality of tasks which respectively execute the calculations of the calculation units, that either the first task or the second task performs a calculation on the basis of the result of the other task, then a calculation execution unit asynchronously calculates the first task and the second task. If there is the dependency relationship between the first task and the second task, the calculation execution unit sequentially calculates the first task and the second task. An output unit outputs the calculation results, calculated by the calculation execution unit, of the standard eigenvalue problem for the prescribed symmetrical matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Processing device and processing method

[0001] The present invention relates to a processing device and a processing method.

[0002] The standard eigenvalue problem for a matrix is ​​the problem of finding all eigenvalues ​​(λ) and eigenvectors (ν), expressed as Aν = λν, for a particular square matrix. When a particular square matrix is ​​n x n in size, there are generally n pairs of eigenvalues ​​(λ) and eigenvectors (ν), which can be found by solving the standard eigenvalue problem. The standard eigenvalue problem is widely used in science and technology. In particular, the standard eigenvalue problem for symmetric matrices is used in new drug design and big data analysis, and is an important topic in modern society.

[0003] When solving the standard eigenvalue problem of a symmetric matrix on a computer, the calculation generally proceeds while transforming the matrix as follows: First, the computer tridiagonalizes the symmetric matrix. Next, the computer calculates the eigenvalues ​​and eigenvectors for the tridiagonal matrix. Finally, the computer performs an inverse transform of the eigenvectors of the tridiagonal matrix to calculate the eigenvalues ​​and eigenvectors of the original symmetric matrix.

[0004] Here, a tridiagonal matrix is ​​a matrix in which only the diagonal elements and adjacent elements above and below the diagonal element are nonzero. In tridiagonalization, a symmetric matrix is ​​transformed into a tridiagonal matrix by a similarity transformation of the matrix. A Householder matrix using the Householder transformation is known as a matrix used for this transformation.

[0005] In tridiagonalization, one of the following three methods is generally used. The first method is called the QR method, which solves the standard eigenvalue problem using a similarity transformation with an orthogonal matrix. The QR method is characterized by its ability to stably and easily calculate eigenvalues ​​and eigenvectors. The second method is called the MRRR (Multiple Relatively Robust Representations) method. The MRRR method is characterized by its ability to easily solve the standard eigenvalue problem with high accuracy. The third method is called the divide-and-conquer method. The divide-and-conquer method divides a matrix into smaller matrices and calculates the eigenvalues ​​and eigenvectors. The divide-and-conquer method is characterized by its ease of calculation with a high degree of parallelism. Recent computers have become very large in scale, resulting in very high parallelism. Therefore, the divide-and-conquer method is often used to solve the standard eigenvalue problem with a high degree of parallelism.

[0006] Matrix operations are frequently used in various mathematical problems, including the standard eigenvalue problem. For this reason, open source programs such as Basic Linear Algebra Subprograms (BLAS), which compiles basic linear algebra operations, and Linear Algebra Package (LAPACK), which compiles functions for calculating standard eigenvalue problems and singular value problems, are available. Generally, BLAS and LAPACK can be combined to calculate the standard eigenvalue problem of a symmetric matrix. Because BLAS and LAPACK are frequently used, various tuned libraries are provided by various vendors.

[0007] A recent trend in processors is to improve computational performance by incorporating more cores. For example, the number of cores in the processors for the supercomputers K and Fugaku, developed by Fujitsu, has increased from 8 to 48. Additionally, the number of cores in flagship GPUs developed by Nvidia has increased, in order, from 5120 (V100), to 6912 (A100), and to 16896 (H100). When using such processors, it is preferable to use an algorithm with a high degree of parallelism that fully utilizes all cores in order to improve computational performance.

[0008] When solving a standard eigenvalue problem of a double-precision symmetric matrix using the divide-and-conquer method with LAPACK, a dedicated function for the standard eigenvalue problem of a double-precision symmetric matrix (a function called DSYEVD: Double to Symmetric Eigenvalue using Divide and Conquer algorithm) is used. In DSYEVD, processing is mainly composed of functions called DSYTRD, DSTEDC, and DORMTR. DSYTRD (Double to Symmetric tridiagonal form reduce) is a function that tridiagonalizes a symmetric matrix. DSTEDC (Double to Symmetric tridiagonal Eigenvalue using Divide and Conquer algorithm) is a function that solves a standard eigenvalue problem of a tridiagonal matrix using the divide-and-conquer method. DORMTR (Double Overwrite Real M-by-N matrix with Trans) is a function that performs an inverse transform of the eigenvectors of a tridiagonal matrix using matrix multiplication.

[0009] The characteristics of each function are listed below. DSYTRD tends to have difficulty in cache hits, and the degree of parallelism decreases as the calculation progresses. DSTEDC can be calculated with high parallelism and high computational efficiency. DORMTR can be calculated with high computational efficiency. Therefore, in general, in standard eigenvalue problems of symmetric matrices, DSYTRD accounts for a large portion of the total calculation time. Based on these characteristics of each function, it is believed that overall performance can be improved by improving the performance issues of DSYTRD.

[0010] As a parallel processing technique, a technique has been proposed in which a given computational model is divided into multiple non-interdependent sub-computations, and multiple processors process each of the sub-computations in parallel.

[0011] Special Publication No. 2022-500755

[0012] However, when calculating the standard eigenvalue problem of a symmetric matrix, DSYTRD has characteristics such as a tendency to have difficulty in cache hits and a decrease in parallelism as the calculation progresses, so the tridiagonalization calculation by DSYTRD becomes a bottleneck. Therefore, unless the tendency to have difficulty in cache hits can be improved, it has been difficult to improve the calculation efficiency as long as the standard eigenvalue problem of a double-precision symmetric matrix is ​​solved by the divide-and-conquer method.

[0013] As an example, let us explain the actual calculation flow using DSYTRD for a 16x16 symmetric matrix. To perform the first similarity transformation, the elements in rows 1 to 15 of column 0 are accessed to calculate the Householder matrix. Because Householder matrices can be expressed using vectors, they are actually stored in vector form. The similarity transformation is then performed using the Householder matrix. Here, the similarity transformation is performed using a matrix-vector product, which has poor cache efficiency and results in long wait times during calculations. In the first similarity transformation, 225 (= 15x15) elements are updated. The second similarity transformation is calculated in the same way as column 0. In the second similarity transformation, 196 (= 14x14) elements are updated. If such calculations are repeated, the number of elements updated by the similarity transformation will decrease significantly, resulting in insufficient parallelism. Therefore, even if multiple threads are available, calculations will only be performed by some of the threads, making it difficult to fully utilize the processor's computational performance.

[0014] Here, the problem of cache hits, which is one of the characteristics of DSYTRD, can be avoided to some extent by changing the calculation algorithm. One possible method for this is to use an algorithm called dsytrd_2stage included in LAPACK. However, when using dsytrd_2stage, the amount of calculation required for the portion of eigenvector calculation corresponding to DORMTR is roughly doubled, so it is preferable to use different algorithms depending on the calculation stage. However, even when using dsytrd_2stage, it is difficult to avoid a decrease in parallelism during tridiagonalization.

[0015] The disclosed technology has been made in view of the above, and aims to provide a processing device and a processing method that improve the efficiency of calculations for standard eigenvalue problems.

[0016] In one aspect of the processing device and processing method disclosed in the present application, a calculation execution unit, for a plurality of calculation units generated by dividing a calculation of a standard eigenvalue problem for a predetermined symmetric matrix and each performing a different calculation, calculates a first task and a second task among a plurality of tasks executed by each of the calculation units asynchronously if there is no dependency between a first task and a second task such that one task performs its calculation based on the result of the other task, and calculates the first task and the second task sequentially if there is a dependency between the first task and the second task. An output unit outputs the calculation result of the standard eigenvalue problem for the predetermined symmetric matrix calculated by the calculation execution unit.

[0017] In one aspect, the present invention can improve the computational efficiency of standard eigenvalue problems.

[0018] FIG. 1 is a block diagram of a computer according to an embodiment. FIG. 2 is a diagram illustrating an example of thread parallelism and task parallelism. FIG. 3 is a diagram illustrating a calculation flow of a standard eigenvalue problem. FIG. 4 is a diagram illustrating a calculation flow of tridiagonalization using DSYTRD. FIG. 5 is a diagram illustrating an example of a dependency graph according to the first embodiment. FIG. 6 is a flowchart of calculation processing of a standard eigenvalue problem by a processor according to the embodiment. FIG. 7 is a flowchart of asynchronous execution feasibility determination processing. FIG. 8 is a flowchart of dependency determination processing. FIG. 9 is a flowchart of asynchronous execution determination processing. FIG. 10 is a diagram illustrating an example of a timeline comparing calculations of a standard eigenvalue problem with and without asynchronous execution of calculation units. FIG. 11 is a diagram illustrating a comparison of calculation speeds between calculations of a standard eigenvalue problem by a processor according to the first embodiment and calculations without asynchronous execution of calculation units. FIG. 12 is a diagram illustrating an example of a dependency graph according to the second embodiment. FIG. 13 is a diagram illustrating matrix division in DSTEDC. FIG. 14 is a diagram illustrating calculations of recursive matrix eigenvalues ​​and eigenvectors in DSTEDC. Fig. 15 is a diagram illustrating a comparison of the calculation speed between calculation of a standard eigenvalue problem by a processor according to Example 2 and calculation when asynchronous execution of calculation units is not performed. Fig. 16 is a diagram illustrating an example of a dependency graph according to Example 3. Fig. 17 is a diagram illustrating an overview of calculation by DORMTR according to Example 3.

[0019] Hereinafter, embodiments of the arithmetic processing device and the arithmetic processing method disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the arithmetic processing device and the arithmetic processing method disclosed in the present application are not limited to the following embodiments.

[0020] 1 is a block diagram of a computer according to an embodiment. In this embodiment, the computer 1 solves the standard eigenvalue problem using LAPACK or BLAS, which are libraries that compile basic operations of linear algebra. However, there are no particular limitations on the algorithm used by the computer 1, as long as it is an algorithm for calculating the standard eigenvalue problem.

[0021] The computer 1 includes a processor 10, a memory 11, and a storage device 12. The processor 10, the memory 11, and the storage device 12 are each connected to a bus, and are capable of transmitting and receiving data to and from each other.

[0022] The processor 10 has multiple cores. Each core can execute one thread at a time. That is, the processor 10 can execute multiple threads. The processor 10 can also execute multiple threads in parallel. Execution of multiple threads in parallel is called thread parallelism.

[0023] Furthermore, in this embodiment, mathematical processes provided by LAPACK or BLAS, functions of a set of processes for the processor 10 to carry out calculations, and user-defined mathematical processes or sets of processes for the processor 10 to carry out calculations are referred to as computation units. A computation unit can be freely defined as long as it is a calculation or process that produces some kind of result. However, if the computation unit is made small, the result obtained by that computation unit alone may become meaningless, being merely an intermediate step in a larger calculation or process that includes that computation unit. Such computation units are undesirable because they complicate the process. In this embodiment, a computation or process that produces a mathematically meaningful result is referred to as a computation unit.

[0024] The following computation units can be used in this embodiment. For example, one computation unit is a function that performs matrix multiplication of double-precision real numbers, such as dgemm in BLAS. Another computation unit is a function that calculates the eigenvalues ​​and eigenvectors of a tridiagonal symmetric matrix of double-precision real numbers, such as dsteqr in LAPACK.

[0025] One of the computation units is a function that copies a double-precision matrix, such as dlacpy in LAPACK. Note that LAPACK and BLAS also have functions that require overwriting of matrices and vectors. Therefore, in this embodiment, copying matrices and vectors to perform calculations on the computer 1 is also considered a computation unit.

[0026] Furthermore, one of the units of calculation is a function that temporarily saves array elements in order to perform a calculation defined by the user. Arrays also include matrices. Here, temporarily saving array elements has no mathematical meaning, but from a program perspective, it is a process necessary to proceed with the processing. Therefore, such functions are also treated as units of calculation. In this way, in this embodiment, a process defined by the user to solve a problem can also be used as a unit of calculation.

[0027] On the other hand, in this embodiment, the following examples are not treated as calculation units. One is a function for error processing, such as xerbla called from dgemm in BLAS. Because error processing is not a mathematical process or a process for advancing calculations on Calculator 1, xerbla is not treated as a calculation unit. For example, xerbla is treated as a process included in the calculation unit of dgemm, which is a calculation unit. Another example is a multiply-and-accumulate operation within dgemm in BLAS. The multiply-and-accumulate operation that constitutes dgemm itself does not have a final mathematical meaning. The multiply-and-accumulate operation within dgemm is treated as a process included in dgemm, which is a calculation unit.

[0028] Another type is a function that obtains a constant in double-precision real numbers, such as dlamch inside dsteqr in LAPACK. dlamch is a function that obtains a constant required for calculating dsteqr, and is not a calculation unit because it is not a mathematical process. dlamch is treated as a process included in dsteqr, which is a calculation unit. Another type is dgemm inside dstedc in LAPACK, which is treated as a calculation unit. dgemm, which is called inside dstedc, which is a calculation unit, is treated as a process included in dstedc.

[0029] The other is a process that outputs the calculation result of dsteqr implemented by the user to standard output. This process is not treated as a calculation unit because it is not a mathematical process or a process necessary for the calculation to proceed on Calculator 1. This process is treated as a process included in dsteqr, which is a calculation unit.

[0030] The processor 10 treats each computational unit included in a program that solves a standard specific problem as one task. A task includes one or more threads. The processor 10 is capable of executing multiple tasks in parallel. The asynchronous execution of multiple tasks is called asynchronous task execution. The computational unit processed by a task may also be called asynchronous execution of a computational unit. In asynchronous task execution, the processor 10 executes each task independently, unlike when executing each task in order according to the program description.

[0031] Here, the processor 10 of this embodiment uses the task parallelism function of OpenMP (Multi Processing) when processing tasks asynchronously. However, in practice, it is preferable for the processor 10 to select an appropriate algorithm for each architecture. For example, if performance is likely to improve when using the task parallelism function of OpenMP to use high-speed synchronization using a hardware barrier function, it is preferable to use OpenMP. Alternatively, the processor 10 may use the stream function or the CUDA Graphs function.

[0032] 2 is a diagram illustrating an example of thread parallelism and task parallelism. For example, the processor 10 executes calculations as shown in thread parallelism 201. That is, the processor 10 executes calculations using multiple threads for a task 211 that executes one calculation unit.

[0033] The processor 10 also executes calculations as shown in task parallelism 202. In this case, the processor 10 executes tasks 221, 222, and 223 in parallel, i.e., asynchronously. In task parallelism 202, when a certain computation unit is focused on, if multiple threads are assigned to that computation unit, the processor 10 executes the processing of that computation unit in thread parallelism. That is, the processor 10 executes processing of tasks 221 and 223 in thread parallelism. That is, the processor 10 calculates multiple computation units in task parallelism at the same time using one or multiple threads. Here, in the case of task parallelism, the processor 10 is only expected to process multiple computation units at the same time, but may actually process those multiple computation units at different times.

[0034] Continuing with the explanation, returning to Figure 1, the processor 10 solves the standard eigenvalue problem using thread parallelism and task parallelism. Here, the processor 10 calculates the standard eigenvalue problem of a symmetric matrix.

[0035] 3 is a diagram showing the flow of calculation of the standard eigenvalue problem. Here, an outline of the flow of calculation of the standard eigenvalue problem by the processor 10 according to this embodiment will be described with reference to FIG. 3. Here, the case where the symmetric matrix 231 is an n×n matrix will be described as an example.

[0036] The processor 10 performs tridiagonalization on the symmetric matrix 231 using DSYTRD to calculate a tridiagonal matrix 232 (step S1). During the tridiagonalization, the processor 10 converts the Householder matrix Hi used in the i-th similarity transformation into an orthogonal matrix Q t After the tridiagonalization is completed, the processor 10 stores Q t = H n-2 ...H 2 H 1 get.

[0037] FIG. 4 is a diagram showing the flow of tridiagonalization calculations using DSYTRD. By executing DSYTRD, the processor 10 converts a symmetric matrix into a tridiagonal matrix column by column, starting from the left column and moving to the right column, as shown in FIG. 4. At this time, one column can be tridiagonalized with one similarity transformation. In FIG. 4, determined diagonal elements are shown in black, determined subdiagonal elements are shown with a diagonal line pattern, other determined elements are shown in white, and undetermined elements are shown in gray. For an n×n symmetric matrix, tridiagonalization is completed with n−2 similarity transformations.

[0038] Continuing with the description, returning to Figure 3, processor 10 then calculates the eigenvalues ​​(λ) of tridiagonal matrix 232, shown as solution 233. 1 , λ 2 , ..., λ n ) and eigenvector (x 1 , x 2 , ..., x n ) is calculated (step S2).

[0039] Next, the processor 10 calculates the eigenvector (x 1 , x 2 , ..., x n ) is inversely transformed to obtain the eigenvectors (ν 1 , ν 2 , ..., ν n ) of the symmetric matrix 231 shown as a solution 234. 1 , λ 2 , ..., λ n ) and eigenvectors (ν 1 , ν 2 , ..., ν n ) is obtained (step S3).

[0040] 1, the description will be continued. The memory 11 is a main storage device. The memory 11 is, for example, a dynamic random access memory (DRAM). The memory 11 is used by the processor 10 as a storage area for arithmetic processing, for example.

[0041] The storage device 12 is an auxiliary storage device, such as a hard disk or a solid state drive (SSD). The storage device 12 stores various programs for the processor 10 to execute arithmetic processing. The storage device 12 also stores data for the processor 10 to execute arithmetic processing. For example, the storage device 12 stores an eigenmatrix and a symmetric matrix for which eigenvalues ​​are to be calculated using the standard eigenvalue problem.

[0042] Next, a description will be given of details of the calculation of the standard eigenvalue problem by the processor 10 according to this embodiment. As shown in FIG. 1 , the processor 10 includes a calculation unit dividing unit 101, a dependency graph generating unit 102, a dependency determination unit 103, a calculation execution unit 104, and an output unit 105.

[0043] The computational unit dividing unit 101 has a predetermined computational unit generation rule. The computational unit dividing unit 101 acquires a symmetric matrix to be used to calculate the standard eigenvalue problem from the storage device 12. The computational unit dividing unit 101 then divides the entire calculation of the standard eigenvalue problem into computational units based on characteristics of the symmetric matrix, such as the number of rows and the number of columns, in accordance with the generation rule to generate the computational units. The computational unit dividing unit 101 then outputs information about the generated computational units to the dependency graph generating unit 102.

[0044] Fig. 5 is a diagram illustrating an example of a dependency graph according to Example 1. Fig. 5 illustrates an example of dependency relationships between tasks corresponding to computation units in the computation of a standard eigenvalue problem.

[0045] For example, the calculation unit dividing unit 101 divides the Householder matrix H i The generation of H is one calculation unit. i represents the i-th column of the symmetric matrix, and i represents the Householder matrix in the i-th column. Task #1-i in FIG. 4 represents the calculation unit for generating the Householder matrix H i . Task #1-i is this calculation unit, and the Householder matrix H i Represents the process of generating

[0046] The computation unit division unit 101 also divides the similarity transformation in the calculation by DSYTRD among the calculations of the standard eigenvalue problem into one computation unit. Task #2-i in FIG. 5 corresponds to this computation unit, and the Householder matrix H i This represents the process of performing a similarity transformation using

[0047] Furthermore, the computation unit dividing unit 101 defines the computation of the eigenvalues ​​and eigenvectors of a tridiagonal matrix by DSTEDC as one computation unit among the computations of the standard eigenvalue problem. Task #3 in FIG. 5 corresponds to this computation unit.

[0048] Furthermore, the calculation unit dividing unit 101 divides the Householder matrix H i The task #4-i in FIG. 5 corresponds to this calculation unit, and the Householder matrix H i represents the transformation of

[0049] Furthermore, the computation unit dividing unit 101 defines a matrix multiplication in the DORMTR calculation of the standard eigenvalue problem as one computation unit, with task #5 in FIG.

[0050] Returning to FIG. 1 , the explanation continues. The dependency graph generator 102 receives input of information about the computational units of the calculation of the standard eigenvalue problem for a symmetric matrix from the computational unit division unit 101. Next, when a task executing a specific computational unit uses a result calculated by a task executing another computational unit as input information, the dependency graph generator 102 generates information indicating the input-output relationship of the computation results between tasks. For example, the dependency graph generator 102 places an arrow from another computational unit that has output a result toward the specific computational unit.

[0051] For example, in DSYTRD, the i-th column of the Householder matrix H i Once generated, the Householder matrix H i The similarity transformation is performed using the Householder matrix H iis converted into a determinant by DORMTR. Therefore, the dependency graph generator 102 generates information indicating input-output relationships by arranging arrows from task #1-i to tasks #2-i and #4-i, as in dependency graph 240 in FIG.

[0052] The dependency graph generation unit 102 generates information indicating input-output relationships for all computation units. As a result, the dependency graph generation unit 102 generates, for example, a dependency graph 240 shown in FIG. 5 . The dependency graph generation unit 102 then outputs the generated dependency graph to the dependency determination unit 103. In this embodiment, the non-dependency graph is expressed as a two-dimensional graph for ease of understanding, but the dependency graph may be information in another format as long as it is information from which information on input-output relationships between tasks can be obtained.

[0053] The dependency determination unit 103 receives a dependency graph as input from the dependency graph generation unit 102. Next, it extracts task combinations for which no dependency exists from the obtained dependency graph. Here, if a result output by a first task is directly or indirectly used in a calculation by another second task, or if a result output by a second task is directly or indirectly used in a calculation by the first task, it can be said that a dependency exists between the first task and the second task. After extracting task combinations for which no dependency exists, the dependency determination unit 103 outputs information about each computation unit and information about task combinations for which no dependency exists to the computation execution unit 104. Below, the extraction of tasks for which no dependency exists will be described in detail with reference to FIG. 5.

[0054] The dependency graph is a directed graph in which a direction exists for each input-output relationship, and will be described using an example of two different tasks A and B that exist in the dependency graph. If a path exists from task A to task B or from task B to task A that follows the direction of the input-output relationship, the dependency determination unit 103 determines that a dependency relationship exists between task A and task B. On the other hand, if no path exists that follows the direction of the input-output relationship from task A to task B or from task B to task A, the dependency determination unit 103 determines that no dependency relationship exists between task A and task B.

[0055] 5, there is no path that can be traced from task #2-0 to task #4-0 or from task #4-0 to task #2-0 according to the direction of the input-output relationship. Therefore, the dependency relationship determination unit 103 determines that there is no dependency relationship between task #2-0 and task #4-0. Similarly, there is no path that can be traced according to the direction of the input-output relationship between task #1-2 and task #4-1, so the dependency relationship determination unit 103 determines that there is no dependency relationship between task #1-2 and task #4-1.

[0056] On the other hand, between task #2-0 and task #4-2, there is no path from task #4-2 to task #2-0 according to the direction of the input-output relationship, but there is a path from task #2-0 to task #4-2. Therefore, the dependency relationship determination unit 103 determines that a dependency relationship exists between task #2-0 and task #4-2.

[0057] Continuing the explanation, returning to FIG. 1 , the computation execution unit 104 has an asynchronous execution determination unit 140. The computation execution unit 104 receives input of information on each computation unit and information on task combinations for which no dependency exists from the dependency determination unit 103. The computation execution unit 104 also obtains a symmetric matrix from the storage device 12.

[0058] The calculation execution unit 104 then begins executing the calculation of the standard eigenvalue problem, the outline of which is shown in Fig. 3, for the obtained symmetric matrix. In the calculation of the standard eigenvalue problem, the calculation execution unit 104 executes the calculation of each calculation unit asynchronously for tasks that do not have a dependency relationship. In contrast, for tasks that have a dependency relationship and do not support asynchronous calculation, the calculation execution unit 104 calls functions that calculate the calculation units of each task sequentially in a predetermined order, and processes them in order.

[0059] More specifically, after a certain task is completed, the asynchronous execution determination unit 140 of the computation execution unit 104 extracts a task that has no dependency relationship from among the tasks that can be executed next after the task. The asynchronous execution determination unit 140 then determines whether the computation speed will increase if the specific task and the extracted task are executed asynchronously. If the computation speed will increase, the asynchronous execution determination unit 140 determines to execute the specific task and the extracted task asynchronously. The computation execution unit 104 then executes each task according to the determination of the asynchronous execution determination unit 140.

[0060] 5, after task #1-i is completed, there is no dependency between task #2-i and task #4-i, so the asynchronous execution determination unit 140 confirms that task #2-i and task #4-i can be executed asynchronously. Then, when the asynchronous execution determination unit 140 determines that task #2-i and task #4-i should be executed asynchronously, the calculation execution unit 104 executes task #2-i and task #4-i asynchronously.

[0061] Here, the computation unit 104 can calculate computation units that can be computed asynchronously using, for example, the task parallel function of OpenMP. The task parallel function allows the computation unit 104 to assign tasked processes as threads and process them asynchronously. For example, task #2-i and task #4-i are relatively heavy processes, so it is preferable to perform them in thread parallelism. Therefore, the computation unit 104 processes task #2-i and task #4-i using #pragma omp taskloop. As a result, the thread assigned to task #2-i may be assigned to process task #4-i after the calculation is completed, and vice versa. In other words, the computation unit 104 may be able to execute task #2-i and task #4-i asynchronously. This is expected to improve the efficiency of the processor 10.

[0062] When tasks are executed asynchronously, various controls are performed according to the dependency relationships between each task. Furthermore, if the dependency relationships between tasks are defined, task execution can be automated. For example, the computation execution unit 104 can automate task execution using the stream function or CUDA Graphs function in CUDA provided by NVIDIA. When using the stream function, the computation execution unit 104 prepares a queue called a stream and submits non-dependent tasks to a different queue, allowing the non-dependent tasks to be executed asynchronously. In this case, tasks submitted to the same queue are considered to be dependent, and each task is executed sequentially. When using the CUDA Graphs function, the computation execution unit 104 executes the tasks after defining the dependency relationships between each task. In this case, non-dependent tasks are likely to be executed asynchronously, while dependent tasks are executed in the appropriate order.

[0063] Furthermore, for each task, if the amount of calculation of the calculation unit executed in that task is equal to or greater than a predetermined value, the calculation execution unit 104 executes the calculation of the calculation unit included in the task using multiple threads. Furthermore, for each task, if the amount of calculation of the calculation unit executed in that task is less than a predetermined value, the calculation execution unit 104 executes the calculation of the calculation unit included in the task using a single thread.

[0064] The calculation execution unit 104 completes the calculation of the eigenvalues ​​and eigenvectors of the symmetric matrix by completing the execution of all tasks, and then notifies the output unit 105 of the calculated eigenvalues ​​and eigenvectors of the symmetric matrix.

[0065] As described above, the calculation execution unit 104 according to this embodiment performs calculations for multiple calculation units, including calculation units obtained by dividing the calculation of the tridiagonalization of a symmetric matrix (DSYTRD), which is included in the calculation of the standard eigenvalue problem for a predetermined symmetric matrix, into multiple units, based on the existence of a dependency relationship between the first task and the second task.

[0066] The output unit 105 receives notification of the eigenvalues ​​and eigenvectors of the symmetric matrix from the calculation execution unit 104. Then, the output unit 105 displays the notified eigenvalues ​​and eigenvectors of the symmetric matrix on a display device or the like, and presents the calculation results to the user.

[0067] 6 is a flowchart of the calculation process of the standard eigenvalue problem by the processor 10 according to the embodiment. Next, the flow of the calculation process of the standard eigenvalue problem by the processor 10 according to the embodiment will be described with reference to FIG.

[0068] The computational unit dividing unit 101 divides the calculation of a standard eigenvalue problem for a symmetric matrix into computational units according to a predetermined rule for generating computational units (step S101).

[0069] The dependency graph generation unit 102 generates information on input / output relationships between the computation units generated by the computation unit division unit 101, and generates a dependency graph (step S102).

[0070] The dependency determining unit 103 executes a dependency determining process for determining the dependency relationships between the tasks using the dependency graph generated by the dependency graph generating unit 102 (step S103).

[0071] The calculation execution unit 104 executes the calculation of the standard eigenvalue problem for a symmetric matrix in accordance with the decision by the asynchronous execution determination unit 140 based on the dependency relationships between tasks as to whether or not each task should be executed asynchronously (step S104).

[0072] The output unit 105 outputs the eigenvalues ​​and eigenvectors of the symmetric matrix calculated by the calculation execution unit 104 and provides them to the user (step S105).

[0073] FIG. 7 is a flowchart of the asynchronous execution possibility determination process. Each process shown in the flow of FIG. 7 is an example of the process executed in steps S103 and S104 of FIG. 6. However, in the flow of FIG. 7, each process is described using an example in which steps S103 and S104 are performed in parallel. Next, with reference to FIG. 7, the flow of the asynchronous execution possibility determination process by the processor 10 according to this embodiment will be described. Here, the case will be described in which the symmetric matrix is ​​an n×n matrix and each task is assigned a consecutive number.

[0074] The dependency relationship determination unit 103 acquires the dependency relationship graph from the dependency relationship graph generation unit 102 (step S201).

[0075] Next, the dependency relationship determination unit 103 sets i=0 and j=0 (step S202).

[0076] Next, the dependency determining unit 103 determines whether or not a dependency relationship exists between task #i and task #j (step S203).

[0077] If a dependency exists between task #i and task #j (step S203: Yes), the asynchronous execution determination unit 140 determines that task #i and task #j can be executed asynchronously (step S204).

[0078] On the other hand, if there is no dependency between task #i and task #j (step S203: No), the asynchronous execution determination unit 140 determines that task #i and task #j will not be executed asynchronously (step S205).

[0079] Thereafter, the dependency relationship determination unit 103 determines whether j=N-1 (step S206). If j≠N-1 (step S206: No), the dependency relationship determination unit 103 increments j by 1 (step S207). Thereafter, the asynchronous execution possibility determination process returns to step S203.

[0080] On the other hand, if j=N-1 (step S206: Yes), the dependency determination unit 103 determines whether i=N-1 (step S208). If i≠N-1 (step S208: No), the dependency determination unit 103 increments i by 1 (step S209). Thereafter, the asynchronous execution possibility determination process returns to step S203.

[0081] On the other hand, if i=N-1 (step S208: Yes), the dependency determining unit 103 and the asynchronous execution determining unit 140 end the asynchronous execution possibility determining process.

[0082] Fig. 8 is a flowchart of the dependency relationship determination process. Each process shown in the flow of Fig. 8 corresponds to an example of the process executed in step S203 of Fig. 7. Next, the flow of the dependency relationship determination process by the processor 10 according to this embodiment will be described with reference to Fig. 8.

[0083] The dependency relationship determination unit 103 uses the dependency relationship graph to determine whether or not a path exists that traces from task #i to task #j according to the direction of the input-output relationship (step S301).

[0084] If there is no path from task #i to task #j (step S301: No), the dependency relationship determination unit 103 determines whether there is a path from task #j to task #i according to the direction of the input / output relationship (step S302).

[0085] If a path from task #i to task #j exists (step S301: Yes), the dependency determination unit 103 determines that a dependency relationship exists between task #i and task #j (step S303).If a path from task #j to task #i exists (step S302: Yes), the dependency determination unit 103 determines that a dependency relationship exists between task #i and task #j (step S303).

[0086] On the other hand, if there is no path from task #j to task #i (step S302: No), the dependency determination unit 103 determines that there is no dependency between task #i and task #j (step S304).

[0087] Fig. 9 is a flowchart of the asynchronous execution determination process. Each process shown in the flow of Fig. 9 corresponds to an example of the process executed in step S104 of Fig. 6. Next, the flow of the asynchronous execution determination process by the processor 10 according to this embodiment will be described with reference to Fig. 9. Here, the description will be given assuming that the symmetric matrix is ​​an n x n matrix and that each task is assigned a consecutive number.

[0088] After the completion of task set X, the asynchronous execution determination unit 140 acquires a group of tasks that have no dependency relationship with the next executable task (step S401). Here, the number of next executable tasks is defined as M, and the number of tasks included in the group of tasks that have no dependency relationship with the next executable task is defined as K.

[0089] Next, the asynchronous execution determination unit 140 sets i = 0 for task #i, which is the next executable task. The asynchronous execution determination unit 140 also sets j = 0 for task #j, which is included in a task group that does not have a dependency relationship corresponding to task #i (step S402).

[0090] Next, the asynchronous execution determination unit 140 determines whether the calculation speed increases when task #i and task #j are executed asynchronously (step S403).

[0091] If the calculation speed increases (step S403: Yes), the asynchronous execution determination unit 140 determines that task #i and task #j are to be executed asynchronously (step S404).

[0092] On the other hand, if the calculation speed does not increase (step S403: No), the asynchronous execution determination unit 140 determines to execute task #i and task #j sequentially (step S405).

[0093] Thereafter, the asynchronous execution determination unit 140 determines whether j=K-1 (step S406). If j≠K-1 (step S406: No), the asynchronous execution determination unit 140 increments j by 1 (step S407). Thereafter, the asynchronous execution determination unit 140 returns to step S403.

[0094] On the other hand, if j=K-1 (step S406: Yes), the asynchronous execution determination unit 140 determines whether i=M-1 (step S408). If i≠M-1 (step S408: No), the asynchronous execution determination unit 140 increments i by 1 (step S409). Thereafter, the asynchronous execution determination unit 140 returns to step S403.

[0095] On the other hand, if i=M-1 (step S408: Yes), the asynchronous execution determination unit 140 ends the asynchronous execution determination process.

[0096] FIG. 10 is an example of a timeline diagram comparing the cases where the computation units for the standard eigenvalue problem are executed asynchronously and not executed asynchronously. In a normal case, as shown in graph 251, the processor 10 executes DSTEDC after DSYTRD is completed, and then executes DORMTR after DSTEDC is completed. In contrast, when the computation units are executed asynchronously, as shown in graph 252, for example, the processor 10 can process DSTEDC and DORMTR in parallel with DSYTRD once a specific task in DSYTRD is completed. Comparing graphs 251 and 252, it is shown that the processing in graph 252 is completed earlier than the processing in graph 251. While FIG. 6 illustrates the asynchronous execution of tasks as being executed consecutively, for example, if the tasks have the dependencies shown in FIG. 5, a synchronization wait may occur in DSYTRD, DSTEDC, and DORMTR until a specific task is completed.

[0097] 11 is a diagram illustrating a comparison of the calculation speed between the calculation of the standard eigenvalue problem by the processor according to the first embodiment and the calculation when asynchronous execution of the calculation unit is not performed. In FIG. 11, the symmetric matrix is ​​an n×n matrix, and cases where n=1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, and 12288 are described.

[0098] In this case, when the symmetric matrix becomes large enough to reach 12288 x 12288, the effect of asynchronous execution of computational units becomes apparent, and processor 10 can speed up the calculation of the standard eigenvalue problem by approximately 30% compared to a computational method that does not perform asynchronous execution of computational units.

[0099] As described above, the processor, which is an arithmetic processing device according to this embodiment, divides the calculation of a standard eigenvalue problem for a symmetric matrix into calculation units according to predetermined rules. The processor then treats each calculation unit as a task, determines whether to execute the tasks asynchronously based on their dependencies, and calculates the standard eigenvalue problem for the symmetric matrix according to the decision. This allows tasks to be calculated individually in parallel during wait times when the parallelism of the cores being used is low, thereby hiding wait times caused by cache misses. Therefore, even when cache hits tend to be difficult, the divide-and-conquer method can improve and speed up calculations, thereby making it possible to improve the calculation efficiency of the standard eigenvalue problem.

[0100] Next, a second embodiment will be described. A processor according to the second embodiment divides DSTEDC, a function for solving a standard eigenvalue problem of a tridiagonal matrix by a divide-and-conquer method in the calculation of a standard eigenvalue problem, into a plurality of different types of calculation units, and performs the calculation asynchronously. A computer 1 according to the second embodiment is also shown in the block diagram of FIG. 1. In the following description, a description of the operation of each unit similar to that of the first embodiment will be omitted.

[0101] Fig. 12 is a diagram illustrating an example of a dependency graph according to Example 2. Fig. 12 illustrates an example of dependency relationships between tasks corresponding to computation units in the computation of a standard eigenvalue problem.

[0102] The computation unit dividing unit 101 divides the computations in DSYTRD, DSTEDC, and DORMTR into computation units as follows. In this embodiment, the dependency relationships between the computation units are ultimately represented by a dependency graph 301 shown in FIG. 12. In this embodiment, the processor 10 divides a 16×16 tridiagonal matrix into a 2×2 matrix in a computation using DSYTRD. However, in practice, the processor 10 does not need to divide the matrix into smaller pieces like 2×2, and it is preferable to change the matrix division size in accordance with the architecture being used.

[0103] For example, the computation unit dividing unit 101 considers the calculation of two-column tridiagonalization by DSYTRD among the calculations of the standard eigenvalue problem as one computation unit. Task #1-i in FIG. 12 represents a computation unit that performs two-column tridiagonalization, tridiagonalizing two columns starting from the i-th column. Task #1-i also includes a similarity transformation. Here, since the matrix is ​​divided into 2x2 units in DSTEDC, the computation unit dividing unit 101 considers tridiagonalization of every two columns in DSYTRD as a computation unit.

[0104] Furthermore, the computational unit dividing unit 101 regards each division step of the standard eigenvalue problem up to dividing the tridiagonal matrix by DSTEDC into a 2 × 2 matrix and the calculation of the eigenvalues ​​and eigenvectors as one computational unit. Task #2-i in Fig. 12 represents the computational unit for dividing the 2 × 2 matrix for two columns from the i-th column and for calculating the eigenvalues ​​and eigenvectors of the divided 2 × 2 matrix.

[0105] Furthermore, the computational unit dividing unit 101 groups together all of the calculations of the recursive integration of eigenvalues ​​and eigenvectors repeated from the terminal 2 × 2 matrix by DSTEDC among the calculations of the standard eigenvalue problem into one computational unit. Task #3 in Fig. 12 represents the computational unit that calculates the eigenvalues ​​and eigenvectors of the tridiagonal matrix using the eigenvalues ​​and eigenvectors of the divided eight 2 × 2 matrices.

[0106] FIG. 13 is a diagram showing matrix division in DSTEDC. In this embodiment, in DSTEDC, the processor 10 repeatedly divides a tridiagonal matrix in half as shown in the division state 302 in FIG. 13 , and calculates the eigenvalues ​​and eigenvectors of the sufficiently small matrix. The processor 10 can use a method with a low processing load other than the divide-and-conquer method, such as the QR algorithm, to calculate the eigenvalues ​​and eigenvectors of the sufficiently small matrix. Furthermore, because the calculations of the eigenvalues ​​and eigenvectors of the sufficiently small matrix are not dependent on each other, the processor 10 can calculate the eigenvalues ​​and eigenvectors of the matrix in parallel.

[0107] FIG. 14 is a diagram illustrating the recursive calculation of the eigenvalues ​​and eigenvectors of a matrix in DSTEDC. Once the calculation of the eigenvalues ​​and eigenvectors of the matrix that has become sufficiently small is completed, the processor 10 calculates the eigenvalues ​​and eigenvectors of the original matrix as shown in process 303 of FIG. 14 . The processor 10 calculates the eigenvalues ​​and eigenvectors of the original matrix using the eigenvalues ​​and eigenvectors of the two divided matrices. The processor 10 can calculate the eigenvalues ​​and eigenvectors of the tridiagonal matrix before division by repeatedly performing this calculation in steps 311 to 313. Furthermore, since the calculation of the eigenvalues ​​and eigenvectors of the original matrix is ​​not dependent on other original matrices, the processor 10 can perform parallel calculations of the eigenvalues ​​and eigenvectors of the original matrix. Furthermore, the calculation of the eigenvalues ​​and eigenvectors of the original matrix can be performed using matrix multiplication, and the processor 10 can improve calculation efficiency by using this calculation method.

[0108] The computational unit dividing unit 101 combines all of the calculations of recursive integration of eigenvalues ​​and eigenvectors in steps 311 to 313 in Fig. 12 into one computational unit. It is known that the computational performance of the processor 10 is improved by batch processing the integration of eigenvalues ​​and eigenvectors in each of steps 311 to 313. Therefore, the computational unit dividing unit 101 combines the calculations of recursive integration of eigenvalues ​​and eigenvectors in each of steps 311 to 313 into one computational unit.

[0109] Furthermore, the calculation unit dividing unit 101 divides the Householder matrix H i The task #4-i in FIG. 12 converts the i-th column of the Householder matrix H i represents the calculation unit for converting into matrix form.

[0110] Furthermore, the computation unit dividing unit 101 defines a matrix multiplication by DORMTR in the calculation of the standard eigenvalue problem as one computation unit. Task #5 in FIG. 12 represents this computation unit.

[0111] The dependency relationship determination unit 103 receives, for example, the dependency relationship graph 301 of FIG. 12 from the dependency relationship graph generation unit 102 .

[0112] In the dependency graph 301, between task #2-0 and task #4-0, there is no path that can be traced from task #2-0 to task #4-0, nor is there a path that can be traced from task #4-0 to task #2-0. Therefore, the dependency determination unit 103 determines that there is no dependency relationship between task #2-0 and task #4-0. Similarly, there is no path that can be traced in either direction between task #2-2 and task #4-2, so the dependency determination unit 103 determines that there is no dependency relationship between task #2-2 and task #4-2.

[0113] On the other hand, between task #1-4 and task #4-8, there is no path from task #4-8 to task #1-4, but there is a path from task #1-4 to task #4-8. Therefore, the dependency relationship determination unit 103 determines that a dependency relationship exists between task #1-4 and task #4-8.

[0114] The asynchronous execution determination unit 140 determines whether asynchronous calculation is possible using the dependency relationship notified by the dependency relationship determination unit 103. For example, in FIG. 12, after task #1-i is completed, there is no dependency relationship between task #2-i and task #4-i, so the asynchronous execution determination unit 140 determines that task #2-i and task #4-i can be calculated asynchronously. Then, if performing the calculation asynchronously improves calculation efficiency, the asynchronous execution determination unit 140 decides to execute task #2-i and task #4-i asynchronously.

[0115] The computation execution unit 104 computes the standard eigenvalue problem in accordance with the presence or absence of dependency relationships between tasks for a plurality of computation units including computation units into which the DSTEDC generated by the computation unit division unit 101 is divided. That is, the computation execution unit 104 executes calculations based on the presence or absence of dependency relationships between a first task and a second task for a plurality of computation units including computation units into which the calculation of eigenvalues ​​and eigenvectors for a tridiagonal matrix obtained by tridiagonalizing a symmetric matrix is ​​divided.

[0116] The computation execution unit 104 performs computations for computation units that can be executed asynchronously using the task parallelism function of OpenMP. Here, because task #2-i is a relatively light processing task, the computation execution unit 104 may process task #2-i using one thread. On the other hand, because task #4-i is a relatively heavy processing task, it is preferable for the computation execution unit 104 to process task #4-i using multiple threads. Therefore, the computation execution unit 104 executes the processing of task #2-i using #pragma omp task and executes the processing of task #4-i using #pragma omp taskloop. This allows the computation execution unit 104 to potentially assign the thread assigned to task #2-i to the processing of task #4-i after the thread has completed its calculation, thereby improving the computational efficiency of the processor 10.

[0117] 15 is a diagram illustrating a comparison of the calculation speed between the calculation of the standard eigenvalue problem by the processor according to the second embodiment and the calculation when asynchronous execution of the calculation unit is not performed. In FIG. 11, the symmetric matrix is ​​an n×n matrix, and cases where n=1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, and 9216 are described.

[0118] In this case, when the matrix size becomes sufficiently large and the degree of parallelism becomes sufficiently large, it becomes possible to fully utilize a large number of cores, and it can be seen that the effect of the calculation by the processor 10 according to this embodiment is exhibited. As another example not shown in Fig. 15, in the calculation of the eigenvalues ​​and eigenvectors of a 10240 x 10240 symmetric matrix, the processor 10 can speed up the calculation of the standard eigenvalue problem by about 20% compared to a calculation method that does not execute the calculation units asynchronously.

[0119] As described above, the processor, which is a computing device according to this embodiment, considers the division of a tridiagonal matrix into a 2×2 matrix by DSTEDC and the calculation of eigenvalues ​​and eigenvectors as one computation unit in the calculation of the standard eigenvalue problem. The processor also considers the entire calculation of the recursive integration of eigenvalues ​​and eigenvectors, which is repeated from the terminal 2×2 matrix by DSTEDC, as one computation unit. The processor then determines whether to execute each computation unit asynchronously based on its dependency relationship as a task, and calculates the standard eigenvalue problem of the symmetric matrix according to the determination. As a result, when the matrix size becomes sufficiently large and the degree of parallelism becomes sufficiently large, DSTEDC can fully utilize multiple cores. This makes it possible to improve the computation efficiency of the standard eigenvalue problem.

[0120] Next, a third embodiment will be described. The processor according to the second embodiment differs from the first and second embodiments in the calculation unit for dividing and generating DSTEDC and DORMTR in the calculation of the standard eigenvalue problem. The computer 1 according to the third embodiment is also shown in the block diagram of FIG. 1. In the following description, the operation of each unit similar to that of the first embodiment will be omitted.

[0121] Fig. 16 is a diagram illustrating an example of a dependency graph according to Example 3. Fig. 16 illustrates an example of dependency relationships between tasks corresponding to computation units in the computation of a standard eigenvalue problem.

[0122] The computation unit dividing unit 101 divides the computations in DSYTRD, DSTEDC, and DORMTR into computation units as follows. In this embodiment, the dependency relationships between the computation units are ultimately represented by a dependency graph 401 shown in FIG. 16. In this embodiment, the processor 10 divides a 16×16 tridiagonal matrix into a 2×2 matrix in a computation using DSYTRD. However, in practice, the processor 10 does not need to divide the matrix into smaller pieces like 2×2, and it is preferable to change the matrix division size in accordance with the architecture being used.

[0123] For example, the computation unit dividing unit 101 considers the calculation of two-column tridiagonalization by DSYTRD among the calculations of the standard eigenvalue problem as one computation unit. Task #1-i in FIG. 16 represents a computation unit that performs two-column tridiagonalization, tridiagonalizing two columns starting from the i-th column. Task #1-i also includes similarity transformation. Here, since the matrix is ​​divided into 2x2 units in DSTEDC, the computation unit dividing unit 101 considers tridiagonalization of every two columns in DSYTRD as a computation unit.

[0124] Furthermore, the computational unit division unit 101 regards each stage of division of the standard eigenvalue problem up to the division of the tridiagonal matrix by DSTEDC into a 2 × 2 matrix, and the calculation of the eigenvalues ​​and eigenvectors as one computational unit. Task #2-i in FIG. 16 represents the computational unit for dividing the 2 × 2 matrix for two columns from the i-th column and calculating the eigenvalues ​​and eigenvectors of the divided 2 × 2 matrix. Here, the tridiagonalization is performed by determining the values ​​from the upper left element, but the 2 × 2 matrix to be divided can be calculated using only the determined elements.

[0125] Furthermore, the computational unit dividing unit 101 regards the calculation of integrating the eigenvalues ​​and eigenvectors of a 2 × 2 matrix by DSTEDC among the calculations of the standard eigenvalue problem as one computational unit. Task #3-i in Fig. 16 is the computational unit for integrating the eigenvalues ​​and eigenvectors of the i-th and (i+1)-th matrices when the 2 × 2 matrices are arranged in correspondence with the original tridiagonal matrix and assigned consecutive numbers from the top row.

[0126] Furthermore, the computation unit dividing unit 101 regards the calculation of integrating the eigenvalues ​​and eigenvectors of a 4 × 4 matrix by DSTEDC among the calculations of the standard eigenvalue problem as one computation unit. Task #4-i in Fig. 16 is the computation unit for integrating the eigenvalues ​​and eigenvectors of the i-th and (i+1)-th matrices when the 4 × 4 matrices are arranged in correspondence with the original tridiagonal matrix and assigned consecutive numbers from the top row.

[0127] Furthermore, the computation unit dividing unit 101 regards the calculation of integrating the eigenvalues ​​and eigenvectors of an 8 × 8 matrix by DSTEDC among the calculations of the standard eigenvalue problem as one computation unit. Task #5-i in Fig. 16 is the computation unit for integrating the eigenvalues ​​and eigenvectors of the i-th and (i+1)-th matrices when the 8 × 8 matrices are arranged in correspondence with the original tridiagonal matrix and assigned consecutive numbers from the top row.

[0128] Furthermore, the computation unit dividing unit 101 considers the calculation of the triangular matrix portion of the transformation used in task #1-i by DORMTR among the calculations of the standard eigenvalue problem as one computation unit. FIG. 17 is a diagram illustrating an overview of computations using DORMTR according to the third embodiment. The Householder matrices used for tridiagonalization have a format called compact WY representation, and multiple Householder matrices may be applied together. In this embodiment, the processor 10 applies two Householder transformations together during tridiagonalization, as shown in computation 403 in FIG. 17. In the example shown in FIG. 17, the eigenvectors of the tridiagonal matrix are obtained through seven computations 403. In this computation 403, a triangular matrix 402 is used when applying two Householder transformations together. Therefore, when performing the inverse transform of the eigenvectors, the processor 10 calculates a 2 × 2 triangular matrix 402. Task #6-i in FIG. 16 is the computation unit for performing this computation, i.e., the computation unit for calculating the triangular matrix portion of the transformation used in task #1-i.

[0129] Furthermore, the computation unit dividing unit 101 defines the computation of the inverse transformation of the eigenvectors of a tridiagonal matrix by DORMTR as one computation unit among the computations of the standard eigenvalue problem. Task #7 in FIG. 17 represents this computation unit.

[0130] The asynchronous execution determination unit 140 determines whether or not asynchronous calculations can be performed between tasks, and determines which tasks should be processed asynchronously, using, for example, the dependencies shown in Fig. 17 notified by the dependency determination unit 103. The calculation execution unit 104 then executes the calculation of the standard eigenvalue problem in accordance with the determination by the asynchronous execution determination unit 140.

[0131] In this way, the computation execution unit 104 calculates the standard eigenvalue problem according to the presence or absence of dependency relationships between tasks for a plurality of computation units including the computation units into which DSTEDC and DORMTR generated by the computation unit division unit 101 are divided. That is, the computation execution unit 104 executes calculations based on the presence or absence of dependency relationships between the first task and the second task for a number of computation units including a computation unit that calculates a triangular matrix used in the inverse transformation of the eigenvectors of a tridiagonal matrix.

[0132] The processor according to this embodiment can control tasks very flexibly, and in an environment where BLAS or LAPACK can be executed with high performance, it is possible to increase the number of tasks executed asynchronously and increase the thread parallelism of each task, thereby improving the calculation performance of the standard eigenvalue problem.

[0133] REFERENCE SIGNS LIST 1 Computer 10 Processor 11 Memory 12 Storage device 101 Computation unit division unit 102 Dependency graph generation unit 103 Dependency determination unit 104 Computation execution unit 105 Output unit 140 Asynchronous execution determination unit

Claims

1. A processing device comprising: a calculation execution unit which, for a plurality of calculation units generated by dividing the calculation of a standard eigenvalue problem for a given symmetric matrix, each of which performs a different calculation, calculates the first task and the second task asynchronously when there is no dependency between a first task and a second task among a plurality of tasks executed by each of the calculation units, in which one task performs calculation based on the result of the other task, and calculates the first task and the second task sequentially when there is a dependency between the first task and the second task; and an output unit which outputs the calculation result of the standard eigenvalue problem for the given symmetric matrix calculated by the calculation execution unit.

2. The processing device according to claim 1, characterized in that the calculation execution unit executes the calculation of the calculation unit in multiple threads for each of the first task and the second task when the calculation amount of the calculation unit to be executed is equal to or greater than a predetermined value.

3. The arithmetic processing device according to claim 1, further comprising a dependency graph generation unit that generates a dependency graph showing the input / output relationship of the calculation results between the multiple tasks, and the calculation execution unit further comprises a dependency determination unit that determines whether or not a dependency exists between the first task and the second task based on the dependency graph generated by the dependency graph generation unit.

4. The processing device according to claim 1, characterized in that the calculation execution unit executes calculations for the plurality of calculation units, including calculation units obtained by dividing the calculation of the tridiagonalization of a symmetric matrix included in the calculation of the standard eigenvalue problem for the specified symmetric matrix, based on the existence or absence of a dependency between the first task and the second task.

5. The processing device according to claim 1, characterized in that the calculation execution unit executes calculations for the plurality of calculation units, including calculation units obtained by dividing the calculation of eigenvalues ​​and eigenvectors for a tridiagonal matrix obtained by tridiagonalizing a symmetric matrix included in the calculation of a standard eigenvalue problem for the specified symmetric matrix, based on the existence or absence of a dependency between the first task and the second task.

6. The processing device according to claim 5, characterized in that the calculation execution unit executes calculations for the plurality of calculation units, including a calculation unit that calculates a triangular matrix used in the inverse transformation of the eigenvectors of the tridiagonal matrix, based on the existence or absence of a dependency relationship between the first task and the second task.

7. A computational processing method characterized by having a processor execute the following process for a plurality of computational units generated by dividing the calculation of a standard eigenvalue problem for a given symmetric matrix, each of which performs a different calculation: if there is no dependency between a first task and a second task among a plurality of tasks executed by each of the computational units such that one performs a calculation based on the result of the other, the first task and the second task are calculated asynchronously; if there is a dependency between the first task and the second task, the first task and the second task are calculated sequentially.

8. The computational processing method according to claim 7, wherein the processing includes, for each of the first task and the second task, a process of executing the calculation of the computation unit in multiple threads when the computation amount of the computation unit to be executed is equal to or greater than a predetermined value.

9. The computational processing method according to claim 7, wherein the processing includes the steps of: generating a dependency graph showing input / output relationships of the results of calculations between the plurality of tasks; and determining whether or not there is a dependency relationship between the first task and the second task based on the generated dependency graph.

10. The computational processing method according to claim 7, wherein computing the first task and the second task includes computing the first task and the second task for the plurality of computational units including computational units obtained by dividing a computation of tridiagonalization of a symmetric matrix, included in the computation of a standard eigenvalue problem for the specified symmetric matrix, based on the presence or absence of a dependency relationship between the first task and the second task.

11. The computational processing method according to claim 7, wherein computing the first task and the second task includes computing the first task and the second task for a plurality of computational units including computational units obtained by dividing the computation of eigenvalues ​​and eigenvectors for a tridiagonal matrix obtained by tridiagonalizing a symmetric matrix included in the computation of a standard eigenvalue problem for the specified symmetric matrix into a plurality of computational units, based on the presence or absence of a dependency relationship between the first task and the second task.

12. The computational processing method according to claim 11, wherein calculating the first task and the second task includes calculating the first task and the second task for the plurality of computational units including a computational unit that calculates a triangular matrix used in the inverse transformation of an eigenvector of the tridiagonal matrix, based on the presence or absence of a dependency relationship between the first task and the second task.

Citation Information

Patent Citations

  • Account checking result data notification method and device, electronic device and storage medium

    CN113656194A

  • Parallel processor and program parallelizing device

    JP2009151645A

  • Task parallel processing method, device and program therefor, and program generation method, device, and program therefor

    JP2013122633A