A vectorized calculation method and system for batch regression analysis

Through vectorized calculation methods and SIMD technology to optimize matrix operations, the Vectorized-LM model is constructed, which solves the problem of non-convergence caused by improper initial point selection in batch regression calculation, improves the calculation efficiency and realizes rapid dimensional determination in the field of semiconductor measurement.

CN118551148BActive Publication Date: 2024-11-01SHANGHAI NORREC SEMICON EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411030444.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-01
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

The prior art has the problem of inappropriate selection of initial points in batch regression calculations, and the parallel computing method is complex and has strict hardware requirements, resulting in low computing efficiency.

Method used

Using vectorized calculation methods, we optimize matrix multiplication and inverse matrix solutions by constructing initial matrix, Jacobian matrix and residual matrix, and accelerated calculations using SIMD technology to construct Vectorized-LM model to batch process regression analysis tasks.

Benefits of technology

This improves the calculation speed, reduces the waiting time, overcomes the problem of non-convergence of the initial point, realizes synchronous batch regression analysis of multitasks without the help of parallel tools, and accelerates the dimensional determination process in the field of semiconductor measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551148B_ABST
    Figure CN118551148B_ABST
Patent Text Reader

Abstract

The present invention relates to a vectorized calculation method and system for batch regression analysis. The calculation method comprises: inputting an initial point set of a task, constructing an initial matrix M0, a residual matrix R v and label vector F; construct vectorized Jacobian matrix J v ; Optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ; Optimize and solve the inverse matrix to obtain the batch search step matrix dx s ; According to the batch search step matrix dx s , update the initial matrix M0, and when the set conditions for jumping out of the iteration loop are met, jump out of the iteration loop and output the final result matrix Mf; and according to the final result matrix Mf, select the optimal result as the final calculation result. The vectorized calculation method provided by the present invention uses different techniques to optimize matrix multiplication and inversion. Without the help of parallel tools, a single regression calculation can synchronously complete multi-task regression analysis in batches, which has a good acceleration effect and is of great significance for practical application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semiconductor measurement technology, and in particular to a vectorized calculation method and system for batch regression analysis. Background Art

[0002] Optical Critical Dimension (OCD) measurement technology and thin film thickness (ThinFilm) measurement technology are widely used in the field of semiconductor chip manufacturing measurement, and are of great significance to the quality monitoring, process optimization, cost control, and yield improvement of semiconductor products. The mathematical principle of measurement technology is to obtain the actual physical morphology and critical dimensions of semiconductor chips through a series of complex algorithms, that is, the combination of direct and inverse problems, without destroying the sample to be tested.

[0003] Regression analysis is a general method for solving inverse problems. Common regression algorithms include the steepest descent method (or gradient descent method), Gauss-Newton method (Gauss-Newton or GN), Levenberg-Marquardt method (Levenberg-Marquardt or LM), and quasi-Newton methods such as BFGS. Among them, the LM method can be regarded as a combination of the steepest descent method and the GN method: when the distance to the optimal solution is far, the LM method tends to the steepest descent method and can quickly determine the descent direction; when gradually approaching the optimal solution, the LM method tends to the GN method and can quickly converge to the optimal solution. The LM method is widely used in the industry due to its high performance and strong robustness.

[0004] In some practical application scenarios, there is a need for batch regression calculations. For example, according to the mathematical characteristics of Newton's method, it is easy to know that the final calculation result is closely related to the position of the initial point. A poor initial point is more likely to lead to non-convergence, thus failing to obtain accurate actual physical morphology and critical dimensions of the semiconductor. It is now known that a certain initial point cannot converge through the LM method, so consider throwing a large number of random initial points for regression calculations in order to obtain converged results. There are many ways to complete the above batch regression calculations: the most direct method is serial calculation, which uses the LM method to regress each random initial point in turn; it can also be processed in parallel with the help of parallel tools such as the Message Passing Interface (MPI) and Open Multi-Processing (openMP). Serial computing is to repeatedly execute the LM algorithm, each time responsible for one task. It has simple logic and low code complexity, but it has a very high time cost, which increases linearly with the amount of tasks, causing users to wait too long. With the help of parallel tools, although it is possible to achieve multi-task synchronous computing and reduce time costs, it requires the introduction of additional libraries, which increases code complexity, and problems such as resource competition in parallel computing may also reduce the robustness of the program and affect the final calculation results. In addition, this method also has certain requirements for hardware. If the configuration of the computer used is not high and the computing resources are limited, parallel computing may even slow down the algorithm. Summary of the invention

[0005] In view of some or all of the problems in the prior art, the present invention provides a vectorized calculation method for batch regression analysis, which comprises the following steps:

[0006] Input the initial point set of the task, construct the initial matrix M0 and the residual matrix R v and label vector F;

[0007] Construct the vectorized Jacobian matrix J v ;

[0008] Optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ;

[0009] Optimize and solve the inverse matrix to obtain the batch search step matrix dx s ;

[0010] According to the batch search step matrix dx s , update the initial matrix M0, and when the set condition for jumping out of the iteration loop is met, jump out of the iteration loop and output the final result matrix Mf; and

[0011] According to the final result matrix Mf, the best result is selected as the final calculation result.

[0012] Furthermore, the initial point set of the task is input to construct the initial matrix M0 and the residual matrix R v And the label vector F includes:

[0013] The matrix of the initial point set for,

[0014]

[0015] in, , ,..., Respectively represent the initial point of the Nth task;

[0016] in, It is expressed as follows:

[0017]

[0018] in, , ,..., L independent variables representing the initial point of the first task;

[0019] According to the same method, construct the residual matrix R v ;

[0020] Construct a label vector F of dimension N and initialize it to have all elements false.

[0021] Further, construct the vectorized Jacobian matrix J v include:

[0022] Vectorized Jacobian matrix J v for,

[0023]

[0024] Among them, J1, J2, …, J N are N Jacobian sub-matrices;

[0025] Among them, J1 is expressed by the following formula:

[0026]

[0027] Wherein, P represents the number of wavelength bands.

[0028] Further, the matrix multiplication is optimized to obtain the vectorized multiplication matrix JJ v and JR v include:

[0029] Vectorized matrix multiplication JJ v It is expressed as follows:

[0030]

[0031] in, , , …, are the Jacobian sub-matrices J1, J2, ..., J N The transposed matrix of

[0032] Vectorized multiplication matrix JR v It is expressed as follows:

[0033]

[0034] in, is the residual matrix, , ,..., Respectively represent the residual vector of the Nth task;

[0035] Depending on the value of N, use a high-performance computing library or block matrix multiplication to perform vectorized matrix multiplication JJ v and JR v Calculation of

[0036] Among them, SIMD is used to accelerate the calculation of block matrix multiplication.

[0037] Further, the inverse matrix is ​​optimized and solved to obtain the batch search step matrix dx s include:

[0038] Batch search step matrix dx s It is expressed as follows:

[0039]

[0040] Among them, JJ v and JR v is the vectorized multiplication matrix, I is the identity matrix; the vector U contains u1, u2, ..., u N , u1, u2, …, u N They represent the damping coefficient of the Nth task respectively;

[0041] Depending on the value of N, use a high-performance computing library or solve the inverse matrix in blocks to perform a batch search step matrix dx s Calculation of

[0042] Perform batch search using block inverse matrix step size matrix dx s When calculating, the adjoint matrix method or LU decomposition inversion is used to perform the calculation according to the size of the block matrix.

[0043] Further, according to the batch search step matrix dx s , update the initial matrix M0, and when the set conditions for jumping out of the iteration loop are met, jump out of the iteration loop, and output the final result matrix Mf including:

[0044] The updated initial matrix is,

[0045]

[0046] in, Represents the matrix consisting of the point sets of each task corresponding to the iterative calculation in the i+1th step, Represents the matrix composed of the point sets of each task corresponding to the iterative calculation in the i-th step, dx s Represents the batch search step matrix;

[0047] If the nth subtask meets the set condition for jumping out of the iteration loop, the nth element in the F vector is updated from the initial value false to true;

[0048] If all F are true, the iteration loop is exited and the final result matrix Mf is output.

[0049] Furthermore, the conditions for jumping out of the iteration loop include:

[0050] The number of iterations reaches the maximum number of iterations set; or

[0051] The mean square error or chi-square value of the goodness of fit calculated from the optical information and the true value is less than the set threshold; or

[0052] The norm of the batch search step matrix is ​​less than the set threshold; or

[0053] The change amount or change rate of the fitting degree calculated from the optical information and the true value is less than the set threshold.

[0054] Furthermore, according to the final result matrix Mf, the best result is selected as the final calculation result including:

[0055] The final result matrix Mf includes the final search points xf_1, xf_2, ..., xf_N of N tasks, and the final search point xf with the highest fitting degree is selected from these final search points as the final calculation result.

[0056] The present invention also provides a vectorized computing system for batch regression analysis, which includes the following modules:

[0057] The initial matrix construction module is configured to input the initial point set of the task and construct the initial matrix M0 and the residual matrix R v and label vector F;

[0058] Jacobian matrix building module, configured to build the vectorized Jacobian matrix J v ;

[0059] The matrix calculation module is configured to optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ;

[0060] The inverse matrix calculation module is configured to optimize the solution of the inverse matrix and obtain the batch search step matrix dx s ;

[0061] The final result matrix output module is configured to output the batch search step matrix dx s , update the initial matrix M0, and when the set condition for jumping out of the iteration loop is met, jump out of the iteration loop and output the final result matrix Mf; and

[0062] The final calculation result output module is configured to select the best result as the final calculation result according to the final result matrix Mf.

[0063] The present invention also provides a computer system, comprising:

[0064] a processor configured to execute machine-readable instructions;

[0065] A graphics card with an artificial intelligence chip configured to train a vectorized computing method for batch regression analysis; and

[0066] The memory is configured to store machine-readable instructions, which, when executed by the processor and / or the graphics card, perform the steps of the vectorized calculation method for batch regression analysis.

[0067] Compared with the prior art, the present invention has the following advantages:

[0068] 1. The vectorized calculation method for batch regression analysis provided by the present invention performs vectorization deduction on the basis of the original LM mathematical model, upgrades the dimension of the original LM model, and constructs a Vectorized-LM model (VLM) that can process regression analysis tasks in batches without affecting the calculation results.

[0069] 2. The vectorized calculation method for batch regression analysis provided by the present invention uses different techniques to optimize matrix multiplication, matrix inversion or solving a system of equations. By using the Single Instruction Multiple Data (SIMD) technology, the lowest-level scalar calculation is vectorized through the SIMD instruction set, further accelerating the calculation, performing vectorization optimization at the computer hardware level, and improving the efficiency of the algorithm. In other words, the method of the present invention is a method executed by a computer, and its technical effect is that it significantly improves the calculation speed and reduces the waiting time compared to conventional regression algorithms. When applied to the field of semiconductor measurement, it can reduce the amount of calculation when determining the size and increase the speed of determining the size.

[0070] 3. The vectorized calculation method for batch regression analysis provided by the present invention is compared with the original LM model which can only perform regression analysis on one initial point in a single calculation. The VLM model proposed by the present invention can perform regression analysis in batches, thus overcoming the problem of non-convergence of poor initial points in the LM method and increasing the possibility of convergence.

[0071] 4. The vectorized calculation method for batch regression analysis provided by the present invention can synchronously complete multi-task regression analysis in batches with a single regression calculation without the help of parallel tools, has a good acceleration effect, and is of great significance for practical application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] To further illustrate the above and other advantages and features of various embodiments of the present invention, a more specific description of various embodiments of the present invention will be presented with reference to the accompanying drawings. It will be understood that these drawings only depict typical embodiments of the present invention and are therefore not to be considered as limiting the scope thereof. In the accompanying drawings, for clarity, identical or corresponding parts will be represented by identical or similar reference numerals.

[0073] Figure 1 A schematic flow chart of a vectorized calculation method for batch regression analysis according to an embodiment of the present invention is shown;

[0074] Figure 2 A schematic diagram of the Jacobian matrix of an embodiment of the present invention is shown;

[0075] Figure 3 A schematic diagram of the SISD operation principle of an embodiment of the present invention is shown;

[0076] Figure 4 A schematic diagram showing the SIMD operation principle of an embodiment of the present invention is shown; and

[0077] Figure 5 A schematic diagram of a vectorized computing system for batch regression analysis according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0078] In the following description, the present invention is described with reference to various embodiments. However, those skilled in the art will recognize that various embodiments may be implemented without one or more specific details or with other replacement and / or additional methods or components. In other cases, well-known structures or operations are not shown or described in detail to avoid obscuring the inventive point of the present invention. Similarly, for the purpose of explanation, specific numbers and configurations are set forth to provide a comprehensive understanding of embodiments of the present invention. However, the present invention is not limited to these specific details.

[0079] In this specification, reference to "one embodiment" or "the embodiment" means that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present invention. The phrase "in one embodiment" appearing in various places in this specification does not necessarily all refer to the same embodiment.

[0080] It should be noted that the embodiments of the present invention describe the method steps in a specific order, but this is only for the purpose of illustrating the specific embodiment, rather than limiting the order of the steps. On the contrary, in different embodiments of the present invention, the order of the steps can be adjusted according to actual needs.

[0081] In the present invention, each module of the system according to the present invention can be implemented using software, hardware, firmware or a combination thereof. When the module is implemented using software, the function of the module can be implemented through a computer program flow, for example, the module can be implemented by a code segment (such as a code segment of a language such as C, C++, etc.) stored in a storage device (such as a hard disk, memory, etc.), wherein when the code segment is executed by a processor, the corresponding function of the module can be implemented. When the module is implemented using hardware, the function of the module can be implemented by setting a corresponding hardware structure, for example, the function of the module can be implemented by hardware programming a programmable device such as a field programmable gate array (FPGA), or by designing an application-specific integrated circuit (ASIC) including electronic devices such as multiple transistors, resistors and capacitors to implement the function of the module. When the module is implemented using firmware, the function of the module can be written into a read-only memory such as an EPROM or EEPROM of the device in the form of a program code, and when the program code is executed by a processor, the corresponding function of the module can be implemented. In addition, some functions of the module may need to be implemented by separate hardware or by collaboration with the hardware, for example, the detection function is implemented by corresponding sensors (such as proximity sensors, acceleration sensors, gyroscopes, etc.), the signal transmission function is implemented by corresponding communication devices (such as Bluetooth devices, infrared communication devices, baseband communication devices, Wi-Fi communication devices, etc.), the output function is implemented by corresponding output devices (such as displays, speakers, etc.), and so on.

[0082] The vectorized calculation method for batch regression analysis provided by the present invention performs vectorization derivation on the basis of the original LM mathematical model, upgrades the dimension of the original LM model, and constructs a Vectorized-LM model (VLM) that can process regression analysis tasks in batches without affecting the calculation results. This model does not rely on any external parallel tools, and is theoretically compatible with tasks of any scale, and only needs to execute the calculation process once to obtain the regression analysis results of all tasks. The above is a relatively high-level vectorization, which can be summarized as "vectorization at the mathematical level."

[0083] On the basis of the above VLM model, the present invention also optimizes the matrix calculations within the model. There are large-scale matrix / matrix or matrix / vector calculations within the model. The present invention utilizes the mathematical properties of specific matrices and adopts a variety of different matrix calculation techniques to optimize matrix operations and improve algorithm efficiency. The above matrix calculations can be deeply optimized. By using Single Instruction Multiple Data (SIMD) technology, the lowest-level scalar calculations are vectorized through the SIMD instruction set to further accelerate the calculation. This section is a relatively low-level optimization, which can be summarized as "matrix operation optimization" and "vectorization at the hardware level."

[0084] The technical solutions in the embodiments of the present invention are described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0085] Figure 1 FIG. 1 is a flow chart showing a vectorized calculation method for batch regression analysis according to an embodiment of the present invention. Figure 1 As shown, the vectorized calculation method for batch regression analysis includes the following steps:

[0086] First, input the initial point set of the task and construct the initial matrix M0 and the residual matrix R v and the label vector F.

[0087] In the original LM model, the initial point of the input Is a vector with dimension L, which is equivalent to the degree of freedom of the regression analysis to be performed, that is, the number of independent variables. Each independent variable has a corresponding actual physical meaning, such as the thickness, width, angle, etc. of the semiconductor device to be tested. It is expressed as follows:

[0088]

[0089] The VLM model implements multi-task batch regression analysis, so the initial input information of the model is different from the original LM model. In the VLM model, the input information is upgraded, N tasks correspond to N initial points, and the input information is composed of the initial point vector Converted to the matrix M0 consisting of the initial point set, the matrix M0 is expressed as follows:

[0090] in, , ,..., They respectively represent the initial points of the Nth task.

[0091] in, It is expressed as follows:

[0092]

[0093] in, , ,..., The L independent variables representing the initial point of the first task.

[0094] According to the same method, construct the residual matrix R v . In one embodiment of the present invention, the residual is the difference between the actual spectral data and the calculated spectral data. The actual spectral data is obtained by actual measurement of the device and is definite data; the calculated spectral data is the spectral data calculated by using a mathematical model according to the critical optical dimensions in the positive problem, and changes during the regression calculation process. The smaller the spectral residual, the better the effect, which means that the current optical critical dimension is closer to the actual dimension. The goal of the regression calculation is to find the size that can make the residual as small as possible.

[0095] Construct a tag vector F of dimension N and initialize it to all elements false, that is, all elements of vector F are 0 or empty. Vector F serves as a container to record the status of each task during the iterative calculation process. Use the above initial matrix M0 and tag vector F as the initial input information of the VLM model to perform subsequent calculation steps.

[0096] Next, construct the vectorized Jacobian matrix J v .

[0097] In the original LM model, the Jacobian matrix consists of the first-order partial derivatives of multivariate functions with respect to their respective variables near a certain point. In the calculation of OCD, that is, the spectral information of each wavelength band is More specifically, combined with the single initial point of dimension L in the above steps , take P wavelength bands for regression analysis, then the size of the Jacobian matrix J is P×L. In the VLM model, the input information is represented by the vector Converted to matrix M0, the Jacobian matrix also needs to be upgraded to form a three-dimensional tensor of size N×(P×L), such as Figure 2 To avoid the increased computational complexity caused by the three-dimensional tensor, this three-dimensional tensor is expanded into a two-dimensional matrix in the format of a "block diagonal matrix", as shown in Figure 2 As shown on the right, denoted as J v , its scale becomes (N×P)×(N×L). Figure 2 In the example, the Tasks axis represents the task amount, the DOF (Degree of Freedom) axis represents the degree of freedom, and the WL axis represents the wavelength. The vectorized Jacobian matrix J v It is expressed as follows:

[0098]

[0099] Among them, J1, J2, …, J N are N Jacobian submatrices located in the Jacobian matrix J v On the diagonal of v The rest of the elements are 0. Among them, J1 is expressed by the following formula,

[0100]

[0101] Wherein, P represents the number of wavelength bands.

[0102] Vectorized Jacobian matrix J v It is a strictly block diagonal matrix. This matrix property also facilitates subsequent matrix multiplication, matrix inversion and other calculations.

[0103] Next, optimize the matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v .

[0104] In the original LM model, there are Jacobian matrix J and residual vector R. First, transpose Jacobian matrix J to get matrix J T , and then J T Multiply them with the original Jacobian matrix J and the residual vector R respectively, and the resulting matrix and vector are denoted as JJ and JR respectively.

[0105] In the VLM model, based on the above vectorized Jacobian matrix J v According to its dimensionality change and diagonal block characteristics, it can be derived that the vectorized JJ and JR matrices are denoted as JJ v and JR v , where the vectorized multiplication matrix JJv It is expressed as follows:

[0106]

[0107] in, , , …, are the Jacobian sub-matrices J1, J2, ..., J N The transposed matrix of .

[0108] Vectorized multiplication matrix JR v It is expressed as follows:

[0109]

[0110] in, is the residual matrix, , ,..., Represent the residual vector of the Nth task respectively.

[0111] In different situations, you can choose from a variety of methods to perform vectorized matrix multiplication JJ v and JR v In one embodiment of the present invention, depending on the value of N, a high performance computing library or block matrix multiplication can be used to perform vectorized multiplication matrix JJ v and JR v When N is small, use a high-performance computing library; when N is large, use block matrix multiplication. The specific boundary is related to the actual calculation content, the performance of the device performing the calculation, and many other aspects. When the task volume is moderate or small (N is small), you can configure a high-performance computing library such as MKL or openBlas in the computer environment, and directly call the cblas_dgemm function to perform the above calculation. The advantage is that it is simple and direct, avoiding the development cost of self-written matrix multiplication algorithms; however, when the task volume is large (N is large), JJ v The dimension of the matrix increases rapidly, and its upper and lower triangles contain a large number of zero elements, which will bring too many redundant calculations and may reduce the algorithm speed. Therefore, when the task volume is large (N is large), we can independently develop a unique matrix multiplication algorithm based on the characteristics of the vectorized matrix, and convert JJ v The matrix multiplication calculation is performed in the form of block matrix multiplication, ignoring the calculation of all non-diagonal zero elements and focusing only on the diagonal sub-matrix multiplication, which greatly reduces the amount of calculation.

[0112] In one embodiment of the present invention, when N does not exceed 20, a high performance computing library is used; when N is greater than 20, block matrix multiplication is used.

[0113] If a self-developed algorithm is used, SIMD technology can be used to further optimize the sub-matrix multiplication, which can ensure that when the task volume is large, the vectorized JJ v and JR v The calculation still maintains a fast execution speed. v The matrix is ​​a diagonal block matrix, and each JJ submatrix has the characteristics of a symmetric matrix, so JJ v If the matrix is ​​also a symmetric matrix, the above different methods can be further optimized: directly call the MKL library's functions specifically used to calculate symmetric matrices and block matrices, or reduce the redundant calculation of symmetric elements (equal elements) in the independently developed algorithm, thereby reducing the amount of calculation and improving calculation efficiency.

[0114] Single Instruction Multiple Data (SIMD) is a technology that uses the special structure of the CPU to achieve hardware-level vectorization. Figure 3 and Figure 4 With the help of addition operation, the operation principles of SISD and SIMD are explained respectively. Figure 3 As shown, in a single instruction single data (SISD) operation, a single vector addition of length 4 requires executing four addition instructions in sequence on the elements at corresponding positions in the vector. Figure 4 As shown, by using the AVX instruction set in SIMD technology, only a single AVX instruction needs to be executed to complete vector addition, and the theoretical acceleration effect is 4 times that of the conventional one. Basic operations include addition, subtraction, multiplication and division, and the principle of SIMD vectorization acceleration is the same. Therefore, the matrix multiplication part of the present invention can essentially be decomposed into multiple vector multiplication calculations, and then SIMD technology is used to accelerate vector multiplication, so as to achieve the purpose of optimizing matrix multiplication. It is worth noting that if the computer CPU can support the more advanced AVX512 instruction set, the bit width that can be vectorized and executed can be increased to 8 double data, and the acceleration effect is more obvious, and the theoretical acceleration effect is 8 times that of the conventional one.

[0115] Next, optimize and solve the inverse matrix to obtain the batch search step matrix dx s .

[0116] In the VLM model, the batch search step matrix dx s It is expressed as follows:

[0117]

[0118] Among them, JJ v and JR vis the vectorized multiplication matrix; I is the identity matrix with dimensions (N×L)×(N×L); the vector U contains u1, u2, …, u N , u1, u2, …, u N They represent the damping coefficients of the Nth task respectively, and these damping coefficients are independent of each other.

[0119] In different situations, you can choose a suitable method from a variety of methods to perform batch search step matrix dx s In one embodiment of the present invention, according to the value of N, a batch search step matrix dx is performed using a high-performance computing library or a block-by-block inverse matrix solution. s When N is small, use the high-performance computing library; when N is large, use block-based inverse matrix solving. The specific boundary is related to the actual calculation content, the performance of the device performing the calculation, and many other aspects. When the task volume is moderate or small (N is small), you can directly call the LAPACKE_dgetrf and LAPACKE_dgetri functions of the high-performance computing library to perform LU decomposition on the vectorized matrix (JJv+UI) to obtain its inverse matrix, and then perform matrix multiplication according to the cblas_dgemm function to obtain dx s matrix; you can also call the LAPACKE_dgesv function to directly solve the above equations to obtain dx s . When the task volume is large (N is large), the inversion can be performed in blocks according to the characteristics of the vectorized matrix (JJv+UI), and the inverse matrix of each (JJ+uI) submatrix can be calculated to avoid redundant calculations. On the basis of the above, the inversion calculation can be further optimized in depth. If the degree of freedom L is small, such as when L<4 or L<5, the calculation time of solving the inverse matrix using the adjoint matrix formula method is significantly lower than LU decomposition. In addition, due to the particularity of JJv, the (JJv+UI) matrix inherits the characteristics of its diagonal matrix and symmetric matrix, so special functions in the MKL library can be used or redundant calculations can be avoided in self-developed algorithms. Through the above optimization, the time consumption of the matrix inversion part can be accelerated from ms to s, and the fastest to μs, with obvious acceleration effect.

[0120] In one embodiment of the present invention, according to the scale of the block matrix, the adjoint matrix method or LU decomposition inversion is used to perform the calculation; when the scale of the block matrix is ​​large, the LU decomposition inversion is used; when the scale of the block matrix is ​​small, the adjoint matrix method is used, which is more efficient than the LU decomposition inversion. The LU decomposition inversion decomposes the original matrix into a lower triangular matrix L and an upper triangular matrix U, and then solves two triangular equations to obtain the inverse matrix; the calculation process only involves simple linear algebra operations, the time complexity is low, and it is suitable for processing large matrices with high universality. The adjoint matrix method first calculates all algebraic co-factors of the original matrix, and then constructs its transposed matrix, which is the adjoint matrix, and finally divides the adjoint matrix by the determinant of the original matrix to obtain the inverse matrix; when processing small matrices (usually not more than 5 orders), the calculation of the determinant and the construction of the adjoint matrix are relatively simple, and the required amount of calculation is small.

[0121] Next, according to the batch search step matrix dx s , update the initial matrix M0, and when the set conditions for jumping out of the iteration loop are met, jump out of the iteration loop and output the final result matrix Mf.

[0122] The updated initial matrix is,

[0123]

[0124] in, Represents the matrix consisting of the point sets of each task corresponding to the iterative calculation in the i+1th step, Represents the matrix composed of the point sets of each task corresponding to the iterative calculation in the i-th step, dx s Represents the batch search step size matrix.

[0125] According to the pre-set conditions for jumping out of the iteration loop, the current state of each subtask is determined, and the state mark is updated at the corresponding position of the mark vector F. For example, if the nth subtask meets the set conditions for jumping out of the iteration loop, the nth element in the F vector is updated from the initial value false to true, otherwise it remains false.

[0126] After updating the F vector, the F vector is judged. If all F vectors are true, it means that all tasks meet the conditions for jumping out of the loop, then the iterative calculation of the VLM algorithm ends and the final result matrix Mf is output. If not all F vectors are true, repeat the following steps to continue searching for a better solution: optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ; Optimize and solve the inverse matrix to obtain the batch search step matrix dx s ; According to the batch search step matrix dx s, update the initial matrix M0, and when the set conditions for jumping out of the iteration loop are met, jump out of the iteration loop and output the final result matrix Mf.

[0127] The conditions for jumping out of the iteration loop include:

[0128] The number of iterations reaches the maximum number of iterations set. For example, if the maximum number of iterations is set to max-iter=100, then when the iteration reaches 100, it is necessary to jump out of the loop regardless of whether it converges or not; otherwise, there will be too many iterations and the calculation time will be too long; or

[0129] The mean square error (MSE) or chi-square value of the fit calculated from the optical information and the true value is less than the set threshold, for example, MSE < 10 -3 , it is considered to have converged and the conditions for jumping out of the loop are met; or

[0130] The norm of the batch search step matrix is ​​less than the set threshold, for example, the norm of the step is less than 10 -3 , it is considered to have converged and the conditions for jumping out of the loop are met; or

[0131] The change or rate of fit calculated from the optical information and the true value is less than the set threshold, for example, the MSE change is less than 10 -3 Or if the rate of change is less than 5%, it is considered to have converged and the conditions for exiting the loop are met.

[0132] The stricter the above conditions for jumping out of the iteration loop, the higher the calculation accuracy, but the time cost will also increase. Generally speaking, these conditions can be retained in the code as external interfaces and set by the user of the measurement device.

[0133] Finally, according to the final result matrix Mf, the optimal result is selected as the final calculation result. The final result matrix Mf contains the final search points xf_1, xf_2, ..., xf_N of N tasks. All the final search points are sorted, and the final search point xf with the highest fit is selected, that is, the point closest to the global optimal solution, as the final calculation result of the entire VLM model. In one embodiment of the present invention, xf can be transmitted to the subsequent components of the software for post-processing, visualization drawing and other operations, and the data information in xf is converted into an image, and the physical morphology of the semiconductor device to be tested is intuitively presented to the user.

[0134] The vectorized calculation method for batch regression analysis provided by the present invention performs vectorized deduction on the basis of the original LM mathematical model to construct a VLM model capable of batch processing regression analysis tasks; uses different techniques to optimize matrix multiplication, matrix inversion or solving a system of equations, and further accelerates the calculation by using SIMD technology, thereby improving the efficiency of the algorithm; without the aid of parallel tools, a single regression calculation can synchronously complete multi-task regression analysis in batches, which has a good acceleration effect and is of great significance for practical application scenarios.

[0135] The effect of the present invention can be further illustrated by the following application examples.

[0136] For a semiconductor measurement task of an existing OCD, in the regression analysis, if the initial point Unable to converge, changing the initial point many times, still can not achieve a good convergence effect. If you continue to manually input the initial points in sequence and repeatedly perform the LM regression calculation at this time, it is not only easy to miss the better initial points, but also inefficient, and the labor cost and time cost are high. If the VLM model provided by the present invention is used, the initial points are randomly scattered within the upper and lower limits of each degree of freedom, and the task amount N is set to a larger value, then a large number of random initial point regression analyses can be performed at one time, and the optimal result can be selected from these large number of regression analysis results, which greatly increases the possibility of convergence and reduces labor and time costs. The vectorized calculation method for batch regression analysis proposed in the present invention can play a role in a variety of scenarios.

[0137] In one embodiment of the present invention, the present invention further provides a vectorized computing system for batch regression analysis. Figure 5 FIG. 1 is a schematic diagram of a vectorized computing system for batch regression analysis according to an embodiment of the present invention. Figure 5 As shown, the system includes the following modules:

[0138] The initial matrix construction module is configured to input the initial point set of the task and construct the initial matrix M0 and the residual matrix R v and label vector F;

[0139] Jacobian matrix building module, configured to build the vectorized Jacobian matrix J v ;

[0140] The matrix calculation module is configured to optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ;

[0141] The inverse matrix calculation module is configured to optimize the solution of the inverse matrix and obtain the batch search step matrix dx s ;

[0142] The final result matrix output module is configured to output the batch search step matrix dx s , update the initial matrix M0, and when the set condition for jumping out of the iteration loop is met, jump out of the iteration loop and output the final result matrix Mf; and

[0143] The final calculation result output module is configured to select the best result as the final calculation result according to the final result matrix Mf.

[0144] In one embodiment of the present invention, the present invention further provides a computer system, which includes a processor, a graphics card and a memory, wherein the memory is configured to store machine-readable instructions, the graphics card is configured to train a vectorized computing method for batch regression analysis, and the processor is configured to execute the machine-readable instructions. When the processor and / or the graphics card executes the machine-readable instructions, the following processing steps are implemented: inputting the initial point set of the task, constructing the initial matrix M0, the residual matrix R v and label vector F; construct vectorized Jacobian matrix J v ; Optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v ; Optimize and solve the inverse matrix to obtain the batch search step matrix dx s ; According to the batch search step matrix dx s , update the initial matrix M0, and when the set condition for jumping out of the iteration loop is met, jump out of the iteration loop and output the final result matrix Mf; and according to the final result matrix Mf, select the optimal result as the final calculation result.

[0145] The graphics card may preferably have a GPU computing power higher than 5.0. Since the amount of data to be trained is large, providing a graphics card configuration can significantly increase the training speed.

[0146] The memory includes: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store machine-readable instructions.

[0147] It can be understood that in addition to the memory and processor mentioned above, the above-mentioned computer system also includes other software and hardware components not listed in this specification. The specific components can be determined according to the model of specific data processing equipment in different application scenarios, and this specification will not list them one by one in detail.

[0148] Although various embodiments of the present invention are described above, it should be understood that they are presented as examples only and not as limitations. It is obvious to those skilled in the relevant art that various combinations, modifications and changes can be made thereto without departing from the spirit and scope of the present invention. Therefore, the breadth and scope of the present invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should only be defined according to the technical solutions of the present invention and their equivalents.

Claims

1. A vectorized computing method for batch regression analysis, the vectorized computing method being used to process spectral data, It is characterized in that The steps include: Input the initial point set of the task and construct the initial matrix M 0 , residual matrix R v and a label vector F, the tasks include N, the initial point set is a vector including L spectral data independent variables, the independent variables correspond to the physical parameters of the semiconductor device, the initial matrix M 0 It contains N initial point sets, the residual is the difference between the actual spectrum data and the calculated spectrum data, and the tag vector is used to record the status of the task during the calculation process; Construct the vectorized Jacobian matrix J v , the Jacobian matrix consists of P wavelength segments about the initial matrix M 0 The first-order partial derivatives of the respective variables are composed; Optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v , the optimized matrix multiplication includes performing matrix multiplication using a high performance computing library or performing matrix multiplication using block matrix multiplication or performing matrix multiplication using single instruction multiple data technology, the matrix JJ v is the Jacobian matrix J v The transposed matrix and Jacobian matrix J v The product of the matrix JR v is the Jacobian matrix J v The transposed matrix and residual matrix R v The product of Optimize and solve the inverse matrix to obtain the batch search step matrix dx s , the optimizing and solving the inverse matrix includes using a high performance computing library to solve the inverse matrix or using block matrix multiplication to solve the inverse matrix; According to the batch search step matrix dx s , update the initial matrix M 0 , when the set conditions for jumping out of the iteration loop are met, the iteration loop is jumped out and the final result matrix Mf is output; as well as According to the final result matrix Mf, the optimal result is selected as the final calculation result. The final result matrix Mf includes the final search points xf_1, xf_2, ..., xf_N of N tasks. The final search point xf with the highest fit is selected from these final search points as the final calculation result. The final calculation result is converted into a morphological image of the semiconductor device.

2. The vectorized calculation method for batch regression analysis according to claim 1, It is characterized in that Input the initial point set of the task and construct the initial matrix M 0 , residual matrix R v And the label vector F includes: The matrix of the initial point set for, in, , ,..., Respectively represent the initial point of the Nth task; in, It is expressed as follows: in, , ,..., L independent variables representing the initial point of the first task; According to the same method, construct the residual matrix R v ; Construct a label vector F of dimension N and initialize it to have all elements false.

3. The vectorized calculation method for batch regression analysis according to claim 1, It is characterized in that Construct the vectorized Jacobian matrix J v include: Vectorized Jacobian matrix J v for, Among them, J 1 , J 2 , …, J N are N Jacobian sub-matrices; Among them, J 1 It is expressed as follows: in, , ,..., represents the initial information of P wavelength bands, Represents the first-order partial derivative of the spectral information of the Pth wavelength band with respect to the Lth independent variable at the initial point of the first task.

4. The vectorized calculation method for batch regression analysis according to claim 1, It is characterized in that Optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v include: Vectorized matrix multiplication JJ v It is expressed as follows: in, , , …, They are the Jacobian submatrices J 1 , J 2 , …, J N The transposed matrix of Vectorized multiplication matrix JR v It is expressed as follows: in, is the residual matrix, , ,..., Respectively represent the residual vector of the Nth task; Depending on the value of N, use a high-performance computing library or block matrix multiplication to perform vectorized matrix multiplication JJ v and JR v Calculation of Among them, SIMD is used to accelerate the calculation of block matrix multiplication.

5. The vectorized calculation method for batch regression analysis according to claim 1, It is characterized in that Optimize and solve the inverse matrix to obtain the batch search step matrix dx s include: Batch search step matrix dx s It is expressed as follows: Among them, JJ v and JR v is the vectorized multiplication matrix, I is the identity matrix; the vector U contains u 1 、u 2 、…、u N ,u 1 、u 2 、…、u N They represent the damping coefficient of the Nth task respectively; Depending on the value of N, use a high-performance computing library or solve the inverse matrix in blocks to perform a batch search step matrix dx s Calculation of Perform batch search using block inverse matrix step size matrix dx s When calculating, the adjoint matrix method or LU decomposition inversion is used to perform the calculation according to the size of the block matrix.

6. The vectorized calculation method for batch regression analysis according to claim 1, It is characterized in that According to the batch search step matrix dx s , update the initial matrix M 0 When the set conditions for jumping out of the iteration loop are met, the iteration loop is jumped out, and the final result matrix Mf is output, including: The updated initial matrix is, in, Represents the matrix consisting of the point sets of each task corresponding to the iterative calculation of the i+1th step, Represents the matrix composed of the point sets of each task corresponding to the iterative calculation in the i-th step, dx s Represents the batch search step matrix; If the nth subtask meets the set condition for jumping out of the iteration loop, the nth element in the F vector is updated from the initial value false to true; If all F are true, the iteration loop is exited and the final result matrix Mf is output.

7. The vectorized calculation method for batch regression analysis according to claim 6, It is characterized in that The conditions for jumping out of the iteration loop include: The number of iterations reaches the maximum number of iterations set; or The mean square error or chi-square value of the goodness of fit calculated from the optical information and the true value is less than the set threshold; or The norm of the batch search step matrix is ​​less than the set threshold; or The change amount or change rate of the fitting degree calculated from the optical information and the true value is less than the set threshold.

8. A vectorized computing system for batch regression analysis, the vectorized computing system being used to process spectral data, It is characterized in that Includes the following modules: The initial matrix construction module is configured to input the initial point set of the task and construct the initial matrix M 0 , residual matrix R v and a label vector F, the tasks include N, the initial point set is a vector including L spectral data independent variables, the independent variables correspond to the physical parameters of the semiconductor device, the initial matrix M 0 It contains N initial point sets, the residual is the difference between the actual spectrum data and the calculated spectrum data, and the tag vector is used to record the status of the task during the calculation process; Jacobian matrix building module, configured to build the vectorized Jacobian matrix J v , the Jacobian matrix consists of P wavelength segments about the initial matrix M 0 The first-order partial derivatives of the respective variables are composed; The matrix calculation module is configured to optimize matrix multiplication and obtain the vectorized multiplication matrix JJ v and JR v , the optimized matrix multiplication includes performing matrix multiplication using a high performance computing library or performing matrix multiplication using block matrix multiplication or performing matrix multiplication using single instruction multiple data technology, the matrix JJ v is the Jacobian matrix J v The transposed matrix and Jacobian matrix J v The product of the matrix JR v is the Jacobian matrix J v The transposed matrix and residual matrix R v The product of The inverse matrix calculation module is configured to optimize the solution of the inverse matrix and obtain the batch search step matrix dx s , the optimizing and solving the inverse matrix includes using a high performance computing library to solve the inverse matrix or using block matrix multiplication to solve the inverse matrix; The final result matrix output module is configured to output the batch search step matrix dx s , update the initial matrix M 0 , when the set conditions for jumping out of the iteration loop are met, the iteration loop is jumped out and the final result matrix Mf is output; as well as The final calculation result output module is configured to select the optimal result as the final calculation result according to the final result matrix Mf, wherein the final result matrix Mf includes the final search points xf_1, xf_2, ..., xf_N of N tasks, and select the final search point xf with the highest fit from these final search points as the final calculation result, and convert the final calculation result into a morphological image of the semiconductor device.

9. A computer system, It is characterized in that include: a processor configured to execute machine-readable instructions; A graphics card with an artificial intelligence chip configured to train a vectorized computing method for batch regression analysis; and A memory configured to store machine-readable instructions, wherein the machine-readable instructions, when executed by a processor and / or a graphics card, perform the steps of the method according to any one of claims 1 to 7.