Circuit information, calculation method and program
The computing device efficiently solves Ising model optimization problems using matrix multiplication and symplectic Euler updates, addressing complexity and scalability issues in existing hardware, enabling fast and cost-effective solutions for large variable sets.
Patent Information
- Application Number
- JP2023121420
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2038-09-18
AI Technical Summary
Existing hardware solutions for solving optimization problems using Ising models are complex, inefficient, and struggle with handling large numbers of variables and adapting to changes in variable counts without significant design modifications.
A computing device that uses a hardware description language to implement a novel method of solving Ising model optimization problems through matrix multiplication and simultaneous ordinary differential equations, separating calculations for variables x and y, and employing a symplectic Euler method for efficient updates, allowing for a simple configuration and reduced computational burden.
The solution enables fast and cost-effective calculation of optimal solutions to Ising model problems with a simple configuration, capable of handling large numbers of variables and adapting to changes without major design modifications.
Smart Images

Figure 0007551863000016 
Figure 0007551863000029 
Figure 0007551863000032
Abstract
Description
[Technical field]
[0001] An embodiment of the present invention relates to circuit information, a calculation method, and a program. [Background technology]
[0002] Various algorithms have been proposed for solving optimization problems using the Ising model, and hardware for solving optimization problems using the Ising model has also been proposed.
[0003] It is preferable that the hardware for solving such optimization problems has a simple configuration and can solve the problem quickly. It is also preferable that the hardware for solving such optimization problems can handle a large number of variables. It is also preferable that the hardware for solving such optimization problems can flexibly handle changes in the number of variables to be handled without requiring major design changes. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 5865456 [Patent Document 2] JP 2018-005541 A [Patent Document 3] JP 2018-010474 A [Non-patent literature]
[0005] [Non-Patent Document 1] T. Inagaki et al., “A coherent ising machine for 2000-node optimization problems”, Science 354, 603 (2016). [Non-Patent Document 2] H. Goto, “Bifurcation-based adiabatic quantum computation with a nonlinear oscillator network”, Sci. Rep. 6, 21686 (2016). [Non-Patent Document 3] Y. Haribara et al., “Performance evaluation of coherent Ising machines against classical neural networks”, Quantum Sci. Technol. 2, 044002 (2017). Summary of the Invention [Problem to be solved by the invention]
[0006] The problem that the invention aims to solve is to solve an optimization problem with a simple configuration. [Means for solving the problem]
[0007] The circuit information according to the embodiment is written in a hardware description language. , A computing device that solves optimization problems using the Ising model To The computing device , No. N (N is an integer of 2 or more) first intermediate variables at one time are matrix-multiplied by a coefficient matrix including preset coefficients of N rows and N columns to calculate N second intermediate variables at the first time. computing device calculates N first variables at a second time one sampling period after the first time and N second variables at the second time based on the N second intermediate variables at the first time, and calculates the N first variables at the second time. The first Write one variable into the memory, and write N second variables at the second time. The first Write to 2 variable memory. computing device The time is increased for each sampling period from the start time, and the a process of calculating the N second intermediate variables at the first time, a process of calculating the N second variables at the second time, a process of writing the N first variables at the second time to the first variable memory, and a process of writing the N second variables at the second time to the second variable memory. Execute the above. computing deviceoutputs N first variables at a preset end time. computing device is a set of multiple operations. Execute the action The above The computing device Multiple Operations In each of the processes A division matrix including coefficients of some rows and N columns different from each other in the coefficient matrix is set, and a part of the N second intermediate variables at the first time is calculated by matrix multiplying the N first intermediate variables at the first time by the set division matrix. The N first variables correspond to N spins in the Ising model. The N second variables correspond to the N spins. The N spins correspond to N points. Each of the N first variables represents a position of a point corresponding to a corresponding spin among the N points. Each of the N second variables represents a momentum of a point corresponding to a corresponding spin among the N points. The N first intermediate variables correspond to the N first variables, and each of the N first intermediate variables is a value obtained by multiplying a corresponding first variable among the N first variables or the corresponding first variable by a preset coefficient. The N second intermediate variables correspond to the N second variables. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a configuration diagram of a computing device according to a first embodiment. [Diagram 2] 4 is a flowchart showing a processing flow of a calculation unit. [Diagram 3] FIG. 11 is a diagram showing the configuration of a calculation unit according to a second embodiment. [Figure 4] FIG. 11 is a relationship diagram of variables and a coefficient matrix in the second embodiment. [Diagram 5] FIG. 4 is a diagram showing a first example of the configuration of a function calculation unit. [Figure 6] FIG. 13 is a diagram showing a second example of the configuration of the function calculation unit. [Figure 7] FIG. 13 is a diagram showing a third example of the configuration of the function calculation unit. [Figure 8] FIG. 13 is a diagram showing a fourth example of the configuration of the function calculation unit. [Figure 9] FIG. 13 is a relationship diagram of variables and a coefficient matrix in the third embodiment. [Figure 10] FIG. 13 is a configuration diagram of a matrix multiplication unit according to the third embodiment. [Figure 11] FIG. 13 is a diagram showing an implementation example according to the third embodiment. [Figure 12] FIG. 13 is a relationship diagram of variables and a coefficient matrix in the fourth embodiment. [Figure 13] FIG. 13 is a configuration diagram of a division matrix multiplication unit according to the fourth embodiment. [Figure 14] FIG. 13 is a relationship diagram of variables and a coefficient matrix in the fifth embodiment. [Figure 15] FIG. 13 is a configuration diagram of a sub-matrix multiplication unit according to the sixth embodiment. [Figure 16] FIG. 4 is a diagram showing a division matrix stored in a division matrix memory. [Figure 17] FIG. 13 illustrates sub-matrices transmitted to a multiply-accumulate unit. [Figure 18] FIG. [Figure 19] FIG. 13 is a diagram showing parameters and timing in the fifth embodiment. [Figure 20] FIG. 13 is a configuration diagram of a time evolution section according to the sixth embodiment. [Figure 21] 1 is a timing chart of a first intermediate variable and a second intermediate variable. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, the computing device 10 according to the embodiment will be described in detail with reference to the drawings. The computing device 10 according to the embodiment aims to solve an optimization problem using an Ising model.
[0010] (Premise) First, the premise of the processing executed by the computing device 10 will be described.
[0011] Ising model energy E Ising is expressed by the following equation (1).
number
[0012] In formula (1), N represents the number of spins. i represents the state of the i-th spin. For example, s i = ±1. j represents the j-th spin state. For example, s j =±1. i and j are integers greater than or equal to 0 and less than or equal to (N-1).
[0013] In formula (1), J i,j is the coefficient in row i and column j of the N row x N column coefficient matrix J. i,j represents the interaction between the i-th spin and the j-th spin. The coefficient matrix J is, for example, a real symmetric matrix. A real symmetric matrix is a matrix whose diagonal elements are all zero. h i is the i-th coefficient in the N coefficient array. i represents the action applied solely to the i-th spin. The energy E of the Ising model Ising The problem of searching for the spin state (ground state) that minimizes is called the Ising problem. A machine that solves the Ising problem may be called an Ising machine. An Ising machine is input with the coefficient matrix J and h, and calculates and outputs the ground state or an approximate solution with lower energy.
[0014] A classical model of the quantum bifurcation machine (hereafter referred to as the classical bifurcation machine) has been proposed. The classical bifurcation machine calculates the optimal solution of equation (1) using the equation of motion expressed as simultaneous ordinary differential equations shown in equations (2), (3), and (4).
[0015]
number
number
number
[0016] In formulas (2), (3) and (4), N represents the number of mass points and is an integer equal to or greater than 2. N corresponds to the number of spins. xi is a real number that represents the position of the i-th particle. i is a real number representing the momentum of the i-th mass point, where i and j are integers between 0 and (N-1).
[0017] In formula (2), formula (3) and formula (4), J i,j is the coefficient of row i and column j included in a coefficient matrix J that includes predetermined coefficients of N rows and N columns. The coefficient matrix J is, for example, a real symmetric matrix. i is the i-th coefficient included in the predetermined N-coefficient array. In equations (2), (3) and (4), h i The term may be omitted.
[0018] In Equation (2), Equation (3), and Equation (4), D is a constant corresponding to, for example, detuning. c is a constant. K is a constant corresponding to, for example, the Kerr coefficient. For example, D, c, and K are predetermined.
[0019] In formulas (2), (3), and (4), t represents time. p(t) is, for example, a function with t as a variable, and is the pump rate. a(t) is a function with t as a variable. a(t) is, for example, expressed by the following formula (5).
number
[0020] A classical bifurcation machine is a machine that calculates x by increasing t from zero to a sufficiently large value in small increments of time using equations (2) and (3) for each t. i and y i Then, the classical branching machine updates x when t is large enough. i The sign (±1) of the final value of s i In this way, the classical bifurcation machine regards the Ising model as a Hamiltonian dynamical system with H in equations (2), (3), and (4) as the Hamiltonian.
[0021] Simulated annealing is also known as a method for calculating the optimal solution of the Ising model. This method employs a sequential update algorithm. The sequential update algorithm selects multiple spins one by one and updates them sequentially. This type of sequential update algorithm is not suitable for parallel calculation, and it is difficult to speed up the algorithm.
[0022] In response to this, an algorithm can be considered that solves the equations of motion of classical bifurcation machines using a discrete solution method on a digital computer. This algorithm differs from simulated annealing in that it can update multiple variables simultaneously.
[0023] However, classical branching machines perform matrix multiplication using the coefficient matrix J, which is the most computationally intensive, as x i and y i In order to calculate both of these, the classical bifurcation machine had to execute the classical bifurcation machine. In addition, the classical bifurcation machine had to solve the equations of motion expressed by equations (2), (3), and (4) by executing a discrete method (such as the fourth-order Runge-Kutta method), which has a high computational cost. For this reason, the classical bifurcation machine had to perform an enormous amount of calculations.
[0024] In response to this, the calculation device 10 according to the embodiment calculates an optimal solution to equation (1) using an equation of motion expressed by new simultaneous ordinary differential equations shown in the following equations (6), (7), and (8).
[0025]
number
number
number
[0026] In formulas (6), (7) and (8), N, x i、 y i , i, j, J i,j , h i, D, c, K, t, p(t) and a(t) are the same as in equations (2) to (4).
[0027] The calculation device 10 according to the embodiment increases t from zero to a sufficiently large value in small time increments, and calculates x i and y i Then, the calculation device 10 according to the embodiment updates x when t is made sufficiently large. i The sign (±1) of the final value of s i In this way, the computing device 10 according to the embodiment solves the Ising problem by simulating the time evolution of a Hamiltonian dynamical system in which H in equation (8) is the Hamiltonian.
[0028] In the formulas (6), (7), and (8), the matrix multiplication for the coefficient matrix J with the largest amount of calculation is included in the formula (7) but not included in the formula (6). Therefore, the calculation device 10 according to the embodiment performs the matrix multiplication for the coefficient matrix J with the largest amount of calculation as y i It only needs to be run to update x i You do not need to run it to update x i The time derivative of (dx i In equation (6) for calculating p(t), p(t) is eliminated. Therefore, the computing device 10 according to the embodiment can calculate the optimal solution of the Ising model with a small amount of calculation.
[0029] Also, x i The time derivative of (dx i The formula (6) for calculating y i Contains x i Also, y i The time derivative of (dy i / dt) is calculated by the formula (7) x i Contains y i Does not include.
[0030] In other words, when using equations (6) and (7), in the Hamiltonian, x i andy iTherefore, the computing device 10 according to the embodiment applies a stable discrete solution method with a small amount of calculation to calculate x i and y i For example, the calculation device 10 according to the embodiment can update x i and y i Therefore, the computing device 10 according to the embodiment can calculate an optimal solution to an optimization problem using an Ising model with simple calculations and a simple configuration.
[0031] Furthermore, the computing device 10 according to the embodiment may calculate the optimal solution of equation (1) by using an equation of motion expressed by new simultaneous ordinary differential equations shown in the following equations (9) and (10).
[0032]
number
number
[0033] In the formulas (9) and (10), N, x i、 y i , i, j, J i,j , h i , D, c, K, t, p(t) and a(t) are the same as in equations (2) to (4). In equations (9) and (10), n is an even number equal to or greater than 2.
[0034] In this case, the calculation device 10 according to the embodiment increases t from zero to a sufficiently large value in small time increments, and calculates x i and y i Then, the calculation device 10 according to the embodiment updates x when t is made sufficiently large. i The sign (±1) of the final value of s i The optimal solution is output.
[0035] Here, the matrix multiplication for the coefficient matrix J with the largest amount of calculation is included in formula (9) but not in formula (10). Therefore, even when formulas (9) and (10) are used, the calculation device 10 according to the embodiment performs the matrix multiplication for the coefficient matrix J with the largest amount of calculation as y i It only needs to be run to update x i You do not need to run it to update x i The time derivative of (dx i In equation (9) for calculating p(t), p(t) is eliminated. Therefore, even when equations (9) and (10) are used, the computing device 10 according to the embodiment can calculate an optimal solution to an optimization problem using an Ising model with a small amount of calculation.
[0036] Also, x i The time derivative of (dx i The formula (9) for calculating y i Contains x i Also, y i The time derivative of (dy i / dt) is calculated by the formula (10) i Contains y i Does not include.
[0037] In other words, even when using equations (9) and (10), in the Hamiltonian, x i andy i Therefore, when formula (9) and formula (10) are used, similarly to the case where formula (6) and formula (7) are used, the computing device 10 according to the embodiment can calculate an optimal solution to an optimization problem using an Ising model with simple calculations and a simple configuration.
[0038] (First embodiment) A computing device 10 according to the first embodiment will be described. In the description of each embodiment, devices, blocks, circuits, etc. having substantially the same functions and configurations as those of devices, blocks, circuits, etc. described up to that point will be assigned the same reference numerals, and detailed description will be omitted except for the differences.
[0039] 1 is a diagram showing the configuration of a computing device 10 according to the first embodiment. The computing device 10 is a device that solves an optimization problem using an Ising model by using the simultaneous ordinary differential equations shown in formulas (7) and (8) or the simultaneous ordinary differential equations shown in formulas (9) and (10).
[0040] The calculation device 10 includes a calculation unit 20, an input unit 22, an output unit 24, and a setting unit .
[0041] The calculation unit 20 is an arithmetic processing device including, for example, one or more processors such as CPUs (Central Processing Units) and memories. The calculation unit 20 may be the circuitry of the second embodiment or later.
[0042] The calculation unit 20 increments a parameter t representing a sampling time from a start time (for example, 0) in increments of a small time (dt). For each sampling time, the calculation unit 20 calculates N first variables x i and N second variables y i Then, the calculation unit 20 updates the N first variables x i Output.
[0043] Prior to the calculation process by the calculation unit 20, the input unit 22 inputs N first variables x i and N second variables y i The N first variables x i and N second variables y i may be, for example, a value generated by random numbers, or may be a preset value (for example, all 0 or all a predetermined value).
[0044] After the calculation process by the calculation unit 20 is completed, the output unit 24 outputs the N first variables x iThen, the output unit 24 obtains the N first variables x i The Ising model outputs a value representing the sign of (e.g., +1, -1) as the optimal solution for the combination of N spin states in the Ising model.
[0045] Prior to the calculation process by the calculation unit 20, the setting unit 26 sets the parameters used in the simultaneous ordinary differential equations shown in equations (6) and (7) and the simultaneous ordinary differential equations shown in equations (9) and (10) for the calculation unit 20. More specifically, the setting unit 26 sets N, J, h, D, c, K, p(t), and a(t).
[0046] N is an integer of 2 or more that represents the number of first variables and second variables. J is a coefficient matrix with N rows and N columns. i,j is the coefficient in row i, column j of the coefficient matrix J. h is a coefficient array containing N coefficients. i is the i-th coefficient in the coefficient array h. D, c, and K are constants. p(t) is a function whose variable is the sampling time. a(t) is a function whose variable is the sampling time.
[0047] Furthermore, the setting unit 26 may set dt, T, and M. dt is a constant representing the sampling period (microsecond). T is a constant representing the sampling time corresponding to the end time. M is an integer of 1 or more that indicates the number of repetitions of the operations of formulas (6) and (7), or the number of repetitions of the operations of formulas (9) and (10).
[0048] The setting unit 26 may arbitrarily change some of these parameters in response to a user operation, or may set these parameters to fixed values without changing them for each calculation.
[0049] FIG. 2 is a flowchart showing the flow of processing by the calculation unit 20.
[0050] First, in S11, the calculation unit 20 initializes t, p, and a. For example, the calculation unit 20 sets all of t, p, and a to 0. t is a parameter representing a sampling time. p is a parameter representing the value of p(t) at time t. a is a parameter representing the value of a(t) at time t.
[0051] Next, the calculation unit 20 repeats the processes from S13 to S20 until t becomes equal to or greater than a preset end time T (loop process between S12 and S21). Note that, if a(t) is an increasing function, the calculation unit 20 may repeat the processes from S13 to S20 until a becomes equal to or greater than a predetermined value.
[0052] In S13, the calculation unit 20 calculates N first variables x i Each of the first intermediate variables x is multiplied by a sampling period (infinite time) dt and a preset coefficient c. i That is, in S13, the calculation unit 20 executes the calculation of the following equation (21). x i ´=dt×c×x i …(twenty one)
[0053] Next, in S14, the calculation unit 20 calculates N first intermediate variables x i ' and a coefficient matrix J containing coefficients of N rows and N columns set in advance, N second intermediate variables b i That is, in S14, the calculation unit 20 executes the calculation of the following equation (22).
number
[0054] The calculation unit 20 may execute the process of S13 after executing the process of S14. In this case, in S14, the calculation unit 20 calculates the N first variables x iThen, in S13, the calculation unit 20 multiplies each of the N values calculated in S14 by (dt×c) to calculate N second intermediate variables b i Calculate.
[0055] Next, in S15, the calculation unit 20 calculates N second variables y i For each of these, the corresponding second intermediate variable b i By adding N second variables y i That is, in S15, the calculation unit 20 executes the calculation of the following equation (23). y i +=b i …(twenty three)
[0056] Next, the calculation unit 20 repeats the process from S17 to S18 M times (loop process between S16 and S19), where M is an integer equal to or greater than 1.
[0057] In S17, the calculation unit 20 calculates the second variable y i For example, in S17, when the calculation unit 20 executes the calculation according to the formula (7), it executes the calculation of the following formula (24). y i +=dt´×[(-D+p-Kx i 2 )x i -c×h i ×a]…(24)
[0058] Furthermore, for example, in S17, when the calculation unit 20 executes the calculation according to the formula (10), it executes the calculation of the following formula (25): In formula (25), n is an even number equal to or greater than 2. y i +=dt´×{[(-D+p)(1+x i n )-Kx i n+2 ]x i -c×h i ×a}…(25)
[0059] Next, in S18, the calculation unit 20 performs a calculation according to the formula (6) or the formula (9) to obtain the first variable x i It should be noted that equations (6) and (9) are the same equation. For example, in S18, when the calculation unit 20 executes the calculation according to equation (6) or equation (9), it executes the calculation of equation (26) below. x i +=dt´×D×y i …(26)
[0060] The loop process from S16 to S19 corresponds to the repeated calculation in the Symplectic Euler method. The calculation unit 20 may execute the process of S17 and the process of S18 in reverse. That is, the calculation unit 20 executes the process of S17 and the process of S18 in reverse. i After updating the second variable y i may be updated.
[0061] After executing the loop process from S16 to S19, the calculation unit 20 advances the process to S20. In S20, the calculation unit 20 updates t by adding dt to t. Furthermore, the calculation unit 20 updates p and a. For example, the calculation unit 20 updates p by adding a preset dp to p. Furthermore, the calculation unit 20 updates a by calculating the square root of the updated p.
[0062] After executing the process of S20, the calculation unit 20 judges whether t is equal to or greater than T. If t is smaller than T, the calculation unit 20 returns the process to S13 and repeats the process from S13. If t is equal to or greater than T, the calculation unit 20 ends this flow.
[0063] By executing the above-described processing, the calculation device 10 according to the first embodiment can solve the optimization problem using the simultaneous ordinary differential equations shown in formulas (6) and (7) or the simultaneous ordinary differential equations shown in formulas (9) and (10). i and the second variable y ican be updated quickly with simple calculations or a simple configuration. Therefore, the calculation device 10 according to the first embodiment can calculate an optimal solution to an optimization problem quickly and at low cost.
[0064] Second embodiment A computing device 10 according to the second embodiment will be described.
[0065] 3 is a diagram showing a configuration of a calculation unit 20 according to the second embodiment. In the second embodiment, the calculation device 10 is a circuit realized by one or more semiconductor devices. The calculation device 10 may be, for example, a field programmable gate array (FPGA), a gate array, or an application specific integrated circuit (ASIC). The calculation device 10 may also include a processor as a part thereof.
[0066] The calculation unit 20 according to the second embodiment includes a matrix multiplication unit 28, a time evolution unit 30, and a management unit 32.
[0067] The matrix multiplication unit 28 multiplies N first intermediate variables x i The matrix multiplication unit 28 obtains N first intermediate variables x′(t1) at the first time t1 from the time evolution unit 30. i ´(t1) and the coefficient matrix J are multiplied to obtain N second intermediate variables b i Calculate (t1).
[0068] For example, the matrix multiplication unit 28 includes a coefficient matrix memory 36 and a matrix multiplication execution unit 38. The coefficient matrix memory 36 stores a coefficient matrix J. The matrix multiplication execution unit 38 executes a matrix multiplication process for N first intermediate variables x i ´(t1) is multiplied by the coefficient matrix J.
[0069] The time evolution unit 30 calculates N second intermediate variables b i (t1) from the matrix multiplication unit 28. The time evolution unit 30 calculates N second intermediate variables bi Based on (t1), N first variables x at a second time t2 representing a sampling time one sampling period after the first time t1 are calculated. i (t2), N second variables y at the second time t2 i (t2) and N first intermediate variables x at the second time t2 i Calculate ´(t2).
[0070] The management unit 32 increments the sampling time for each sampling period from the start time, and causes the matrix multiplication unit 28 and the time evolution unit 30 to execute processing for each sampling time.
[0071] That is, the management unit 32, for example, transmits to the matrix multiplication unit 28 the N second intermediate variables b i Next, the management unit 32 causes the time evolution unit 30 to calculate N first variables x i (t2), N second variables y i (t2) and N first intermediate variables x i Next, the management unit 32 causes the matrix multiplication unit 28 to calculate N second intermediate variables b i Next, the management unit 32 causes the time evolution unit 30 to calculate N first variables x (t2) at a third time t3 which represents a sampling time one sampling period after the second time t2. i (t3), N second variables y i (t3) and N first intermediate variables x i In this manner, the management unit 32 causes the matrix multiplication unit 28 and the time evolution unit 30 to execute the processes alternately while increasing the sampling time.
[0072] Note that the N first variables x at the start time (for example, t0) i (t0) and N second variables y i (t0) is, for example, given in advance by the input unit 22 prior to the calculation processing.
[0073] For example, the time evolution section 30 has a first variable memory 40, a second variable memory 42, a first addition section 44, a function operation section 46, a first multiplication section 48, and a first intermediate variable memory 50.
[0074] The first variable memory 40 stores N first variables x i The second variable memory 42 stores N second variables y i Remember (t1).
[0075] The first addition unit 44 calculates the N second intermediate variables b i The first adder 44 obtains N second variables y (t1) at the first time t1 stored in the second variable memory 42. i At (t1), N second intermediate variables b i (t1), N second variables y i For example, the first adder 44 updates the second variable y(t1) of the last index (i=N-1) from the second variable y0(t1) of the first index (i=0). N-1 (t1), in order of index, for N second variables y i Update (t1).
[0076] In the embodiment, adding N first values and N second values means generating N third values by adding values of the same index.
[0077] The function calculation unit 46 calculates the N first variables x at the first time t1 stored in the first variable memory 40. i (t1), and the updated N second variables y i Based on (t1), N first variables x at the second time t2 i (t2) and N second variables y iFor example, the function calculation unit 46 calculates the first variable x(t2) of the last index (i=N-1) from the first variable x0(t2) and the second variable y0(t2) of the first index (i=0). N-1 (t2) and the second variable y N-1 (t2) in order of index, the first N variables x i (t2) and N second variables y i Calculate (t2).
[0078] The function calculation unit 46 calculates the N first variables x i (t2) into the first variable memory 40. For example, the function calculation unit 46 writes N first variables x i (t2) into the first variable memory 40 in sequence starting from the first variable x0(t2) at the top index (i=0). The first variable memory 40 is, for example, a dual port memory, and can write data to another address while reading data from the other address. When the first variable memory 40 is a dual port memory, the function calculation unit 46 writes each of the N first variables x0(t2) at the second time t2 into the first variable memory 40 in sequence starting from the first variable x0(t2) at the top index (i=0). i (t2) is the N first variables x i The address where (t1) was stored can be overwritten.
[0079] The function calculation unit 46 calculates N second variables y i (t2) in the second variable memory 42. For example, the function calculation unit 46 writes N second variables y i The function calculation unit 46 writes each of the N second variables y0(t2) at the second time t2 into the second variable memory 42 in sequence starting from the second variable y0(t2) at the top index. The second variable memory 42 is, for example, a dual port memory. When the second variable memory 42 is a dual port memory, the function calculation unit 46 writes each of the N second variables y0(t2) at the second time t2 into the second variable memory 42 in sequence starting from the second variable y0(t2) at the top index. i (t2) is the N second variables y i The address where (t1) was stored can be overwritten.
[0080] The first multiplication unit 48 multiplies the N first variables x i (t2) by a preset value (in this embodiment, (dt×c)). i ´ The first intermediate variable memory 50 calculates N first intermediate variables x (t2) at the second time t2 calculated by the first multiplication unit 48. i ´(t2) is stored. Note that the N first intermediate variables x i The matrix multiplication unit 28 receives the matrix multiplication result x′(t2) from the matrix multiplication unit 28 after it is temporarily stored in the first intermediate variable memory 50. The first intermediate variable memory 50 stores the N first intermediate variables x′(t2) at the second time t2. i The first intermediate variable memory 50 holds each of the intermediate variable memory elements ′(t2) from the time they are generated by the first multiplication unit 48 until they are transmitted to the matrix multiplication unit 28. The first intermediate variable memory 50 may include, for example, a First In First Out (FIFO) memory.
[0081] In such a configuration, the matrix multiplication unit 28 executes the process of S14 described in the first embodiment. The first addition unit 44 executes the process of S15. The function calculation unit 46 executes the processes from S16 to S19. The first multiplication unit 48 executes the process of S13. The management unit 32 manages S11, S20, and the loop process between S12 and S21. Therefore, according to the calculation unit 20 of the second embodiment, as in the first embodiment, it is possible to calculate an optimal solution to an optimization problem quickly and at low cost.
[0082] The first multiplication unit 48 may be provided in front of the first addition unit 44 instead of in front of the first intermediate variable memory 50. This change in arrangement corresponds to the reverse of the processes in S13 and S14 in the first embodiment. However, when the N first variables x iWhen the value by which each of the first intermediate variables x (t2) is multiplied (in this embodiment, (dt×c)) is smaller than 1, the first multiplication unit 48 is preferably provided in the previous stage of the first intermediate variable memory 50. In this way, the first multiplication unit 48 multiplies the N first intermediate variables x i By reducing the number of digits of (t2), the probability of overflow in the matrix multiplication unit 28 can be reduced.
[0083] When the first multiplication unit 48 is provided in front of the first addition unit 44, the first intermediate variable memory 50 stores N first variables x i (t2) is the N first intermediate variables x i In this case, the first multiplier 48 stores the N second intermediate variables b i In this case, the first adder 44 multiplies each of the N second variables y i (t1) by a preset value (dt×c) by the first multiplication unit 48 to obtain N second intermediate variables b i (t1), N second variables y i Update (t1).
[0084] The time evolution unit 30 also calculates N first intermediate variables x i ´(t1) is the first intermediate variable x of the first number (the first number is an integer equal to or greater than 1) in one clock cycle. i The matrix multiplication unit 28 may output the second intermediate variable b′(t1) to the matrix multiplication unit 28 as a first intermediate stream X′ including the N second intermediate variables b′(t1) at the first time t1. i (t1) is the second intermediate variable b i The second intermediate stream B may be output to the time evolution unit 30 as a second intermediate stream B including (t1).
[0085] Here, a stream refers to time-series data. More specifically, a stream refers to a data string that includes P data sets (P is an integer equal to or greater than 1) obtained by dividing N data sets into each set of P data sets for each clock cycle.
[0086] When the matrix multiplication unit 28 and the time evolution unit 30 acquire such a stream, they execute processing in order starting from the data set acquired first. This allows the matrix multiplication unit 28 and the time evolution unit 30 to start processing before acquiring all data included in the stream is completed. Furthermore, when the matrix multiplication unit 28 and the time evolution unit 30 complete the calculation of the first data set of N pieces of data, they start transmitting data sequentially starting from the data set for which the calculation has been completed. This allows the matrix multiplication unit 28 and the time evolution unit 30 to start processing the next unit before the calculation of all data is completed.
[0087] FIG. 4 shows the N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i The matrix multiplication unit 28 calculates N first intermediate variables (x0′, x1′, x2′, ..., x i ´,…,x N-1 Furthermore, the matrix multiplication unit 28 obtains a coefficient matrix (J 0,0 ,J 0,1 ,J 0,2 ,…,J i,j ,…,J N-1,N-1 ) to remember.
[0088] Then, the matrix multiplication unit 28 multiplies the N first intermediate variables (x0′, x1′, x2′, . . . , x i ´,…,x N-1 ´) and the coefficient matrix (J 0,0 ,J 0,1 ,J 0,2 ,…,J i,j ,…,J N-1,N-1 ) and N second intermediate variables (b0, b1, b2, …, b i ,…,b N-1 ) is calculated.
[0089] In the second embodiment, the matrix multiplication unit 28 may perform the matrix multiplication by any process. In addition, in the second embodiment, the matrix multiplication unit 28 may include, for example, a processor or the like inside and perform the matrix multiplication by a program.
[0090] 5 is a diagram showing a first example of the configuration of the function calculation unit 46. The function calculation unit 46 according to the first example has a first FX calculation unit 51-1, a first FX addition unit 52-1, a first FY calculation unit 53-1, and a first FY addition unit 54-1.
[0091] The first FX calculation unit 51-1 performs a first function calculation (FX(x i ) to calculate N second differential values. The first FX adder 52-1 calculates N second update values by adding the N second differential values calculated by the first FX calculation unit 51-1 and the N updated second variables calculated by the first adder 44.
[0092] The first FY calculation unit 53-1 performs a second function calculation (FY(y i ) to calculate N first differential values. The first FY adder 54-1 calculates N first update values by adding the N first differential values calculated by the first FY calculation unit 53-1 to the N first variables at the first time.
[0093] Then, function calculation unit 46 provides the N first update values calculated by first FY adder 54-1 to first variable memory 40. First variable memory 40 stores the N first update values calculated by first FY adder 54-1 as N first variables at the second time.
[0094] Furthermore, function calculation unit 46 provides the N second update values calculated by first FX adder unit 52-1 to second variable memory 42. Second variable memory 42 stores the N second update values calculated by first FX adder unit 52-1 as N second variables at the second time.
[0095] Here, the first function calculation is the calculation of the following formula (31). FX(x i )=dt´×[(-D+p-Kx i 2 )x i -c×h i ×a]…(31)
[0096] Moreover, the second function is the calculation of the following equation (32). FY(y i )=dt´×D×y i …(32)
[0097] Moreover, the first function operation may be the operation of the following formula (33). FX(x i )=dt´×{[(-D+p)(1+x i n )-Kx i n+2 ]x i -c×h i ×a}…(33)
[0098] In formulas (31), (32) and (33), x i is the i-th first variable among the N first variables at the first time, or the i-th first update value among the N first update values. y i is the i-th second variable out of the N updated second variables calculated by the first adder 44, or the i-th second update value out of the N second update values.
[0099] dt' is a preset infinitesimal time. D, c, and K are preset constants. h i is a coefficient set for each i. p and a are values that increase at each sampling time according to a predetermined arithmetic expression.
[0100] The function calculation unit 46 having such a first example configuration can execute the loop process from S16 to S19 in the first embodiment once in the order of S17 → S18. As a result, the function calculation unit 46 can use a method called the Symplectic Euler method to evolve N first variables and N second variables at a first time point over time to calculate N first variables and N second variables at a second time point.
[0101] Furthermore, the function calculation unit 46 according to the first example may realize the calculation by pipeline processing. When executing the pipeline processing, for example, the function calculation unit 46 calculates the first variable X IN and the second variable Y IN In each clock cycle, the function calculation unit 46 receives one variable pair including the first variable X OUT and the second variable Y OUT Calculate one pair of variables including
[0102] Specifically, when pipeline processing is performed, function operation unit 46 further has two stages of X transfer registers 55-1 to 55-2, two stages of Y transfer registers 56-1 to 56-2, one X output register 57, and one Y output register 58.
[0103] The first-stage X transfer register 55-1 transfers one first variable X from the first variable memory 40 at a first time instant among the N first variables at the first time instant every clock cycle. IN and the first variable X IN The first-stage Y transfer register 56-1 holds one second variable Y out of the N second variables updated by the first adder 44 for one clock cycle. IN and the second variable Y INThe first-stage X transfer register 55-1 and the first-stage Y transfer register 56-1 each acquire one first variable and one second variable of the same index i in the same clock cycle.
[0104] The first FX calculation unit 51-1 transfers the first variable X stored in the first-stage X transfer register 55-1 at each clock cycle. IN The first FX adder 52-1 calculates a second differential value by executing a first function operation on the second variable Y IN The second update value Y1 is calculated by adding
[0105] The second-stage X transfer register 55-2 transfers the first variable X held in the first-stage X transfer register 55-1 in the immediately preceding clock cycle. IN and the first variable X IN The second-stage Y transfer register 56-2 acquires the second update value Y1 calculated by the first FX adder 52-1 in the immediately preceding clock cycle for each clock cycle, and holds the acquired second update value Y1 for one clock cycle.
[0106] The first FY calculation unit 53-1 calculates a first differential value by performing a second function operation on the second update value Y1 stored in the second-stage Y transfer register 56-2 every clock cycle. The first FY addition unit 54-1 calculates the first differential value calculated in the clock cycle by the first FY calculation unit 53-1 and the first variable X stored in the second-stage X transfer register 55-2 every clock cycle. IN The first update value X1 is calculated by adding
[0107] The X output register 57 acquires the first update value X1 calculated by the first FY addition unit 54-1 in the immediately preceding clock cycle, and outputs the acquired first update value X1 as one first variable X at the second time. OUT is stored in the first variable memory 40.
[0108] The Y output register 58 acquires the second update value Y1 stored in the second-stage Y transfer register 56-2 at each clock cycle, and outputs the acquired second update value Y1 as one second variable Y OUT is stored in the second variable memory 42.
[0109] By performing such pipeline processing, the function calculation unit 46 according to the first example can perform the following calculations for each clock cycle.
[0110] Y1=FX(X IN )+Y IN X1=FY(Y1)+X IN Y OUT =Y1 X OUT =X1
[0111] The function calculation unit 46 according to the first example calculates one first variable X IN and one second variable Y IN For a variable pair including the above, a series of calculation sets of first function calculation -> FX addition -> second function calculation -> FY addition can be executed once. Furthermore, since the function calculation unit 46 according to the first example executes pipeline processing, it can execute calculations in parallel for a plurality of variable pairs. This allows the function calculation unit 46 according to the first example to complete calculations for N variable pairs in a short time.
[0112] Fig. 6 is a diagram showing a second example of the configuration of the function calculation unit 46. The function calculation unit 46 may have the second example configuration as shown in Fig. 6. The function calculation unit 46 according to the second example has the same components as those in the first example, but the arrangement of the components is different. In describing the second example, the components that operate in the same manner as those in the first example are given the same reference numerals, and detailed description thereof will be omitted except for the differences.
[0113] The first FY calculation unit 53-1 performs a second function calculation (FY(y i ) to calculate N first differential values. The first FY adder 54-1 calculates N first update values by adding the N first differential values calculated by the first FY calculation unit 53-1 to the N first variables at the first time.
[0114] The first FX calculation unit 51-1 performs a first function calculation (FX(x i ) to calculate N second differential values. The first FX adder 52-1 calculates N second update values by adding the N second differential values calculated by the first FX calculation unit 51-1 and the N updated second variables calculated by the first adder 44.
[0115] The function calculation unit 46 having such a second example configuration can execute the loop process from S16 to S19 in the first embodiment once in the order of S18 → S17. As a result, the function calculation unit 46 can use a method called the Symplectic Euler method to evolve N first variables and N second variables at a first time point over time to calculate N first variables and N second variables at a second time point.
[0116] Furthermore, the function calculation unit 46 according to the second example may realize calculations by pipeline processing. In this case, the function calculation unit 46 according to the second example has the same components as those in the first example, but the arrangement of the components is different.
[0117] The first FY calculation unit 53-1 transfers the updated second variable Y stored in the first-stage Y transfer register 56-1 every clock cycle. IN The first FY addition unit 54-1 calculates a first differential value by executing a second function operation on the first variable X stored in the first-stage X transfer register 55-1. IN The first update value X1 is calculated by adding
[0118] The second-stage X transfer register 55-2 acquires the first update value X1 calculated by the first FY addition unit 54-1 in the immediately preceding clock cycle, and holds the acquired first update value X1 for one clock cycle. The second-stage Y transfer register 56-2 acquires the second variable Y1 held by the first-stage Y transfer register 56-1 in the immediately preceding clock cycle, and holds the acquired first update value X1 for one clock cycle. IN and the second variable Y IN is held for one clock cycle period.
[0119] The first FX calculation unit 51-1 calculates a second differential value by performing a first function operation on the first update value X1 stored in the second-stage X transfer register 55-2 for each clock cycle. The first FX addition unit 52-1 calculates the first differential value calculated in the clock cycle by the first FX calculation unit 51-1 and the second variable Y stored in the second-stage Y transfer register 56-2 for each clock cycle. IN The second update value Y1 is calculated by adding
[0120] By performing such pipeline processing, the function calculation unit 46 according to the second example can perform the following calculations for each clock cycle.
[0121] X1=FY(Y IN )+X IN Y1=FX(X1)+Y IN XOUT =X1 Y OUT =Y1
[0122] The function calculation unit 46 according to the second example calculates one first variable X IN and one second variable Y IN For a variable pair including the above, a series of calculation sets of the second function calculation →FY addition →first function calculation →FX addition can be executed once. Furthermore, since the function calculation unit 46 according to the second example executes pipeline processing, it can execute calculations in parallel for a plurality of variable pairs. This allows the function calculation unit 46 according to the second example to complete calculations for N variable pairs in a short time.
[0123] Fig. 7 is a diagram showing a third example of the configuration of the function calculation unit 46. The function calculation unit 46 may have the third example configuration as shown in Fig. 7. The function calculation unit 46 according to the third example has substantially the same configuration as the first example. In describing the third example, components that operate in the same manner as in the first example are given the same reference numerals, and detailed description thereof will be omitted except for the differences.
[0124] The function calculation unit 46 in the third example further has, in addition to the configuration of the first example, second to Mth (M is an integer greater than or equal to 2) (M-1) FX calculation units 51-2 to 51-M, second to Mth (M-1) FX addition units 52-2 to 52-M, second to Mth (M-1) FY calculation units 53-2 to 53-M, and second to Mth (M-1) FY addition units 54-2 to 54-M.
[0125] The mth FX calculation unit 51-m (m is any integer from 2 to M) calculates N second differential values by performing a first function calculation on each of the N first update values calculated by the (m-1)th FY adder unit 54-(m-1). The mth FX adder unit 52-m calculates new N second update values by adding the N second differential values calculated by the mth FX calculation unit 51-m to the N second update values calculated by the (m-1)th FX adder unit 52-(m-1).
[0126] The mth FY calculation unit 53-m calculates N first differential values by performing a second function calculation on each of the N second update values calculated by the mth FX adder 52-m. The mth FY adder 54-m calculates new N first update values by adding the N first differential values calculated by the mth FY calculation unit 53-m to the N first update values calculated by the (m-1)th FY adder 54-(m-1).
[0127] Then, function calculation unit 46 provides the N first update values calculated by Mth FY adder 54-M to first variable memory 40. First variable memory 40 stores the N first update values calculated by Mth FY adder 54-M as N first variables at the second time.
[0128] Furthermore, function calculation unit 46 provides the N second update values calculated by the Mth FX adder unit 52-M to second variable memory 42. Second variable memory 42 stores the N second update values calculated by the Mth FX adder unit 52-M as N second variables at the second time.
[0129] The function calculation unit 46 having such a configuration of the third example can execute the loop process from S16 to S19 in the first embodiment M times in the order of S17 → S18. As a result, the function calculation unit 46 can use a method called the Symplectic Euler method to evolve N first variables and N second variables at a first time point over time to calculate N first variables and N second variables at a second time point.
[0130] Furthermore, the function calculation unit 46 according to the third example may realize calculation by pipeline processing. In this case, the function calculation unit 46 further includes 2M stages of X transfer registers 55-1 to 55-2M, 2M stages of Y transfer registers 56-1 to 56-2M, one X output register 57, and one Y output register 58. Among these configurations, the configurations shown in the first example operate in the same manner as the first example, except for the X output register 57 and the Y output register 58.
[0131] The (2m-1)-th stage X transfer register 55-(2m-1) transfers the first update value X calculated by the (m-1)-th FY adder 54-(m-1) in the immediately preceding clock cycle at every clock cycle. m-1 and obtain the first updated value X m-1 The (2m-1)-th stage Y transfer register 56-(2m-1) holds the second update value Y held in the (2m-2)-th stage Y transfer register 56-(2m-2) in the immediately preceding clock cycle at every clock cycle. m-1 and obtain the second update value Y m-1 is held for one clock cycle period.
[0132] The m-th FX calculation unit 51-m transfers the first update value X stored in the (2m-1)th stage X transfer register 55-(2m-1) every clock cycle. m-1 The m-th FX adder 52-m calculates a second differential value by performing a first function operation on the m-th FX calculation unit 51-m in each clock cycle, and calculates a second update value Y m-1 A new second update value Y m Calculate.
[0133] The X transfer register 55-2m in the 2mth stage transfers the first update value X held in the X transfer register 55-(2m-1) in the (2m-1)th stage in each clock cycle. m-1 and obtain the first updated value X m-1 The 2m-th stage Y transfer register 56-2m holds the second update value Y calculated by the m-th FX adder 52-m in the immediately preceding clock cycle for one clock cycle. m and obtain the second updated value Y m is held for one clock cycle.
[0134] The m-th FY calculation unit 53-m transfers the second update value Ym The m-th FY addition unit 54-m calculates a first differential value by performing a second function operation on the m-th FY calculation unit 53-m in each clock cycle. The m-th FY addition unit 54-m calculates the first differential value calculated in the clock cycle by the m-th FY calculation unit 53-m in the corresponding clock cycle and the first update value X stored in the 2m-th stage X transfer register 55-2m. m-1 By adding and, a new first update value X m Calculate.
[0135] The X output register 57 receives, at each clock cycle, the first update value X calculated by the Mth FY adder 54-M in the immediately preceding clock cycle. M and obtain the first updated value X M one first variable X at the second time OUT is stored in the first variable memory 40.
[0136] The Y output register 58 receives the second update value Y stored in the Y transfer register 56-2M in the 2Mth stage every clock cycle. M and obtain the second updated value Y M to one second variable Y at the second time OUT is stored in the second variable memory 42.
[0137] By performing such pipeline processing, the function calculation unit 46 according to the third example can perform the following calculations for each clock cycle.
[0138] Y1=FX(X IN )+Y IN X1=FY(Y1)+X IN … Y m =FX(X m-1 )+Y m-1 X m =FY(Y m )+X m-1 … Y M =FX(X M-1 )+Y M-1 X M =FY(Y M )+X M-1 Y OUT =Y M X OUT =X M
[0139] The function calculation unit 46 according to the third example calculates one first variable X IN and one second variable Y IN For a variable pair including the above, a series of calculation sets of a first function calculation -> FX addition -> a second function calculation -> FY addition can be executed M times. Furthermore, since the function calculation unit 46 according to the third example executes the calculations by pipeline processing, it can execute calculations in parallel for a plurality of variable pairs. This allows the function calculation unit 46 according to the third example to complete calculations for N variable pairs in a short time.
[0140] Fig. 8 is a diagram showing a fourth example of the configuration of the function calculation unit 46. The function calculation unit 46 may have the fourth example configuration as shown in Fig. 8. The function calculation unit 46 according to the fourth example has substantially the same configuration as the second example. In describing the fourth example, components that operate in the same manner as in the second example are given the same reference numerals, and detailed description thereof will be omitted except for the differences.
[0141] The mth FY calculation unit 53-m (m is any integer from 2 to M) calculates N first differential values by performing a second function calculation on each of the N second update values calculated by the (m-1)th FX adder 52-(m-1). The mth FY adder 54-m calculates new N first update values by adding the N first differential values calculated by the mth FY calculation unit 53-m and the N first update values calculated by the (m-1)th FY adder 54-m.
[0142] The mth FX calculation unit 51-m calculates N second differential values by performing a first function calculation on each of the N first update values calculated by the mth FY adder unit 54-m. The mth FX adder unit 52-m calculates new N second update values by adding the N second differential values calculated by the mth FX calculation unit 51-m to the N second update values calculated by the (m-1)th FX adder unit 52-(m-1).
[0143] The function calculation unit 46 having such a configuration as the fourth example can execute the loop process from S16 to S19 in the first embodiment M times in the order of S18 → S17. As a result, the function calculation unit 46 can use a method called the Symplectic Euler method to evolve N first variables and N second variables at a first time point over time to calculate N first variables and N second variables at a second time point.
[0144] Furthermore, the function calculation unit 46 according to the fourth example may realize calculation by pipeline processing. In this case, the function calculation unit 46 further includes 2M stages of X transfer registers 55-1 to 55-2M, 2M stages of Y transfer registers 56-1 to 56-2M, one X output register 57, and one Y output register 58. Among these configurations, the configuration shown in the second example operates in the same manner as the second example, except for the X output register 57 and the Y output register 58.
[0145] The (2m-1)-th stage X transfer register 55-(2m-1) transfers the first update value X held in the (2m-2)-th stage X transfer register 55-(2m-2) in the immediately preceding clock cycle. m-1 and obtain the first updated value X m-1 The (2m-1)-th stage Y transfer register 56-(2m-1) holds the second update value Y calculated by the (m-1)-th FX adder 52-(m-1) in the immediately preceding clock cycle for each clock cycle. m-1 and obtain the second updated value Y m-1 is held for one clock cycle.
[0146] The m-th FY calculation unit 53-m transfers the second update value Y stored in the (2-1)th stage Y transfer register 56-(2-1) every clock cycle. m-1 The m-th FY addition unit 54-m calculates a first differential value by performing a second function operation on the m-th FY calculation unit 53-m in each clock cycle, and calculates a first update value X stored in the (2m-1)-th X transfer register 55-(2m-1). m-1 By adding and, a new first update value X m Calculate.
[0147] The X transfer register 55-2m in the 2mth stage receives the first update value X calculated by the mth FY adder 54-m in the immediately preceding clock cycle at every clock cycle. m and obtain the first updated value X m The Y transfer register 56-2m in the 2mth stage holds the second update value Y held in the Y transfer register 56-(2m-1) in the (2m-1)th stage in the immediately preceding clock cycle. m-1 and obtain the second update value Y m-1 is held for one clock cycle period.
[0148] The m-th FX calculation unit 51-m transfers the first update value X stored in the 2m-th stage X transfer register 55-2m every clock cycle. m The m-th FX adder 52-m calculates a second differential value by performing a first function operation on the m-th FX calculation unit 51-m in each clock cycle, and calculates a second update value Y m-1 A new second update value Y m Calculate.
[0149] The X output register 57 outputs the first update value X stored in the X transfer register 55-2M in the 2Mth stage every clock cycle. M and obtain the first updated value XM one first variable X at the second time OUT is stored in the first variable memory 40.
[0150] The Y output register 58 receives, at each clock cycle, the second update value Y M and obtain the second updated value Y M to one second variable Y at the second time OUT is stored in the second variable memory 42.
[0151] By performing such pipeline processing, the function calculation unit 46 according to the fourth example can perform the following calculations for each clock cycle.
[0152] X1=FY(Y IN )+X IN Y1=FX(X1)+Y IN … X m =FY(Y m-1 )+X m-1 Y m =FX(X m )+Y m-1 … X M =FY(Y M-1 )+X M-1 Y M =FX(X M )+Y M-1 X OUT =X M Y OUT =Y M
[0153] The function calculation unit 46 according to the fourth example calculates one first variable X IN and one second variable Y INFor a variable pair including the above, a series of calculation sets of the second function calculation →FY addition →first function calculation →FX addition can be executed M times. Furthermore, since the function calculation unit 46 according to the fourth example executes the calculations by pipeline processing, it can execute calculations in parallel for a plurality of variable pairs. This allows the function calculation unit 46 according to the fourth example to complete calculations for N variable pairs in a short time.
[0154] Third embodiment A calculation device 10 according to the third embodiment will be described.
[0155] FIG. 9 shows the N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i FIG.
[0156] The coefficient matrix J is P r3 It is divided into partition matrices (JG0, JG1, ... JGk, ..., JGPr3-1). P r3 Each of the partition matrices is (N / P r3 ) row × N column coefficient J i,j Includes: r3 is a divisor of N. Also, k ranges from 0 to P r3 It can be any integer up to -1.
[0157] In addition, N second intermediate variables b i , P r3 It is divided into blocks (BG0, BG1, ... BGk, ..., BGPr3-1). P r3 Each of the blocks is (N / P r3 ) second intermediate variables b i In addition, P r3 The blocks are P r3 For example, the k-th block BGk corresponds to the k-th division matrix JGk.
[0158] In the third embodiment, the matrix multiplication unit 28 multiplies N first intermediate variables x i ´ and P r3By separately multiplying each of the partition matrices, P r3 Calculate the blocks.
[0159] FIG. 10 is a diagram showing the configuration of the matrix multiplication unit 28 according to the third embodiment, together with the time evolution unit 30.
[0160] The matrix multiplication unit 28 is r3 P r3 The matrix multiplication unit 60 is P r3 Each of the divided matrix multiplication units 60 calculates N first intermediate variables x i ' and the corresponding partition matrix are multiplied to obtain the (N / P r3 ) second intermediate variables b i Calculate.
[0161] P r3 The divided matrix multiplication units 60 have the same configuration. r3 The divided matrix multiplication units 60 may be circuits mounted on different semiconductor devices, for example.
[0162] P r3 Each of the divided matrix multiplication units 60 calculates N first intermediate variables x i The first intermediate stream X′ is a stream of the first intermediate variable b i In addition, a second intermediate stream B is received by converting P r3 Each of the division matrix multiplication units 60 transmits a first intermediate stream X′ and a second intermediate stream B.
[0163] P r3The division matrix multiplication units 60 are connected in series. The leading division matrix multiplication unit 60 receives the first intermediate stream X' from the time evolution unit 30. The leading division matrix multiplication unit 60 also receives dummy data as the second intermediate stream B. Note that the dummy data may be transmitted from any block. The division matrix multiplication units 60 other than the leading one receive the first intermediate stream X' and the second intermediate stream B transmitted from the division matrix multiplication unit 60 in the immediately preceding stage.
[0164] The division matrix multiplication units 60 other than the last one transmit the first intermediate stream X' and the second intermediate stream B to the division matrix multiplication unit 60 in the immediately succeeding stage. The last division matrix multiplication unit 60 transmits the second intermediate stream B to the time evolution unit 30. The first intermediate stream X' transmitted from the last division matrix multiplication unit 60 is discarded. Note that the first intermediate stream X' transmitted from the last division matrix multiplication unit 60 may be discarded within the time evolution unit 30 after being received by the time evolution unit 30.
[0165] P r3 Each of the division matrix multiplication units 60 includes a buffer unit 62 , a division matrix memory 64 , an execution unit 66 , and a selector 68 .
[0166] The buffer unit 62 of the first division matrix multiplication unit 60 acquires the first intermediate stream X' output from the time evolution unit 30, and stores and outputs the acquired first intermediate stream X' for a certain period of time. The buffer units 62 of the division matrix multiplication units 60 other than the first acquire the first intermediate stream X' output from the division matrix multiplication unit 60 in the immediately preceding stage, and stores and outputs the acquired first intermediate stream X' for a certain period of time.
[0167] The division matrix memory 64 stores the (N / P r3 ) row × N column coefficient J i,j The execution unit 66 calculates the number of pixels included in the corresponding block based on the first intermediate stream X′ stored in the buffer unit 62 and the division matrix stored in the division matrix memory 64. r3 ) second intermediate variables b i Calculate.
[0168] Here, the execution unit 66 is included in the corresponding block (N / P r3 ) second intermediate variables b i In one clock cycle, r1 The second intermediate variables b i The output is a second intermediate stream B containing P r1 is a divisor of N.
[0169] Furthermore, the execution unit 66 outputs the second intermediate stream B in a clock cycle different from that of the execution units 66 included in the other partitioned matrix multiplication units 60. Therefore, the second intermediate stream B is not output from a plurality of partitioned matrix multiplication units 60 in the same clock cycle.
[0170] The selector 68 of the leading division matrix multiplication unit 60 selects and outputs the second intermediate stream B output by the execution unit 66 of the leading division matrix multiplication unit 60 in a clock cycle in which the execution unit 66 of the leading division matrix multiplication unit 60 outputs the second intermediate stream B. Also, the selector 68 of the leading division matrix multiplication unit 60 selects and outputs dummy data in a clock cycle in which the execution unit 66 of the leading division matrix multiplication unit 60 does not output the second intermediate stream B.
[0171] Furthermore, the selector 68 of the kth divided matrix multiplication unit 60 excluding the first one selects and outputs the second intermediate stream B output by the execution unit 66 of the kth divided matrix multiplication unit 60 in a clock cycle in which the execution unit 66 of the kth divided matrix multiplication unit 60 outputs the second intermediate stream B. Furthermore, in a clock cycle in which the execution unit 66 of the kth divided matrix multiplication unit 60 does not output the second intermediate stream B, the selector 68 of the previous stage divided matrix multiplication unit 60 selects and outputs the second intermediate stream B output by the selector 68 of the divided matrix multiplication unit 60.
[0172] FIG. 11 is a diagram showing an implementation example of the matrix multiplication unit 28 and the time evolution unit 30 according to the third embodiment.
[0173] P according to the third embodiment r3The matrix multiplication units 28 and the time evolution unit 30 are, for example, independent semiconductor chips. r3 +1) chips 70-1 to 70-(P r3 +1) can be implemented.
[0174] 1st to Pth r3 Chip 70-1~70-P r3 Each of the (P r3 +1) Chip 70-(P r3 +1) includes a time evolution section 30.
[0175] Each chip 70 also includes a receiver 74 and a transmitter 76. The receiver 74 is a link port for receiving data. The transmitter 76 is a link port for transmitting data. The receiver 74 and the transmitter 76 may be transceivers that perform full-duplex communication. Each chip 70 may also include additional communication ports. For example, each chip 70 may include two independent link ports for receiving data and two independent link ports for transmitting data.
[0176] The sending unit 76 receives the first intermediate variable x i ´ and the second intermediate variable b i If the bit width of the first intermediate stream X' is Wx' and the bit width of the second intermediate stream B is Wb, the combined stream has a bit width of Wx'+Wb or more.
[0177] Each of the receiving unit 74 and the transmitting unit 76 includes, for example, a FIFO memory. The transmitting unit 76 combines the first intermediate stream X' and the second intermediate stream B and writes the combined stream to the FIFO. The transmitting unit 76 then sequentially transmits the combined stream stored in the FIFO. The receiving unit 74 also writes the received combined stream to the FIFO. The receiving unit 74 then sequentially reads the combined stream from the FIFO and separates it into the first intermediate stream X' and the second intermediate stream B.
[0178] The two chips 70 are connected via a communication link 72. The output terminal of the first chip 70-1 is connected to the input terminal of the second chip 70-2 via a first communication link 72-1. The output terminal of the k-th chip 70-k is connected to the input terminal of the (k+1)-th chip 70-(k+1) via a k-th communication link 72-k. r3 +1) Chip 70-(P r3 The output terminal of the first chip 70-1 is connected to the input terminal of the (P r3 +1) communication link 72-(P r3 +1). In this way, (P r3 +1) chips 70-1 to 70-(P r3 +1) are interconnected in a ring topology.
[0179] For example, the input and output terminals of the chip 70 may be QSFP (Quad Small Form-factor Pluggable) ports, and the communication link 72 may be a QSFP-compatible optical cable or a QSFP-compatible metal cable. The communication link 72 between the two chips 70 may be a high-speed serial link, an Ethernet link, or a peer-to-peer link.
[0180] In this embodiment, each chip 70 transmits and receives the composite stream, but the first intermediate stream X' and the second intermediate stream B may be transmitted and received separately. In this case, (P r3 +1) chips 70-1 to 70-(P r3 +1) are interconnected in the form of a two-system ring topology.
[0181] The calculation device 10 according to the third embodiment calculates a first variable x i Even if the number of the first variables x to be determined by the optimization problem is changed, the change can be accommodated by changing the number of the division matrix multiplication units 60. iIf the number of chips 70 is significantly increased, this can be accommodated by, for example, increasing the number of chips 70 having the same configuration. In addition, since the calculation device 10 performs matrix calculations in parallel using the multiple divided matrix multiplication units 60, it is possible to complete the optimization problem in a short time.
[0182] (Fourth embodiment) A calculation device 10 according to the fourth embodiment will be described.
[0183] FIG. 12 shows the N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i In the fourth embodiment, N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i In addition to the same relationship as in the third embodiment, there is also a relationship as shown in FIG.
[0184] N first intermediate variables x i ´ is N s The data is divided into N s Each of the data sets is c The first intermediate variables x i ´ included. N s and P c is a divisor of N. For example, the first intermediate variable x i ´ is the N of x´b0, x´b1, …, x´bNs s The data is divided into data sets.
[0185] P r3 Each of the partition matrices is P r2 It is divided into sub-matrices P r2 Each of the sub-matrices is r1 Row x N column coefficient J i,j For example, the partition matrix of JG0 is jb0, jb1, ..., jbs, ..., jbPr2-1 P r2 is divided into sub-matrices.
[0186] P r1 and P r2is a divisor of N, and P r1 ×P r2 ×P r3 is N. s ranges from 0 to P r2 It can be any integer up to -1.
[0187] N second intermediate variables b i P included in r3 Each of the blocks is P r2 P r2 Each of the sub-blocks is P r1 The second intermediate variables b i For example, the block BG0 includes P of bb0, bb1, ..., bbs, ..., bbPr2-1. r2 The image is divided into sub-blocks.
[0188] Then, P in the kth block r2 The sub-blocks are P r2 For example, the s-th sub-block included in the k-th block BGk corresponds to the s-th sub-matrix jbs included in the k-th partitioned matrix JGk.
[0189] In the fourth embodiment, the division matrix multiplication unit 60 multiplies N first intermediate variables x i For example, the k-th divided matrix multiplication unit 60 performs matrix multiplication with N first intermediate variables x i ´ and P included in the kth partition matrix JGk r2 By separately multiplying each of the sub-matrices, P r2 Sub-blocks are calculated.
[0190] FIG. 13 is a diagram showing the configuration of the division matrix multiplication unit 60 according to the fourth embodiment. The division matrix multiplication unit 60 includes an execution unit 66, r2 The image forming apparatus includes sub-matrix multiplication units 80 and a multiplexing unit 82.
[0191] P r2The sub-matrix multiplication units 80 multiply P r2 For example, P r2 The sub-matrix multiplication units 80 multiply P r2 The sub-matrices correspond one-to-one to each of the
[0192] P included in the kth division matrix multiplication unit 60 r2 Each of the sub-matrix multiplication units 80 multiplies N first intermediate variables x i By multiplying the matrix P ′ and the corresponding sub-matrix, r1 The second intermediate variables b i Calculate.
[0193] Also, P r2 Each of the sub-matrix multiplication units 80 is r1 The second intermediate variables b i In one clock cycle, the s-th sub-matrix multiplication unit 80 included in the k-th divided matrix multiplication unit 60 outputs in parallel P r1 The second intermediate variables b i are output in the same clock cycle.
[0194] Furthermore, P r2 Each of the sub-matrix multiplication units 80 performs P r1 The second intermediate variables b i That is, the second intermediate variable b i is not output from multiple sub-matrix multiplication units 80 in the same clock cycle.
[0195] The multiplexing unit 82 is r2 The P output from each of the sub-matrix multiplication units 80 r1 The second intermediate variables b i By multiplexing the set of r1The second intermediate variables b i For example, the multiplexer 82 included in the k-th division matrix multiplication unit 60 generates a second intermediate stream B including P r2 The second intermediate stream B containing P r2 Output on clock cycle.
[0196] The buffer unit 62 included in the division matrix multiplication unit 60 functions as a shift register. r2 The buffer includes a stage register 84, an internal receive buffer 86, and an internal transmit buffer 88.
[0197] P r2 The register 84 in the P r2 The matrix multiplication units 80 are in one-to-one correspondence with each other. r2 Each of the registers 84 in the stage c The first intermediate variables x i The data set including P is stored for one clock cycle. r2 Each of the registers 84 of the stage will then store the P c The first intermediate variables x i The data set including the first bit is transferred in parallel to the next stage register 84.
[0198] The in-buffer receiver 86 receives the first intermediate stream X′ and converts the received first intermediate stream X′ into P c Then, the in-buffer receiver 86 converts the P c The first intermediate variables x i The data set containing the ' is written to the first register 84.
[0199] The in-buffer transmission unit 88 receives the P c The first intermediate variables x i The intra-buffer transmitter 88 then reads out the data set including the first intermediate stream X' and converts it into a first intermediate stream X'. Then, the intra-buffer transmitter 88 transmits the first intermediate stream X'.
[0200] P r2 Each of the sub-matrix multiplication units 80 receives the P c The first intermediate variables x i A data set containing P is read every clock cycle. r2 Each of the sub-matrix multiplication units 80 calculates the read P c The first intermediate variables x i ´ and the coefficient J of the corresponding column in the corresponding submatrix i,j Then multiply it by P r2 Each of the sub-matrix multiplication units 80 multiplies a first intermediate variable x i ´ and coefficient J i,j The multiplication results are accumulated. r2 Each of the sub-matrix multiplication units 80 is r1 The second intermediate variables b i can be calculated.
[0201] Here, P r2 Each of the sub-matrix multiplication units 80 stores N first intermediate variables x i ' from the first intermediate variable x0' to the last intermediate variable x N-1 During the period before ´ is stored, multiplication and cumulative addition are performed. Then, P r2 Each of the sub-matrix multiplication units 80 stores the final first intermediate variable x N-1 After a certain number of clock cycles have elapsed since the clock cycle in which ´ was stored, r1 The second intermediate variables b i Therefore, P r2 Each of the sub-matrix multiplication units 80 performs multiplication on P r1 The second intermediate variables b i can be output.
[0202] The computing device 10 according to the fourth embodiment having such a configuration is r3 ×P r2Therefore, the calculation device 10 according to the fourth embodiment can perform matrix multiplication at high speed.
[0203] Fifth embodiment A calculation device 10 according to the fifth embodiment will be described.
[0204] FIG. 14 shows the N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i In the fifth embodiment, N first intermediate variables x i ´, the coefficient matrix J and N second intermediate variables b i In addition to the same relationship as in the fourth embodiment, there is also a relationship as shown in FIG.
[0205] P r3 Each of the partition matrices is P r2 Furthermore, P r2 Each of the sub-matrices is c In columns, s Each coefficient set is divided into P r1 Row x P c Column coefficient J i,j For example, the sub-matrices of jb0 included in the partition matrix of JG0 are jb0(0), jb0(1), …, jb0(N s -1)N s The coefficients are divided into coefficient sets.
[0206] Also, N s The coefficient sets are the N first intermediate variables x i ´P c N divided into individual pieces s It corresponds one-to-one to each dataset.
[0207] In the fifth embodiment, the sub-matrix multiplication unit 80 multiplies P r1 For each row, P c Coefficient J i,j and the corresponding P cThe first intermediate variables x i Then, the sub-matrix multiplication unit 80 calculates the multiplication and accumulation value of P r1 For each row, s The sub-matrix multiplication unit 80 adds up all the multiplication and accumulation values calculated for each of the coefficient sets. r1 For each of the rows, N coefficients J i,j and N first intermediate variables x i ´ can be multiplied and accumulated.
[0208] 15 is a diagram showing a configuration of a sub-matrix multiplication unit 80 according to the sixth embodiment, together with a corresponding register 84. r1 The multiplication and accumulation unit 90 is included.
[0209] P r1 The multiplication and accumulation units 90 are r1 For example, P r1 The multiplication and accumulation units 90 calculate P r1 It corresponds one-to-one to each row.
[0210] P r1 All of the multiplication and accumulation units 90 have the same configuration. r1 Each of the multiplication and accumulation units 90 is a multiplication and accumulation unit that multiplies a corresponding row in the coefficient matrix J by N first intermediate variables x i The second intermediate variable b i Calculate P r1 The multiplication and accumulation units 90 calculate the second intermediate variable b i are calculated in parallel and output in the same clock cycle.
[0211] For more information, see P r1 Each of the multiplication and accumulation units 90 has P r2The first intermediate variable x0′ at the beginning of the first intermediate stream X′ to the N first intermediate variables x at the end of the first intermediate stream X′ are sequentially stored in the corresponding registers 84 of the stage. N-1 ´ is acquired every clock cycle. In this case, P r1 Each of the multiplication and accumulation units 90 outputs P c The first intermediate variables x i Then, obtain a dataset that contains P r1 Each of the multiplication and accumulation units 90 acquires a data set in N s (N s =N / P c ) clock cycles, s We obtain a data set of P r1 The pth multiplier / accumulator unit 90 (p is 0 to P r1 In one clock cycle, the multiplication and accumulation unit 90 of the coefficient set corresponding to the acquired data set (any integer up to -1) multiplies P c Obtain coefficients ((jp,s0)~(jp,SPc-1)). Then, P r1 Each of the multiplication and accumulation units 90 calculates a corresponding P c The coefficients are N s Acquire over clock cycles. P r1 Each of the multiplication and accumulation units 90 calculates P c The first intermediate variables x i ´ and the corresponding P in the corresponding row c Coefficient J i,j Multiply and accumulate P r1 Each of the multiplication / accumulation units 90 outputs the multiplication / accumulation result as N s The second intermediate variable b is accumulated over clock cycles. i Calculate.
[0212] 16 is a diagram showing the division matrix stored in the division matrix memory 64. The division matrix memory 64 stores the division matrix P r2 Divide it into sub-matrices and store them. P r2Each of the sub-matrices is output in parallel to a corresponding sub-matrix multiplication unit 80 .
[0213] P r2 Each of the sub-matrices is s It contains N coefficient sets. s Each of the coefficient sets is P c ×P r1 The division matrix memory 64 includes P r2 For each of the sub-matrices, P c ×P r1 It is possible to output coefficients in parallel.
[0214] FIG. 17 shows P r1 1 shows multiplication accumulation units 90 and the sub-matrices transmitted to the sub-matrix multiplication units 80.
[0215] P included in one sub-matrix multiplication unit 80 r1 Each of the multiplication and accumulation units 90 receives the P stored in the corresponding register 84 every clock cycle. c The first intermediate variables x i A dataset containing ´ is broadcast.
[0216] The divided matrix memory 64 stores N s Each sub-matrix includes coefficient sets. In the partition matrix memory 64, one coefficient set included in each sub-matrix is specified by a pointer for each clock cycle. More specifically, in the partition matrix memory 64, a coefficient set corresponding to the data set stored in the register 84 corresponding to the sub-matrix is specified.
[0217] The partitioned matrix memory 64 stores the P c ×P r1 The coefficients in the coefficient set are output in parallel. c ×P r1The multiplication and accumulation unit 90 to which each of the coefficients is output is previously determined. c ×P r1 Each of the coefficients is output to a predetermined multiplication and accumulation unit 90. For example, c P up to the th c These coefficients are output to the first multiplication / accumulation unit 90. For example, (P c +1)th to (2×P c )th P c These coefficients are output to the second multiplication and accumulation unit 90. r1 -P c )th to P r1 P up to the th c The coefficients are P r1 The result is output to the multiplication / accumulation unit 90.
[0218] 18 is a diagram showing the configuration of the multiplication and accumulation unit 90. The multiplication and accumulation unit 90 is c The multiplication and accumulation unit 90 includes P multipliers 92, an adder 94, and an accumulator 96. c The first intermediate variables x i A dataset containing P c Coefficient J i,j A coefficient set including
[0219] P included in the dataset c The first intermediate variables x i ´ and P included in the coefficient set c Coefficient J i,j There is a one-to-one correspondence between P c The multipliers 92 are P c The first intermediate variables x i ´, and P included in the coefficient set c Coefficient J i,j It corresponds one-to-one to P c Each of the multipliers 92 multiplies a corresponding one of the first intermediate variables x i ´ and a corresponding coefficient J in the coefficient set. i,jBy multiplying and, the multiplied value is output. c Each of the multipliers 92 outputs a multiplied value every clock cycle.
[0220] The adder 94 adds P c The P output from the multiplier 92 c The accumulator 96 calculates a multiplied and accumulated value by adding up the multiplied values. The accumulator 96 accumulates the multiplied and accumulated values output from the adder 94 for each clock cycle. The accumulator 96 also resets the accumulated value to 0 at the timing (S0=0) when the first intermediate variable x0′ at the top of the first intermediate stream X′ is stored in the corresponding register 84.
[0221] The multiplication and accumulation unit 90 having such a configuration has a function of P r2 The first intermediate variable x0′ at the beginning of the first intermediate stream X′ to the first intermediate variable x1′ at the end of the first intermediate stream X′ are stored in the corresponding registers 84 of the stages in sequence. N-1 The first N intermediate variables x i The multiplication and accumulation unit 90 obtains each of the obtained first intermediate variables x i ´ and the first intermediate variable x i ´, the coefficient of the column J i,j Then, the multiplication and accumulation unit 90 multiplies the first intermediate variable x i ´ and coefficient J i,j The multiplication result is stored in the first intermediate variable x0' at the beginning of the first intermediate stream X' to the first intermediate variable x N-1 By such a process, the multiplication and accumulation unit 90 accumulates the second intermediate variable b i can be calculated.
[0222] FIG. 19 is a diagram showing an example of specific parameter values and an example of processing timing in the fifth embodiment.
[0223] In the example of FIG. 19, N=16384. Also, in the example of FIG.c =4, N S = 4096. In the example of FIG. r1 =8, P r2 =256, P r3 19, t0, t1, t2, ..., t6143 represent the order of clock cycles.
[0224] N first intermediate variables x i The leading data set in jb0′ is stored in the leading register 84 in the leading matrix multiplication unit 28 at t0. Therefore, the leading coefficient set in the sub-matrix of jb0 in the partitioned matrix of JG0 is read out at t0.
[0225] Also, the N first intermediate variables x i The last data set in jb0′ is stored in the first register 84 in the first matrix multiplication unit 28 at t4095. Therefore, the last coefficient set in the sub-matrix of jb0 in the partitioned matrix of JG0 is read out at t4095.
[0226] Then, N second intermediate variables b i The first block in can be output after the clock cycle (t4095) when the multiplication and accumulation of the last coefficient set in the sub-matrix of jb0 in the division matrix of JG0 is completed. Therefore, the second intermediate variable b i The first block in is output at t4095+α (α is a predetermined delay time).
[0227] N first intermediate variables x i The first data set in ´ is t0 to (P r1 ×P r3 = 2048) clock cycles, and then stored in the last register 84 in the last matrix multiplication unit 28. Therefore, the leading coefficient set in the sub-matrix jbPr2-1 in the divided matrix JGPr3-1 is read out at t2047.
[0228] Also, the N first intermediate variables x iThe last data set in ´ is from t4095 to (P r1 ×P r3 = 2048) clock cycles, and then stored in the last register 84 in the last matrix multiplication unit 28. Therefore, the last coefficient set in the sub-matrix jbPr2-1 in the divided matrix JGPr3-1 is read out at t6143.
[0229] Then, N second intermediate variables b i The last block in can be output after the clock cycle (t6143) when the multiplication and accumulation of the last coefficient set in the sub-matrix of jbPr2-1 in the division matrix of JGPr3-1 is completed. Therefore, the second intermediate variable b i The last block in is output at t6143+α.
[0230] The computing device 10 according to the fifth embodiment having such a configuration is r3 ×P r2 ×P r1 Therefore, the calculation device 10 according to the fifth embodiment can perform matrix multiplication at high speed.
[0231] Sixth embodiment A calculation device 10 according to a sixth embodiment will be described.
[0232] 20 is a diagram showing a configuration of the time evolution section 30 according to the sixth embodiment, together with a plurality of matrix multiplication sections 28. In the sixth embodiment, each of the matrix multiplication sections 28 performs P r1 The second intermediate variables b i In the sixth embodiment, the time evolution unit 30 outputs a second intermediate stream B including P r1 The second intermediate variables b i A second intermediate stream B including:
[0233] The time evolution section 30 according to the sixth embodiment is r1 A first variable memory 40, P r1A second variable memory 42 and P r1 number of first adders 44, and P r1 Function calculation units 46 and P r1 The multiplication unit 48 has a first multiplication unit 48 and a first intermediate variable memory 50 .
[0234] P r1 Number of first variable memories 40, P r1 Number of second variable memories 42, P r1 The first adders 44, P r1 The function calculation units 46 and P r1 The first multiplication units 48 are P r1 The second intermediate variables b i corresponds one-to-one to.
[0235] And P r1 Each of the first adders 44 and P r1 Each of the function operation units 46 includes P r1 The second intermediate variables b i The second intermediate variable b i Also, P r1 Each of the first variable memories 40 and P r1 Each of the second variable memories 42 includes P r1 The second intermediate variables b i The second intermediate variable b i The first variable x calculated using i and the second variable y i Also, P r1 Each of the first multiplication units 48 includes P r1 The second intermediate variables b i The second intermediate variable b i The first variable x calculated using i Calculation processing is performed on
[0236] In this way, the time evolution section 30 according to the sixth embodiment reduces the P r1 The second intermediate variables b iFor N first variables x i and N second variables y i The calculation process of P r1 In this way, the calculation device 10 according to the sixth embodiment executes the calculation with a parallelism of N first variables x i and N second variables y i The calculation process can be performed at high speed.
[0237] Figure 21 shows the first intermediate variable x i ´ and the second intermediate variable b i 21A is a diagram showing the output timing of the first intermediate variable x i 21B shows the timing when the second intermediate variable b i 21C shows the timing when the first intermediate variable x i ´ calculation timing.
[0238] First intermediate variable x i ´ is P c Therefore, as shown in FIG. 21A, the transfer period of the first intermediate variables (x'b0 to x'b4095(t1)) at the first time is N S (=N / P c ) clock cycles.
[0239] In addition, the second intermediate variable b i , P r1 Therefore, as shown in FIG. 21B, the transfer period of the second intermediate variables (bb0 to bb2047(t1)) at the first time is N / P r1 This is a clock cycle.
[0240] In addition, the time evolution section 30 is r1 Therefore, as shown in FIG. 21C, the calculation period of the second intermediate variables (bb0 to bb2047(t2)) at the second time is N / P r1 This is a clock cycle.
[0241] Here, L a is the delay time from the completion of the output of the last first intermediate variable (x´b4095(t1)) at the first time to the start of the output of the first second intermediate variable (bb0(t1)). b is the delay time from the start of the output of the first second intermediate variable (bb0(t1)) at the first time to the calculation of the first first intermediate variable (x´b0(t2)) at the second time. c is the delay time from when the first first intermediate variable (x'b0(t2)) at the second time instant is calculated to when the first first intermediate variable (x'b0(t2)) at the second time instant is output.
[0242] Here, the period from the start of one loop process to the start of the next loop process (one loop period) is N S +L a +L b +L c The calculation device 10 calculates (L b +L c ) is the transfer period (N / P r1 ). Therefore, in the calculation device 10, output of the first intermediate variables (x'b0 to x'b4095 (t2)) at the second time is started before output of the second intermediate variables (bb0 to bb2047 (t1)) at the first time is completed. That is, the calculation device 10 realizes overlap of loop processing. According to the calculation device 10, by realizing such overlap, it is possible to execute processing at high speed.
[0243] Also, when N is large, N S >>L a +L b +L c Therefore, when N is large, L a +L b +L becomes negligible relative to the overall execution time. In this case, the matrix multiplication time in the calculation device 10 is N S (=N / P c) clock cycle.
[0244] For example, the time required for a matrix operation of size N by a single-core processor is (N×N) clock cycles. The matrix multiplication time by the computing device 10 relative to the matrix multiplication time by a single-core processor is (N / P c ) / N×N. Therefore, for a single-core processor, the computing device 10 has a c ×N) time for matrix multiplication.
[0245] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0246] 10 Computing equipment 20 Arithmetic section 22 Input section 24 Output section 26 Setting section 28 Matrix multiplication section 30 Time evolution section 32 Management Department 36 Coefficient matrix memory 38 Matrix multiplication execution unit 40 First variable memory 42 Second variable memory 44 First Adder 46 Function calculation section 48 First Multiplication Section 50 First intermediate variable memory 60 Division matrix multiplication section 62 Buffer section 64 partitioned matrix memory 66 Executive Department 68 Selector 80 Sub-matrix multiplication section 82 Multiplexer 84 Registers 86 Receiver in Buffer 88 Transmitting part in buffer 90 Multiplication and accumulation section 92 Multiplier 94 Adder 96 Accumulator
Claims
1. Circuit information described in a hardware description language to configure a circuit into a computing device that solves an optimization problem using an Ising model, The computing device comprises: calculating N second intermediate variables at a first time by matrix multiplying N first intermediate variables (N is an integer equal to or greater than 2) at a first time by a coefficient matrix including preset coefficients of N rows by N columns; calculating N first variables at a second time one sampling period after the first time and N second variables at the second time based on the N second intermediate variables at the first time, writing the N first variables at the second time into a first variable memory, and writing the N second variables at the second time into a second variable memory; incrementing the time from a start time for each sampling period, and executing, for each time, a process of calculating the N second intermediate variables at the first time, a process of calculating the N second variables at the second time, a process of writing the N first variables at the second time into the first variable memory, and a process of writing the N second variables at the second time into the second variable memory; Outputting the N first variables at a preset end time; The computing device executes a plurality of computations; the computing device, in each of the plurality of arithmetic processes, sets a partitioned matrix including coefficients of some rows and N columns that are different from each other in the coefficient matrix, and calculates a portion of the N second intermediate variables at the first time by matrix multiplying the N first intermediate variables at the first time by the set partitioned matrix; The N first variables correspond to N spins in the Ising model, the N second variables correspond to the N spins; The N spins correspond to N points, each of the N first variables represents a position of a point corresponding to a corresponding spin among the N points; Each of the N second variables represents a momentum of a point corresponding to a corresponding spin among the N points; the N first intermediate variables correspond to the N first variables, and each of the N first intermediate variables is a corresponding first variable among the N first variables or a value obtained by multiplying the corresponding first variable by a preset coefficient; The N second intermediate variables correspond to the N second variables. Circuit information.
2. Circuit information to be written into a reconfigurable semiconductor device, which turns the reconfigurable semiconductor device into a computing device that solves an optimization problem using an Ising model, comprising: The computing device comprises: calculating N second intermediate variables at a first time by matrix multiplying N first intermediate variables (N is an integer equal to or greater than 2) at a first time by a coefficient matrix including preset coefficients of N rows by N columns; calculating N first variables at a second time one sampling period after the first time and N second variables at the second time based on the N second intermediate variables at the first time, writing the N first variables at the second time into a first variable memory, and writing the N second variables at the second time into a second variable memory; incrementing the time from a start time for each sampling period, and executing, for each time, a process of calculating the N second intermediate variables at the first time, a process of calculating the N second variables at the second time, a process of writing the N first variables at the second time into the first variable memory, and a process of writing the N second variables at the second time into the second variable memory; Outputting the N first variables at a preset end time; The computing device executes a plurality of computations; the computing device, in each of the plurality of arithmetic processes, sets a partitioned matrix including coefficients of some rows and N columns that are different from each other in the coefficient matrix, and calculates a portion of the N second intermediate variables at the first time by matrix multiplying the N first intermediate variables at the first time by the set partitioned matrix; The N first variables correspond to N spins in the Ising model, the N second variables correspond to the N spins; The N spins correspond to N points, each of the N first variables represents a position of a point corresponding to a corresponding spin among the N points; Each of the N second variables represents a momentum of a point corresponding to a corresponding spin among the N points; the N first intermediate variables correspond to the N first variables, and each of the N first intermediate variables is a corresponding first variable among the N first variables or a value obtained by multiplying the corresponding first variable by a preset coefficient; The N second intermediate variables correspond to the N second variables. Circuit information.
3. The computing device comprises: calculating the N second variables at the second time based on the N second intermediate variables at the first time; Calculating the N first variables at the second time based on the N second variables at the second time.
3. Circuit information according to claim 1 or 2.
4. The computing device, in each of the plurality of arithmetic processes, Sequentially acquiring a predetermined number of the N first intermediate variables at the first time; Sequentially sending out the N first intermediate variables at the first time, the predetermined number at a time; The computing device, in a first process of the plurality of arithmetic processes, obtains at least a portion of the N first intermediate variables at the first time from a second process of the plurality of arithmetic processes. The circuit information according to claim 1 .
5. In each of the plurality of arithmetic processes, the computing device starts a matrix multiplication before completing reception of all of the N first intermediate variables at the first time. The circuit information according to claim 4.
6. A calculation method for solving an optimization problem using an Ising model by an information processing device, comprising: The information processing device includes: an information processing device calculates N second intermediate variables at a first time by matrix multiplying N first intermediate variables (N is an integer equal to or greater than 2) at a first time by a coefficient matrix including preset coefficients of N rows by N columns; the information processing device calculates, based on the N second intermediate variables at the first time, N first variables at a second time one sampling period after the first time and N second variables at the second time, writes the N first variables at the second time into a first variable memory, and writes the N second variables at the second time into a second variable memory; the information processing device increments time from a start time for each sampling period, and executes, for each time, a process of calculating the N second intermediate variables at the first time, a process of calculating the N second variables at the second time, a process of writing the N first variables at the second time into the first variable memory, and a process of writing the N second variables at the second time into the second variable memory; the information processing device outputs N first variables at a preset end time; The information processing device executes a plurality of arithmetic operations, the information processing device, in each of the plurality of arithmetic processes, sets a partitioned matrix including coefficients of some rows and N columns that are different from each other in the coefficient matrix, and calculates a portion of the N second intermediate variables at the first time by matrix multiplying the N first intermediate variables at the first time by the set partitioned matrix; The N first variables correspond to N spins in the Ising model, the N second variables correspond to the N spins; The N spins correspond to N points, each of the N first variables represents a position of a point corresponding to a corresponding spin among the N points; Each of the N second variables represents a momentum of a point corresponding to a corresponding spin among the N points; the N first intermediate variables correspond to the N first variables, and each of the N first intermediate variables is a corresponding first variable among the N first variables or a value obtained by multiplying the corresponding first variable by a preset coefficient; The N second intermediate variables correspond to the N second variables. Calculation method.
7. A program for causing an information processing device to become a computing device that solves an optimization problem using an Ising model, The information processing device includes: calculating N second intermediate variables at a first time by matrix multiplying N first intermediate variables (N is an integer equal to or greater than 2) at a first time by a coefficient matrix including preset coefficients of N rows by N columns; calculating N first variables at a second time one sampling period after the first time and N second variables at the second time based on the N second intermediate variables at the first time, writing the N first variables at the second time into a first variable memory, and writing the N second variables at the second time into a second variable memory; incrementing the time from a start time for each sampling period, and executing, for each time, a process of calculating the N second intermediate variables at the first time, a process of calculating the N second variables at the second time, a process of writing the N first variables at the second time into the first variable memory, and a process of writing the N second variables at the second time into the second variable memory; outputting N first variables at a preset end time; causing the information processing device to execute a plurality of arithmetic operations; a division matrix including coefficients of some rows and N columns that are different from each other in the coefficient matrix is set in the information processing device, and a part of the N second intermediate variables at the first time is calculated by matrix multiplying the N first intermediate variables at the first time by the division matrix that has been set, in each of the plurality of arithmetic processes; The N first variables correspond to N spins in the Ising model, the N second variables correspond to the N spins; The N spins correspond to N points, each of the N first variables represents a position of a point corresponding to a corresponding spin among the N points; Each of the N second variables represents a momentum of a point corresponding to a corresponding spin among the N points; the N first intermediate variables correspond to the N first variables, and each of the N first intermediate variables is a corresponding first variable among the N first variables or a value obtained by multiplying the corresponding first variable by a preset coefficient; The N second intermediate variables correspond to the N second variables. program.
Citation Information
Patent Citations
Variable power transfer type copying machine
JP1983065456A
Computing machine and method for repetitively finding solution to simultaneous linear equation
JP2005115497A
Quantum calculation device and method
JP2017073106A
Information processor, ising device and control method of information processor
JP2018005541A
Information processing device, ising device, and control method for information processing device
JP2018010474A
