Computing power application scene and intelligent computing chip adaptation evaluation method, equipment and product

By calculating the computing power and storage capacity of the intelligent computing model, combined with the chip performance, the appropriate chip selection is determined, which solves the problem that the MLPerf benchmark cannot meet the needs of specific scenarios, and achieves cost savings and optimal chip selection.

CN118820033AActive Publication Date: 2024-10-22CHINA MOBILE GROUP DESIGN INST +1

Patent Information

Application Number
CN202410802293.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-22
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In the existing technology, the MLPerf benchmark cannot meet the computing power requirements of specific intelligent computing models used by downstream manufacturers in intelligent computing scenarios, resulting in high testing costs and the inability to obtain satisfactory chip selection solutions.

Method used

Based on the calculation amount and parameter amount of the operators of the intelligent computing model in the computing power application scenario, the computing power and video memory storage capacity of the calculation model, combined with the performance parameters of the intelligent computing chip, the minimum training and inference time is calculated, and the adaptation is finally determined. chip selection scheme to avoid actually running the model on the chip.

Benefits of technology

It saves the cost of purchasing chips and can provide the best chip selection solution for models not included in the MLPerf benchmark, reducing testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820033A_ABST
    Figure CN118820033A_ABST
Patent Text Reader

Abstract

The invention provides a calculation power application scene and intelligent calculation chip adaptation evaluation method, device and product, and the method comprises the steps: predicting the model calculation power needed when an intelligent calculation model is applied to a set industry based on the calculation amount of each operator included in the intelligent calculation model in the calculation power application scene; on the basis of the parameter quantity of each operator, calculating the memory space of a model video memory required when the intelligent calculation model is trained and pushed; based on the model calculation power, the model video memory storage capacity and chip parameters used for describing the performance of the intelligent calculation chips in the intelligent calculation chips, the minimum training and pushing time needed by the intelligent calculation chips to complete training and pushing of the intelligent calculation model is calculated; and determining an intelligent calculation chip type selection scheme matched with the intelligent calculation model based on the cost of each intelligent calculation chip and the minimum training and pushing time of each intelligent calculation chip when the training and pushing of the intelligent calculation model are completed. Compared with the prior art, the cost of purchasing the intelligent calculation chip is saved, and meanwhile, the optimal chip type selection scheme matched with the intelligent calculation model can be obtained even if the intelligent calculation model is not included in the MLPerf benchmark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a method, device and product for evaluating the adaptation of computing power application scenarios and intelligent computing chips. Background Art

[0002] With the rapid development of AI (Artificial Intelligence) large model technology, the market demand for intelligent computing chips (i.e. AI chips) is increasing, which is conducive to the rapid development of intelligent computing chips. In order to achieve the best match between the computing power demand of intelligent computing scenarios and the computing power supply of intelligent computing chips, downstream manufacturers of intelligent computing chips need to objectively evaluate the performance of intelligent computing chips.

[0003] Currently, the industry mostly uses the MLPerf benchmark to evaluate the performance of intelligent computing chips, so downstream manufacturers need to actually purchase a variety of intelligent computing chips, and use the intelligent computing chips to actually run the intelligent computing models specified by the MLPerf benchmark. The intelligent computing chips train and push the intelligent computing models, and obtain parameters such as the training time and model effect of the intelligent computing models. The computing power of the intelligent computing chips is evaluated based on these parameters. Finally, the computing power of the intelligent computing chips is combined to judge whether the computing power supply of the intelligent computing chips matches the computing power requirements of the intelligent computing scenarios.

[0004] However, due to the limited types of intelligent computing models included in the MLPerf benchmark, the MLPerf benchmark may not include the intelligent computing models used by downstream manufacturers in the computing power requirements of intelligent computing scenarios. In this case, using the MLPerf benchmark to test intelligent computing chips cannot obtain test results that meet the computing power requirements of intelligent computing scenarios. In addition, since the intelligent computing model needs to be actually run in the intelligent computing chip when testing with the MLPerf benchmark, downstream manufacturers need to actually purchase intelligent computing chips before testing, which will result in higher costs for downstream manufacturers. Summary of the invention

[0005] This application proposes a method, device and product for evaluating the adaptation of computing power application scenarios and intelligent computing chips, which can alleviate the technical problem that the MLPerf benchmark cannot be used for testing when the testing cost in related technologies is high and the MLPerf benchmark does not include the intelligent computing models used by downstream manufacturers to meet the computing power requirements of intelligent computing scenarios.

[0006] The first embodiment of the present application proposes a method for evaluating the compatibility of computing power application scenarios with intelligent computing chips, including:

[0007] Based on the computing amount of each operator included in the intelligent computing model in the computing power application scenario, predict the model computing power required when the intelligent computing model is applied to the set industry; and based on the parameter amount of each operator, calculate the model video memory storage required when the intelligent computing model is trained and pushed;

[0008] Based on the computing power of the model, the storage capacity of the model video memory and the chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip, the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model is calculated;

[0009] Based on the cost of each of the intelligent computing chips when completing the training of the intelligent computing model and the minimum training time of each of the intelligent computing chips, a selection scheme of intelligent computing chips that is compatible with the intelligent computing model is determined.

[0010] In one or more embodiments, based on the computational amount of each operator included in the intelligent computing model, predicting the model computing power required when the intelligent computing model is applied to a set field under a set industry includes:

[0011] Based on the computational amount of each operator included in the intelligent computing model, calculate the single computing power required for one forward conduction of the intelligent computing model;

[0012] The model computing power is calculated based on the single computing power and the parameters of the data required for training the intelligent computing model.

[0013] In one or more embodiments, based on the parameter amount of each operator, calculating the model video memory storage amount required when the intelligent computing model is trained and pushed includes:

[0014] Based on the parameter amount of each of the operators, calculate the parameter storage amount required for the intelligent computing model, the parameter storage amount required for the optimizer of the intelligent computing model, the input data storage amount and the output data storage amount of the intelligent computing model;

[0015] The model video memory storage capacity is obtained based on the parameter storage capacity required by the intelligent computing model, the parameter storage capacity required by the optimizer of the intelligent computing model, the input data storage capacity and the output data storage capacity.

[0016] In one or more embodiments, based on the model computing power, the model memory storage capacity, and chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip, the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model is calculated, including:

[0017] When the model memory storage capacity is less than or equal to the chip memory capacity included in the chip parameters, the actual peak computing power of the intelligent computing chip is calculated based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth; the minimum training and pushing time is calculated based on the model computing computing power and the actual peak computing power;

[0018] When the model video memory storage capacity is greater than the chip video memory capacity, the minimum number of intelligent computing chips required to complete the training and pushing of the intelligent computing model is calculated based on the model video memory storage capacity and the chip video memory capacity, and the minimum training and pushing time is calculated based on the model computing power, the minimum number of chips and the actual peak computing power.

[0019] In one or more embodiments, calculating the actual peak computing power of the intelligent computing chip based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth includes:

[0020] Calculating the product of the model computing-memory ratio and the chip memory bandwidth;

[0021] The minimum value of the result of the peak computing power and the product is taken as the actual peak computing power.

[0022] In one or more embodiments, based on the cost of each of the intelligent computing chips when the training of the intelligent computing model is completed and the minimum training time of each of the intelligent computing chips, determining an intelligent computing chip selection scheme adapted to the intelligent computing model includes:

[0023] Calculate the model training target of each intelligent computing chip based on the cost of each intelligent computing chip, the minimum training time, and the minimum number of chips of each intelligent computing chip required to complete the training of the intelligent computing model;

[0024] Obtaining a target model training target with the smallest value among the model training targets;

[0025] The selection scheme of the intelligent computing chip corresponding to the target training target of the target model is used as the selection scheme of the intelligent computing chip.

[0026] In one or more embodiments, before the target model is trained to infer the intelligent computing chip selection scheme corresponding to the target as the intelligent computing chip selection scheme, the method further includes:

[0027] Determine that the cost, minimum training time and minimum number of chips of the intelligent computing chip corresponding to the model training target with the smallest value among the model training targets all meet the preset constraints.

[0028] A second aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0029] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method described in the first aspect.

[0030] The fourth aspect embodiment of the present application proposes a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the method described in the first aspect.

[0031] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:

[0032] In an embodiment of the present application, the computing power of the computing model is calculated based on the computing amount of the operators included in the intelligent computing model in the computing power application scenario, the parameter amount of the operator is calculated, the storage capacity of the model video memory is calculated, and the computing power and chip parameters of the model are further calculated to calculate the minimum training and pushing time, and finally the intelligent computing chip selection scheme is determined based on the cost and minimum training and pushing time of the intelligent computing chip. The entire process does not require the actual operation of the intelligent computing model in the intelligent computing chip. With the help of the computing amount of the operators included in the intelligent computing model, the parameter amount and the chip parameters of the intelligent computing chip, the intelligent computing chip selection scheme adapted to the intelligent computing model can be obtained. Compared with the related technology, the cost of purchasing intelligent computing chips is saved. At the same time, even if the intelligent computing model is not included in the MLPerf benchmark, the solution of the present application can also obtain the best chip selection scheme adapted to the intelligent computing model.

[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.

[0035] In the attached picture:

[0036] Figure 1 A flow chart of a method for evaluating the compatibility of computing power application scenarios and intelligent computing chips provided in an embodiment of the present application is shown;

[0037] Figure 2 Another flow chart of a method for evaluating the compatibility between computing power application scenarios and intelligent computing chips provided in an embodiment of the present application is shown;

[0038] Figure 3 for Figure 2 A schematic diagram of the key elements of the method shown;

[0039] Figure 4A schematic diagram of the structure of a computing power application scenario and an adaptation evaluation device for an intelligent computing chip provided in an embodiment of the present application is shown;

[0040] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown;

[0041] Figure 6 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0042] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0043] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0044] The application of intelligent computing power is mainly distributed in the Internet, services, government, telecommunications, manufacturing, education, finance, transportation and other industries. With the rapid development of industry big models, the demand for intelligent computing power applications in various industries has increased dramatically. Intelligent computing models are an application of intelligent computing power, so it is necessary to predict the computing power needs of intelligent computing models.

[0045] Currently, the industry mostly uses the MLPerf benchmark as a standard for evaluating intelligent computing chips. The MLPerf benchmark defines a certain number of representative intelligent computing models. Each intelligent computing chip manufacturer uses these intelligent computing models specified in the MLPerf benchmark to actually measure the intelligent computing chips, measure the parameters that characterize the performance of the intelligent computing chips, such as the training and pushing time and model effect of the intelligent computing models in the intelligent computing chips, to evaluate the computing power of the intelligent computing chips. Although this method is more objective and can intuitively describe the actual performance of intelligent computing chips, it has a certain equipment cost because it requires the actual purchase of intelligent computing chips. And because the types of intelligent computing models included in the MLPerf benchmark are limited, the MLPerf benchmark may not include the intelligent computing models used by downstream manufacturers in the computing power requirements of intelligent computing scenarios, and does not meet the actual needs of downstream manufacturers.

[0046] In order to alleviate the technical problems existing in the related art, the embodiments of the present application provide a method, device and computer program product for evaluating the adaptation of computing power application scenarios and intelligent computing chips. The method is based on the computing amount of the operator included in the intelligent computing model in the computing power application scenario, the computing power of the computing model, the parameter amount of the operator, the storage capacity of the model video memory, and further based on the model computing power and chip parameters, the minimum training and pushing time is calculated, and finally based on the cost and minimum training and pushing time of the intelligent computing chip, the intelligent computing chip selection scheme is determined. The whole process does not require the actual operation of the intelligent computing model in the intelligent computing chip. With the help of the computing amount, parameter amount and chip parameters of the intelligent computing chip included in the intelligent computing model, the intelligent computing chip selection scheme adapted to the intelligent computing model can be obtained. Compared with the related art, the cost of purchasing intelligent computing chips is saved. At the same time, even if the intelligent computing model is not included in the MLPerf benchmark, the solution of the present application can also obtain the best chip selection scheme adapted to the intelligent computing model.

[0047] To facilitate understanding of this embodiment, we first introduce in detail a method for evaluating the compatibility of a computing power application scenario and an intelligent computing chip disclosed in an embodiment of the present application. The executor of the method for evaluating the compatibility of a computing power application scenario and an intelligent computing chip provided in an embodiment of the present application is generally a computer device with certain computing capabilities, such as a terminal device or a server or other processing device.

[0048] See also Figure 1 As shown, it is a flow chart of the method for evaluating the adaptation of computing power application scenarios and intelligent computing chips provided in an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps:

[0049] Step 101: Based on the computing amount of each operator included in the intelligent computing model in the computing power application scenario, predict the model computing power required when the intelligent computing model is applied to a set field under a set industry; and, based on the parameter amount of each operator, calculate the model video memory storage required when the intelligent computing model is trained.

[0050] Intelligent computing models usually include multiple operators, such as full connection, convolution, deconvolution, pooling, regularization, recurrent neural network structure, gated recurrent unit, long short-term memory network, word embedding, self-attention, multi-head self-attention, etc. The computational amount of an operator is usually expressed in floating-point operations (FLOPs). The computational amount required by different operators can be summarized according to their structure and computational rules.

[0051] The following takes the fully connected operator and the two-dimensional convolution operator as examples to list the calculation process of the operator's computational amount:

[0052] Fully connected operators, the required computational FLOPs:

[0053] 2×d in ×dout (Formula 1)

[0054] Among them, d in Indicates the input vector dimension, d out Indicates the output vector dimension. Assuming the fully connected operator input dimension is 100 and the output dimension is 10, the computing power required for one forward inference is 100*10*2 FLOPs.

[0055] Two-dimensional convolution operator, the required calculation FLOPs:

[0056] 2×c in ×k w ×k h ×c out ÷s (Formula 2)

[0057] Among them, c in Indicates the number of input channels, c out Indicates the number of output channels, k w , k h They represent the width and height of the two-dimensional convolution kernel respectively, and s represents the convolution stride.

[0058] During the application process, the intelligent computing model will process data in large batches multiple times. During this process, the computing power required for each intelligent computing model is the same. Therefore, the computing power is calculated by combining the data required for training the intelligent computing model and the single computing power of the intelligent computing model.

[0059] In one or more embodiments, based on the computational effort of each operator included in the intelligent computing model, the model computing power required when the intelligent computing model is applied to a set field under a set industry is predicted, including:

[0060] Based on the computational effort of each operator included in the intelligent computing model, the single computing power (f m );

[0061] The computing power of the calculation model is calculated based on the parameters of the single computing power and the data required for training and inference of the intelligent computing model.

[0062] It should be understood that the single computing power of the intelligent computing model is the sum of the computing power of each operator included in the intelligent computing model.

[0063] The parameters of the data required by the training and inference intelligent computing model are used to characterize the amount of data. The following describes the calculation process of the model computing power based on the two stages of training and inference that may be involved in the training and inference intelligent computing model.

[0064] Training phase:

[0065] During the model training process, the model batch data computing power ft is affected by the batch data size. bs :

[0066] ft bs =bs×f m (Formula 3)

[0067] Where bs represents the data batch size, f m For a single computing power.

[0068] Training computing power ft required for intelligent computing model m in industry i and application field d i,d,m Calculation method:

[0069] ft i,d,m =ds×e×fi m (Formula 4)

[0070] Among them, ft i,d,m represents the required training computing power, fi m It represents the computing power required for single data reasoning, e represents the training cycle, and ds represents the amount of data in the training database.

[0071] The calculation method of training computing power required for industry i is as follows:

[0072]

[0073] Among them, the training computing power required for industry i is the model computing power of the intelligent computing model in the training stage.

[0074] Reasoning stage:

[0075] The reasoning process is affected by the number of visits to the parallel reasoning service, and the parallel reasoning computing power is affected by the number of visits to the parallel reasoning service. bs :

[0076] fi ps =ps×f m (Formula 6)

[0077] Among them, ps represents the amount of parallel reasoning, f m For a single computing power.

[0078] Concurrent reasoning computing power fi required for intelligent computing model m in industry i and application field d i,d,m Calculation method:

[0079] fi i,d,m =infs×fi m (Formula 7)

[0080] Among them, i,d,m Indicates the concurrent reasoning computing power, and infs indicates the amount of parallel reasoning.

[0081] The calculation method of parallel reasoning power required by industry i is as follows:

[0082]

[0083] Among them, the parallel reasoning computing power required by industry i is the model calculation computing power of the intelligent computing model in the reasoning stage.

[0084] Taking model training as an example, assuming that the computing power required to forward transmit a piece of data in the model once is 10 FLOPs (floating-point operations), the model needs to be trained for 2 cycles, and 100 data are required to participate in the training of the model in each cycle, then the computing power required to complete the model training is 10*2*100 FLOPs.

[0085] It should be understood that the same industry, sub-industry or intelligent computing application manufacturer may face requirements for multiple intelligent models, different training data volumes, different inference concurrency, and different model effects. After estimating the model computing power of different intelligent computing models, the maximum training and inference power requirements are obtained as the intelligent computing requirements. Based on this data standard model and the computing power requirement assessment model, by adding intelligent computing application demand data, the intelligent computing requirements can be quickly assessed based on factors such as application fields, intelligent models, training data volumes, training cycles, and inference concurrency.

[0086] In this embodiment, the model memory storage capacity is jointly determined by the parameter storage capacity required by the intelligent computing model, the parameter storage capacity required by the optimizer, the input data storage capacity, and the output data storage capacity. Based on the differences between the training and reasoning stages involved in the training and reasoning intelligent computing model, the model memory storage capacity can be further divided into the storage capacity required for reasoning m i And the storage required for training m t Among them, the storage required for training is m t is the sum of these four storage capacities, and the required storage capacity m is inferred i It is the sum of the parameter storage, input data storage, and output data storage required by the intelligent computing model.

[0087] The parameter storage capacity required by the intelligent computing model is determined based on the model structure, and the sum of the parameter storage capacity of each operator included in the intelligent computing model is the parameter storage capacity of the intelligent computing model. The parameter storage capacity of an operator is the product of the parameter capacity of the operator and the parameter storage accuracy.

[0088] The following describes the calculation process of operator parameters using the fully connected operator and two-dimensional convolution computing power as examples:

[0089] The parameter quantity of the fully connected operator is:

[0090] d in ×d out +d out (Formula 9)

[0091] Among them, d in Indicates the input vector dimension, d out Indicates the output vector dimension.

[0092] Two-dimensional convolution operator, its parameters are:

[0093] c in ×k w ×k h =(c out +1) (Formula 10)

[0094] Among them, c in Indicates the number of input channels, c out Indicates the number of output channels, k w , k h They represent the width and height of the two-dimensional convolution kernel respectively.

[0095] The same method is used to count the number of parameters of all operators. The parameter storage amount is calculated based on different parameter storage precisions. Taking float32 type as an example, the parameter storage amount of the fully connected operator is (d in ×d out +d out )×4bytes, the parameter storage capacity of the intelligent computing model n params By calculating the parameter storage of different operators and accumulating them, the parameter storage required by the intelligent computing model is calculated according to the parameter accuracy. params .

[0096] The amount of video memory required for model training is mainly affected by the size of the batch data. The batch input data and the data output by each layer of operators need to be saved. According to the data accuracy, the storage required for the input data is calculated. input And output data m output of storage capacity.

[0097] The amount of storage required for input data depends on the type, m input =bs×m d , where bs represents the batch size, m d Indicates the size of input data. For example, a multi-dimensional matrix of floating-point numbers is used as input data. By calculating the number of all its floating-point numbers, the amount of storage required is calculated. The output data is generated by the forward feedback calculation of the deep network. The storage capacity of the single data forward feedback calculation result is m f , m f The value is related to the depth of the network. Different models have different outputs. The storage capacity of the output is also related to the batch size. Therefore, m output =bs×m f .

[0098] During the training phase, since key parameters such as gradient and momentum need to be recorded during the training process, different optimizers need to record different key parameters. Generally, the optimizer key parameters may be 1 to 3 times the model parameters. Therefore, the storage required by the optimizer can be expressed as m opt =coef×m params , where coef represents the storage coefficient of different optimizers.

[0099] It should be understood that in the inference phase, the model inference process depends on the amount of concurrent inference, so m input , m output Affected by the amount of inference concurrency.

[0100] Step 102: Calculate the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model based on the model computing power, the model video memory storage capacity, and the chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip.

[0101] Among them, the chip parameters used to describe the performance of the intelligent computing chip can be derived from the data standard of the intelligent computing chip. As an example, the data standard of the intelligent computing chip shown in Table 1 is given:

[0102] Table 1

[0103]

[0104]

[0105] In Table 1, video memory, video memory bandwidth, peak computing power, interconnection bandwidth, computing power interconnection coefficient, energy consumption, etc. are the core performance parameters of intelligent computing chips. Based on these parameters, the model computing power required by the intelligent computing model can be adapted to the computing power of the intelligent computing chip. In order to achieve subsequent adaptation and measurement, the intelligent computing chip should have the above public key parameters. If a parameter is not available, the missing parameter should be estimated based on relevant public materials or evaluation data. Automatic estimation methods can also be used to obtain the estimated value through cluster analysis based on the relationship between chip manufacturers, series, and models.

[0106] In this embodiment, based on whether a single chip can meet the training and reasoning requirements of the intelligent computing model, the following steps are given to calculate the minimum training and reasoning time:

[0107] When the model memory storage capacity is less than or equal to the chip memory capacity st included in the chip parameters, the actual peak computing power of the intelligent computing chip is calculated based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth; based on the model computing computing power and the actual peak computing power, the minimum training and pushing time is calculated;

[0108] When the model memory capacity is greater than the chip memory capacity, the minimum number of intelligent computing chips required to complete the training and inference of the intelligent computing model is calculated based on the model memory capacity and the chip memory capacity ( ), calculate the minimum training and pushing time based on the model calculation power, the minimum number of chips and the actual peak computing power.

[0109] It should be understood that if the model memory capacity is less than or equal to the chip memory capacity, it means that the single chip can meet the training and push application of the intelligent computing model. Conversely, if the model memory capacity is greater than the chip memory capacity, it means that the single chip cannot meet the training and push application of the intelligent computing model.

[0110] On the premise that a single chip meets the training and push requirements of the intelligent computing model, the actual peak computing power that a single chip can actually achieve is affected by the model computing-memory ratio. peak , model computing-storage ratio, calculate the actual peak computing power f that a single chip can actually achieve max , the specific calculation method is:

[0111] f max =min(f peak , f model ÷m×bd) (Formula 11)

[0112] Among them, f model ÷m represents the model storage ratio, f model It represents the number of operations required for model training and pushing, and m represents the storage required for inference or training.

[0113] It should be understood that based on the two stages of training and reasoning that may be involved in the training-pushing intelligent computing model, the actual peak computing power can be specifically divided into training peak computing power and reasoning peak computing power. When m in Formula 11 represents the storage required for reasoning, the actual peak computing power calculated by Formula 11 is the reasoning peak computing power. When m in Formula 11 represents the storage required for training, the actual peak computing power calculated by Formula 11 is the reasoning peak computing power. Furthermore, the minimum training-pushing time can be further subdivided into minimum training time and minimum reasoning time, where:

[0114] Minimum training time:

[0115] Tt = ft i,d,m ÷f max (Formula 12)

[0116] The minimum inference time is:

[0117] Ti=fi i,d,m ÷f max (Formula 13)

[0118] Where, the actual peak computing power f in formula 12 is maxFor training peak computing power, ft i,d,m is the training computing power required for industry i; the actual peak computing power f in formula 13 max is the peak computing power for inference, ft i,d,m To meet the parallel reasoning computing power required for industry i.

[0119] In actual application scenarios, under the premise that a single chip meets the training and inference requirements of the intelligent computing model, data parallelism can be used to speed up training or inference. In this case, the minimum training time can be Tt data for:

[0120] Tt data =ft i,d,m ÷f max ÷n gpu +t p (Formula 14)

[0121] where n gpu represents the number of parallel chips, t p Indicates the time required for model parameter synchronization, estimated by communication bandwidth. Minimum inference time Ti data for:

[0122] Ti data =fi i,d,m ÷f max ÷n gpu (Formula 15)

[0123] When a single chip cannot meet the training and inference requirements of the intelligent computing model, a model parallel or hybrid parallel distributed mode can be used. Due to the complexity of model parallelism and hybrid parallelism, the pipeline parallel method is used as an example to simplify the adaptive calculation method. In the model training and inference process, the model is evenly divided into a multi-chip environment according to the pipeline. Based on the two stages of training and inference involved in the training and inference of the intelligent computing model, the minimum number of chips includes the minimum number of chips required for training. Minimum number of chips required for inference in:

[0124] Minimum number of chips required for training The calculation formula can be simplified as:

[0125]

[0126] Among them, m t is the storage required for training, and st is the chip memory.

[0127] Similarly, the minimum number of chips required for inference The calculation formula can be simplified as:

[0128]

[0129] Among them, m i is the storage required for reasoning, and st is the chip video memory.

[0130] The minimum training time is Tt model for:

[0131] Tt model =ft i,d,m ÷f max +t gpus (Formula 18)

[0132] where t gpus Indicates the multi-chip interconnect data transmission time.

[0133] The same pipeline parallel method minimizes the inference time Ti model for:

[0134] Ti model =fi i,d,m ÷f max +t′ gpus (Formula 19)

[0135] Among them, t′ gpus Represents the multi-chip interconnect data transmission time during inference.

[0136] Step 103: Determine an intelligent computing chip selection scheme that is compatible with the intelligent computing model based on the cost of each intelligent computing chip when the training and promotion of the intelligent computing model is completed and the minimum training and promotion time of each intelligent computing chip.

[0137] In one or more embodiments, determining the intelligent computing chip selection scheme may include the following steps:

[0138] Calculate the model training target for each intelligent computing chip based on the cost of each intelligent computing chip, the minimum training time, and the minimum number of chips required to complete the training of the intelligent computing model.

[0139] Obtain the target model training target with the smallest value among the model training targets;

[0140] The selection scheme of the intelligent computing chip corresponding to the target model training and pushing target is used as the intelligent computing chip selection scheme.

[0141] It should be understood that, under the premise that a single chip meets the training and push requirements of the intelligent computing model, two types of minimum training and push times can be obtained based on whether data parallel methods are used to speed up training or reasoning. One type is the minimum training and push time calculated without using data parallel methods to speed up training or reasoning, and the other type is the minimum training and push time calculated when data parallel methods are used to speed up training or reasoning.

[0142] It should be understood that the selection plan for the intelligent computing chip corresponding to the target model training target includes the cost of the intelligent computing chip corresponding to the target model training target, the minimum number of chips, the minimum training time, and the parameters used to uniquely identify the intelligent computing chip.

[0143] The following formula describes the selection process of the intelligent computing chip selection scheme:

[0144] According to the actual selection requirements, a multi-objective and multi-constrained intelligent chip selection model is established. The decision variable is the indicator variable x i , indicating whether to select a chip i. i =1, indicating that chip i is selected, otherwise, chip i is not selected. Variable n i Indicates the number of selected chips i, when x i = 0, n i =0; when x i =1, n i ≥0.

[0145] In the face of intelligent computing application requirements, assuming that there are currently N types of intelligent computing chips that meet the requirements, a multi-objective chip selection model is established:

[0146] Minimize the number of chips:

[0147]

[0148] Minimize the amount of power consumption, w i Represents the power of chip i:

[0149] Training energy consumption:

[0150] Reasoning energy consumption:

[0151] Minimize smart chip costs:

[0152]

[0153] Mixed target, α, β, γ, δ represent the corresponding target factors, and the mixed target sets different single target combinations:

[0154] min(α×n+β×p t +γ×p i +δ×c). (Equation 24)

[0155] In the application, in order to meet the actual application needs, the selection scheme of the intelligent computing chip corresponding to the target model training and inference target is used as the intelligent computing chip selection scheme, and it also includes:

[0156] Determine that the cost of the intelligent computing chip, the minimum training time, and the minimum number of chips corresponding to the model training target with the smallest value among the model training targets all meet the preset constraints.

[0157] When companies in different industries select intelligent computing chips for edge clouds, they will select different types of intelligent computing chips based on actual training and push application scenarios and effects. The main selection criteria include:

[0158] The minimum standard single-chip selection that meets the storage capacity of model training and push services.

[0159] The model training and promotion service can complete the minimum standard selection of a single chip within a certain time frame.

[0160] The minimum number of chips required to meet the model training and storage requirements is selected.

[0161] The model training and promotion service can complete the minimum standard selection of distributed multi-chips within a certain time frame.

[0162] Minimum standard selection of single chip or distributed multi-chip considering chip cost.

[0163] Considering the needs of model training and pushing, and considering the minimum selection of single-chip or distributed multi-chip models that are green and energy-saving in operation and maintenance.

[0164] Consider localization factors or ecological considerations and choose chips that meet the needs of model training and pushing.

[0165] Based on the above goals, the following related constraints can be added.

[0166] Consider the stability of the selection technology and choose a type of chip:

[0167] Indicator variable x i and chip number variable n i Relationship: If x i =0,n i =0.

[0168] The chip needs to meet the minimum chip quantity: n i =0or n i ≥n min_i , n min_ Indicates the minimum number of chips required for intelligent model training.

[0169] Meet the training time requirements, Tt model / n i ×n min_i ≤Tt max , Tt max Indicates the maximum acceptable training time for the model. Ti model / n i ×nmin_i ≤Ti max , Ti max Indicates the minimum acceptable training time for the model.

[0170] Integrated chip power requirement constraints: w i ≤w max , w max Indicates the maximum acceptable chip power.

[0171] Localization or ecological demand constraints: If the chip does not meet the localization or ecological requirements, then x i =0.

[0172] Based on the above objectives and constraints, combinatorial optimization is used to obtain a chip selection solution for the intelligent application model.

[0173] In the solution provided in this embodiment, the computing power of the computing model is calculated based on the computing amount of the operators included in the intelligent computing model in the computing power application scenario, the computing power of the computing model is calculated based on the parameter amount of the operator, the storage capacity of the model video memory is calculated, and the computing power and chip parameters of the model are further calculated to calculate the minimum training and pushing time, and finally the intelligent computing chip selection scheme is determined based on the cost and minimum training and pushing time of the intelligent computing chip. The entire process does not require the actual operation of the intelligent computing model in the intelligent computing chip. With the help of the computing amount of the operators included in the intelligent computing model, the parameter amount and the chip parameters of the intelligent computing chip, the intelligent computing chip selection scheme adapted to the intelligent computing model can be obtained. Compared with the related technology, the cost of purchasing intelligent computing chips is saved. At the same time, even if the intelligent computing model is not included in the MLPerf benchmark, the solution of this application can also obtain the best chip selection scheme adapted to the intelligent computing model.

[0174] The present application also provides a method for evaluating the compatibility of computing power application scenarios with intelligent computing chips. Figure 2 As shown, the method may include the following steps:

[0175] Step 201: General evaluation of computing power requirements for industry intelligent computing applications;

[0176] Step 202: Intelligent computing model data standards and computing power requirements assessment;

[0177] Step 203: Obtaining intelligent computing chip data standards and key performance parameters;

[0178] Step 204: A method for adapting the computing power required for training and pushing the intelligent computing model to the computing power of the intelligent computing chip;

[0179] Step 205: Selecting intelligent computing chips;

[0180] Step 206: Intelligent computing chip selection and key indicator calculation.

[0181] Figure 2The key parameters and key technologies in each link of the process are shown. The entire process is divided into six parts from front to back, including the computing power demand evaluation model of industry intelligent computing applications, intelligent model data standards and computing power demand estimation methods, intelligent computing chip data standards and key performance parameter models, the computing power required for intelligent model training and intelligent chip computing power adaptation methods, the general method for intelligent computing chip selection, the intelligent chip selection plan and key indicator calculation methods. Please refer to Figure 3 , Figure 3 for Figure 2 The key elements and core technologies in the method shown.

[0182] The embodiment of the present application also provides a computing power application scenario and intelligent computing chip adaptation evaluation device, which is used to execute the computing power application scenario and intelligent computing chip adaptation evaluation method provided in any of the above embodiments. Figure 4 As shown, the device comprises:

[0183] The processing module 41 is used to predict the model computing power required when the intelligent computing model is applied to a set industry based on the computing power of each operator included in the intelligent computing model in the computing power application scenario; and calculate the model video memory storage required when the intelligent computing model is trained and pushed based on the parameter amount of each operator;

[0184] A calculation module 42 is used to calculate the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model based on the model computing power, the model memory storage capacity and the chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip;

[0185] The determination module 43 is used to determine an intelligent computing chip selection scheme that is compatible with the intelligent computing model based on the cost of each intelligent computing chip when completing the training and pushing of the intelligent computing model and the minimum training and pushing time of each intelligent computing chip.

[0186] In one or more embodiments, the processing module 41 is used to:

[0187] Based on the computational amount of each operator included in the intelligent computing model, calculate the single computing power required for one forward conduction of the intelligent computing model;

[0188] The model computing power is calculated based on the single computing power and the parameters of the data required for training the intelligent computing model.

[0189] In one or more embodiments, the processing module 41 is used to:

[0190] Based on the parameter amount of each of the operators, calculate the parameter storage amount required for the intelligent computing model, the parameter storage amount required for the optimizer of the intelligent computing model, the input data storage amount and the output data storage amount of the intelligent computing model;

[0191] The model video memory storage capacity is obtained based on the parameter storage capacity required by the intelligent computing model, the parameter storage capacity required by the optimizer of the intelligent computing model, the input data storage capacity and the output data storage capacity.

[0192] In one or more embodiments, the computing module 42:

[0193] When the model memory storage capacity is less than or equal to the chip memory capacity included in the chip parameters, the actual peak computing power of the intelligent computing chip is calculated based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth; the minimum training and pushing time is calculated based on the model computing computing power and the actual peak computing power;

[0194] When the model video memory storage capacity is greater than the chip video memory capacity, the minimum number of intelligent computing chips required to complete the training and pushing of the intelligent computing model is calculated based on the model video memory storage capacity and the chip video memory capacity, and the minimum training and pushing time is calculated based on the model computing power, the minimum number of chips and the actual peak computing power.

[0195] In one or more embodiments, the computing module 42:

[0196] Calculating the product of the model computing-memory ratio and the chip memory bandwidth;

[0197] The minimum value of the result of the peak computing power and the product is taken as the actual peak computing power.

[0198] In one or more embodiments, the determination module 43 is used to:

[0199] Calculate the model training target of each intelligent computing chip based on the cost of each intelligent computing chip, the minimum training time, and the minimum number of chips of each intelligent computing chip required to complete the training of the intelligent computing model;

[0200] Obtaining a target model training target with the smallest value among the model training targets;

[0201] The selection scheme of the intelligent computing chip corresponding to the target training target of the target model is used as the selection scheme of the intelligent computing chip.

[0202] The adaptation evaluation device for computing power application scenarios and intelligent computing chips provided in the embodiment of the present application and the adaptation evaluation method for computing power application scenarios and intelligent computing chips provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0203] The present application also provides an electronic device to perform the above-mentioned computing power application scenario and intelligent computing chip adaptation evaluation method. Figure 5It shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 5 As shown, the electronic device 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, and the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; the memory 801 stores a computer program that can be run on the processor 800, and when the processor 800 runs the computer program, it executes the adaptation evaluation method of the computing power application scenario and the intelligent computing chip provided in any of the aforementioned embodiments of the present application.

[0204] The memory 801 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0205] The bus 802 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 801 is used to store programs, and the processor 800 executes the program after receiving the execution instruction. The computing power application scenario and the adaptation evaluation method of the intelligent computing chip disclosed in any implementation method of the aforementioned embodiment of the present application can be applied to the processor 800, or implemented by the processor 800.

[0206] The processor 800 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 800. The above processor 800 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the above method in combination with its hardware.

[0207] The electronic device provided in the embodiment of the present application and the adaptation evaluation method of the computing power application scenario and the intelligent computing chip provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0208] The present application also provides a computer-readable storage medium corresponding to the computing power application scenario and the intelligent computing chip adaptation evaluation method provided in the above-mentioned embodiment. Please refer to Figure 6 The computer-readable storage medium shown is a CD 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by the processor, it will execute the adaptation evaluation method of the computing power application scenario and the intelligent computing chip provided in any of the aforementioned implementation methods.

[0209] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0210] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the adaptation evaluation method for computing power application scenarios and intelligent computing chips provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0211] It should be noted that:

[0212] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.

[0213] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0214] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0215] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for evaluating the compatibility between computing power application scenarios and intelligent computing chips, characterized in that: include: Based on the computing power of each operator included in the intelligent computing model in the computing power application scenario, predict the model computing power required when the intelligent computing model is applied to the set industry; And, based on the parameter quantity of each of the operators, calculating the model video memory storage quantity required when the intelligent computing model is trained and pushed; Based on the computing power of the model, the storage capacity of the model video memory and the chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip, the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model is calculated; Based on the cost of each of the intelligent computing chips when completing the training of the intelligent computing model and the minimum training time of each of the intelligent computing chips, a selection scheme of intelligent computing chips that is compatible with the intelligent computing model is determined.

2. The method according to claim 1, characterized in that Based on the computational effort of each operator included in the intelligent computing model, the model computing power required when the intelligent computing model is applied to a set field under a set industry is predicted, including: Based on the computational amount of each operator included in the intelligent computing model, calculate the single computing power required for one forward conduction of the intelligent computing model; The model computing power is calculated based on the single computing power and the parameters of the data required for training the intelligent computing model.

3. The method according to claim 1, characterized in that Based on the parameter quantity of each operator, the model video memory storage quantity required when the intelligent computing model is trained and pushed is calculated, including: Based on the parameter amount of each of the operators, calculate the parameter storage amount required for the intelligent computing model, the parameter storage amount required for the optimizer of the intelligent computing model, the input data storage amount and the output data storage amount of the intelligent computing model; The model video memory storage capacity is obtained based on the parameter storage capacity required by the intelligent computing model, the parameter storage capacity required by the optimizer of the intelligent computing model, the input data storage capacity and the output data storage capacity.

4. The method according to claim 1, characterized in that: Based on the computing power of the model, the storage capacity of the model video memory, and chip parameters of each intelligent computing chip used to describe the performance of the intelligent computing chip, the minimum training time required for each intelligent computing chip to complete the training of the intelligent computing model is calculated, including: When the model memory storage capacity is less than or equal to the chip memory capacity included in the chip parameters, the actual peak computing power of the intelligent computing chip is calculated based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth; the minimum training and pushing time is calculated based on the model computing computing power and the actual peak computing power; When the model video memory storage capacity is greater than the chip video memory capacity, the minimum number of intelligent computing chips required to complete the training and pushing of the intelligent computing model is calculated based on the model video memory storage capacity and the chip video memory capacity, and the minimum training and pushing time is calculated based on the model computing power, the minimum number of chips and the actual peak computing power.

5. The method according to claim 4, characterized in that Based on the model computing-memory ratio of the intelligent computing model, the peak computing power included in the chip parameters, and the chip memory bandwidth, calculating the actual peak computing power of the intelligent computing chip, including: Calculating the product of the model computing-memory ratio and the chip memory bandwidth; The minimum value of the result of the peak computing power and the product is taken as the actual peak computing power.

6. The method according to claim 1, characterized in that Based on the cost of each of the intelligent computing chips when the training and pushing of the intelligent computing model is completed and the minimum training and pushing time of each of the intelligent computing chips, determining an intelligent computing chip selection scheme adapted to the intelligent computing model includes: Calculate the model training target of each intelligent computing chip based on the cost of each intelligent computing chip, the minimum training time, and the minimum number of chips of each intelligent computing chip required to complete the training of the intelligent computing model; Obtaining a target model training target with the smallest value among the model training targets; The selection scheme of the intelligent computing chip corresponding to the target training target of the target model is used as the selection scheme of the intelligent computing chip.

7. The method according to claim 6, characterized in that Before using the intelligent computing chip selection scheme corresponding to the target model training and inference target as the intelligent computing chip selection scheme, the method further includes: Determine that the cost, minimum training time and minimum number of chips of the intelligent computing chip corresponding to the model training target with the smallest value among the model training targets all meet the preset constraints.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor runs the computer program to implement the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-chip-particle chip operator placement strategy generation method based on deep reinforcement learning

    CN115828831A

  • Neural network reasoning acceleration method, target detection method, equipment and storage medium

    CN116702835A

  • Artificial intelligence performance evaluation method and device and electronic equipment

    CN117389820A

  • Vehicle electronic device and operating method for the same

    KR1020240176038A

  • Neural network compilation method and apparatus, device, and storage medium

    WO2023029589A1

Cited By

  • Target training strategy determination method for single-model chip computing power cluster and related device

    CN119808944A

  • MCU chip adaptation evaluation method

    CN120276352A

  • A MCU chip adaptation evaluation method

    CN120276352B