Method and device for predicting performance of application program in heterogeneous system

By employing a dual-channel neural network and a phased transfer learning strategy, the high cost and low accuracy issues of large-scale program performance prediction in heterogeneous systems are addressed, achieving low-cost, high-accuracy performance prediction and supporting program optimization and resource scheduling.

CN121255593APending Publication Date: 2026-01-02COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511452898.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing technologies lack effective methods for predicting application performance in heterogeneous computing systems. In particular, they are costly, inaccurate, and have poor extrapolation capabilities for large-scale programs, making it difficult to support iterative optimization and cross-platform adaptability.

Method used

By employing a dual-channel neural network architecture that combines program behavior and hardware constraints, a performance model is constructed through small-scale program modeling and a phased transfer training strategy, enabling low-cost and high-precision prediction of performance trends for large-scale programs.

Benefits of technology

It enables reliable prediction of the performance of large-scale programs under resource-constrained conditions, significantly improves prediction accuracy and cross-platform adaptability, reduces measurement costs, and provides support for program optimization and resource scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255593A_ABST
    Figure CN121255593A_ABST
Patent Text Reader

Abstract

The invention discloses an application program performance prediction method and device under a heterogeneous system, and belongs to the technical field of system performance prediction.The method comprises the steps that S100, small-scale programs are extracted from large-scale parallel programs to be predicted; s200, running the small-scale program on a target heterogeneous system, and collecting performance data related to a hardware architecture; s300, constructing a performance model based on the performance data; s400, training the performance model by adopting a staged migration training strategy; and S500, inputting the program parameters of the large-scale parallel program into the performance model, and outputting a performance trend prediction result on the current heterogeneous system. According to the method, large-scale performance prediction with low cost, high precision and strong extrapolation is realized through a representative small-scale program, a dual-channel neural network and staged migration training.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of system performance prediction, and more particularly to a method and device for predicting performance of an application program in a heterogeneous system. BACKGROUND

[0002] With the wide application of heterogeneous computing systems, performance optimization of large-scale parallel programs (such as scientific computing, deep learning, and big data processing) faces severe challenges. Developers need to know the performance of a program on a target system before deployment, but traditional methods have significant drawbacks: Full-scale measurement method directly runs the complete program to obtain performance data, which is highly accurate but extremely costly, especially for programs that need to run on thousands of cores, which takes hours for a single experiment, making it difficult to support iterative optimization. Analytical modeling methods (such as Roofline model and LogP model) estimate the performance upper limit based on theoretical formulas. Such methods rely on strong assumptions (such as ideal communication and no interference), have large prediction errors in complex heterogeneous systems, and are difficult to capture the behavior details of real programs. Pure data-driven models (such as XGBoost and SVR) use machine learning to fit performance data. However, most models are "black boxes" that lack modeling of program behavior evolution rules, have poor extrapolation ability, and have poor generalization performance under small samples. Simulation and instrumentation tools (such as Gem5 and PAPI) can obtain fine-grained information, but simulation is slow, instrumentation introduces overhead, and it is difficult to accurately model the complex interactions of modern heterogeneous systems.

[0003] In addition, existing technologies generally lack effective support for the core requirement of "extrapolating from small scale to large scale", and do not fully combine the coupling relationship between program behavior evolution rules and hardware constraints.

[0004] Therefore, how to provide a method and device for predicting performance of an application program in a heterogeneous system is a problem that needs to be solved by those skilled in the art. SUMMARY

[0005] Therefore, the present application provides a method and device for predicting performance of an application program in a heterogeneous system, which has low cost, high precision, strong extrapolation ability, and can reliably predict the performance trend of large-scale programs under resource-limited conditions.

[0006] To achieve the above purpose, the present application adopts the following technical solutions: A method for predicting performance of an application program in a heterogeneous system, comprising: S100: extracting a small-scale program from a large-scale parallel program to be predicted, wherein the small-scale program is selected by analyzing the computing mode and communication mode of the large-scale parallel program to retain key performance characteristics; S200: running the small-scale programs on the target heterogeneous system and collecting performance data related to the hardware architecture; S300: constructing a performance model based on the performance data, the performance model establishing a mapping relationship between program parameters and system performance indicators through a dual-channel neural network architecture, and incorporating the hardware characteristic description of the heterogeneous system, wherein the first channel learns the scale-invariant features of program behavior, and the second channel models the performance bottleneck evolution law under hardware constraints; S400: training the performance model using a phased migration training strategy, first pre-training the model on multiple source heterogeneous platforms to learn general program behavior patterns, and then fine-tuning on the target platform to improve prediction accuracy under small samples; S500: inputting the program parameters of the large-scale parallel program into the performance model, and outputting the performance trend prediction results on the current heterogeneous system.

[0007] Preferably, the computing mode includes computing density, floating point operation intensity, and memory access mode, and the communication mode includes message passing frequency, communication data volume, and communication topology structure.

[0008] Preferably, the S100 further comprises: dimensionality reduction and pattern recognition of the execution trajectory of the large-scale parallel program through cluster analysis or principal component analysis, and selection of a representative small-scale program subset.

[0009] Preferably, the performance data includes execution time, resource utilization, and communication cost.

[0010] Preferably, the performance model adopts a dual-channel feedforward neural network expression as follows: ; In the formula, is the predicted performance indicator; x is the program parameter vector; h is the hardware feature vector; f prog is the program behavior channel; f hw is the hardware constraint channel; α ∈ [0, 1] is a dynamic fusion weight, 、 are trainable parameters of the two channels.

[0011] Preferably, the S300 comprises: inputting the program parameters for scale normalization processing, the expression being: ; wherein N is the problem size of the current program; P is the parallel task number of the current program; N0 is the benchmark problem size; P0 is the benchmark parallel degree; is the normalized problem size; is the normalized parallel degree; The behavior evolution feature is extracted to quantify the rate of communication overhead growth with scale, as a key input feature, expressed as:

[0012] In the formula, is the communication ratio under the problem scale N and parallelism P; N1, P1 are configuration parameters of a smaller scale program; N2, P2 are configuration parameters of a larger scale program, and N2>N1; ΔR comm is the rate of change of the communication ratio with the logarithm of the problem scale.

[0013] Preferably, the staged migration training strategy comprises: The dual-channel model is trained, and the target is to minimize: ; Wherein is the total loss function value of the pre-training stage; M is the total number of samples used for pre-training; w i is the weight coefficient of the i-th sample; P i is the actual measured performance value of the i-th sample; is the predicted performance value of the i-th sample by the model; λ is the L2 regularization coefficient; is the square of the L2 norm of all trainable parameters of the model; θ is the complete set of trainable parameters of the model, including the weight matrix and bias vector of each layer in the dual-channel neural network; The fine-tuning on the target platform comprises: Running 5-10 groups of small-scale representative programs on the target heterogeneous system to collect performance data; Loading the pre-trained model, and fine-tuning only the hardware channel and the fusion gating network; Using a low learning rate for fast convergence.

[0014] An electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements an application program performance prediction method under a heterogeneous system when executing the computer program.

[0015] Compared with the prior art, the application provides an application program performance prediction method under a heterogeneous system, which models the scale normalization and behavior evolution feature, can accurately predict scales far beyond the training range, avoids the overfitting problem of small scales of traditional models, uses a staged training strategy to enable the model to quickly adapt to a new platform, only needs a small amount of measured data, significantly improves the deployment efficiency, uses a fusion weight and attention mechanism to reveal the source of the current performance bottleneck, assists developers in decision-making, and combines the physical intuition of performance modeling and the flexibility of data-driven design through a dual-channel design. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram of the method flow provided by the present invention. Detailed Implementation

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

[0019] This invention relates to the interdisciplinary fields of high-performance computing, system performance modeling, and machine learning, specifically to a method for performance prediction of massively parallel applications in heterogeneous computing systems (such as CPU-GPU and CPU-FPGA hybrid architectures). It is particularly suitable for predicting the execution time, resource bottlenecks, and scalability trends of massively parallel programs through modeling with small-scale representative programs, providing decision support for program optimization, resource scheduling, and system selection. The purpose of this invention is to overcome the problems of high measurement costs, low prediction accuracy, weak extrapolation capabilities, and poor cross-platform adaptability in existing performance prediction technologies. It provides a performance prediction method that integrates the evolutionary laws of program behavior with the characteristics of heterogeneous hardware, achieving high-precision large-scale performance trend prediction based on small-scale experiments, significantly improving the practicality and engineering value of the prediction model.

[0020] Example 1: See Figure 1 This invention discloses a method for predicting application performance in heterogeneous systems, comprising: S100: Extract small-scale programs from the massively parallel program to be predicted, wherein the small-scale programs are selected by analyzing the computation and communication patterns of the massively parallel program to retain key performance characteristics. S200: Run the small-scale program on the target heterogeneous system and collect performance data related to the hardware architecture; S300: based on the performance data, a performance model is constructed, the performance model establishes the mapping relationship between the program parameters and the system performance indicators through a double-channel neural network architecture, and the hardware characteristic description of the heterogeneous system is integrated, wherein the first channel learns the scale-invariant features of the program behavior, and the second channel models the performance bottleneck evolution law under the hardware constraint; S400: the performance model is trained by adopting a staged migration training strategy, the model is pre-trained on a plurality of source heterogeneous platforms to learn the general program behavior mode, and then fine-tuned on the target platform to improve the prediction accuracy under a small sample; S500: the program parameters of the large-scale parallel program are input into the performance model, and a performance trend prediction result on the current heterogeneous system is output.

[0021] Specifically, the calculation mode includes calculation density, floating point operation intensity and memory access mode, and the communication mode includes message passing frequency, communication data volume and communication topology structure.

[0022] Specifically, S100 further comprises: dimension reduction and pattern recognition are performed on the execution trajectory of the large-scale parallel program through clustering analysis or principal component analysis, and a small-scale program subset with representativeness is selected.

[0023] Specifically, the performance data includes execution time, resource utilization and communication cost.

[0024] Specifically, the performance model adopts a double-channel feedforward neural network expression as follows: ; In the formula, is a predicted performance indicator; x is a program parameter vector; h is a hardware feature vector; f prog () is a program behavior channel; f hw () is a hardware constraint channel; alpha is a dynamic fusion weight in [0, 1], are trainable parameters of the two channels.

[0025] Specifically, the double-channel structure of the present application simulates the physical idea of Amdahl's law and the communication delay bandwidth model, but realizes nonlinear and self-adaptive modeling through a neural network, which is superior to the traditional fixed mode.

[0026] Specifically, S300 comprises: The input program parameters are subjected to scale normalization processing, and the expression is as follows: ; Wherein, N is the problem size of the current program; P is the parallel task number of the current program; N0 is the benchmark problem size; P0 is the benchmark parallel degree. ​normalized problem size; normalized parallelism; Specifically, by normalization, the model learns relative scale changes rather than absolute values, significantly improving extrapolation ability for unseen large scales.

[0027] Extract the behavior evolution feature, which is used to quantify the rate of communication overhead growth with scale, as a key input feature, the expression is:

[0028] In the formula, is the communication ratio under the problem size N and parallelism P; N1, P1 are the configuration parameters of the smaller scale program; N2, P2 are the configuration parameters of the larger scale program, and N2>N1; ΔR comm is the rate of change of the communication ratio with the logarithmic growth of the problem size.

[0029] Specifically, the evolution feature enables the model to identify whether the communication bottleneck intensifies with scale, thereby more accurately predicting performance degradation at large scales.

[0030] Specifically, the staged migration training strategy includes: Train the dual-channel model, the goal is to minimize: ; Where is the total loss function value of the pre-training stage; M is the total number of samples used for pre-training; w i is the weight coefficient of the i-th sample; P i is the actual measured performance value of the i-th sample; is the predicted performance value of the i-th sample by the model; λ is the L2 regularization coefficient; is the square of the L2 norm of all trainable parameters of the model; θ is the complete set of trainable parameters of the model, including the weight matrix and bias vector of each layer in the dual-channel neural network; Specifically, by introducing sample weights, the model pays more attention to training samples similar to the target program behavior, improving the effectiveness of transfer learning; L2 regularization ensures the generalization ability of the model.

[0031] Fine-tuning on the target platform includes: Run 5-10 small-scale representative programs on the target heterogeneous system to collect performance data; Load the pre-trained model and fine-tune only the hardware channel and fusion gate network; Use a low learning rate for fast convergence.

[0032] Specifically, the phased migration training strategy of the application significantly reduces the dependence on the measured data of the target platform, realizes small sample rapid modeling, and has outstanding engineering practicability.

[0033] In another aspect, the embodiment of the application further discloses an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements an application performance prediction method under a heterogeneous system when executing the computer program.

[0034] Embodiment 2: This embodiment is based on the performance prediction of the MPI fluid dynamics program on the GPU cluster.

[0035] First, program analysis and small-scale selection: Target program: three-dimensional fluid simulation (MPI+CUDA), original scale 1024 3 , using 512 GPUs.

[0036] Analysis shows that the calculation intensity is high (12 FLOPs / Byte), and each step is all-reduce communication, R comm ∝N 2 / 3 .

[0037] The representative small scale is selected as: 64 3 (8 GPUs), 128 3 (32 GPUs), keeping the same communication frequency and calculation intensity ratio.

[0038] Performance data collection: Run the small-scale program on the NVIDIA A100+InfiniBand cluster.

[0039] Use Nsight Systems, PAPI to collect: execution time T; GPU SM utilization, memory bandwidth B mem ; MPI communication delay L comm , bandwidth B link ; A total of 8 sets of training data are obtained.

[0040] The model training process is as follows: Build a double-channel model: Input: , Rcomm, ΔR comm , h=[B mem , L net , f GPU ] Program channel: 3-layer MLP (128-64-32); Hardware channel: 3-layer MLP + attention mechanism; Gating network output α.

[0041] Pre-training stage: 80 groups of data from 3 GPU clusters are used to train for 200 epochs, and the validation error is <9%.

[0042] Fine-tuning stage: load the pre-trained model, fine-tune the hardware channel on the target platform for 50 epochs (learning rate 1 4 ).

[0043] Large-scale prediction and analysis: Input N = 1024 3 , P = 512, predicted execution time = 2.32 hours; Actual running T = 2.43 hours, relative error 4.5%; Model output α = 0.28, indicating that the performance is mainly limited by the bandwidth of hardware interconnection, and it is recommended to optimize the communication algorithm.

[0044] The weak expansion efficiency of the prediction on 1024 GPUs is 68%, and the communication overhead accounts for 65%, which verifies the bottleneck judgment.

[0045] The present application proposes a high-performance prediction method that combines program behavior evolution rules and heterogeneous hardware characteristics. Through the innovative architecture of representative small-scale programs, double-channel neural networks and phased migration training, low-cost, high-precision, strong extrapolation large-scale performance prediction is achieved.

[0046] Specifically, the present application has been verified to be effective on multiple heterogeneous platforms, and has significant technical progress and industrial application value.

[0047] In the specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between each embodiment can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the method part.

[0048] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting application performance in a heterogeneous system, characterized in that, include: S100: Extract small-scale programs from the massively parallel program to be predicted, wherein the small-scale programs are selected by analyzing the computation and communication patterns of the massively parallel program to retain key performance characteristics. S200: Run the small-scale program on the target heterogeneous system and collect performance data related to the hardware architecture; S300: Based on the performance data, a performance model is constructed. The performance model establishes a mapping relationship between program parameters and system performance indicators through a dual-channel neural network architecture and incorporates the hardware characteristic description of heterogeneous systems. The first channel learns the scale-invariant features of program behavior, and the second channel models the evolution law of performance bottlenecks under hardware constraints. S400: The performance model is trained using a phased transfer training strategy. First, the model is pre-trained on multiple heterogeneous platforms to learn general program behavior patterns, and then fine-tuned on the target platform to improve the prediction accuracy under small sample conditions. S500: Input the program parameters of the massively parallel program into the performance model and output the performance trend prediction results on the current heterogeneous system.

2. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The computing mode includes computing density, floating-point operation intensity, and memory access mode, and the communication mode includes message passing frequency, communication data volume, and communication topology.

3. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The S100 further includes: performing dimensionality reduction and pattern recognition on the execution trajectory of a large-scale parallel program through cluster analysis or principal component analysis, and selecting a representative small-scale subset of programs.

4. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The performance data includes execution time, resource utilization, and communication costs.

5. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The performance model, expressed using a dual-channel feedforward neural network, is as follows: ; In the formula, For predicting performance metrics; x is the program parameter vector; h is the hardware feature vector; f prog () represents the program behavior channel; f hw () represents the hardware constraint channel; α∈[0,1] represents the dynamic fusion weight. , These are the trainable parameters for the two channels.

6. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The S300 includes: The input program parameters are scale-normalized using the following expression: ; Where N is the problem size of the current program; P is the number of parallel tasks in the current program; N0 is the baseline problem size; and P0 is the baseline parallelism. This represents the normalized problem size. This represents the normalized parallelism. We extract behavioral evolution features to quantify the rate at which communication overhead grows with scale, serving as key input features. The expression is as follows: In the formula, Let N be the communication ratio under problem size N and parallelism P; N1 and P1 are configuration parameters for smaller programs; N2 and P2 are configuration parameters for larger programs, where N2 > N1; ΔR comm The rate of change of the communication ratio as the logarithm of the problem size increases.

7. The method for predicting application performance in a heterogeneous system according to claim 1, characterized in that, The phased transfer training strategy includes: The goal of training a dual-channel model is to minimize: ; in The total loss function value during the pre-training phase; M is the total number of samples used in the pre-training phase; w i P represents the weight coefficient of the i-th sample; i This represents the actual measured performance value of the i-th sample. Let be the model's prediction performance value for the i-th sample; λ is the L2 regularization coefficient. θ is the squared L2 norm of all trainable parameters of the model; θ is the set of all trainable parameters of the model, including the weight matrix and bias vector of each layer in the two-channel neural network. The fine-tuning on the target platform includes: Run 5-10 small-scale representative programs on the target heterogeneous system and collect performance data; Load the pre-trained model and fine-tune only the hardware channels and the fusion gated network; Use a low learning rate for fast convergence.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the application performance prediction method for heterogeneous systems as described in any one of claims 1 to 7.