Accelerator parameter selection methods, devices, equipment, storage media, and software products

By introducing a parameter selection method guided by prior knowledge into accelerator design, and combining clustering and Bayesian optimization, the problem of personal bias and human-machine intelligence integration in accelerator microarchitecture parameter selection is solved, and efficient automatic exploration of target design points is achieved.

CN121365633BActive Publication Date: 2026-03-06LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511935633.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-06
Estimated Expiration
2045-12-22

AI Technical Summary

Technical Problem

Existing technologies have issues with the selection of accelerator microarchitecture parameters, such as the risk of personal bias and the failure to effectively integrate human and machine intelligence, which may result in the final solution not being globally optimal.

Method used

Guided by prior knowledge, the core design parameters and their preset weights are determined, parameter point clustering and Bayesian optimization are performed, candidate parameter points are screened, and the target design point is automatically explored by combining adaptive sampling methods and Bayesian optimization processing of multiple acquisition functions.

Benefits of technology

It enables automated and efficient exploration of accelerator parameter selection guided by prior knowledge, avoids personal bias, and improves the accuracy and efficiency of parameter point selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365633B_ABST
    Figure CN121365633B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, storage medium, and program product for accelerator parameter selection, relating to the field of hardware design. It determines the core design parameters and their preset weights for a target accelerator design based on prior knowledge. Within the design space of the target accelerator design, the number of candidate values ​​for the core design parameters is used as the number of clusters. Parameter points are clustered based on the number of clusters and the distance between parameter points in the design space, guided by prior knowledge, to obtain parameter point clusters under each core design parameter configuration. Subsequently, high-value candidate parameter points can be screened from each parameter point cluster. Then, observation parameter points can be sampled from the candidate parameter points, and accelerator design simulations can be performed on the observed parameter points to obtain actual index values. Based on the observed parameter points and their actual index values, Bayesian optimization is iteratively applied to the candidate parameter points to obtain the target design points for the target accelerator design, thereby improving the parameter point selection effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hardware design, and in particular to an accelerator parameter selection method, apparatus, device, storage medium, and program product. Background Technology

[0002] Optimizing the selection of microarchitecture parameters is a crucial aspect of the accelerator's conceptual design phase. In related technologies, microarchitecture parameters are typically selected by architects based on their professional experience, or automatically through algorithm-driven optimization. However, the former carries the risk of personal bias, potentially resulting in a satisfactory rather than globally optimal solution; the latter ignores the architect's existing domain knowledge, failing to achieve an effective integration of human and machine intelligence. Summary of the Invention

[0003] The purpose of this invention is to provide an accelerator parameter selection method, device, electronic device, storage medium, and program product that can automatically find and select target design points for accelerator design under the guidance of prior knowledge, avoid personal bias, and improve the efficiency of accelerator parameter point selection.

[0004] To solve the above-mentioned technical problems, the present invention provides an accelerator parameter selection method, comprising:

[0005] The design space is determined based on the adjustable design parameters in the target accelerator design.

[0006] The core design parameters and their preset weights for the target accelerator are determined based on pre-defined prior knowledge. The number of candidate values ​​for the core design parameters is used as the number of clusters. The parameter points are clustered based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance is determined based on the difference between the design parameters of the parameter points, and the preset weights are used to weight the difference between the core design parameters to correct the distance.

[0007] In each parameter point cluster, a preset number of candidate parameter points are selected based on the distance between each parameter point to eliminate parameter points that are too close to each other.

[0008] Observation parameter points are sampled from candidate parameter points, and accelerator design simulation is performed on the observation parameter points to obtain the actual index values. Based on the observation parameter points and their actual index values, Bayesian optimization is iteratively performed on the candidate parameter points to obtain the target design points of the target accelerator.

[0009] The present invention also provides a parameter selection device, comprising:

[0010] The design space setting module is used to determine the design space based on the adjustable design parameters in the target accelerator design.

[0011] The clustering module is used to determine the core design parameters and their preset weights for the target accelerator design based on preset prior knowledge. The number of candidate values ​​of the core design parameters is used as the number of clusters, and parameter points are clustered according to the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance is determined based on the difference between the design parameters of the parameter points, and the preset weights are used to weight the difference between the core design parameters to correct the distance.

[0012] The sampling module is used to filter a preset number of candidate parameter points in each parameter point cluster based on the distance between each parameter point, so as to eliminate parameter points that are close to each other in the parameter point cluster.

[0013] The Bayesian optimization module is used to sample observation parameter points from candidate parameter points, perform accelerator design simulation on the observation parameter points to obtain real index values, and iteratively perform Bayesian optimization on the candidate parameter points based on the observation parameter points and their real index values ​​to obtain the target design points of the target accelerator design.

[0014] The present invention also provides an electronic device, comprising:

[0015] Memory, used to store computer programs;

[0016] The processor is used to implement the accelerator parameter selection method described above when executing computer programs.

[0017] The present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the above-described accelerator parameter selection method.

[0018] The present invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the above-described accelerator parameter selection method.

[0019] This invention provides a method for selecting accelerator parameters, comprising: determining a design space based on adjustable design parameters in a target accelerator design; determining core design parameters and their preset weights for the target accelerator design based on preset prior knowledge; using the number of candidate values ​​of the core design parameters as the number of clusters; and clustering parameter points based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters; wherein the distance is determined based on the design parameter difference between parameter points, and the preset weights are used to weight the core design parameter difference to correct the distance; in each parameter point cluster, filtering a preset number of candidate parameter points based on the distance between each parameter point to eliminate parameter points that are too close; sampling and observing parameter points from the candidate parameter points; performing accelerator design simulation on the observed parameter points to obtain actual index values; and iteratively performing Bayesian optimization on the candidate parameter points based on the observed parameter points and their actual index values ​​to obtain the target design points for the target accelerator design.

[0020] The beneficial effects of this invention are as follows: First, it allows for the establishment of a complete design space based on adjustable design parameters in the target accelerator design. Then, it determines the core design parameters and their preset weights based on pre-defined prior knowledge. The number of candidate values ​​for the core design parameters is used as the number of clusters. Parameter points are clustered based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance is determined based on the difference in design parameters between parameter points, and the preset weights are used to weight the differences in core design parameters to correct the distance. In other words, the most important core design parameters for the target accelerator design can be determined based on prior knowledge. The number of clusters is determined based on the number of candidate values ​​for the core design parameters, and the distance between parameter points is corrected based on the preset weights of the core design parameters to enhance the influence of the core design parameters. Thus, clustering can be performed under the guidance of prior knowledge to obtain parameter point clusters under each core design parameter configuration. Subsequently, within each parameter point cluster, a preset number of candidate parameter points can be selected based on the distance between each parameter point to eliminate closely spaced parameter points and remove redundancy in the design space corresponding to each parameter point cluster. Finally, observation parameter points can be sampled from the candidate parameter points, and accelerator design simulation can be performed on the observation parameter points to obtain the real index values. Based on the observation parameter points and their real index values, Bayesian optimization is performed iteratively on the candidate parameter points to obtain the target design point of the target accelerator. The target design point can be automatically explored under the guidance of prior knowledge, which can avoid personal bias and improve the efficiency of parameter point exploration.

[0021] The present invention also provides a parameter selection device, an electronic device, a storage medium, and a program product, which have the above-mentioned beneficial effects. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0023] Figure 1 A flowchart of an accelerator parameter selection method provided in an embodiment of the present invention;

[0024] Figure 2 A flowchart of another accelerator parameter selection method provided in an embodiment of the present invention;

[0025] Figure 3 A structural block diagram of an accelerator parameter selection device provided in an embodiment of the present invention;

[0026] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Optimizing the selection of microarchitecture parameters is a crucial aspect of the accelerator's conceptual design phase. In related technologies, microarchitecture parameters are typically selected by architects based on their professional experience, or automatically through algorithm-driven optimization. However, the former carries the risk of personal bias, potentially resulting in a satisfactory rather than globally optimal solution; the latter ignores the architect's existing domain knowledge, failing to achieve an effective integration of human and machine intelligence.

[0029] In view of this, in order to address the technical problem of how to improve the automatic selection of accelerator parameters, the present invention provides an accelerator parameter selection method that can automatically find and select target design points for accelerator design under the guidance of prior knowledge, thereby avoiding personal bias and improving the efficiency of accelerator design point selection.

[0030] For easier understanding, please refer to Figure 1 , Figure 1 A flowchart of an accelerator parameter selection method provided in an embodiment of the present invention, the method may include:

[0031] S101. Determine the design space based on the adjustable design parameters in the target accelerator design.

[0032] In this embodiment, the design parameters are adjustable parameters in the target accelerator design, such as CPU core parameters, L2 cache parameters, systolic array parameters, etc. Each design parameter can have one or more optional candidate values, such as the number of CPU cores being 1, 2, 4, 8, 16, etc. The design space consists of all combinations of candidate values ​​for each design parameter, and each parameter point in the design space corresponds to one combination of candidate values ​​for each design parameter. More specifically, the design space can contain all feasible parameter combinations for all adjustable parameters. Feasible parameter combinations refer to parameter combinations formed by adjustable design parameters under the constraints of specific parameter rules of the accelerator. These specific parameter rules are, for example, that the value of the FetchWidth parameter (fetch width) cannot be lower than the DecodeWidth parameter (decode bandwidth), while the ROBEntries parameter (reordering buffer entry) must be an integer multiple of the DecodeWidth parameter.

[0033] As can be seen, since the design space has fully covered all feasible parameter combinations in the target accelerator design, all factors affecting the accelerator chip performance can be comprehensively considered.

[0034] Of course, not all design parameters significantly contribute to improving the performance of the target accelerator design. Therefore, this embodiment can also assess the importance of each design parameter to the target accelerator design and reduce the number of adjustable design parameters in the design space according to their importance, thereby reducing the size of the design space and improving the efficiency of parameter exploration. The assessment of the importance of design parameters and the adjustment of the design space can be found in the descriptions in subsequent embodiments.

[0035] S102. Determine the core design parameters and their preset weights for the target accelerator design based on preset prior knowledge. Use the number of candidate values ​​of the core design parameters as the number of clusters. Then, cluster the parameter points according to the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance is determined based on the difference between the design parameters of the parameter points. The preset weights are used to weight the difference between the core design parameters to correct the distance.

[0036] In related technologies, although Electronic Design Automation (EDA) tools for accelerator design have developed rapidly, they are essentially still just rule-following tools that can only optimize pre-set performance metrics (such as timing, area, and power consumption), but cannot judge the long-term impact or potential risks of an architectural decision. In contrast, experienced designers, based on their experience, can foresee potential problems in the toolchain backend early in the design process; that is, human experience still plays an irreplaceable and crucial role. For example, increasing the reorder buffer depth (ROB) of the Berkeley Out-of-Order Machine (BOOM) is beneficial for unlocking more instruction-level parallelism, but the benefits diminish after the inflection point, and it also increases power consumption and area. In x86 architecture, a larger L3 cache can significantly improve the performance of applications such as games and databases. Therefore, this invention can construct a priori knowledge model based on historical data or expert experience. And high-quality candidate parameter points can be selected based on this model.

[0037] Furthermore, guided by pre-existing knowledge, this step identifies the core design parameters that are more important for the target accelerator design, and clusters the parameter points in the design space to obtain parameter point clusters corresponding to various core design parameter configurations. Different target accelerator designs correspond to different core design parameters. For example, the key parameter for the BOOM core design can be the decode / emit width (DecodeWidth / IssueWidth); the key parameter for the Titan-I core design can be the configurable vector length (VLEN); and the key parameter for the Ventus GPGPU design can be the Warp scheduler in the SIMT microarchitecture (SingleInstruction, Multiple Threads).

[0038] Specifically, to enhance the role of core design parameters in clustering, this embodiment first determines the core design parameters and their preset weights for the target accelerator design based on pre-defined prior knowledge. Then, the number of candidate values ​​for the core design parameters is used as the number of clusters, and parameter point clustering is performed based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance between parameter points is determined by the difference in design parameters between them, and the preset weights of the core design parameters are used to weight the differences in core design parameters to correct the distance. Therefore, since the number of clusters is determined by the number of candidate values ​​for the core design parameters, and the distance between parameter points used in clustering can be corrected using the preset weights of the core design parameters, the influence of core design parameters in parameter point clustering can be enhanced, thereby obtaining parameter point clusters corresponding to various core design parameter configurations.

[0039] The specific process of clustering is described below. In one implementation, parameter point clustering is performed based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters, which may include:

[0040] Step 11: Randomly select cluster centers in the design space according to the number of clusters, and set weights for each design parameter in the parameter points according to the preset weights to obtain a diagonal weight matrix.

[0041] In step 11, k cluster centers are first randomly initialized in the design space, where k is the number of candidate values ​​for the core design parameter. For example, if the design space is clustered according to FetchWidth, and the FetchWidth value can be selected as [4,8], then the number of cluster centers is 2.

[0042] Furthermore, to enhance the influence of core design parameters, this step can also assign weights to each design parameter among the parameter points according to preset weights, resulting in a diagonal weight matrix. The diagonal of the diagonal weight matrix contains the weights of each design parameter. The weights of non-core design parameters can be default values, while the weights of core design parameters can be preset weights determined based on prior knowledge.

[0043] Step 12: In the i-th iteration, for each parameter point in the design space, calculate the distance between the parameter point and the cluster center using the diagonal weight matrix, and assign the parameter point to the parameter point cluster corresponding to the cluster center with the smallest distance; where i is a positive integer.

[0044] In step 12, this embodiment will perform multiple rounds of clustering to obtain the desired parameter point clusters. Specifically, for each parameter point in the design space, the distance between the parameter point and the cluster center can be calculated using a diagonal weight matrix. The distance function formula is as follows:

[0045] ;

[0046] in, Let i be the i-th parameter point in the design space. For the j-th cluster center, Indicates in calculation The diagonal weight matrix used in this process. This function ensures that the differences in core design parameters have a much greater impact on the clustering results than other parameters, thus ensuring that design experience is incorporated into the clusters and that the physical meaning is clear.

[0047] Then, each parameter point can be... Assigned to the nearest cluster center The corresponding parameter point cluster.

[0048] Step 13: Update the cluster centers of the parameter point clusters and determine whether the preset clustering exit conditions are met. If not, proceed to the next iteration; if so, output the parameter point clusters.

[0049] In this step, the center of each parameter point cluster can be recalculated. The calculation method can be to take the mean of all parameter points within the cluster to obtain the updated cluster center. Finally, when the preset clustering exit condition is met, k design space clusters based on the core design parameters are obtained. Each cluster corresponds to a set of parameter points under a core design parameter configuration.

[0050] It should be noted that the preset clustering exit condition can be set according to the actual application requirements, such as when the number of iterations reaches a preset number.

[0051] S103. In each parameter point cluster, a preset number of candidate parameter points are selected based on the distance between each parameter point to eliminate parameter points that are too close to each other in the parameter point cluster.

[0052] This step optimizes the parameter points within each parameter point cluster, eliminating closely spaced parameter points and retaining more representative candidate parameter points. Of course, if the number of parameter points in a parameter point cluster is less than a preset number, all parameter points in the cluster will be considered candidate parameter points.

[0053] Specifically, in this embodiment, candidate parameter points in the parameter point cluster will be selected based on the distance between each parameter point, so as to ensure that the candidate parameter points are dispersed in the parameter point cluster as much as possible. This ensures that the candidate parameter points uniformly cover the design space and reflect different characteristics, laying a high-quality data foundation for subsequent parameter exploration and construction.

[0054] Furthermore, this embodiment can use different preset sampling methods to select sampling points from the parameter point cluster, and merge the sampling points collected by different preset sampling methods to obtain candidate parameter points, thereby improving the parameter point selection effect. The number of samples for different preset sampling methods can be adjusted using a preset ratio to balance the sampling effect of different preset sampling methods.

[0055] In one implementation, within each parameter point cluster, a preset number of candidate parameter points are selected based on the distance between the parameter points, including:

[0056] Step 21: Determine the sampling quantity of the preset sampling method according to the sampling ratio and preset quantity corresponding to the preset sampling method; wherein, the preset sampling method includes at least two.

[0057] In step 21, the preset quantity can be... Where b is the number of parameter points and k is the number of clusters. This indicates rounding down. The sampling ratio can be set as needed. For example, this embodiment can provide two sampling methods: direct-push experimental design sampling and greedy maximum-minimum distance sampling, with a sampling ratio of 7:3.

[0058] Step 22: Based on the number of samples and the distance between each parameter point, perform parameter point sampling in each parameter point cluster using a preset sampling method to obtain the sampling points corresponding to the preset sampling method.

[0059] In step 22, different preset sampling methods can be used to sample parameter points to obtain sampling points corresponding to different preset sampling methods.

[0060] Step 23: Deduplicate the sampling points corresponding to each sampling method to obtain candidate parameter points.

[0061] In step 23, the sampling points obtained from various sampling strategies can be merged, duplicate values ​​can be removed, and all sampling points can be merged into a list and returned to obtain the required candidate parameter points.

[0062] The following describes two sampling methods: direct-push experimental design sampling and greedy max-min distance sampling. First, we will introduce direct-push experimental design sampling. In one implementation, based on the number of samples and the distance between each parameter point, parameter points are sampled in each parameter point cluster using a preset sampling method to obtain the sampling points corresponding to the preset sampling method. This may include:

[0063] Step 31: Set the parameter point cluster as the unsampled set, and randomly select parameter points from the parameter point cluster to initialize the sampled set.

[0064] In step 31, the input parameters for the direct-effect experimental design sampling can be the unsampled set U within the current cluster and the normalization coefficient. The number of samples required for this cluster The initial unsampled set can be set using a cluster of parameter points. Subsequently, this step can initialize the sampled set U' by randomly selecting parameter points from the cluster. For example, a parameter point can be randomly selected as the sampled parameter point in the sampled set.

[0065] Step 32: Determine whether the number of parameter points in the sampled set is equal to the number of samples.

[0066] Step 33: If the number of parameter points is not equal to the number of samples, determine the distance between the unsampled parameter points in the unsampled set and the sampled parameter points in the sampled set to obtain the distance matrix. Use the distance matrix, the distance between the unsampled parameter points and themselves, the preset normalization coefficient, and the preset identity matrix to perform matrix operations, and determine the matrix trace of the matrix operation result.

[0067] In this step, the distance matrix K between all unsampled parameter points in the unsampled set can be calculated first. The distance function f can be flexibly selected, and this invention does not impose specific limitations. The core of this function is to measure the feature differences between microarchitectures.

[0068] Furthermore, the objective function for collecting parameter points from the unsampled parameter points in this step is the trace of the distance matrix between the unsampled parameter points and the sampled set U'. Calculating the trace of the distance matrix and moving the parameter point with the largest trace into the sampled set can maximize the preservation of information in the cluster design space, reduce redundancy, cover key features, and improve sample diversity. Specifically, it is possible to iterate through the parameter points x of each accelerator design in the unsampled set U, calculate its corresponding objective function value, and select the chip design that maximizes this value. (x*∈U) is the result of this round of sampling, and the formula is:

[0069] ;

[0070] in, The trace of the matrix (i.e., the sum of the elements on the main diagonal) is used to quantify the extent to which new samples supplement the spatial information coverage of the accelerator chip design. It is the distance vector (dimension) between all sampled parameter points in U' and x. ); It is the distance between x and itself (a scalar, calculated by the distance function f); I is the identity matrix (here, a 1×1 matrix, i.e., scalar 1). It is the normalization coefficient; Used to guarantee It is reversible, thus avoiding numerical calculation errors.

[0071] Step 34: Move the unsampled parameter point with the largest matrix trace from the unsampled set into the sampled set, and proceed to the step of determining whether the number of parameter points in the sampled set is equal to the number of samples.

[0072] Step 35: If the number of parameter points equals the number of samples, then the parameter points in the sampled set are used as sampling points.

[0073] The following describes greedy maximum-minimum distance sampling. In one implementation, based on the number of samples and the distance between each parameter point, parameter points are sampled in each parameter point cluster using a preset sampling method to obtain the sampling points corresponding to the preset sampling method, including:

[0074] Step 41: Randomly select a parameter point from the parameter point cluster and add it to the selected point set.

[0075] In this step, the input parameters for greedy max-min distance sampling can be the unsampled set U within the current cluster and the normalization coefficients. The number of samples required for this cluster Then, a point within the current cluster can be randomly selected as the first point in the selected point set S.

[0076] Step 42: Determine whether the number of parameter points in the selected point set is equal to the number of samples.

[0077] Step 43: If the number of parameter points is not equal to the number of samples, then determine the minimum distance between the unsampled parameter points in the parameter point cluster and all selected parameter points in the selected point set.

[0078] Step 44: Add the unsampled parameter point with the largest minimum distance to the selected point set, and proceed to the step of determining whether the number of parameter points in the selected point set is equal to the number of samples.

[0079] In steps 43-44, all unsampled parameter points within the cluster can be calculated. The minimum distance to the selected point set S can be determined by the distance function f, which can be flexibly chosen and is not specifically limited in this invention. Subsequently, for each point within the current cluster, the objective function is the distance to each parameter point. Find the minimum distance to the selected point set S, traverse each parameter point x in the unsampled set U, calculate its corresponding objective function value, and select the parameter point that maximizes that value. As the result of this round of sampling, the formula is:

[0080] ;

[0081] Select the points Add the point to S and update the unsampled set U to be sampled, that is, remove the point from the unsampled set.

[0082] Step 45: If the number of parameter points equals the number of samples, then the parameter points in the selected point set are used as sampling points.

[0083] As can be seen, in steps S102-S103, to improve the quality and coverage of initial samples in the design space exploration, this invention can provide an active prior adaptive sampling method, which can design an adaptive active learning strategy to provide a high-quality data foundation for subsequent proxy model construction. Adaptive active learning is based on the prior knowledge model. Guided by design experience and closely combined with knowledge of the microarchitecture domain, a hybrid sampling method of Transductive Experimental Design (TED) sampling and greedy maximum-minimum distance sampling is used to target and sample potentially high-value processor chip microarchitectures, reducing redundant simulation costs and improving the efficiency and accuracy of the overall chip design.

[0084] S104. Sample observation parameter points from candidate parameter points, perform accelerator design simulation on the observation parameter points to obtain real index values, and perform Bayesian optimization on the candidate parameter points iteratively based on the observation parameter points and their real index values ​​to obtain the target design points of the target accelerator design.

[0085] In this embodiment, observation parameter points can be sampled from candidate parameter points, and accelerator design simulations can be performed on these observation parameter points to obtain true index values. Subsequently, a surrogate model can be trained based on the observation parameter points and their true index values. The surrogate model then generates predicted index values ​​and their uncertainties for the candidate parameter points. The uncertainties are used to quantify the uncertainty of the surrogate model in determining the predicted index value. The predicted index values ​​and uncertainties can then be input into a data acquisition function to evaluate the potential value of the candidate parameter points. Multiple rounds of Bayesian optimization can be performed using the surrogate model and data acquisition function. When the iteration exit condition is met, the target parameter point with the best true index value is selected from the currently evaluated candidate parameter points as the final target design point for the target accelerator design. This target parameter point can be considered a design point that satisfies the Pareto front requirement. The Pareto front is a core concept in multi-objective optimization, referring to a set of non-dominated solutions that cannot be simultaneously improved on all objectives, representing the optimal solution among the objectives. Thus, this embodiment enables automatic exploration of the target design point for the target accelerator design.

[0086] Furthermore, to improve the selection effect of design points, this embodiment can use multiple acquisition functions to evaluate candidate parameter points from different perspectives, and weight the function values ​​generated by the acquisition functions to improve the evaluation effect of candidate parameter points. Moreover, after each iteration, this embodiment can adaptively allocate the weights corresponding to each acquisition function based on its performance, achieving context-aware dynamic weight optimization, integrating the advantages of multiple functions to adapt to the needs of different design exploration stages.

[0087] Step S104 is described in detail below. In one embodiment, observation parameter points are sampled from candidate parameter points, accelerator design simulation is performed on the observation parameter points to obtain real index values, and Bayesian optimization is iteratively performed on the candidate parameter points based on the observation parameter points and their real index values ​​to obtain the target design points for the target accelerator design. This may include:

[0088] Step 51: Sample observation parameter points from candidate parameter points, add the observation parameter points to the observation set, and perform accelerator design simulation on the observation parameter points to obtain the actual index values.

[0089] In step 51, observation parameter points are first randomly sampled from the candidate parameter points and added to the observation set to initialize the observation set. Subsequently, accelerator design simulation (VLSI simulation, Very Large-Scale Integration) is performed on the observation parameter points to obtain real performance metrics. These real performance metrics can be PPA metrics, namely performance, power consumption, and area.

[0090] Step 52: In the i-th iteration, train the surrogate model using the parameter points in the observation set and their true index values; where i is a positive integer.

[0091] In step 52, this embodiment can train a surrogate model using the parameter points and their true index values ​​in the observation set. In each iteration after the first iteration, it is only necessary to continue training the surrogate model from the previous iteration.

[0092] Furthermore, in this embodiment, the surrogate model chosen is the Gaussian Process (GP) model, which provides prediction mean and uncertainty estimates. The hyperparameters of a Gaussian process (such as the parameters of the kernel function) are typically optimized by maximizing the marginal likelihood. For multi-objective problems like PPA, a separate GP can be trained for each objective, or a multi-output GP can be used.

[0093] Step 53: Sample the parameter points to be evaluated from the unsampled candidate parameter points, and use the surrogate model to generate the index value and uncertainty value of the parameter points to be evaluated.

[0094] In this step, a small number of parameter points to be evaluated can be sampled from the unsampled candidate parameter points, and the trained surrogate model can be used to generate the index value and uncertainty value of the parameter points to be evaluated.

[0095] Step 54: Process the index value and the uncertainty value using at least two acquisition functions to obtain the function value of each acquisition function, and then use the weight value corresponding to each acquisition function to perform weighted fusion of the function values ​​to obtain the weighted function value.

[0096] In this embodiment, three acquisition functions can be used to guide the Bayesian optimization process: Expected Hypervolume Improvement (EHVI), Probability of Improvement (POI), and Probability of Maximal Hypervolume (PMH). The global acquisition function can be expressed as:

[0097] ;

[0098] in, This represents the weighted function value. It is a weight vector, and the initial weight vector is 1 / 3.

[0099] Step 55: Select the parameter point to be evaluated with the largest weighted function value as the current best parameter point and add the current best parameter point to the observation set.

[0100] In step 55, the parameter point corresponding to the maximum value of the global acquisition function can be selected as the current optimal parameter point for the current iteration. .

[0101] Step 56: Determine the true optimal parameter point that has the best true index value in the observation set in the previous iteration. Update the weight value corresponding to the acquisition function using the function value determined for the current optimal parameter point by the acquisition function, the function value determined for the true optimal parameter point, and the uncertainty value corresponding to the current optimal parameter point.

[0102] In step 56, the weights of each acquisition function can be adaptively assigned based on its performance, achieving context-aware dynamic weight optimization and integrating the advantages of multiple functions to adapt to the needs of different design exploration stages. Specifically, the update of the weight w is based on the actual improvement of each acquisition function and the uncertainty of the current surrogate model. In one implementation, the weight value corresponding to the acquisition function is updated using the function value determined by the acquisition function for the current optimal parameter point, the function value determined for the true optimal parameter point, and the uncertainty value corresponding to the current optimal parameter point. This can include:

[0103] Step 61: Determine the actual improvement amount corresponding to the acquisition function using the function value determined for the current optimal parameter point and the function value determined for the true optimal parameter point;

[0104] Step 62: Determine the function score of the acquisition function by using the actual improvement amount and the uncertainty value corresponding to the current optimal parameter point.

[0105] In steps 61-62, during the t-th iteration, the acquisition function... The score is defined as:

[0106] ;

[0107] in, This represents three data acquisition functions; It is the optimal solution for the current iteration. It is the current optimal solution known before the t-th iteration. Determined based on its corresponding actual indicator value; This represents the actual improvement in the acquisition function (take 0 if the improvement is negative). Is it a proxy model? The prediction uncertainty of the point; ε is a constant term used to ensure the numerical stability and robustness of the formula.

[0108] Step 63: Divide the function score of each acquisition function by the temperature parameter of the current iteration to obtain the intermediate result of each acquisition function, and use the normalized exponential function to transform the intermediate result of each acquisition function to obtain the updated weight value of each acquisition function; among them, the value of the temperature parameter is negatively correlated with the iteration round.

[0109] In step 63, the softmax function can be used to convert the scores into weights:

[0110] ;

[0111] in, This is a temperature parameter that controls the smoothness of the weight distribution. As the iteration progresses, It will gradually decrease to focus on the best-performing acquisition function.

[0112] Step 57: Determine whether the preset iteration exit condition is met. If not, proceed to the next iteration. If it is met, take the parameter point with the best true index value in the observation set as the target design point.

[0113] In this embodiment, iteration can be stopped if one of the following conditions is met:

[0114] 1. Reaching the maximum number of iterations: This is the simplest stopping condition. Pre-set a number of iterations, and stop when this number is reached.

[0115] 2. Convergence: When the improvement of the optimal PPA objective function brought about by the new design point found in multiple consecutive iterations (such as 10-20 times) is less than a given threshold (such as the change of the optimal value is less than 0.01%), it can be considered that convergence has been achieved and the exploration is stopped.

[0116] 3. Unexpected stop: Resource exhaustion: such as insufficient memory.

[0117] Therefore, the preset iteration exit conditions can be that the number of iterations reaches the maximum number, and / or the change in the actual indicator value obtained from multiple consecutive iterations is less than the preset change, and / or the remaining amount of hardware resources is less than the preset threshold.

[0118] As can be seen, this invention provides a global acquisition strategy that dynamically fuses multiple acquisition functions. This strategy can be used as an acquisition function in the accelerator design process, quantifying the potential value of each candidate point and guiding the optimizer to select the next optimal evaluation point. This strategy primarily achieves context-aware dynamic weight optimization by adaptively assigning weights based on the performance of each acquisition function, integrating the advantages of multiple functions to adapt to the needs of different design exploration stages.

[0119] Based on the above embodiments, the present invention first sets a complete design space according to the adjustable design parameters in the target accelerator design. Then, the core design parameters and their preset weights for the target accelerator design are determined based on preset prior knowledge. The number of candidate values ​​for the core design parameters is used as the number of clusters, and parameter points are clustered according to the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters. The distance is determined based on the design parameter differences between parameter points, and the preset weights are used to weight the core design parameter differences to correct the distance. In other words, the most important core design parameters for the target accelerator design can be determined based on prior knowledge, and the number of clusters can be determined based on the number of candidate values ​​for the core design parameters. The distance between parameter points is corrected based on the preset weights of the core design parameters to enhance the influence of the core design parameters. Thus, clustering can be performed under the guidance of prior knowledge to obtain parameter point clusters under each core design parameter configuration. Subsequently, in each parameter point cluster, a preset number of candidate parameter points can be selected based on the distance between each parameter point to eliminate parameter points that are too close together, thus eliminating redundancy in the design space corresponding to each parameter point cluster. Finally, observation parameter points can be sampled from the candidate parameter points, and accelerator design simulation can be performed on the observation parameter points to obtain the real index values. Based on the observation parameter points and their real index values, Bayesian optimization is performed iteratively on the candidate parameter points to obtain the target design point of the target accelerator. The target design point can be automatically explored under the guidance of prior knowledge, which can avoid personal bias and improve the efficiency of parameter point exploration.

[0120] Based on the above embodiments, due to the large design space, the traditional method of randomly sampling to evaluate design points is inefficient and easily overlooks key information. Therefore, this invention can also provide an adaptive multi-granularity spatial pruning method based on importance, which can effectively reduce the design space and improve design efficiency by quantifying the importance of design parameters. The specific pruning process is described below.

[0121] In one embodiment, the method may further include:

[0122] S201. Sample parameter points in the design space, perform accelerator design simulation based on the parameter points, and obtain the index vector corresponding to the parameter points.

[0123] In this step, n parameter points are first sampled from the design space, using sampling algorithms such as random sampling or K-means clustering. Then, the performance index corresponding to each sampling point is calculated using the VLSI process, yielding the corresponding PPA and forming an index space. , can be represented as:

[0124] ;

[0125] in, This indicates that n parameter points are extracted from the complete design space X; This indicates that the complete VLSI process is executed, and the index vector corresponding to each design point is output.

[0126] S202. Determine the importance values ​​of each design parameter based on the indicator vector, and reduce the adjustable design parameters in the design space according to the importance values ​​to obtain the adjusted design space.

[0127] In this step, the importance values ​​of each design parameter will be determined based on the indicator vector, and the number of adjustable design parameters in the design space will be reduced based on the importance values, so as to narrow the design space and improve the efficiency of parameter selection.

[0128] Specifically, the importance values ​​of each design parameter are determined based on the indicator vector, and the adjustable design parameters in the design space are reduced according to the importance values ​​to obtain the adjusted design space, which may include:

[0129] Step 71: Based on the candidate values ​​of the design parameters, divide the index vector into index clusters corresponding to each candidate value, and determine the representative index vector of each index cluster.

[0130] In step 71, the index space Y' can be divided into several groups based on the candidate values ​​of various design parameters. Specifically, assuming each design parameter (common (One design parameter) A number of candidate values, based on their Each candidate value will define the indicator space. Divided into Each cluster. For example, when the value of FetchWidth can be selected as [4,8], it will... All design point metrics with FetchWidth=4 are allocated to ,Will All design point metrics with FetchWidth=8 are allocated to This isolates the influence of a single parameter, making it easier to quantify the importance of that parameter to the indicator later.

[0131] Furthermore, a representative indicator vector can be obtained by averaging all indicator vectors in the indicator cluster. However, mean calculation is sensitive to outliers. Therefore, this invention uses a "weighted median" instead of the mean to enhance robustness to outliers (such as extreme latency values). Specifically, for each cluster... Calculate the median and mean of all index vectors within the cluster, and their weighted sum is the representative index vector of the cluster. Collect representative index vectors from all clusters to form a set. .

[0132] Based on this, the representative index vector of the index cluster can be determined, which may include:

[0133] Step 81: In the index cluster, determine the median and average of each element in the index vector, and perform weighted fusion of the median and average to obtain a representative index vector.

[0134] Step 72: Calculate the vector distance between each cluster of indicators based on the representative indicator vector.

[0135] In step 72, the importance of a parameter is determined by the degree of difference between the representative index vectors corresponding to its candidate values. Therefore, it is necessary to calculate the vector distance between index clusters and use this vector distance to determine the numerical importance of the parameter. Considering that Euclidean distance assumes that the indices are independent and equally important, but in actual accelerator chip design, there are correlations between indices (e.g., power consumption is positively correlated with area); and different indices have different priorities (e.g., power consumption > area in edge scenarios). Therefore, an index weight matrix W (a diagonal matrix, with diagonal elements of...) is introduced. Amplify the distance contribution of key indicators, and use the covariance matrix. Correct the correlation of indicators and eliminate the influence of redundant information.

[0136] Based on this, calculating the vector distance between each cluster of indicators using representative indicator vectors can include:

[0137] Step 91: Obtain the indicator weight diagonal matrix; whereby the indicator weight diagonal matrix contains the preset weights of each element in the indicator vector;

[0138] Step 92: Calculate the Mahalanobis distance between each index cluster based on the representative index vector, and use the index weight diagonal matrix to weight the Mahalanobis distance to obtain the vector distance between each index cluster.

[0139] Specifically, calculate the weighted Mahalanobis distance of all pairwise vectors in set M, using two representative index vectors. The weighted Mahalanobis distance is defined as:

[0140] ;

[0141] in, It is a diagonal matrix of indicator weights. This refers to the number of optimization objectives. Let the weights of performance, power consumption, and area in the accelerator chip design be... . It is the global index covariance matrix. Where i is the index of the sampled parameter point, and k and l are the indices of the index values. For the k-th index value of the i-th parameter point, The global mean of the k-th indicator reflects the linear correlation between indicators (e.g., ...). (covariance of performance and power consumption). It is the inverse of the covariance matrix.

[0142] Step 73: Determine the importance values ​​of the design parameters using vector distance and normalize the importance values.

[0143] Specifically, using vector distance to determine the importance of design parameters can include:

[0144] Step 1001: Sum the vector distances between the index clusters corresponding to the design parameters, and divide the sum by the total number of vector pairs between the index clusters corresponding to the design parameters to obtain the importance value.

[0145] Specifically, regarding parameters The sum of the inter-cluster distances is the sum of the distances between all pairwise vectors, indicating importance. (Unnormalized) is the sum divided by the total number of vector pairs, i.e.:

[0146] ;

[0147] in, Represents a representative index vector. This indicates the number of candidate values ​​for the design parameter.

[0148] Subsequently, the preliminary importance of all obtained parameters can be determined. Normalization to the [0,1] interval ensures that the importance of different parameters can be directly compared. The formula is:

[0149] ;

[0150] in, It is an unnormalized importance vector. This is a maximum value operation. After standardization, a value is given. dimensional vector This indicates the importance of each design feature.

[0151] Step 74: In the design space, design parameters with importance values ​​less than a preset threshold are set as non-adjustable design parameters, and non-adjustable design parameters are set as fixed parameters to obtain the adjusted design space.

[0152] In this step, the importance vector can be used as a basis. and preset importance threshold Perform spatial pruning. For each parameter... ,like (i.e., unimportant parameters), then their candidate values ​​are fixed to the median of the designable parameter values ​​(e.g., for parameter "DecodeWidth", candidate values ​​are 1, 2, 3, 4, 5, with the median value being 3). In other words, the parameter values ​​of non-adjustable design parameters are fixed to the median of the candidate values ​​of non-adjustable design parameters and no longer participate in subsequent exploration; if (i.e., important parameters), retain all their candidate values, and proceed to subsequent optimization.

[0153] Furthermore, the space can be designed after pruning. Each parameter point in , with importance vector Perform element-wise multiplication (i.e., Hadamard product, notation ?). The design point in the transformation space is obtained. The formula is:

[0154] .

[0155] Based on this, after setting the non-adjustable design parameters as fixed parameters, it can also include:

[0156] Step 1101: Set the importance vector using the importance values ​​of each design parameter;

[0157] Step 1102: In the design space, perform element-wise multiplication operations between the importance vector and each parameter point to obtain the adjusted vector space.

[0158] Accordingly, clustering is performed in the design space based on the number of clusters and the distance between parameter points to obtain parameter point clusters, including:

[0159] S301. In the adjusted design space, clustering is performed based on the number of clusters and the distance between parameter points to obtain parameter point clusters.

[0160] As can be seen, since this embodiment has reduced the number of adjustable design parameters in the design space and can assign importance to each parameter point in the design space, it can provide a more valuable design space for subsequent multi-objective Bayesian optimization.

[0161] To better understand the complete process of this method, please refer to [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating another accelerator parameter selection method provided in an embodiment of the present invention. The beneficial effects of this method are as follows: The present invention proposes an accelerator architecture design exploration method and system. This method is equipped with a design space pruning method based on multi-scale importance assessment to evaluate parameter importance and perform structured pruning of the design space. In the pruned space, human prior knowledge and data-driven active learning are dynamically fused using an adaptive sampling strategy based on active learning and prior knowledge to obtain initial sampling points. Multi-objective Bayesian optimization is then performed based on these initial points. The acquisition function employs a dynamically fused global acquisition strategy with an adaptive weight allocation mechanism to achieve context-aware dynamic weight optimization. This invention can solve the problem of high design space dimensionality, improve the efficiency and quality of Pareto front discovery, and achieve rapid exploration of the accelerator chip architecture design space under multi-objective optimization. This invention can not only be directly applied to the design of various accelerator chips but can also be easily extended and adapted to other space exploration tasks.

[0162] The accelerator parameter selection device, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present invention will be described below. The accelerator parameter selection device, electronic device, computer-readable storage medium, and computer program product described below can be referred to in correspondence with the accelerator parameter selection method described above.

[0163] Please refer to Figure 3 , Figure 3 This invention provides a structural block diagram of an accelerator parameter selection device, which may include:

[0164] Design space setting module 301 is used to determine the design space based on the adjustable design parameters in the target accelerator design.

[0165] Clustering module 302 is used to determine the core design parameters and their preset weights of the target accelerator design based on preset prior knowledge, take the number of candidate values ​​of the core design parameters as the number of clusters, and perform parameter point clustering based on the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters; wherein, the distance is determined based on the design parameter difference between parameter points, and the preset weight is used to weight the core design parameter difference to correct the distance;

[0166] The sampling module 303 is used to filter a preset number of candidate parameter points in each parameter point cluster according to the distance between each parameter point, so as to filter out parameter points that are close to each parameter point cluster.

[0167] The Bayesian optimization module 304 is used to sample observation parameter points from candidate parameter points, perform accelerator design simulation on the observation parameter points to obtain real index values, and perform Bayesian optimization on the candidate parameter points iteratively based on the observation parameter points and their real index values ​​to obtain the target design points of the target accelerator design.

[0168] Optionally, it also includes:

[0169] The random sampling simulation module is used to sample parameter points in the design space, perform accelerator design simulation based on the parameter points, and obtain the index vector corresponding to the parameter points.

[0170] The design space adjustment module is used to determine the importance value of each design parameter based on the indicator vector, and reduce the adjustable design parameters in the design space according to the importance value to obtain the adjusted design space.

[0171] The clustering module can be used for:

[0172] Clustering is performed in the adjusted design space based on the number of clusters and the distance between parameter points to obtain parameter point clusters.

[0173] Optionally, a space adjustment module is designed, including:

[0174] The index cluster partitioning submodule is used to divide the index vector into index clusters corresponding to each candidate value based on the candidate values ​​of the design parameters, and to determine the representative index vector of each index cluster.

[0175] The vector distance calculation submodule is used to calculate the vector distance between each cluster of indicators based on the representative indicator vectors.

[0176] The importance value determination submodule is used to determine the importance value of design parameters using vector distance and to normalize the importance value.

[0177] The adjustment submodule is used to set design parameters with importance values ​​less than a preset threshold as non-adjustable design parameters and non-adjustable design parameters as fixed parameters in the design space, thus obtaining an adjusted design space.

[0178] Optionally, the indicator cluster is divided into sub-modules, including:

[0179] The representative index vector construction unit is used to determine the median and average values ​​of each element in the index vector within the index cluster, and to perform weighted fusion of the median and average values ​​to obtain the representative index vector.

[0180] Optionally, the vector distance calculation submodule includes:

[0181] The acquisition unit is used to acquire the indicator weight diagonal matrix; wherein the indicator weight diagonal matrix contains the preset weights of each element in the indicator vector;

[0182] The calculation unit is used to calculate the Mahalanobis distance between each index cluster based on the representative index vector, and to weight the Mahalanobis distance using the index weight diagonal matrix to obtain the vector distance between each index cluster.

[0183] Optionally, the importance value determination submodule includes:

[0184] The importance numerical calculation unit is used to sum the vector distances between the index clusters corresponding to the design parameters, and divide the sum by the total number of vector pairs between the index clusters corresponding to the design parameters to obtain the importance value.

[0185] Optionally, it also includes:

[0186] The importance vector design module is used to set the importance vector using the importance values ​​of each design parameter;

[0187] The importance add-on module is used to perform element-wise multiplication operations between the importance vector and each parameter point in the design space to obtain the adjusted vector space.

[0188] Optionally, adjust the submodules, including:

[0189] The non-adjustable design parameter fixing unit is used to fix the parameter value of the non-adjustable design parameter to the intermediate value among the candidate values ​​of the non-adjustable design parameter.

[0190] Optionally, the clustering module includes:

[0191] The cluster initialization submodule is used to randomly select cluster centers in the design space according to the number of clusters, and to set weights for each design parameter in the parameter points according to preset weights, so as to obtain a diagonal weight matrix.

[0192] The clustering submodule is used in the i-th iteration to calculate the distance between each parameter point and the cluster center using a diagonal weight matrix, and assign each parameter point to the cluster center with the smallest distance in the design space; where i is a positive integer.

[0193] The clustering iteration control submodule is used to update the cluster centers of the parameter point clusters and determine whether the preset clustering exit conditions are met. If not, it enters the next iteration; if so, it outputs the parameter point clusters.

[0194] Optionally, the sampling module includes:

[0195] The sampling quantity determination submodule is used to determine the sampling quantity of a preset sampling method based on the sampling ratio and preset quantity corresponding to the preset sampling method; wherein, the preset sampling method includes at least two methods;

[0196] The sampling submodule is used to sample parameter points in each parameter point cluster according to the number of samples and the distance between each parameter point, and obtain the sampling points corresponding to the preset sampling method.

[0197] The deduplication submodule is used to deduplicat the sampling points corresponding to each sampling method to obtain candidate parameter points.

[0198] Optionally, the sampling submodule includes:

[0199] The first initialization unit is used to set the parameter point cluster as an unsampled set and randomly select parameter points from the parameter point cluster to initialize the sampled set;

[0200] The first judgment unit is used to determine whether the number of parameter points in the sampled set is equal to the number of samples.

[0201] The matrix trace determination unit is used to determine the distance matrix between the unsampled parameter points in the unsampled set and the sampled parameter points in the sampled set if the number of parameter points is not equal to the number of samples. The unit then uses the distance matrix, the distance between the unsampled parameter points and itself, the preset normalization coefficient, and the preset identity matrix to perform matrix operations and determine the matrix trace of the matrix operation result.

[0202] The first set update unit is used to move the unsampled parameter points with the largest matrix trace in the unsampled set into the sampled set, and then proceed to the step of determining whether the number of parameter points in the sampled set is equal to the number of samples.

[0203] The first output unit is used to take the parameter points in the sampled set as sampling points if the number of parameter points is equal to the number of samples.

[0204] Optionally, the sampling submodule includes:

[0205] The second initialization unit is used to randomly select a parameter point from the parameter point cluster and put it into the selected point set;

[0206] The second judgment unit is used to determine whether the number of parameter points in the selected point set is equal to the number of samples.

[0207] The distance calculation unit is used to determine the minimum distance between unsampled parameter points in the parameter point cluster and all selected parameter points in the selected point set if the number of parameter points is not equal to the number of samples.

[0208] The second set update unit is used to add the unsampled parameter point with the largest lowermost distance to the selected point set, and then proceed to the step of determining whether the number of parameter points in the selected point set is equal to the number of samples.

[0209] The second output unit is used to take the parameter points in the selected point set as sampling points if the number of parameter points is equal to the number of samples.

[0210] Optionally, the device further includes:

[0211] The candidate parameter point setting module is used to select all parameter points in a parameter point cluster as candidate parameter points if the number of parameter points in the cluster is less than a preset number.

[0212] Optionally, the Bayesian optimization module includes:

[0213] The Bayesian optimization initialization submodule is used to sample observation parameter points from candidate parameter points, add the observation parameter points to the observation set, and perform accelerator design simulation on the observation parameter points to obtain the actual index values.

[0214] The surrogate model training submodule is used to train the surrogate model in the i-th iteration using the parameter points in the observation set and their true index values; where i is a positive integer.

[0215] The surrogate model processing submodule is used to sample the parameter points to be evaluated from the unsampled candidate parameter points, and use the surrogate model to generate the index value and uncertainty value of the parameter points to be evaluated;

[0216] The data acquisition function processing submodule is used to process the index value and the uncertainty value using at least two data acquisition functions to obtain the function value of each data acquisition function, and to perform weighted fusion of the function values ​​using the weight value corresponding to each data acquisition function to obtain the weighted function value.

[0217] The set update submodule is used to select the parameter point to be evaluated with the largest weighted function value as the current best parameter point and add the current best parameter point to the observation set;

[0218] The weight update submodule is used to determine the true best parameter point that has the best true index value in the observation set in the previous iteration. It updates the weight value corresponding to the acquisition function using the function value determined by the acquisition function for the current best parameter point, the function value determined for the true best parameter point, and the uncertainty value corresponding to the current best parameter point.

[0219] The iteration control submodule is used to determine whether the preset iteration exit condition is met. If not, it enters the next iteration. If it is met, the parameter point with the best true index value in the observation set is taken as the target design point.

[0220] Optionally, the weight update submodule includes:

[0221] The actual improvement amount determination unit is used to determine the actual improvement amount corresponding to the acquisition function by using the function value determined by the acquisition function for the current optimal parameter point and the function value determined for the true optimal parameter point.

[0222] The function score determination unit is used to determine the function score of the acquisition function by using the actual improvement amount and the uncertainty value corresponding to the current best parameter point;

[0223] The weight update unit is used to divide the function score of each acquisition function by the temperature parameter of the current iteration to obtain the intermediate result of each acquisition function, and then use the normalized exponential function to transform the intermediate result of each acquisition function to obtain the updated weight value of each acquisition function; wherein, the value of the temperature parameter is negatively correlated with the iteration round.

[0224] Optionally, the preset iteration exit condition is that the number of iterations reaches the maximum number, and / or the change in the actual indicator value obtained from multiple consecutive iterations is less than the preset change, and / or the remaining amount of hardware resources is less than the preset threshold.

[0225] Please refer to Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. The embodiment of the present invention provides an electronic device 40, including a processor 41 and a memory 42; wherein, the memory 42 is used to store a computer program; the processor 41 is used to execute the accelerator parameter selection method provided in the foregoing embodiment when executing the computer program.

[0226] For details regarding the accelerator parameter selection method described above, please refer to the relevant content provided in the foregoing embodiments, which will not be repeated here.

[0227] Furthermore, the memory 42, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, and the storage method can be temporary storage or permanent storage.

[0228] In addition, the electronic device 40 also includes a power supply 43, a communication interface 44, an input / output interface 45, and a communication bus 46; wherein, the power supply 43 is used to provide operating voltage for the various hardware devices on the electronic device 40; the communication interface 44 can create a data transmission channel between the electronic device 40 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this invention, and is not specifically limited here; the input / output interface 45 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0229] This invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the accelerator parameter selection method described in the above embodiments.

[0230] Since the embodiments of the computer program product section correspond to the embodiments of the accelerator parameter selection method section, please refer to the description of the embodiments of the accelerator parameter selection method section for the embodiments of the computer program product section, and will not be repeated here.

[0231] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the accelerator parameter selection method described in the above embodiments.

[0232] Since the embodiments of the computer-readable storage medium portion correspond to the embodiments of the accelerator parameter selection method portion, the embodiments of the storage medium portion are described in the description of the embodiments of the accelerator parameter selection method portion, and will not be repeated here.

[0233] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0234] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0235] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0236] The accelerator parameter selection method, apparatus, device, storage medium, and program product provided by this invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make several improvements and modifications to this invention without departing from the principles of this invention, and these improvements and modifications also fall within the protection scope of this invention.

Claims

1. An accelerator parameter selection method, characterized by, The method comprises the following steps: determining a design space according to adjustable design parameters in a target accelerator design; determining core design parameters and preset weights of the target accelerator design according to preset prior knowledge, taking a candidate value number of the core design parameters as a cluster number, and performing parameter point clustering according to the cluster number and distances between parameter points in the design space to obtain parameter point clusters; wherein the distance is determined according to a design parameter difference between the parameter points, and the preset weight is used to weight the core design parameter difference to correct the distance; in each of the parameter point clusters, a preset number of candidate parameter points are selected according to distances between the parameter points to filter out close parameter points in the parameter point cluster; sampling observation parameter points from the candidate parameter points, performing accelerator design simulation on the observation parameter points to obtain real indicator values, and performing Bayesian optimization processing on the candidate parameter points iteratively according to the observation parameter points and the real indicator values to obtain a target design point of the target accelerator design; wherein the real indicator values include performance indicators, power consumption indicators and area indicators; sampling parameter points in the design space, performing accelerator design simulation according to the parameter points to obtain an indicator vector corresponding to the parameter points; determining importance values of the design parameters according to the indicator vector, and reducing adjustable design parameters in the design space according to the importance values to obtain an adjusted design space; performing clustering according to the cluster number and distances between parameter points in the design space to obtain parameter point clusters, comprising: performing clustering according to the cluster number and distances between parameter points in the adjusted design space to obtain parameter point clusters; determining importance values of the design parameters according to the indicator vector, and reducing adjustable design parameters in the design space according to the importance values to obtain an adjusted design space, comprising: dividing the indicator vector into indicator clusters corresponding to candidate values of the design parameters according to the candidate values of the design parameters, and determining representative indicator vectors of the indicator clusters; calculating vector distances between the indicator clusters according to the representative indicator vectors; determining importance values of the design parameters by using the vector distances, and performing normalization processing on the importance values; in the design space, setting design parameters with importance values less than a preset threshold as non-adjustable design parameters, setting the non-adjustable design parameters as fixed parameters, and obtaining the adjusted design space.

2. The accelerator parameter selection method of claim 1, wherein, determining representative indicator vectors of the indicator clusters, comprising: in the indicator cluster, determining a median value and an average value of each element in the indicator vector, and performing weighted fusion on the median value and the average value to obtain the representative indicator vector.

3. The accelerator parameter selection method of claim 1, wherein, calculating vector distances between the indicator clusters according to the representative indicator vectors, comprising: obtaining an indicator weight diagonal matrix; wherein the indicator weight diagonal matrix contains preset weights of each element in the indicator vector; calculating Mahalanobis distances between the indicator clusters according to the representative indicator vectors, and weighting the Mahalanobis distances by using the indicator weight diagonal matrix to obtain vector distances between the indicator clusters.

4. The accelerator parameter selection method of claim 1, wherein, Determining an importance value of the design parameter by using the vector distance, comprising: Summing the vector distances between the index clusters corresponding to the design parameter, and dividing the sum by the total number of vector pairs between the index clusters corresponding to the design parameter to obtain the importance value.

5. The accelerator parameter selection method of claim 1, wherein, After setting the non-adjustable design parameter as a fixed parameter, further comprising: Setting an importance vector by using the importance value of each design parameter; In the design space, performing element-level multiplication operation on the importance vector and each parameter point to obtain the adjusted vector space.

6. The accelerator parameter selection method of claim 1, wherein, Setting the non-adjustable design parameter as a fixed parameter, comprising: Fixing the parameter value of the non-adjustable design parameter as a middle value in the candidate values of the non-adjustable design parameter.

7. The accelerator parameter selection method of claim 1, wherein, According to the number of clusters and the distances between parameter points in the design space, clustering the parameter points to obtain parameter point clusters, comprising: Randomly selecting cluster centers in the design space according to the number of clusters, and setting weights for each design parameter in the parameter points according to the preset weights to obtain a diagonal weight matrix; In the i-th iteration, for each parameter point in the design space, calculating the distance between the parameter point and the cluster center by using the diagonal weight matrix, and attributing the parameter point to the parameter point cluster corresponding to the cluster center with the smallest distance; wherein i is a positive integer; Updating the cluster center of the parameter point cluster, and determining whether a preset clustering exit condition is met, if not, entering the next iteration, and if yes, outputting the parameter point clusters.

8. The accelerator parameter selection method of claim 1, wherein, In each parameter point cluster, according to the distances between the parameter points, screening a preset number of candidate parameter points, comprising: According to the sampling proportion corresponding to a preset sampling mode and the preset number, determining the sampling number of the preset sampling mode; wherein the preset sampling mode contains at least two kinds; According to the sampling number and the distances between the parameter points, sampling the parameter points in each parameter point cluster by using the preset sampling mode to obtain the sampling points corresponding to the preset sampling mode; De-duplicating the sampling points corresponding to each sampling mode to obtain the candidate parameter points.

9. The accelerator parameter selection method of claim 8, wherein, According to the sampling number and the distances between the parameter points, sampling the parameter points in each parameter point cluster by using the preset sampling mode to obtain the sampling points corresponding to the preset sampling mode, comprising: Setting the parameter point cluster as an unsampled set, and randomly selecting a parameter point from the parameter point cluster to initialize a sampled set; Determining whether the number of parameter points in the sampled set is equal to the sampling number; If the number of parameter points is not equal to the sampling number, determining the distance matrix between each sampled parameter point in the sampled set and the unsampled parameter point in the unsampled set, performing matrix operation on the distance matrix, the distance between the unsampled parameter point and itself, a preset normalization coefficient and a preset unit matrix, and determining the matrix trace of the matrix operation result; Moving the unsampled parameter point with the largest matrix trace in the unsampled set into the sampled set, and entering the step of determining whether the number of parameter points in the sampled set is equal to the sampling number. If the parameter point quantity is equal to the sampling quantity, the parameter points in the selected point set are taken as sampling points.

10. The accelerator parameter selection method of claim 8, wherein, According to the sampling quantity and the distance between each parameter point, parameter points in each parameter point cluster are sampled by using the preset sampling mode to obtain sampling points corresponding to the preset sampling mode, including: Randomly selecting a parameter point in the parameter point cluster and putting it into the selected point set; Determining whether the parameter point quantity in the selected point set is equal to the sampling quantity; If the parameter point quantity is not equal to the sampling quantity, determining the minimum distance between the unsampled parameter point in the parameter point cluster and all selected parameter points in the selected point set; Putting the unsampled parameter point with the maximum minimum distance into the selected point set and entering the step of determining whether the parameter point quantity in the selected point set is equal to the sampling quantity; If the parameter point quantity is equal to the sampling quantity, the parameter points in the selected point set are taken as sampling points.

11. The method of claim 1, wherein, Further comprising: If the parameter point quantity in the parameter point cluster is less than the preset quantity, taking all the parameter points in the parameter point cluster as candidate parameter points.

12. The method of accelerator parameter selection according to any one of claims 1 to 11, characterized in that, Sampling an observation parameter point from the candidate parameter points, performing accelerator design simulation on the observation parameter point to obtain a real index value, and iteratively performing Bayesian optimization processing on the candidate parameter points according to the observation parameter point and the real index value thereof to obtain a target design point of the target accelerator design, including: Sampling an observation parameter point from the candidate parameter points, adding the observation parameter point to an observation set, and performing accelerator design simulation on the observation parameter point to obtain a real index value; In the i th round of iteration, training a proxy model by using each parameter point in the observation set and the real index value thereof; wherein i is a positive integer; Sampling a to-be-evaluated parameter point from the unsampled candidate parameter points, and generating an index value and an uncertainty value of the to-be-evaluated parameter point by using the proxy model; Processing the index value and the uncertainty value by using at least two acquisition functions to obtain function values of each acquisition function, and performing weighted fusion on the function values by using weight values corresponding to each acquisition function to obtain a weighted function value; Taking the to-be-evaluated parameter point with the maximum weighted function value as a current best parameter point, and adding the current best parameter point to the observation set; Determining a real best parameter point with the best real index value in the observation set in the last round of iteration, updating the weight values corresponding to the acquisition functions by using the function value determined for the current best parameter point, the function value determined for the real best parameter point, and the uncertainty value corresponding to the current best parameter point; Determining whether a preset iteration exit condition is met, if not, entering the next round of iteration, and if yes, taking the parameter point with the best real index value in the observation set as the target design point.

13. The accelerator parameter selection method of claim 12, wherein, Updating the weight values corresponding to the acquisition functions by using the function value determined for the current best parameter point, the function value determined for the real best parameter point, and the uncertainty value corresponding to the current best parameter point, including: determine an actual improvement amount of the acquisition function by using the function value determined for the current best parameter point and the function value determined for the real best parameter point; determine a function score of the acquisition function by using the actual improvement amount and an uncertainty value corresponding to the current best parameter point; divide the function score of each acquisition function by a temperature parameter of the current iteration to obtain an intermediate result corresponding to each acquisition function, and convert the intermediate result of each acquisition function by using a normalization exponential function to obtain an updated weight value corresponding to each acquisition function; wherein the value of the temperature parameter is in a negative correlation with the iteration round.

14. The accelerator parameter selection method of claim 12, wherein, The preset iteration exit condition is that the number of iterations reaches a maximum number, and / or the change amount of the real indicator value obtained in a plurality of consecutive iterations is less than a preset change amount, and / or the remaining amount of hardware resources is less than a preset threshold.

15. A parameter selection apparatus characterized by comprising: Comprise: A design space setting module configured to determine a design space according to adjustable design parameters in a target accelerator design; A clustering module configured to determine core design parameters and preset weights of the target accelerator design according to preset prior knowledge, take the number of candidate values of the core design parameters as the number of clusters, and perform parameter point clustering according to the number of clusters and distances between parameter points in the design space to obtain parameter point clusters; wherein the distance is determined according to a design parameter difference between the parameter points, and the preset weight is used to weight the core design parameter difference to correct the distance; A sampling module configured to filter out close parameter points in each parameter point cluster by selecting a preset number of candidate parameter points according to distances between the parameter points in each parameter point cluster; A Bayesian optimization module configured to sample an observation parameter point from the candidate parameter points, perform accelerator design simulation on the observation parameter point to obtain a real indicator value, and perform Bayesian optimization processing on the candidate parameter points according to the observation parameter point and the real indicator value to obtain a target design point of the target accelerator design; wherein the real indicator value comprises a performance indicator, a power consumption indicator and an area indicator; A random sampling simulation module configured to sample a parameter point in the design space, and perform accelerator design simulation on the parameter point to obtain an indicator vector corresponding to the parameter point; A design space adjustment module configured to determine importance values of the design parameters according to the indicator vector, and reduce adjustable design parameters in the design space according to the importance values to obtain an adjusted design space; The clustering module is configured to: perform clustering according to the number of clusters and distances between parameter points in the adjusted design space to obtain parameter point clusters; The design space adjustment module comprises: An indicator cluster division sub-module configured to divide the indicator vector into indicator clusters corresponding to candidate values of the design parameters according to the candidate values of the design parameters, and determine representative indicator vectors of the indicator clusters; A vector distance calculation sub-module configured to calculate vector distances between the indicator clusters according to the representative indicator vectors. An importance value determining submodule is configured to determine importance values of the design parameters by using the vector distances and normalize the importance values. An adjusting submodule is configured to set, in the design space, a design parameter with an importance value less than a preset threshold as a non-adjustable design parameter, set the non-adjustable design parameter as a fixed parameter, and obtain an adjusted design space.

16. An electronic device, comprising: The computer program or instructions are executed by the processor to implement the accelerator parameter selection method according to any one of claims 1 to 14. The computer program or instructions are executed by the processor to implement the accelerator parameter selection method according to any one of claims 1 to 14. The non-volatile computer readable storage medium stores computer executable instructions, and the computer executable instructions are loaded and executed by the processor to implement the accelerator parameter selection method according to any one of claims 1 to 14.

17. A computer program product comprising computer programs or instructions, characterized in that, ​ 18. A non-transitory computer readable storage medium, comprising: ​

Citation Information

Patent Citations

  • Network performance increment optimization evaluation method and system oriented to simulation of power communication system

    CN108921395A

  • Bayesian optimization method and device for target-related airfoil design and storage medium

    CN114564787A