MPI parameter tuning method, device, storage medium and electronic device
By combining the random algorithm and deep learning method, the automatic adjustment of MPI parameters solves the problem of not high parameter tuning efficiency in existing technologies, and achieves more efficient and accurate parameter tuning.
Patent Information
- Application Number
- CN202111059993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-09-10
AI Technical Summary
In the prior art, parameter tuning efficiency is not high, and it relies on manual adjustment of parameters, which is inefficient and has the risk of incomplete testing.
By combining random algorithms and deep learning methods, automatically adjust the MPI parameters, and use multiple general parameter combinations to train the general parameter tuning model, combined with non -general parameter combinations for application tests to determine the optimal parameter.
Improve the efficiency and accuracy of parameter tuning, reduce artificial intervention, and can find the right parameter combination faster.
Smart Images

Figure CN113760766B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of parameter tuning, and in particular to a method, device, storage medium and electronic device for tuning message passing interface (MPI) parameters. Background Art
[0002] Currently, during the operation of high-performance computing applications, appropriate parameters need to be adjusted according to the machine's hardware and software environment to achieve the best performance.
[0003] However, existing parameter tuning mainly relies on manual adjustment, which requires comparing the test results of a large number of test parameter combinations to be determined.
[0004] Therefore, there is at least a problem in the prior art that the parameter tuning efficiency is low. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, storage medium and electronic device for tuning MPI parameters to solve the problem of low parameter tuning efficiency in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a method for tuning MPI parameters, wherein the MPI parameters include multiple universal parameter combinations and multiple non-universal parameter combinations, and the tuning method includes: randomly selecting a non-universal parameter combination that has not been selected from multiple non-universal parameter combinations; in the case of a fixed non-universal parameter combination, training a universal parameter tuning model using multiple universal parameter combinations to obtain a convergence result of the universal parameter tuning model, and using the convergence result as the final universal parameter combination; performing application testing using the non-universal parameter combination and the final universal parameter combination to obtain a test result; if it is determined that the test result is not an unimproved test result for the Nth consecutive time, then proceeding to the step of randomly selecting a non-universal parameter combination that has not been selected from multiple non-universal parameter combinations; if it is determined that the test result is an unimproved test result for the Nth consecutive time, determining the optimal MPI parameters based on the non-universal parameter combination and the final universal parameter combination, wherein N is a positive integer.
[0007] Therefore, the embodiment of the present application realizes automatic tuning of parameters by combining random algorithms and deep learning methods, which can not only improve the tuning efficiency but also improve the accuracy of parameter tuning compared to the existing manual tuning method.
[0008] In a possible embodiment, the tuning method further includes: performing application testing using a non-universal parameter combination to collect application running data during the application testing process; and storing the application running data as experience data in an experience pool.
[0009] In one possible embodiment, a general parameter tuning model is trained using multiple general parameter combinations to obtain a convergence result of the general parameter tuning model, and the convergence result is used as the final general parameter combination, including: randomly extracting target experience data from an experience pool; selecting a general parameter combination that has not been selected from multiple general parameter combinations, and training the general parameter tuning model using the target experience data and the general parameter combination to obtain an output result of the general parameter tuning model; if it is determined that the output result converges, the output result is used as the final general parameter combination; if it is determined that the output result does not converge, then proceed to the step of randomly extracting target experience data from the experience pool.
[0010] In one possible embodiment, the universal parameter tuning model is trained using target experience data and the universal parameter combination to obtain the output result of the universal parameter tuning model, including: inputting the target experience data and the universal parameter combination into an encoder to obtain feature coding; and training the universal parameter tuning model using the feature coding to obtain the output result of the universal parameter tuning model.
[0011] In a second aspect, an embodiment of the present application provides a tuning device for the parameters of an information transmission interface MPI, wherein the MPI parameters include multiple general parameter combinations and multiple non-general parameter combinations, and the tuning device includes: a selection module, used to randomly select a non-general parameter combination that has not been selected from multiple non-general parameter combinations; a training module, used to train a general parameter tuning model using multiple general parameter combinations under a fixed non-general parameter combination to obtain a convergence result of the general parameter tuning model, and use the convergence result as the final general parameter combination; an application test module, used to perform application testing using the non-general parameter combination and the final general parameter combination to obtain a test result; a determination module, used to trigger the selection module if it is determined that the test result is not a test result that has not been improved for the Nth consecutive time, and if it is determined that the test result is a test result that has not been improved for the Nth consecutive time, determine the optimal MPI parameters based on the non-general parameter combination and the final general parameter combination, where N is a positive integer.
[0012] In a possible embodiment, the tuning device further includes: a test storage module, which is used to: perform application testing using a non-universal parameter combination to collect application running data during the application testing process; and store the application running data as experience data in an experience pool.
[0013] In one possible embodiment, the training module is specifically used to: randomly extract target experience data from an experience pool; select a universal parameter combination that has not been selected from multiple universal parameter combinations, and use the target experience data and the universal parameter combination to train the universal parameter tuning model to obtain the output result of the universal parameter tuning model; if it is determined that the output result converges, the output result is used as the final universal parameter combination; if it is determined that the output result does not converge, jump to the step of randomly extracting target experience data from the experience pool.
[0014] In a possible embodiment, the training module is specifically used to: input the target experience data and the universal parameter combination into the encoder to obtain feature coding; and train the universal parameter tuning model using the feature coding to obtain the output result of the universal parameter tuning model.
[0015] In a third aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and the computer program is executed by a processor to execute the method described in the first aspect or any optional implementation of the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the method described in the first aspect or any optional implementation method of the first aspect is performed.
[0017] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0018] In order to make the above-mentioned objectives, features and advantages to be achieved by the embodiments of the present application more obvious and understandable, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram showing an application scenario provided by an embodiment of the present application is shown;
[0021] Figure 2A flow chart of a method for tuning MPI parameters provided in an embodiment of the present application is shown;
[0022] Figure 3 A specific flow chart of a method for tuning MPI parameters provided in an embodiment of the present application is shown;
[0023] Figure 4 A flowchart of a general parameter tuning method provided in an embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of the structure of a target network provided in an embodiment of the present application is shown;
[0025] Figure 6 A schematic diagram of a strategy network provided in an embodiment of the present application is shown;
[0026] Figure 7 A structural block diagram of an MPI parameter tuning device provided in an embodiment of the present application is shown;
[0027] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0030] At present, the existing parameter tuning methods mainly rely on the experience of engineers, constantly trying to combine various parameters, manually comparing the experimental results, and finally finding a more suitable parameter. However, the existing parameter tuning methods have at least the following problems:
[0031] Manual parameter adjustment is inefficient and carries the risk of incomplete testing.
[0032] Manual testing is also unable to achieve long-term (e.g., 24 / 7) continuous testing;
[0033] Since manual experiments take a long time, conclusions are often drawn without sufficient verification, which leads to statistical data bias and the inability to reproduce the experiment.
[0034] The parameter tuning process of different high-performance computing applications strongly depends on the experience of the tuner, which is difficult to preserve and transfer.
[0035] Based on this, the embodiment of the present application cleverly proposes a method for tuning MPI parameters, which realizes automatic tuning of parameters by combining random algorithms and deep learning methods. Compared with the existing manual tuning method, it can not only improve the tuning efficiency, but also improve the accuracy of parameter tuning.
[0036] In order to facilitate understanding of the embodiments of the present application, some terms involved in the embodiments of the present application are explained as follows:
[0037] "MPI": It can refer to a common parallel communication program interface in the field of high-performance computing.
[0038] "High-performance computing applications": It can refer to applications developed based on the MPI interface.
[0039] "Common parameters": These parameters are related to the MPI interface and are applicable to all MPI-based applications. They do not require additional parsing during application development.
[0040] For example, common parameters may refer to parameters that are the same for all high performance computing applications, such as interface parameters.
[0041] "Non-generic parameters": They can refer to parameters that are specific to a particular application and are parsed and processed separately during the development of the application.
[0042] For example, non-generic parameters may refer to performance parameters that are strongly related to the application.
[0043] "Probe": It refers to a program used to collect application running status, running on each computing node. And, it generally collects data such as node CPU, memory, communication bandwidth, etc. in the form of an independent process.
[0044] See also Figure 1 , Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application is shown. Figure 1 As shown, the application scenario may include a login node, a first computing node and a second computing node, wherein the first computing node and the second computing node are both in communication connection with the login node.
[0045] It should be understood that the specific device of the login node can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0046] For example, the login node can be a single server or a cluster.
[0047] Correspondingly, the specific equipment of the first computing node and the specific equipment of the second computing node can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0048] Among them, the first computing node may be installed with an application that belongs to the same type of application (or a similar application) as the target high-performance computing application to be configured in the second node, so that the login node can adjust the MPI parameters of the target high-performance computing application in the second node based on the historical application operation data (or historical experience data) of the application that belongs to the same type of application as the target application on the first computing node.
[0049] It should be noted here that although Figure 1 A specific application scenario is shown, but those skilled in the art should understand that the application scenario can also be set according to actual needs, and the embodiments of the present application are not limited to this.
[0050] For example, although Figure 1 Two computing nodes are shown, but those skilled in the art should understand that the application scenario may also include more computing nodes.
[0051] See also Figure 2 , Figure 2 FIG. 1 is a flow chart showing a method for tuning MPI parameters provided by an embodiment of the present application. Figure 2 The method for tuning the MPI parameters shown includes the following steps:
[0052] Step S210: The login node randomly selects a non-universal parameter combination that has not been selected from a plurality of non-universal parameter combinations.
[0053] Step S220, the login node trains the universal parameter tuning model using multiple universal parameter combinations while fixing the selected non-universal parameter combination to obtain a convergence result of the universal parameter tuning model, and uses the convergence result as the final universal parameter combination.
[0054] Step S230: The login node performs application testing using the non-universal parameter combination and the final universal parameter combination to obtain a test result.
[0055] Step S240: The login node determines whether the test result is the Nth consecutive unimproved test result, where N is a positive integer.
[0056] It should be understood that the specific value of N can be set according to actual needs, and the embodiments of the present application are not limited thereto.
[0057] For example, N can be 6, 10, 15, etc.
[0058] In addition, if it is determined that the test result is not the Nth consecutive unimproved test result, return to step S210; if it is determined that the test result is the Nth consecutive unimproved test result, execute step S250.
[0059] Step S250: The login node determines the optimal MPI parameters according to the non-universal parameter combination and the final universal parameter combination.
[0060] Therefore, the embodiment of the present application realizes automatic tuning of parameters by combining random algorithms and deep learning methods, which can not only improve the tuning efficiency but also improve the accuracy of parameter tuning compared to the existing manual tuning method.
[0061] It should be noted here that although the above description takes the method of tuning MPI parameters executed by the login node as an example, technical personnel in this field should understand that the method of tuning MPI parameters can also be executed by other nodes connected to the login node, and the embodiments of the present application are not limited to this.
[0062] In order to facilitate understanding of the embodiments of the present application, a description is given below using specific embodiments.
[0063] See also Figure 3 , Figure 3 FIG. 4 shows a specific flow chart of a method for tuning MPI parameters provided in an embodiment of the present application. Figure 3 The method for tuning the MPI parameters shown includes the following steps:
[0064] Step S310: The login node parses the configuration file of the target high performance computing application to obtain MPI parameters.
[0065] Specifically, the login node can parse the configuration file of the high-performance computing application to be configured (or referred to as the application to be configured) of the target computing node, so that the login node can determine that the parameters of the high-performance computing application to be configured may include MPI parameters and custom parameters, and then the login node can extract the MPI parameters from the parameters of the high-performance computing application to be configured.
[0066] In addition, the MPI parameters may include multiple common parameters and multiple non-common parameters, and for the high-performance computing application to be configured, each item to be configured corresponding to each MPI parameter has multiple candidate items.
[0067] For example, for the first configuration item of the high-performance computing application to be configured, it may correspond to P general parameters or M non-general parameters, that is, it is necessary to select a general parameter from the P general parameters to configure the first configuration item, or it is necessary to select a non-general parameter from the M non-general parameters to configure the first configuration item. Wherein, P and M are both positive integers, and the P value or N value corresponding to each configuration item can be set according to actual needs.
[0068] That is to say, the MPI parameters may include multiple general parameter combinations and multiple non-general parameter combinations, that is, when there are multiple general configuration items for the high-performance computing application to be configured, each of the multiple general configuration items can be set with a general parameter, so the multiple general parameters that configure the multiple general configuration items can be regarded as a general parameter combination.
[0069] In addition, non-universal parameter combinations are similar and will not be repeated here. For details, please refer to the relevant description of the above-mentioned universal parameter combinations.
[0070] Step S320: The login node starts a probe on each computing node among the multiple computing nodes.
[0071] Specifically, a performance monitoring program may be provided on the login node, and probes may be deployed on multiple computing nodes connected to the login node. The probes may collect application running data during the configuration process of the high-performance computing application to be configured, and may also collect running data during the configuration process of applications that belong to the same category of applications as the high-performance computing application to be configured (which may be applications that have been configured or applications that are in the configuration process).
[0072] For example, when a first probe is deployed on a first node, the login node can configure a first high-performance computing application on the first node, and can collect historical application operation data during the configuration process of the first high-performance computing application through the first probe. At the same time, when a second probe is deployed on a second node and the second node has a second high-performance computing application that belongs to the same category of applications as the first high-performance computing application, historical application operation data during the configuration process of the high-performance computing application can also be collected through the second probe. Since the adjustment process of MPI parameters belonging to the same category of applications can be referenced to each other, subsequent login nodes can refer to the historical application operation data during the configuration process of the second high-performance computing application, so that the first high-performance computing application can be quickly and accurately configured.
[0073] It should be noted here that for common parameters, common parameters are the same parameters for all high-performance computing applications, and the number of these parameters is relatively fixed, so it is easy to inherit the results of previous tuning in other high-performance computing applications.
[0074] Subsequently, the login node can store the collected historical application operation data into a preset experience pool.
[0075] Step S330, the login node selects a non-universal parameter combination that has not been selected from multiple non-universal parameter combinations using a random algorithm, and can collect historical application running data during the application test through a probe, and can store the historical application running data in an experience pool.
[0076] It should be understood that the specific algorithm of the random algorithm can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0077] For example, the random algorithm may be a Monte Carlo algorithm or a Las Vegas algorithm.
[0078] It should also be understood that historical application running data refers to running data of computing nodes during configuration of a high-performance application to be configured, and may also refer to running data of computing nodes during configuration of an application belonging to the same category as the high-performance application to be configured.
[0079] It should also be understood that the specific data of the historical application operation data can also be set according to actual needs, and the embodiments of the present application are not limited to this.
[0080] For example, the historical application running data may include CPU data (eg, CPU temperature, etc.), mainboard data (eg, mainboard temperature, etc.), and the like.
[0081] Correspondingly, other application operation data are similar and will not be described again later. For details, please refer to the relevant description of the above historical application operation data.
[0082] In order to facilitate understanding of the embodiments of the present application, a description is given below using specific embodiments.
[0083] Specifically, the login node can randomly select a non-universal parameter combination that has not been selected from multiple non-universal parameter combinations, and use the initial universal parameter combination and the current non-universal parameters to perform application testing on the high-performance application to be configured, so as to collect historical application operation data during the application testing process of the high-performance application to be configured, and the historical application operation data can be stored in the experience pool.
[0084] It should be understood that the initial universal parameter combination may be any universal parameter combination among a plurality of universal parameter combinations, and may also be pre-set, and the embodiments of the present application are not limited thereto.
[0085] Step S340, the login node trains the universal parameter tuning model using multiple universal parameter combinations while fixing the non-universal parameter combination to obtain a convergence result of the universal parameter tuning model, and uses the convergence result as the final universal parameter combination.
[0086] It should be noted that the specific process of step S340 can be found in the following Figure 4 The relevant description will not be described in detail here.
[0087] Step S350: The login node performs application testing using the non-universal parameter combination and the final universal parameter combination to obtain a test result.
[0088] Specifically, the login node may send a test instruction carrying the general parameter combination and the final general parameter combination to the corresponding computing node, and the corresponding computing node may use the general parameter combination and the final general parameter combination to test the high-performance computing application to be configured, and then perform application testing to obtain test results, and finally send the test results to the login node. Correspondingly, the login node may obtain the test results.
[0089] Step S360: The login node determines whether the test result is the Nth consecutive unimproved test result.
[0090] When it is determined that the test result is the Nth consecutive unimproved test result (i.e., the test result has been unimproved for N-1 consecutive times before, and it can be determined whether the test result is also an unimproved test result, and if so, it is the Nth consecutive unimproved test result), execute step S370; when it is determined that the test result is not the Nth consecutive unimproved test result, return to step S330.
[0091] It should be noted here that the embodiment of the present application determines whether the test result is the Nth consecutive unimproved test result by comparing the test result with the latest benchmark result. If the current test result is better than the latest benchmark result, the current test result is an improved test result; if the current test result is not better than the latest benchmark result, the current test result is an unimproved test result.
[0092] It should also be noted here that the latest benchmark results in the embodiments of the present application can be updated in real time.
[0093] For example, when the first test result is compared with the initial benchmark result, if the first test result is better than the initial benchmark result, the first test result can be used as the latest benchmark result; when the second test result is compared with the latest benchmark result, if the second test result is not better than the most recent benchmark result, the latest benchmark result remains unchanged (i.e., it is still the first test result); and when the third test result is compared with the latest benchmark result, if the third test result is better than the most recent benchmark result, the third test result can be used as the latest benchmark result.
[0094] Step S370: The login node determines the optimal MPI parameters according to the non-universal parameter combination and the final universal parameter combination.
[0095] Specifically, since the MPI parameters include common parameters and non-common parameters, the login node can determine the optimal MPI parameters according to the non-common parameter combination and the final common parameter combination.
[0096] To facilitate understanding of step S340, a specific embodiment is used to describe it below.
[0097] Specifically, see Figure 4 , Figure 4 FIG. 1 is a flow chart showing a method for tuning a general parameter provided in an embodiment of the present application. Figure 4 The tuning methods shown include:
[0098] Step S410: the login node randomly extracts target experience data from a preset experience pool.
[0099] It should be understood that the target experience data may be application operation data related to the current high performance computing application to be configured, or application operation data of an application belonging to the same category of applications as the current high performance computing application to be configured.
[0100] It should be noted here that the random algorithm used in step S410 can also be set according to actual needs, and the embodiments of the present application are not limited to this.
[0101] Step S420: the login node inputs the target experience data and the universal parameter combination into the encoder to obtain feature coding, wherein the universal parameter combination here can be selected from a plurality of universal parameter combinations.
[0102] It should be understood that the specific model of the encoder can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0103] Optionally, the encoder may be an encoder in a target network. The target network may be in the form of an auto-encoder, and its internal structure may also be configured according to actual needs, but the embodiments of the present application are not limited thereto.
[0104] For example, see Figure 5 , Figure 5 FIG. 1 shows a schematic diagram of a target network structure provided by an embodiment of the present application. Figure 5 The target network shown includes an encoder and a decoder. When the running feature data is a 224-dimensional vector (i.e., input 224-dimensional data), it is sent to the target network with the following structure as input and output at the same time, and the intermediate encoding result vector is constructed in 128 dimensions. At the same time, the encoder Encoder can be composed of two 1024-dimensional fully connected layers plus one 128-dimensional fully connected layer, and the decoder Decoder consists of a 512-dimensional fully connected layer plus two 1024-dimensional fully connected layers, and finally 224-dimensional data is used as the output during training.
[0105] In order to facilitate understanding of the embodiments of the present application, a description is given below using specific embodiments.
[0106] Specifically, the target network can adopt an autoencoder structure, whose encoder receives the input target experience data and current general parameters, and outputs feature coding (i.e., intermediate coding results), and then calculates the target experience data and current general parameters collected at this moment as output through the decoder. The training goal is to make the input and output of the target network as consistent as possible.
[0107] In addition, the embodiment of the present application may use the feature encoding output by the encoder as the input of a subsequent general parameter tuning model to predict the optimal general parameters.
[0108] Step S430: the login node trains the general parameter tuning model using the feature coding to obtain the output result of the general parameter tuning model. The training goal of the general parameter tuning model is to optimize the performance target field result in the feature coding.
[0109] It should be understood that the specific model of the general parameter tuning model can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0110] For example, the general parameter tuning model may be a policy network.
[0111] It should also be understood that the specific network structure of the policy network can also be set according to actual needs, and the embodiments of the present application are not limited to this.
[0112] For example, see Figure 6 , Figure 6 FIG. 1 shows a schematic diagram of a strategy network provided by an embodiment of the present application. Figure 6 The policy network shown includes three 1024-dimensional fully connected layers, a 512-dimensional fully connected layer, and a 256-dimensional fully connected layer connected in sequence, and the input of the policy network can be 128-dimensional data and the output is 16-dimensional data.
[0113] Step S440: The login node determines whether the output result of the general parameter tuning model converges.
[0114] If it is determined that the output result converges, step S450 is executed; if it is determined that the output result does not converge, the process returns to step S420.
[0115] Step S450: Use the output result as the final universal parameter.
[0116] Specifically, during the training process of the general parameter tuning model, after multiple rounds of training, the output result of the general parameter tuning model will converge to a fixed feature vector (ie, the output result), and thus the output result can be taken as the final general parameter.
[0117] It should be noted here that, as mentioned earlier, it is necessary to collect application running data during the configuration process of the high-performance computing application to be configured. Therefore, after obtaining the current output result in step S430, the current output result can be used to perform application testing to collect application running data. That is, the collection process of application running data exists not only in the random selection process of non-general parameters, but also in the tuning process of general parameters.
[0118] It should be understood that the above-mentioned method for tuning the MPI parameters is only exemplary, and those skilled in the art may make various modifications based on the above-mentioned method, and the modified or deformed contents are also within the protection scope of this application.
[0119] See also Figure 7 , Figure 7 The structural block diagram of an MPI parameter tuning device 700 provided in an embodiment of the present application is shown. It should be understood that the tuning device 700 corresponds to the above method embodiment and can execute each step of the above method embodiment. The specific functions of the tuning device 700 can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here. The tuning device 700 includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the tuning device 700. Specifically, the tuning device 700 includes:
[0120] A selection module 710, configured to randomly select a non-universal parameter combination that has not been selected from a plurality of non-universal parameter combinations;
[0121] A training module 720 is used to train the universal parameter tuning model using multiple universal parameter combinations in the case of a fixed non-universal parameter combination to obtain a convergence result of the universal parameter tuning model, and use the convergence result as the final universal parameter combination;
[0122] An application testing module 730 is used to perform application testing using a non-universal parameter combination and a final universal parameter combination to obtain a test result;
[0123] The determination module 740 is used to trigger the selection module if it is determined that the test result is not the Nth consecutive unimproved test result. If it is determined that the test result is the Nth consecutive unimproved test result, the optimal MPI parameters are determined based on the non-universal parameter combination and the final universal parameter combination, where N is a positive integer.
[0124] In a possible embodiment, the tuning device 700 also includes: a test storage module (not shown), which is used to: perform application testing using a non-universal parameter combination to collect application running data during the application testing process; and store the application running data as experience data in an experience pool.
[0125] In one possible embodiment, the training module 720 is specifically used to: randomly extract target experience data from the experience pool; randomly extract target experience data from the experience pool; select a universal parameter combination that has not been selected from multiple universal parameter combinations, and use the target experience data and the universal parameter combination to train the universal parameter tuning model to obtain the output result of the universal parameter tuning model; if it is determined that the output result converges, the output result is used as the final universal parameter combination; if it is determined that the output result does not converge, go to the step of randomly extracting target experience data from the experience pool.
[0126] In a possible embodiment, the training module 720 is specifically used to: input the target experience data and the general parameter combination into the encoder to obtain feature coding; and train the general parameter tuning model using the feature coding to obtain the output result of the general parameter tuning model.
[0127] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0128] See also Figure 8 , Figure 8 The structural block diagram of an electronic device 800 provided in an embodiment of the present application is shown. The electronic device 800 may include a processor 810, a communication interface 820, a memory 830 and at least one communication bus 840. Among them, the communication bus 840 is used to realize the direct connection and communication of these components. Among them, the communication interface 820 in the embodiment of the present application is used to communicate signaling or data with other devices. The processor 810 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 810 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 field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 810 can also be any conventional processor, etc.
[0129] The memory 830 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 830 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 810, the electronic device 800 may execute the various steps in the above method embodiment.
[0130] The electronic device 800 may further include a storage controller, an input / output unit, an audio unit, and a display unit.
[0131] The memory 830, storage controller, processor 810, peripheral interface, input / output unit, audio unit, and display unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 840. The processor 810 is used to execute the executable module stored in the memory 830. Furthermore, the electronic device 800 is used to execute the following method: randomly selecting a non-universal parameter combination that has not been selected from the multiple non-universal parameter combinations; while fixing the non-universal parameter combination, training the universal parameter tuning model using the multiple universal parameter combinations to obtain a convergence result of the universal parameter tuning model, and using the convergence result as the final universal parameter combination; performing application testing using the non-universal parameter combination and the final universal parameter combination to obtain a test result; if it is determined that the test result is not an unimproved test result for the Nth consecutive time, then going to the step of randomly selecting a non-universal parameter combination that has not been selected from the multiple non-universal parameter combinations; if it is determined that the test result is an unimproved test result for the Nth consecutive time, then determining the optimal MPI parameters based on the non-universal parameter combination and the final universal parameter combination, where N is a positive integer.
[0132] The input and output unit is used to provide input data to the user to realize the interaction between the user and the server (or local terminal). The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0133] The audio unit provides an audio interface to the user and may include one or more microphones, one or more speakers, and audio circuitry.
[0134] The display unit provides an interactive interface (e.g., a user operation interface) between the electronic device and the user or is used to display image data for the user's reference. In this embodiment, the display unit may be a liquid crystal display or a touch display. If it is a touch display, it may be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more locations on the touch display, and the sensed touch operations are handed over to the processor for calculation and processing.
[0135] Understandably, Figure 8 The structure shown is for illustration only. The electronic device 800 may also include Figure 8 More or fewer components as shown, or with Figure 8 Different configurations shown. Figure 8 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0136] The present application also provides a storage medium, on which a computer program is stored. When a processor runs the computer program, the method described in the method embodiment is executed.
[0137] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method, and will not be elaborated here.
[0139] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0140] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0141] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0142] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0143] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for tuning parameters of a message passing interface MPI, characterized in that: The MPI parameters include a plurality of general parameter combinations and a plurality of non-general parameter combinations, and the tuning method includes: Randomly selecting a non-universal parameter combination that has not been selected from the multiple non-universal parameter combinations; Under the condition that the non-universal parameter combination is fixed, the universal parameter tuning model is trained using the multiple universal parameter combinations and the data extracted from the experience pool to obtain a convergence result of the universal parameter tuning model, and the convergence result is used as the final universal parameter combination; Performing an application test using the non-universal parameter combination and the final universal parameter combination to obtain a test result; If it is determined that the test result is not the Nth consecutive unimproved test result, then proceed to the step of randomly selecting a non-universal parameter combination that has not been selected from the multiple non-universal parameter combinations; if it is determined that the test result is the Nth consecutive unimproved test result, then determine the optimal MPI parameter according to the non-universal parameter combination and the final universal parameter combination, where N is a positive integer; The tuning method further includes: Performing application testing using the non-universal parameter combination to collect application operation data during the application testing process; storing the application operation data as experience data in an experience pool; Among them, the application running data includes: application running data during the configuration process of the high-performance computing application to be configured, and running data during the configuration process of applications belonging to the same type of application as the high-performance computing application to be configured; wherein the running data during the configuration process of applications of the same type of application can be used to configure high-performance computing applications to be configured other than itself.
2. The tuning method according to claim 1, characterized in that: The method of training the general parameter tuning model by using the plurality of general parameter combinations and the data extracted from the experience pool to obtain a convergence result of the general parameter tuning model, and using the convergence result as a final general parameter combination, includes: randomly extracting target experience data from the experience pool; Selecting a general parameter combination that has not been selected from the multiple general parameter combinations, and training the general parameter tuning model using the target experience data and the general parameter combination to obtain an output result of the general parameter tuning model; If it is determined that the output result converges, the output result is used as the final universal parameter combination; if it is determined that the output result does not converge, the process proceeds to the step of randomly extracting target experience data from the experience pool.
3. The tuning method according to claim 2, characterized in that: The step of training the general parameter tuning model by using the target experience data and the general parameter combination to obtain an output result of the general parameter tuning model includes: Inputting the target experience data and the general parameter combination into an encoder to obtain feature encoding; The general parameter tuning model is trained using the feature encoding to obtain an output result of the general parameter tuning model.
4. A device for tuning parameters of an information transfer interface MPI, characterized in that: The MPI parameters include a plurality of general parameter combinations and a plurality of non-general parameter combinations, and the tuning device is used to execute the method according to claim 1, comprising: A selection module, used for randomly selecting a non-universal parameter combination that has not been selected from the multiple non-universal parameter combinations; A training module, used for training the universal parameter tuning model by using the plurality of universal parameter combinations while fixing the non-universal parameter combination, so as to obtain a convergence result of the universal parameter tuning model, and taking the convergence result as the final universal parameter combination; An application testing module, used to perform application testing using the non-universal parameter combination and the final universal parameter combination to obtain a test result; A determination module is used to trigger the selection module if it is determined that the test result is not the Nth consecutive unimproved test result, and if it is determined that the test result is the Nth consecutive unimproved test result, determine the optimal MPI parameters based on the non-universal parameter combination and the final universal parameter combination, wherein N is a positive integer.
5. The tuning device according to claim 4, characterized in that: The training module is specifically used to: randomly extract target experience data from the experience pool; select a universal parameter combination that has not been selected from the multiple universal parameter combinations, and use the target experience data and the universal parameter combination to train the universal parameter tuning model to obtain an output result of the universal parameter tuning model; If it is determined that the output result converges, the output result is used as the final universal parameter combination; if it is determined that the output result does not converge, the process proceeds to the step of randomly extracting target experience data from the experience pool.
6. The tuning device according to claim 5, characterized in that: The training module is specifically used to: input the target experience data and the general parameter combination into an encoder to obtain feature coding; and use the feature coding to train the general parameter tuning model to obtain the output result of the general parameter tuning model.
7. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for tuning the MPI parameters as claimed in any one of claims 1 to 3 is executed.
8. An electronic device, characterized in that: The electronic device includes: a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the MPI parameter tuning method as described in any one of claims 1 to 3 is performed.
Citation Information
Patent Citations
Machine learning based method for predicating parameters during MPI (message passing interface) optimal operation in multi-core environments
CN102708404A
Distributed parallel deep neural network performance evaluation method for super computer
CN112434785A
Automatic tuning of communication protocol performance
US20090129277A1