Accelerator parameter selection method and device, equipment, storage medium and program product

By utilizing prior knowledge for parameter point clustering and Bayesian optimization in accelerator design, the problem of personal bias in accelerator microarchitecture parameter selection is solved, and the automated selection of globally optimal accelerator design points is achieved.

CN121365633AActive Publication Date: 2026-01-20LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511935633.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-01-20
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 found by combining accelerator design simulation and Bayesian optimization.

Benefits of technology

It enables the automated selection of accelerator parameter points under the guidance of prior knowledge, avoiding personal bias, improving selection efficiency and accuracy, and obtaining the globally optimal design point.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365633A_ABST
    Figure CN121365633A_ABST
Patent Text Reader

Abstract

The invention provides an accelerator parameter selection method and device, equipment, a storage medium and a program product, and relates to the field of hardware design, core design parameters of target accelerator design and preset weights thereof can be determined according to priori knowledge, and in a design space of the target accelerator design, the number of candidate values of the core design parameters is used as the number of clusters, and the cluster number is calculated. According to the cluster number and the distance between the parameter points in the design space, parameter point clustering is carried out, parameter point clustering is carried out under the guidance of priori knowledge, and a parameter point cluster under each type of core design parameter configuration is obtained. Then, 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, accelerator design simulation is performed on the observation parameter points to obtain real index values, and Bayesian optimization processing is performed on the candidate parameter points in an iteration manner according to the observation parameter points and the real index values thereof to obtain target design points of target accelerator design, so that the parameter point selection effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of hardware design, in particular to an accelerator parameter selection method, device, equipment, storage medium and program product. BACKGROUND

[0002] The selection optimization of micro-architecture parameters of an accelerator is an important content in the conceptual design stage of the accelerator. In the related art, the micro-architecture parameters are usually selected by an architect based on professional experience or automatically selected based on a pure algorithm-driven optimization mode. However, the former has the risk of personal bias, so that the final scheme may only be satisfactory but not globally optimal; the latter ignores the domain knowledge known by the architect and fails to effectively combine human wisdom with machine wisdom. SUMMARY

[0003] The present application aims to provide an accelerator parameter selection method, device, electronic equipment, storage medium and program product, which can automatically find and select a target design point of an accelerator design under the guidance of prior knowledge, can avoid personal bias and can improve the efficiency of accelerator parameter point selection.

[0004] To solve the above technical problems, the present application provides an accelerator parameter selection method, comprising: determining a design space according to adjustable design parameters in a target accelerator design; determining core design parameters of the target accelerator design and preset weights of the core design parameters according to preset prior knowledge, taking the number of candidate values of the core design parameters as the number of clusters, and performing parameter point clustering according to the number of clusters and the distance between parameter points in the design space to obtain parameter point clusters; wherein the distance is determined according to the difference in design parameters between the parameter points, and the preset weights are used to weight the difference in core design parameters to correct the distance; In each parameter point cluster, a preset number of candidate parameter points are selected according to the distance between the parameter points to screen out close parameter points in the parameter point cluster; sampling and observing parameter points from the candidate parameter points, performing accelerator design simulation on the observed parameter points to obtain real indicator values, and iteratively performing Bayesian optimization processing on the candidate parameter points according to the observed parameter points and the real indicator values to obtain a target design point of the target accelerator design.

[0005] The present application also provides a parameter selection device, comprising: a design space setting module configured to determine a design space according to adjustable design parameters in a target accelerator design; The clustering module is configured to determine core design parameters of the target accelerator design and preset weights of the core design parameters 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 distances are determined according to design parameter differences between the parameter points, and the preset weights are used to weight the core design parameter differences to correct the distances. The sampling module is configured to filter a preset number of candidate parameter points in each parameter point cluster according to distances between the parameter points, so as to filter out close parameter points in the parameter point cluster. The Bayesian optimization module is 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 iteratively according to the observation parameter point and the real indicator value, to obtain a target design point of the target accelerator design.

[0006] The application further provides an electronic device, comprising: a memory configured to store a computer program; a processor configured to execute the computer program to implement the accelerator parameter selection method.

[0007] The application further provides a computer program product comprising a computer program or instructions, which, when executed by a processor, implement the accelerator parameter selection method.

[0008] The application further provides a non-volatile computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the accelerator parameter selection method is implemented.

[0009] The application provides an accelerator parameter selection method, comprising: determining a design space according to adjustable design parameters in a target accelerator design; determining core design parameters of the target accelerator design and preset weights of the core design parameters according to preset prior knowledge, taking the number of candidate values of the core design parameters as the number of clusters, and performing 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 distances are determined according to design parameter differences between the parameter points, and the preset weights are used to weight the core design parameter differences to correct the distances; filtering a preset number of candidate parameter points in each parameter point cluster according to distances between the parameter points, so as to filter out close parameter points in the parameter point cluster; sampling an observation parameter point from the candidate parameter points, performing accelerator design simulation on the observation parameter point to obtain a real indicator value, and performing Bayesian optimization processing on the candidate parameter points iteratively according to the observation parameter point and the real indicator value, to obtain a target design point of the target accelerator design.

[0010] The application has the beneficial effects that: the application can first set a complete design space according to adjustable design parameters in a target accelerator design. Then, the core design parameters of the target accelerator design and preset weights thereof are determined according to preset prior knowledge, the number of candidate values of the core design parameters is taken as the number of clusters, and parameter point clusters are obtained according to the number of clusters and the distance between parameter points in the design space; wherein the distance is determined according to the difference of the design parameters between the parameter points, and the preset weights are used to weight the difference of the core design parameters to correct the distance. In other words, the core design parameters that are most important for the target accelerator design can be determined based on the prior knowledge, the number of clusters is determined based on the number of candidate values of the core design parameters, the distance between parameter points is corrected based on the preset weights of the core design parameters to improve the influence of the core design parameters, so that the clustering can be performed under the guidance of the prior knowledge to obtain parameter point clusters under each type of core design parameter configuration. Then, in each parameter point cluster, a preset number of candidate parameter points can be selected according to the distance between the parameter points to filter out the close parameter points in the parameter point cluster and eliminate the redundancy in the design space corresponding to each parameter point cluster. Finally, an observation parameter point can be sampled from the candidate parameter points, an accelerator design simulation is performed on the observation parameter point to obtain a real indicator value, and a Bayesian optimization process is iteratively performed 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. The automatic exploration of the target design point can be performed under the guidance of the prior knowledge, personal bias can be avoided, and the efficiency of parameter point exploration can be improved.

[0011] The application also provides a parameter selection device, an electronic device, a storage medium, and a program product, which have the beneficial effects described above. BRIEF DESCRIPTION OF DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.

[0013] Figure 1 A flowchart of an accelerator parameter selection method provided by an embodiment of the present application; Figure 2 A flowchart of another accelerator parameter selection method provided by an embodiment of the present application; Figure 3 A structural block diagram of an accelerator parameter selection device provided by an embodiment of the present application; Figure 4 A structural block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0014] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0015] The selection optimization of the micro-architecture parameters of the accelerator is an important content in the concept design stage of the accelerator. In the related art, the micro-architecture parameters are usually explored and selected by an architect based on professional experience, or are automatically selected based on a pure algorithm-driven optimization mode. However, the former has the risk of personal bias, so that the final scheme may only be satisfactory but not globally optimal; the latter ignores the domain knowledge known by the architect, and fails to effectively integrate human and machine wisdom.

[0016] In view of this, for the technical problem of how to improve the effect of automatic selection of accelerator parameters, the present application can provide an accelerator parameter selection method, which can automatically find and select a target design point of accelerator design under the guidance of prior knowledge, can avoid personal bias and can improve the efficiency of selection of the design point of the accelerator.

[0017] For the convenience of understanding, please refer to Figure 1 , Figure 1 A flowchart of an accelerator parameter selection method provided by an embodiment of the present application, which can include: S101, determining a design space according to adjustable design parameters in a target accelerator design.

[0018] In the present embodiment, the design parameters are parameters that can be adjusted in the target accelerator design, for example, CPU core parameters, L2 cache parameters, systolic array parameters, etc. Each design parameter can have one or more candidate values, such as 1, 2, 4, 8, 16, etc. for the number of CPU cores. The design space is composed of all candidate value combinations of the design parameters, and each parameter point in the design space corresponds to a candidate value combination of the design parameters. More specifically, the design space can include all feasible parameter combinations of all adjustable parameters. The feasible parameter combination refers to a parameter combination formed by the adjustable design parameters under the constraint of a specific parameter rule of the accelerator. The specific parameter rule is, for example, that the value of the FetchWidth parameter (fetch width) cannot be lower than the value of the DecodeWidth parameter (decoding bandwidth), and the value of the ROBEntries parameter (reorder buffer entry) must be an integer multiple of the value of the DecodeWidth parameter.

[0019] It can be seen that, since the design space has completely covered all feasible parameter combinations in the target accelerator design, all factors affecting the indicators of the accelerator chip can be comprehensively considered.

[0020] Of course, not all design parameters have a significant contribution to improving the performance of the target accelerator design, so the embodiment can also evaluate the importance of each design parameter to the target accelerator design, and reduce the adjustable design parameters in the design space according to the importance, so as to reduce the size of the design space and improve the parameter exploration efficiency. The importance evaluation of the design parameters and the adjustment of the design space can refer to the description in the subsequent embodiments.

[0021] In S102, the core design parameters of the target accelerator design and preset weights thereof are determined according to preset prior knowledge, the number of candidate values of the core design parameters is taken as the number of clusters, and the parameter points are clustered according to the number of clusters and the distance between the parameter points in the design space to obtain parameter point clusters; wherein the distance is determined according to the difference between the design parameters of the parameter points, and the preset weight is used to weight the difference between the core design parameters to correct the distance.

[0022] In the related art, although the Electronic Design Automation (EDA) tool for accelerator design has developed rapidly, it is still essentially a rule-based tool that can only optimize the preset optimization indicators (such as timing, area, and power consumption), but cannot judge the long-term impact or potential risks of an architecture decision. In contrast, experienced designers can foresee the problems that may be encountered by the tool chain backend at an early stage of design, that is, human experience still plays an irreplaceable key role. For example, increasing the Reorder Buffer Depth (ROB) depth of the Berkeley Out-of-Order Machine (BOOM) is beneficial to explore more instruction-level parallelism, but the benefit decreases after the inflection point, and increases power consumption and area. In the x86 architecture, a larger L3 cache can significantly improve the performance of game and database applications. Therefore, the present application can construct a prior knowledge model based on historical data or expert experience , and can select high-quality candidate parameter points based on the model.

[0023] 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).

[0024] 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.

[0025] 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: 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.

[0026] 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.

[0027] In addition, in order to improve the influence of the core design parameters, the step can further set a weight for each design parameter in the parameter point according to a preset weight, to obtain a diagonal weight matrix. The diagonal line of the diagonal weight matrix contains the weight of each design parameter. The weight of the non-core design parameter can be a default value, and the weight of the core design parameter can be a preset weight determined according to prior knowledge.

[0028] Step 12: In the i th iteration, for each parameter point in the design space, the distance between the parameter point and the cluster center is calculated using the diagonal weight matrix, and the parameter point is attributed to the parameter point cluster corresponding to the cluster center with the smallest distance. Where i is a positive integer.

[0029] In step 12, the embodiment will perform multiple rounds of clustering to obtain the required parameter point clusters. Specifically, for each parameter point in the design space, the distance between the parameter point and the cluster center is calculated using the diagonal weight matrix, and the distance function formula is: Wherein, is the i th parameter point in the design space, is the j th cluster center, indicates the diagonal weight matrix used when calculating . The function makes the difference of the core design parameter much greater than other parameters in the clustering result, ensuring that design experience is introduced into the cluster and the physical meaning is clear.

[0030] Subsequently, each parameter point is assigned to the parameter point cluster corresponding to the cluster center with the closest distance.

[0031] Step 13: Update the cluster center of the parameter point cluster, and judge whether the preset clustering exit condition is met. If not, enter the next iteration, and if yes, output the parameter point cluster.

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

[0033] It should be noted that the preset clustering exit condition can be set according to actual application requirements, for example, the number of iterations can reach a preset number.

[0034] S103, In each parameter point cluster, a preset number of candidate parameter points are selected according to the distance between the parameter points, to filter out close parameter points in the parameter point cluster. ​

[0035] This step will optimize the parameter points in each parameter point cluster, filter out the close parameter points in the parameter point cluster, and keep the more representative candidate parameter points in the parameter point cluster. Of course, if the number of parameter points in the parameter point cluster is less than the preset number, all the parameter points in the parameter point cluster will be taken as candidate parameter points.

[0036] Specifically, the embodiment will filter the candidate parameter points in the parameter point cluster according to the distance between the parameter points, try to ensure that the candidate parameter points are scattered in the parameter point cluster, so as to ensure that the candidate parameter points uniformly cover the design space and reflect different characteristics, and lay a high-quality data foundation for subsequent parameter exploration.

[0037] Further, the 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 sampling number of different preset sampling methods can be adjusted by using a preset ratio, so as to balance the sampling effect of different preset sampling methods.

[0038] In one embodiment, in each parameter point cluster, a preset number of candidate parameter points are selected according to the distance between the parameter points, comprising: Step 21: determining the sampling number of a preset sampling method according to the sampling ratio corresponding to the preset sampling method and the preset number; wherein the preset sampling method contains at least two kinds.

[0039] In step 21, the preset number can be , wherein b is the number of parameter points, k is the number of clusters, , which means rounding down. The sampling ratio can be set according to demand. For example, the embodiment can provide two sampling methods of direct-push experimental design sampling and greedy maximum-minimum distance sampling, and the sampling ratio of these two methods can be 7:3.

[0040] Step 22: sampling parameter points in each parameter point cluster by using a preset sampling method according to the sampling number and the distance between the parameter points, to obtain sampling points corresponding to the preset sampling method.

[0041] In step 22, different preset sampling methods can be used for parameter point sampling to obtain sampling points corresponding to different preset sampling methods.

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

[0043] In step 23, the repeated values in the sampling points obtained by various sampling strategies can be removed, and all the sampling points can be combined into a list and returned to obtain the required candidate parameter points.

[0044] The two sampling methods of direct-push experimental design sampling and greedy maximum minimum distance sampling are introduced below. First, the direct-push experimental design sampling is introduced. In an implementation, according to the sampling number and the distance between each parameter point, the parameter points in each parameter point cluster are sampled by using a preset sampling method to obtain sampling points corresponding to the preset sampling method, which can include: Step 31: Set the parameter point cluster as an unsampled set, and randomly select a parameter point from the parameter point cluster to initialize a sampled set.

[0045] In step 31, the input parameters of the direct-push experimental design sampling can be the unsampled set U in the current cluster, the normalization coefficient , the sample number to be sampled in the cluster. The initial unsampled set can be set by using the parameter point cluster. Then, the sampled set U' can be initialized by randomly selecting a parameter point from the parameter point cluster. For example, a parameter point is randomly selected as a sampled parameter point in the sampled set.

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

[0047] Step 33: If the number of parameter points is not equal to the sampling number, determine the distance matrix between the unsampled parameter points in the unsampled set and each sampled parameter point in the sampled set, perform matrix operations by using the distance matrix, the distance between the unsampled parameter points and themselves, the preset normalization coefficient and the preset unit matrix, and determine the matrix trace of the matrix operation result.

[0048] In this step, the distance matrix K between all unsampled parameter points in the unsampled set can be calculated first, and the distance function f can be flexibly selected, which is not limited in the present application. The core of the function is to measure the feature difference between microarchitectures.

[0049] Further, the target function of collecting parameter points from the unsampled parameter points in this step is the distance matrix trace between the unsampled parameter points and the sampled set U'. The distance matrix trace is calculated, and the parameter point with the maximum distance matrix trace is moved to the sampled set, which can maximize the information of the design space in the cluster, reduce redundancy and cover key features, and improve sample diversity. Specifically, each parameter point x of the accelerator design in the unsampled set U can be traversed, the corresponding target function value is calculated, and the chip design (x*∈U) with the maximum value is selected as the sampling result of this round, and the formula is: ; Wherein, represents the trace of the matrix (i.e., the sum of the main diagonal elements), which is used to quantify the supplementary degree of the newly added sample to the information coverage of the accelerator chip design space; is the distance vector (dimension ) between all sampled parameter points in U' and x; is the distance of x to itself (scalar, calculated by distance function f); I is the identity matrix (1x1 matrix, i.e. scalar 1 here), is the normalization coefficient; to ensure reversibility, avoiding numerical calculation errors.

[0050] Step 34: move the unsampled parameter point with the largest matrix trace in the unsampled set into the sampled set, and enter the step of judging whether the number of parameter points in the sampled set is equal to the sampling number.

[0051] Step 35: if the number of parameter points is equal to the sampling number, then the parameter points in the sampled set are taken as the sampling points.

[0052] The greedy maximum minimum distance sampling is introduced below. In an embodiment, according to the sampling number and the distance between parameter points, parameter points are sampled in each parameter point cluster by using a preset sampling method, to obtain sampling points corresponding to the preset sampling method, including: Step 41: randomly select a parameter point in the parameter point cluster and put it into the selected point set.

[0053] In this step, the input parameters of the greedy maximum minimum distance sampling can be the unsampled set U in the current cluster, the normalization coefficient , and the sampling number of the cluster. Then, a point in the current cluster can be randomly selected as the first point of the selected point set S.

[0054] Step 42: judge whether the number of parameter points in the selected point set is equal to the sampling number.

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

[0056] Step 44: put the unsampled parameter point with the largest minimum distance into the selected point set, and enter the step of judging whether the number of parameter points in the selected point set is equal to the sampling number.

[0057] In steps 43-44, the minimum distance of all unsampled parameter points in the cluster to the selected point set S can be calculated, and the distance function f can be flexibly selected, which is not limited in the present application. Then, for each point in the current cluster, the target function is the minimum distance of each parameter point to the selected point set S, and each parameter point x in the unsampled set U is traversed to calculate the corresponding target function value, and the parameter point with the largest value is selected. As the result of the current sampling, the formula is: ; The selected point is added to S, and the un-sampled set U is updated, i.e., the point is removed from the un-sampled set.

[0058] Step 45: If the number of parameter points is equal to the number of samples, the parameter points in the selected point set are taken as the sampling points.

[0059] It can be seen that in steps S102-S103, in order to improve the initial sample quality and coverage of the design space exploration, the application can provide an active prior adaptive sampling method, and an adaptive active learning strategy can be designed to provide a high-quality data basis for subsequent proxy model construction. The adaptive active learning is closely combined with the knowledge in the micro-architecture field under the guidance of the design experience of the prior knowledge model , and a hybrid sampling method of transductive experimental design (TED) sampling and greedy maximum minimum distance sampling is used to directionally sample potential high-value processor chip micro-architectures, thereby reducing the redundant simulation cost and improving the efficiency and accuracy of the overall chip design.

[0060] S104, 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.

[0061] In the embodiment, an observation parameter point can be sampled from the candidate parameter points, and an accelerator design simulation is performed on the observation parameter point to obtain a real indicator value. Subsequently, the proxy model can be trained according to the observation parameter point and the real indicator value, and the proxy model can be used to generate a predicted indicator value and an uncertainty value of the candidate parameter point. The uncertainty value is used to quantify the uncertainty of the proxy model in determining the predicted indicator value. Subsequently, the predicted indicator value and the uncertainty can be input into the acquisition function to evaluate the potential value of the candidate parameter point using the acquisition function. The above proxy model and acquisition function can be used to iteratively perform multiple rounds of Bayesian optimization processing, and when the iteration exit condition is met, a target parameter point with the best real indicator value is selected from the currently evaluated candidate parameter points as the target design point finally used by the target accelerator design. The target parameter point can be regarded as a design point that meets the requirements of the Pareto frontier. The Pareto frontier is a core concept in multi-objective optimization, which refers to a set of non-dominated solutions that cannot be improved in all objectives at the same time, and represents the best among the objectives. In this way, the embodiment can realize automatic exploration of the target design point of the target accelerator design.

[0062] Further, to improve the effect of design point selection, the embodiment can use multiple acquisition functions to evaluate the candidate parameter points from different angles, and weight the function values generated by the acquisition functions, so as to improve the evaluation effect of the candidate parameter points. Moreover, after each iteration, the embodiment can adaptively assign the weight corresponding to each acquisition function according to the performance of each acquisition function, realize dynamic weight optimization based on context awareness, and fuse the advantages of multiple functions to adapt to the needs of different design exploration stages.

[0063] The step S104 will be specifically introduced below. In an implementation manner, the observed parameter point is sampled from the candidate parameter points, the accelerator design simulation is performed on the observed parameter point to obtain the real indicator value, and the Bayesian optimization processing is performed on the candidate parameter points according to the observed parameter point and the real indicator value, to obtain the target design point of the target accelerator design, which can include: Step 51: An observed parameter point is sampled from the candidate parameter points, the observed parameter point is added to the observation set, and the accelerator design simulation is performed on the observed parameter point to obtain the real indicator value.

[0064] In step 51, the observed parameter point can be first randomly sampled from the candidate parameter points, and the observed parameter point is added to the observation set to initialize the observation set. Then, the accelerator design simulation (VLSI simulation, Very Large-Scale Integration) is performed on the observed parameter point to obtain the real indicator value. The real indicator value can be the PPA indicator, i.e., the performance indicator (Performance), the power indicator (Power) and the area indicator (Area).

[0065] Step 52: In the i th iteration, the proxy model is trained by using the parameter points in the observation set and the real indicator values thereof; wherein i is a positive integer.

[0066] In step 52, the proxy model can be trained by using the parameter points in the observation set and the real indicator values thereof. In each iteration after the first iteration, only the proxy model in the last iteration needs to be continuously trained.

[0067] Further, the proxy model in the embodiment selects the Gaussian Process GP model (Gaussian Process), which can provide prediction mean and uncertainty estimation. The hyperparameters (such as the parameters of the kernel function) of the Gaussian Process are usually optimized by maximizing the marginal likelihood. For the multi-objective problem of PPA, a GP can be trained for each target, or a multi-output GP can be used.

[0068] Step 53: A to-be-evaluated parameter point is sampled from the unsampled candidate parameter points, and the proxy model is used to generate the indicator value and the uncertainty value of the to-be-evaluated parameter point.

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

[0070] Step 54: The index value and the uncertainty value are processed by using at least two acquisition functions to obtain function values of each acquisition function, and the function values are weighted and fused by using the weight values corresponding to each acquisition function to obtain a weighted function value.

[0071] In this embodiment, three acquisition functions can be used to guide the Bayesian optimization process, which are expected hypervolume improvement (EHVI), probability of improvement (POI), and probability of maximal hypervolume (PMH). The global acquisition function can be expressed as: ; wherein, the weighted function value is represented by w, is a weight vector, and the initial weight vector is 1 / 3.

[0072] Step 55: The to-be-evaluated parameter point with the maximum weighted function value is selected as the current best parameter point, and the current best parameter point is added to the observation set.

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

[0074] Step 56: The real best parameter point with the best real index value in the observation set in the last iteration is determined, and the weight value corresponding to the acquisition function is updated 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.

[0075] In step 56, the weight corresponding to each acquisition function can be adaptively assigned by the performance of each acquisition function, realizing dynamic weight optimization based on context awareness, and fusing 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 an embodiment, the update of the weight value corresponding to the acquisition function 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 can include: Step 61: Determine the actual improvement of the acquisition function using the function value determined for the current best parameter point and the function value determined for the real best parameter point; Step 62: Determine the function score of the acquisition function using the actual improvement and the uncertainty value corresponding to the current best parameter point.

[0076] In steps 61~62, the score of the acquisition function is defined as: ; wherein, represents three acquisition functions; is the optimal solution of the current iteration, is the current optimal solution known before the tth iteration, is determined according to the corresponding real index value; represents the actual improvement of the acquisition function (if the improvement is negative, take 0), is the predicted uncertainty of the surrogate model for point; ε is a constant term for ensuring numerical stability and robustness of the formula.

[0077] Step 63: Divide the function score of each acquisition function by the temperature parameter of the current iteration to obtain the intermediate result corresponding to each acquisition function, and convert the intermediate result of each acquisition function using the normalization exponential function to obtain the updated weight value corresponding to each acquisition function; wherein the numerical value of the temperature parameter is negatively related to the iteration round.

[0078] In step 63, the score can be converted into weight using the softmax function: ; wherein, is the temperature parameter, which controls the smoothness of the weight distribution. As the iteration proceeds, will gradually decrease to focus on the best performing acquisition function.

[0079] Step 57: Determine whether the preset iteration exit condition is met, if not, enter the next iteration, if met, take the parameter point with the best real index value in the observation set as the target design point.

[0080] In this embodiment, the iteration can be stopped when one of the following conditions is met: 1. Reach the maximum number of iterations: This is the simplest stopping condition. A number of iterations is set in advance, and the iteration is stopped when this number is reached.

[0081] 2. Convergence: When the improvement of the best PPA objective function brought by the new design point found in successive iterations (e.g. 10-20 times) is less than a given threshold (e.g. the change of the optimal value is less than 0.01%), it can be considered that the convergence has been reached, and the exploration is stopped.

[0082] 3. Unexpected stop: Resource exhaustion: such as insufficient memory, etc.

[0083] Therefore, the preset iteration exit condition can be that the number of iterations reaches the maximum number, and / or the change amount of the real index value obtained by the continuous multiple rounds of iterations is less than the preset change amount, and / or the remaining amount of the hardware resource is less than the preset threshold.

[0084] It can be seen that the application can provide a global collection strategy of dynamic fusion of multiple collection functions, which can be used as a collection function in the design process of an accelerator, quantifies the potential value of each candidate point, and thus guides the optimizer to select the next best evaluation point. The strategy mainly adaptively allocates weights through the performance of each collection function, realizes dynamic weight optimization based on context awareness, fuses the advantages of multiple functions, and adapts to the needs of different design exploration stages.

[0085] Based on the above embodiment, the application first sets a complete design space according to the adjustable design parameters in the target accelerator design. Then, the core design parameters of the target accelerator design and their preset weights are determined according to the preset prior knowledge, the number of candidate values of the core design parameters is taken as the number of clusters, and the parameter point clusters are obtained according to the number of clusters and the distance between the parameter points in the design space; wherein the distance is determined according to the difference of the design parameters between the parameter points, and the preset weight is used to weight the difference of the 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 the prior knowledge, the number of clusters can be determined based on the number of candidate values of the core design parameters, and the distance between the parameter points can be corrected based on the preset weight of the core design parameters to improve the influence of the core design parameters, so that the clustering can be performed under the guidance of the prior knowledge to obtain the parameter point clusters under the configuration of each type of core design parameters. Then, in each parameter point cluster, a preset number of candidate parameter points can be selected according to the distance between the parameter points to filter out the close parameter points in the parameter point cluster and eliminate the redundancy in the design space corresponding to each parameter point cluster. Finally, the observed parameter points can be sampled from the candidate parameter points, the accelerator design simulation is performed on the observed parameter points to obtain the real index values, and the candidate parameter points are iteratively processed by the Bayesian optimization based on the observed parameter points and their real index values, to obtain the target design point of the target accelerator design. The automatic exploration of the target design point can be performed under the guidance of the prior knowledge, personal bias can be avoided, and the efficiency of parameter point exploration can be improved.

[0086] 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.

[0087] In one embodiment, the method may further include: 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.

[0088] 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: ; 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.

[0089] 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.

[0090] 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.

[0091] 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: 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.

[0092] 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 from [4, 8], the FetchWidth = 4 design point indicators in Table 1 are divided into a first cluster C1, and the FetchWidth = 8 design point indicators in Table 1 are divided into a second cluster C2. The first cluster C1 is shown in Table 2. The second cluster C2 is shown in Table 3. The first cluster C1 is shown in Table 2. The second cluster C2 is shown in Table 3.

[0093] Further, the representative indicator vector can be obtained by averaging all the indicator vectors in the indicator cluster. However, the average calculation is sensitive to outliers. Therefore, the present application uses a "weighted median" instead of the average to enhance the robustness to abnormal indicators (such as extreme delay values). Specifically, for each cluster divided , the median and the average of all the indicator vectors inside the cluster are calculated, and the weighted sum of the median and the average is the representative indicator vector of the cluster . The representative indicator vectors of all the clusters are collected to form a set .

[0094] Based on this, determining the representative indicator vector of the indicator cluster can include: Step 81: In the indicator cluster, the median and the average of each element in the indicator vector are determined, and the median and the average are fused by weighting to obtain the representative indicator vector.

[0095] Step 72: Calculate the vector distance between the indicator clusters according to the representative indicator vectors.

[0096] In step 72, the importance of the parameter is determined by the difference between the representative indicator vectors corresponding to the candidate values of the parameter, so the vector distance between the indicator clusters needs to be calculated, and the vector distance is used to determine the importance value of the parameter. Considering that the Euclidean distance assumes that the indicators are independent and equally important, but in actual accelerator chip design, there is correlation between indicators (such as positive correlation between power consumption and area), and indicators have different priorities (such as power consumption > area in edge scenarios). Therefore, an indicator weight matrix W (a diagonal matrix, the diagonal elements are ) is introduced to amplify the distance contribution of important indicators, and a covariance matrix is used to correct the indicator correlation and eliminate redundant information.

[0097] Based on this, calculating the vector distance between the indicator clusters according to the representative indicator vectors can include: Step 91: Obtain an indicator weight diagonal matrix; wherein the indicator weight diagonal matrix contains preset weights of each element in the indicator vector; Step 92: Calculate Mahalanobis distance between each index cluster according to representative index vectors, and weight the Mahalanobis distance by index weight diagonal matrix to obtain vector distance between each index cluster.

[0098] Specifically, the weighted Mahalanobis distance of all two vectors in the set M is calculated, and the weighted Mahalanobis distance of two representative index vectors is defined as: ; wherein, is the index weight diagonal matrix, is the number of optimization objectives, and the weights of performance, power consumption and area in the accelerator chip design are set as . is the global index covariance matrix, wherein i is the index of the sampled parameter point, k and l are the indices of the index values, is the kth index value of the ith parameter point, is the global mean of the kth index, reflecting the linear correlation between the indexes (such as is the covariance of performance and power consumption), is the inverse of the covariance matrix.

[0099] Step 73: Determine the importance value of the design parameter by using the vector distance, and normalize the importance value.

[0100] Specifically, the importance value of the design parameter can be determined by using the vector distance, which can include: Step 1001: Sum the vector distances between the index clusters corresponding to the design parameter, and divide the sum by the total number of vector pairs between the index clusters corresponding to the design parameter to obtain the importance value.

[0101] Specifically, for the parameter , the total distance between the clusters is the sum of all two vector distances, and the importance (unnormalized) is the total sum divided by the total number of vector pairs, i.e.: ; wherein, represents the representative index vector, represents the number of candidate values of the design parameter.

[0102] Subsequently, the preliminary importance of all parameters obtained can be normalized to the interval [0, 1] to ensure that the importance of different parameters can be directly compared. The formula is: ; wherein, is the unnormalized importance vector, is a max operation. After normalization, a dimensional vector is given to represent the importance of each design feature.

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

[0104] In this step, the design space pruning can be performed according to the obtained importance vector and the preset importance threshold . For each parameter , if (i.e., an unimportant parameter), the candidate value of the parameter is fixed as the middle value of the designable parameter values (for example, the candidate values of the parameter “DecodeWidth” are 1, 2, 3, 4, and 5, and the middle value is 3), that is, the parameter value of the non-adjustable design parameter is fixed as the middle value of the candidate values of the non-adjustable design parameter, and the non-adjustable design parameter no longer participates in the subsequent exploration; if (i.e., an important parameter), all candidate values of the parameter are retained and enter the subsequent optimization.

[0105] Further, the element-level multiplication (i.e., Hadamard product, symbol ) can be performed on each parameter point in the pruned design space and the importance vector to obtain a design point in the transformed space, and the formula is: .

[0106] Based on this, after setting the non-adjustable design parameters as fixed parameters, the following can also be included: Step 1101: Set an importance vector using the importance values of the design parameters; Step 1102: In the design space, perform element-level multiplication operation on the importance vector and each parameter point to obtain an adjusted vector space.

[0107] Correspondingly, clustering is performed in the design space according to the number of clusters and the distance between parameter points to obtain parameter point clusters, including: S301, clustering is performed in the adjusted design space according to the number of clusters and the distance between parameter points to obtain parameter point clusters.

[0108] As can be seen, since the adjustable design parameters in the design space have been reduced in this embodiment, and the importance of each parameter point in the design space can be assigned, a more valuable design space can be provided for subsequent multi-objective Bayesian optimization.

[0109] For the convenience of understanding the complete flow of the method, please refer to Figure 2 , Figure 2 The flowchart of another accelerator parameter selection method provided by the embodiment of the application. The beneficial effects of the method are that the application proposes an accelerator architecture design exploration method and system, which is equipped with a design space pruning method based on multi-scale importance evaluation to evaluate parameter importance and structure pruning of the design space. In the pruned space, the initial sampling points are obtained by means of an adaptive sampling strategy based on active learning and prior knowledge to dynamically fuse human prior knowledge and data-driven active learning, and multi-objective Bayesian optimization is performed therefrom, and the adaptive weight allocation mechanism is realized by means of the dynamic fusion global sampling strategy of the acquisition function to realize the dynamic weight optimization based on context perception. The application can solve the problem of high dimension of the design space, improve the discovery efficiency and quality of the Pareto frontier, and realize the rapid exploration of the accelerator chip architecture design space under multi-objective optimization. The application can not only be directly applied to the design work of various accelerators, but also be adapted to other space exploration tasks through simple expansion.

[0110] The accelerator parameter selection device, electronic equipment, computer readable storage medium and computer program product provided by the embodiment of the application are introduced below, and the accelerator parameter selection device, electronic equipment, computer readable storage medium and computer program product described below can be mutually corresponding to the accelerator parameter selection method described above.

[0111] Please refer to Figure 3 , Figure 3 The structural block diagram of an accelerator parameter selection device provided by the embodiment of the application, which can include: The design space setting module 301 is configured to determine the design space according to the adjustable design parameters in the target accelerator design; The clustering module 302 is configured to determine the core design parameters of the target accelerator design and their preset weights according to the preset prior knowledge, take the number of candidate values of the core design parameters as the number of clusters, and cluster the parameter points in the design space according to the number of clusters and the distance between the parameter points to obtain parameter point clusters; wherein the distance is determined according to the difference in design parameters between the parameter points, and the preset weight is used to weight the difference in core design parameters to correct the distance; The sampling module 303 is configured to filter out the close parameter points in the parameter point clusters by screening a preset number of candidate parameter points according to the distance between the parameter points in each parameter point cluster; The Bayesian optimization module 304 is configured to sample an observation parameter point from the candidate parameter points, perform an accelerator design simulation on the observation parameter point to obtain a real index value, and perform Bayesian optimization processing on the candidate parameter points according to the observation parameter point and the real index value of the observation parameter point, to obtain a target design point of the target accelerator design.

[0112] Optionally, the method further comprises: The random sampling simulation module is configured to sample a parameter point in the design space, perform an accelerator design simulation according to the parameter point, and obtain an index vector corresponding to the parameter point. The design space adjustment module is configured to determine an importance value of each design parameter according to the index vector, and reduce the adjustable design parameters in the design space according to the importance value, to obtain an adjusted design space. The clustering module can be configured to: cluster the parameter points in the adjusted design space according to the number of clusters and the distance between the parameter points, to obtain parameter point clusters.

[0113] Optionally, the design space adjustment module comprises: The index cluster division submodule is configured to divide the index vector into index clusters corresponding to the candidate values of the design parameters according to the candidate values of the design parameters, and determine a representative index vector of each index cluster. The vector distance calculation submodule is configured to calculate the vector distance between the index clusters according to the representative index vectors. The importance value determination submodule is configured to determine the importance value of each design parameter by using the vector distance, and perform normalization processing on the importance value. The adjustment submodule is configured to set, in the design space, a design parameter with an importance value less than a preset threshold as an unadjustable design parameter, and set the unadjustable design parameter as a fixed parameter, to obtain an adjusted design space.

[0114] Optionally, the index cluster division submodule comprises: The representative index vector construction unit is configured to determine the median value and the average value of each element in the index vector in the index cluster, and perform weighted fusion on the median value and the average value, to obtain a representative index vector.

[0115] Optionally, the vector distance calculation submodule comprises: The acquisition unit is configured to acquire an index weight diagonal matrix, wherein the index weight diagonal matrix contains preset weights of the elements in the index vector. The calculation unit is configured to calculate the Mahalanobis distance between the index clusters according to the representative index vectors, and perform weighting on the Mahalanobis distance by using the index weight diagonal matrix, to obtain the vector distance between the index clusters.

[0116] Optionally, the importance value determination submodule comprises: An importance value calculation unit is configured to sum up vector distances between index clusters corresponding to the design parameters, and divide the sum by a total number of vector pairs between the index clusters corresponding to the design parameters to obtain an importance value.

[0117] Optionally, the method further comprises: An importance vector design module is configured to set an importance vector using the importance values of the design parameters. An importance addition module is configured to perform element-level multiplication between the importance vector and each parameter point in the design space to obtain an adjusted vector space.

[0118] Optionally, the adjusting sub-module comprises: An unadjustable design parameter fixing unit is configured to fix the parameter value of the unadjustable design parameter as a middle value in the candidate values of the unadjustable design parameter.

[0119] Optionally, the clustering module comprises: A clustering initialization sub-module is configured to 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 a preset weight to obtain a diagonal weight matrix. A clustering sub-module is configured to, in the i-th iteration, calculate distances between each parameter point in the design space and the cluster centers using the diagonal weight matrix, and assign the parameter point to a parameter point cluster corresponding to the cluster center with the smallest distance; wherein i is a positive integer. A clustering iteration control sub-module is configured to update the cluster centers of the parameter point clusters, and determine whether a preset clustering exit condition is met, if not, enter the next iteration, and if yes, output the parameter point clusters.

[0120] Optionally, the sampling module comprises: A sampling number determination sub-module is configured to determine the sampling number of each preset sampling method according to a sampling ratio and a preset number corresponding to the preset sampling method; wherein the preset sampling method comprises at least two kinds. A sampling sub-module is configured to sample parameter points in each parameter point cluster using the preset sampling method according to the sampling number and the distances between the parameter points to obtain sampling points corresponding to the preset sampling method. A deduplication sub-module is configured to deduplicate the sampling points corresponding to each sampling method to obtain candidate parameter points.

[0121] Optionally, the sampling sub-module comprises: A first initialization unit is configured to set the parameter point clusters as an unsampled set, and randomly select parameter points from the parameter point clusters to initialize a sampled set. A first judgment unit is configured to determine whether the number of parameter points in the sampled set is equal to the sampling number. a matrix trace determination unit configured to, if the number of parameter points is not equal to the sampling number, determine a distance matrix between the unsampled parameter points in the unsampled set and each of the sampled parameter points in the sampled set, perform matrix operation on the distance matrix, the distance between the unsampled parameter points and themselves, a preset normalization coefficient and a preset unit matrix, and determine a matrix trace of a result of the matrix operation; a first set updating unit configured to move the unsampled parameter point with the largest matrix trace in the unsampled set into the sampled set, and enter a step of judging whether the number of parameter points in the sampled set is equal to the sampling number; a first output unit configured to, if the number of parameter points is equal to the sampling number, take the parameter points in the sampled set as the sampling points.

[0122] Optionally, the sampling module comprises: a second initialization unit configured to randomly select a parameter point in the parameter point cluster and put it into a selected point set; a second judgment unit configured to judge whether the number of parameter points in the selected point set is equal to the sampling number; a distance calculation unit configured to, if the number of parameter points is not equal to the sampling number, determine the minimum distance between the unsampled parameter points in the parameter point cluster and all selected parameter points in the selected point set; a second set updating unit configured to put the unsampled parameter point with the largest minimum distance into the selected point set, and enter a step of judging whether the number of parameter points in the selected point set is equal to the sampling number; a second output unit configured to, if the number of parameter points is equal to the sampling number, take the parameter points in the selected point set as the sampling points.

[0123] Optionally, the device further comprises: a candidate parameter point setting module configured to, if the number of parameter points in the parameter point cluster is less than a preset number, take all the parameter points in the parameter point cluster as candidate parameter points.

[0124] Optionally, the Bayesian optimization module comprises: a Bayesian optimization initialization submodule configured to sample an observation parameter point from the candidate parameter points, add the observation parameter point to an observation set, and perform accelerator design simulation on the observation parameter point to obtain a true index value; a proxy model training submodule configured to, in the i-th iteration, train a proxy model by using each parameter point in the observation set and the true index value of the parameter point; wherein i is a positive integer; a proxy model processing submodule configured to sample an evaluation parameter point from the unsampled candidate parameter points, and generate an index value and an uncertainty value of the evaluation parameter point by using the proxy model; The collection function processing submodule is configured to process the index value and the uncertainty value by using at least two collection functions, obtain function values of the collection functions, and obtain a weighted function value by weighting and fusing the function values according to the weight values corresponding to the collection functions. The set updating submodule is configured to add the parameter point with the maximum weighted function value to the observation set as a current best parameter point. The weight updating submodule is configured to determine a real best parameter point with the best real index value in the observation set in the last iteration, update the weight values corresponding to the collection functions according to 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. The iteration control submodule is configured to determine whether a preset iteration exit condition is met, and if not, enter the next iteration, and if so, add the parameter point with the best real index value in the observation set to the target design point.

[0125] Optionally, the weight updating submodule comprises: The actual improvement amount determination unit is configured to determine the actual improvement amount of the collection function according to the function value determined for the current best parameter point and the function value determined for the real best parameter point. The function score determination unit is configured to determine the function score of the collection function according to the actual improvement amount and the uncertainty value corresponding to the current best parameter point. The weight updating unit is configured to divide the function score of each collection function by a temperature parameter of the current iteration to obtain an intermediate result corresponding to each collection function, and convert the intermediate result of each collection function by using a normalization exponential function to obtain an updated weight value corresponding to each collection function; wherein the value of the temperature parameter is negatively correlated with the iteration round.

[0126] Optionally, the preset iteration exit condition is that the number of iterations reaches a maximum number, and / or the change amount of the real index 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.

[0127] Please refer to Figure 4 , Figure 4 The structure block diagram of the electronic device provided in the embodiment of the application, the embodiment of the application provides an electronic device 40, comprising a processor 41 and a memory 42;Wherein, the memory 42 is used to save computer programs;The processor 41 is used to execute the accelerator parameter selection method provided in the foregoing embodiments when executing the computer programs.

[0128] The specific process of the above-mentioned accelerator parameter selection method can refer to the corresponding content provided in the foregoing embodiments, which will not be repeated here.

[0129] And, the memory 42 as the carrier of the resource storage can be a read-only memory, a random memory, a magnetic disk or an optical disk, etc., and the storage mode can be temporary storage or permanent storage.

[0130] In addition, the electronic device 40 further comprises 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 for providing working voltage for each hardware device 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 followed by the communication interface 44 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input / output interface 45 is used for obtaining external input data or outputting data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited here.

[0131] The embodiment of the present application further provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the accelerator parameter selection method as described in the above embodiment.

[0132] Since the embodiment of the computer program product part corresponds to the embodiment of the accelerator parameter selection method part, the embodiment of the computer program product part is described in the description of the embodiment of the accelerator parameter selection method part, which is not repeated here.

[0133] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the accelerator parameter selection method as described in the above embodiment.

[0134] Since the embodiment of the computer readable storage medium part corresponds to the embodiment of the accelerator parameter selection method part, the embodiment of the storage medium part is described in the description of the embodiment of the accelerator parameter selection method part, which is not repeated here.

[0135] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part.

[0136] Those skilled in the art will further realize that the mere conception of the examples described herein is not inducing the patentable subject matter recited in each of the claims. The embodiments described herein with reference to the drawings are illustrative of various embodiments of the present application and are not meant to limit or restrict the scope of the application as encompassed by the appended claims in any way. It will be apparent to those having skill in the art that changes can be made in the examples described without departing from the spirit and scope of the present application. Thus, the disclosed embodiments are to be considered in all respects as illustrative and not restrictive, and all changes coming within the meaning and equivalency range of the appended claims are intended to be embraced therein.

[0137] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The present disclosure can be implemented by using a conventional computer program or a conventional computer program manufactured or sold by SAMSUNG Electronics Co., Ltd.

[0138] The above provides an accelerator parameter selection method, device, equipment, storage medium, program product. The principle and implementation of the present application are described by applying specific examples. The above examples are used to help understand the method and core idea of the present application. It should be pointed out that for those skilled in the art, without departing from the principle of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.

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 number of candidate values of the core design parameters as a number of clusters, and clustering parameter points in the design space according to the number of clusters and distances between the parameter points to obtain parameter point clusters; wherein the distances are determined according to design parameter differences between the parameter points, and the preset weights are used to weight the core design parameter differences to correct the distances; 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 iteratively performing Bayesian optimization processing on the candidate parameter points according to the observation parameter points and the real indicator values to obtain a target design point of the target accelerator design.

2. The accelerator parameter selection method of claim 1, wherein, The method further comprises the following steps: 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; clustering parameter points in the design space according to the number of clusters and distances between the parameter points to obtain parameter point clusters, comprising: clustering parameter points in the adjusted design space according to the number of clusters and distances between the parameter points to obtain parameter point clusters.

3. The accelerator parameter selection method of claim 2, wherein, 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 the importance values of the design parameters by using the vector distances, and normalizing 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.

4. The accelerator parameter selection method of claim 3, wherein, determining the 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 fusing the median value and the average value by weighting to obtain the representative indicator vector.

5. The accelerator parameter selection method of claim 3, 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 the vector distances between the indicator clusters.

6. The accelerator parameter selection method of claim 3, 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.

7. The accelerator parameter selection method of claim 3, 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.

8. The accelerator parameter selection method of claim 3, 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.

9. The 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.

10. The 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.

11. The accelerator parameter selection method of claim 10, 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.

12. The accelerator parameter selection method of claim 10, 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.

13. 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.

14. The method of accelerator parameter selection according to any one of claims 1 to 13, 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.

15. The accelerator parameter selection method of claim 14, 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.

16. The method of accelerator parameter selection of claim 14, 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.

17. A parameter selection apparatus characterized by comprising: The method comprises: 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 the 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.

18. An electronic device, comprising: The method comprises: a memory configured to store a computer program; a processor configured to implement the accelerator parameter selection method according to any one of claims 1 to 16 when executing the computer program.

19. A computer program product comprising computer programs or instructions, characterized in that, 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 16.

20. A non-transitory computer readable storage medium, comprising: 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 16.

Citation Information

Patent Citations

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

    CN108921395A

  • Hyper-parameter adaptive optimization system and method for automatic machine learning

    CN113392983A

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

    CN114564787A

  • Hyper-parameter optimization method, related device and storage medium

    CN116029368A

  • Hyper-parameter selection using budget-aware Bayesian optimization

    CN118414621A