Operator mapping method, device and equipment of heterogeneous system and medium

By modeling the operator mapping problem as a multi-objective optimization problem and using a non-dominated sorting genetic algorithm and a polynomial fitting method, the global optimization difficulties caused by the optimization of a single performance indicator in traditional methods are solved, and balanced optimization of computing time, energy consumption, and load balancing in heterogeneous systems is achieved, thereby improving the overall performance of the system.

CN120654786AActive Publication Date: 2025-09-16NORTHWESTERN POLYTECHNICAL UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511156438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-09-16
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Traditional operator mapping methods often only focus on a single performance indicator and ignore the multi-objective optimization requirements of the overall system performance. As a result, while improving a certain indicator, other performance indicators may be damaged, making it difficult to achieve global optimization.

Method used

The operator mapping problem is modeled as a multi-objective optimization problem. A non-dominated sorting genetic algorithm is used to generate the Pareto front solution set. The operator mapping scheme is optimized by a polynomial fitting method, taking into account multiple performance indicators such as computing time, energy consumption and load balancing.

Benefits of technology

It achieves the precise trade-off and optimization of computing time, energy consumption and load balancing under the constraints, obtains a smooth and balanced operator mapping scheme, and improves the overall performance of heterogeneous systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654786A_ABST
    Figure CN120654786A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of heterogeneous computing, and discloses an operator mapping method and device of a heterogeneous system, equipment and a medium. The method comprises the following steps: modeling an operator mapping problem into a multi-objective optimization problem; solving a multi-objective optimization problem based on a non-dominated sorting genetic algorithm to obtain a Pareto frontier solution set formed by a plurality of different operator mapping schemes; according to a target function constructed by a plurality of targets, obtaining a target function value of each target corresponding to each operator mapping scheme in the Pareto frontier solution set; performing curve fitting on each operator mapping scheme in the Pareto leading edge solution set and the target function value of each corresponding target by adopting a polynomial fitting method to obtain a Pareto polynomial corresponding to each target; according to a target needing to be optimized in a preset multi-target optimization problem, the optimal operator mapping scheme is selected from the Pareto leading edge solution set through the Pareto polynomial corresponding to the target, and the generated operator mapping scheme is optimal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of heterogeneous computing technology, and in particular to an operator mapping method, device, equipment and medium for a heterogeneous system. Background Art

[0002] With the ever-increasing demand for computing, modern computing systems increasingly rely on heterogeneous architectures, encompassing a variety of processing units, including central processing units (CPUs), graphics processing units (GPUs), and field-programmable gate arrays (FPGAs). These processing units each possess distinct performance characteristics and computing capabilities, suited for handling different types of tasks. Efficiently allocating operators (i.e., computing tasks) in applications to these processing units to optimize overall system performance and resource utilization has become a crucial issue in computing system design. This process requires comprehensive consideration of multiple objectives, such as computing speed, energy consumption, and load balancing, rather than focusing solely on single performance metrics.

[0003] The operator mapping process described above involves optimizing multiple performance metrics. Therefore, transforming the operator mapping problem into a multi-objective optimization problem and solving it is crucial. This requires accurately modeling each objective and constraint in the optimization model and utilizing appropriate optimization algorithms to find an effective balance between multiple performance metrics and achieve optimal system performance.

[0004] However, traditional operator mapping methods often focus solely on a single performance metric, such as computational speed or energy consumption, while ignoring the multi-objective optimization requirements for overall system performance. This can lead to improvements in one metric at the expense of other performance metrics, making global optimization difficult. While some operator mapping methods attempt to incorporate multi-objective optimization, their approaches lack flexibility and are unable to effectively balance and optimize multiple key performance metrics, such as computational time, energy consumption, and load balancing. Summary of the Invention

[0005] The purpose of the present invention is to provide an operator mapping method, device, equipment and medium for heterogeneous systems, which can transform the operator mapping problem into a multi-objective optimization problem, effectively weigh and optimize multiple optimization objectives and their constraints such as computing time, energy consumption and load balancing.

[0006] To solve the above technical problems, an embodiment of the present invention provides an operator mapping method for a heterogeneous system, comprising the following steps: The operator mapping problem is modeled as the following multi-objective optimization problem: the objectives are to minimize the total execution time of multiple different operators, minimize the total execution energy consumption, and maximize the total load balance of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and the operator mapping scheme formed by assigning multiple different operators to different processing units as the decision variable; Based on the non-dominated sorting genetic algorithm to solve the multi-objective optimization problem, a Pareto front solution set consisting of multiple different operator mapping schemes is obtained; Obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set according to the objective functions constructed with the goals of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units; The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target, and the Pareto polynomial corresponding to each target is obtained; According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set through the Pareto polynomial corresponding to the objective.

[0007] Optionally, the polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto front solution set and the objective function value of each corresponding target to obtain the Pareto polynomial corresponding to each target, including: For each target, set the corresponding polynomial fitting model as follows: ; Where, It is targeted The fitting polynomial of is the coefficient to be determined, is the decision variable, n is the number of operator mapping schemes in the Pareto front solution set; Substitute the n operator mapping schemes in the Pareto front solution set into the polynomial fitting model of each target respectively to form a linear equation system consisting of n equations for each target; The coefficients of the polynomial fitting model are solved by solving the linear equation system to obtain the Pareto polynomial for each target.

[0008] Optionally, the selecting of the optimal operator mapping scheme from the Pareto front solution set by using the Pareto polynomial corresponding to the objective to be optimized in the preset multi-objective optimization problem includes: According to any objective that needs to be optimized in the multi-objective optimization problem, the corresponding Pareto polynomial is used to calculate the objective function value of each operator mapping scheme in the Pareto front solution set under this objective; Select the operator mapping scheme with the smallest objective function value as the optimal operator mapping scheme for the objective; Alternatively, according to any multiple objectives that need to be optimized in the multi-objective optimization problem, the corresponding multiple Pareto polynomials are used to calculate the objective function values ​​of each operator mapping scheme in the Pareto front solution set under multiple objectives; According to the preset weights of multiple objectives, the objective function values ​​of each operator mapping scheme under multiple objectives are weighted to obtain the comprehensive performance of each operator mapping scheme under multiple objectives; The operator mapping scheme with the best overall performance is selected as the optimal operator mapping scheme for multiple objectives.

[0009] Optionally, before performing curve fitting on each operator mapping scheme and the objective function value of each corresponding objective in the Pareto front solution set, the method further includes: According to the objective function value of each operator mapping scheme in the Pareto front solution set under each objective, multiple operator mapping schemes in the Pareto front solution set are screened.

[0010] Optionally, the non-dominated sorting genetic algorithm is used to solve the multi-objective optimization problem, and a Pareto front solution set consisting of multiple different operator mapping schemes is obtained, including: Based on the non-dominated sorting genetic algorithm, a set of operator mapping schemes are randomly generated; According to the computational complexity and execution resource requirements of each operator and the hardware resources of the processing unit, the randomly generated operator mapping scheme is adjusted to obtain the initialized population; By initializing the population, a Pareto front solution set consisting of multiple different operator mapping schemes is obtained.

[0011] Optionally, before modeling the operator mapping problem as the following multi-objective optimization problem, the method further includes: Mapping the execution resource requirement as an output parameter into a preset vector, where each element in the preset vector represents an execution resource requirement; Dynamically adjust the execution resource requirements in the preset vector based on the preset operator requirements.

[0012] Optionally, the execution resource requirements include at least the following: computing resource requirements, storage resource requirements, and input and output bandwidth requirements.

[0013] An embodiment of the present invention further provides an operator mapping device for a heterogeneous system, comprising: A problem modeling module is used to model the operator mapping problem as the following multi-objective optimization problem: with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and the operator mapping scheme formed by assigning multiple different operators to different processing units as decision variables; The problem-solving module is used to solve multi-objective optimization problems based on the non-dominated sorting genetic algorithm and obtain the Pareto front solution set consisting of multiple different operator mapping schemes; A solution optimization module is used to obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set based on objective functions constructed with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units; The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target, and the Pareto polynomial corresponding to each target is obtained; According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set through the Pareto polynomial corresponding to the objective.

[0014] An embodiment of the present invention also provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned operator mapping method for the heterogeneous system.

[0015] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned operator mapping method for heterogeneous systems when executed by a processor.

[0016] The operator mapping method for heterogeneous systems provided by the present invention has at least the following beneficial effects: By transforming the operator mapping problem into a multi-objective optimization problem, the authors accurately modeled multiple optimization objectives and their constraints, including operator execution time, execution energy consumption, and processing unit load balancing, forming an optimization framework suitable for heterogeneous systems. This allows the algorithm to iteratively adjust the decision variables of the operator mapping scheme while satisfying the constraints, minimizing the objective functions of multiple objectives and ultimately obtaining the ideal Pareto front solution set. When solving the operator mapping scheme, a non-dominated sorting genetic algorithm was introduced to generate the Pareto front solution set, which was then fitted using Pareto polynomials. This ensured the smoothness and balance of the resulting solution set, thereby achieving more accurate and diverse operator mapping schemes across different performance metrics. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] One or more embodiments are exemplarily described by the figures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments.

[0018] Figure 1 This is a flowchart of an operator mapping method for a heterogeneous system provided according to an embodiment of the present invention; Figure 2 is a flow chart of calculating a Pareto front solution using a genetic algorithm according to an embodiment of the present invention; Figure 3 The present invention provides a flowchart of fitting a Pareto front solution set using Pareto polynomials according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in the embodiments of the present invention, many technical details are provided to enable the reader to better understand the present invention. However, even without these technical details and the various changes and modifications based on the following embodiments, the technical solutions claimed in the present invention can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with each other and referenced to each other under the premise that there is no contradiction.

[0020] One embodiment of the present invention relates to an operator mapping method for a heterogeneous system. The specific process of the operator mapping method for a heterogeneous system in this embodiment can be as follows: Figure 1 As shown, including: Step 101, model the operator mapping problem as the following multi-objective optimization problem: with the goals of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balancing of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and with the operator mapping scheme formed by allocating multiple different operators to different processing units as decision variables.

[0021] Step 102 : solving the multi-objective optimization problem based on a non-dominated sorting genetic algorithm to obtain a Pareto front solution set consisting of multiple different operator mapping schemes.

[0022] Step 103, based on the objective functions constructed with the goals of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units, obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set.

[0023] Step 104 , using a polynomial fitting method, curve fitting is performed on each operator mapping scheme in the Pareto front solution set and the objective function value of each corresponding target to obtain a Pareto polynomial corresponding to each target.

[0024] Step 105 : According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set using the Pareto polynomials corresponding to the objectives.

[0025] In this embodiment, by transforming the operator mapping problem into a multi-objective optimization problem, the multiple optimization objectives and their constraints, including operator execution time, execution energy consumption, and processing unit load balancing, are precisely modeled, forming an optimization framework suitable for heterogeneous systems. This allows the operator mapping solution decision variables to be iteratively adjusted through a solution algorithm, while satisfying the constraints, minimizing the objective functions of multiple objectives and ultimately obtaining the ideal Pareto front solution set. When solving the operator mapping solution, a non-dominated sorting genetic algorithm is introduced to generate the Pareto front solution set, which is then fitted using Pareto polynomials. This ensures the smoothness and balance of the resulting solution set, thereby achieving more accurate and diverse operator mapping solutions across different performance metrics.

[0026] The following is a detailed description of the implementation details of the operator mapping method for the heterogeneous system of this embodiment. The following content is only for the convenience of understanding the implementation details and is not necessary for implementing this solution.

[0027] In step 101, a constraint condition model based on resource constraints and task-specificity is first established to generate constraint conditions under resource limitations and specific computing task configurations. Then, an objective function model based on resource constraints and task-specificity is established to output the objective function value under a specific task configuration through different heterogeneous system operator mapping schemes. Then, based on the objective function model and the constraint condition model, a multi-objective operator mapping mathematical model (i.e., a model of a multi-objective optimization problem) is established to comprehensively optimize the decision variables that affect the overall performance of the system under the constraints of specific task configurations and resources, thereby realizing the modeling of the operator mapping problem as a multi-objective optimization problem.

[0028] About the constraint model: First, the information related to each operator that needs to be mapped to the heterogeneous computing system is encapsulated into an operator tuple. This tuple is used to describe the execution requirements of the operator on different computing units and its resource consumption characteristics. The operator tuple is defined as follows: ; Where, A number used to identify each operator; Used to identify the set of heterogeneous computing units that can be mapped to; Used to indicate the computing resources required for operator execution; Used to indicate the storage resource requirements during execution, including the required memory size and cache size; Indicates the input and output bandwidth requirements of the operator during execution.

[0029] Extract the resource requirements of each task from each operator tuple, map these requirements to specific resource types in the system, and identify the specific limitations of each resource type. This information is used as input parameters and mapped to the corresponding positions in the vector. Constraints are represented as vectors, with each element in the vector representing a specific system constraint. Based on specific task requirements, the constraints in the vector can be dynamically adjusted, including adding or removing specific constraints. The specific formula can be expressed as follows: ; The detailed description of each element is as follows: Mappable computational units: ; Where, Represents different types of computing units. This set represents the computing units to which the current operator can be mapped.

[0030] Computing resource requirements: ; Where, represents the calculation cycle, Indicates the calculation time.

[0031] Storage requirements: ; Where, Indicates memory usage, Indicates the cache size.

[0032] I / O bandwidth requirements: ; Where, represents the input bandwidth, Indicates the output bandwidth.

[0033] When checking the constraints, first Check to ensure that the task requirements of each operator are met and the computing units to which the operators are mapped are met. Secondly, the constraints of all operators are summed up to get an overall constraint vector , and compare it with the overall available resources. If this condition is not met, it means that the current operator mapping scheme is not feasible and the operator mapping or optimization scheme needs to be adjusted, that is: ; About the objective function model: In order to model the operator mapping problem as a multi-objective optimization problem, this embodiment first defines three main optimization objective functions.

[0034] One is to minimize the total execution time , its formula can be expressed as: ; Where, Representation operator In the processing unit The computation time on Representation operator The communication delay of transmitting data between different processing units. The optimization goal is to select an appropriate operator allocation method to minimize the total execution time of all operators.

[0035] The second optimization goal is to minimize the total energy consumption of the system , its formula can be modeled as: ; Where, Is the processing unit Execute operator Energy consumption, combined with processing time ,The present invention aims to reduce the energy consumption of the ,whole system by optimizing the allocation of operators.

[0036] The third goal is to maximize the load balance of the processing units, that is, to make the workload of each processing unit relatively even as much as possible. This can be achieved by calculating the proportion of working time of each processing unit and minimizing the difference. The definition formula is: ; Where, Represents a processing unit By minimizing the time differences between different processing units, we can avoid overloading some units while others are idle.

[0037] In addition, for some insensitive objective functions, a threshold can be set. When the threshold condition is met, the objective function will no longer be used as the target for further optimization. For example, if the current optimization goal is not sensitive to energy consumption, a higher threshold can be set to allow the system to find an acceptable solution even with slightly higher energy consumption: ; About the mathematical model of multi-objective operator mapping: In this model, decision variables are variables that can be optimized and adjusted to determine how operators are mapped to different processing units. In the operator mapping problem, the decision variables are mainly the mapping relationship between operators and processing units.

[0038] Specifically, the decision variables set Representation operator Whether to allocate to a processing unit Above, the definition is as follows: ; Where, is the operator index, is the processor index. Each operator can only be assigned to one processing unit, so the following constraints must be met: ; This means that each operator can only be assigned to a specific processing unit, rather than to multiple units at the same time. It is the mapping matrix from operators to processing units. Together with the objective function and constraints, they constitute the core structure of the entire multi-objective optimization problem.

[0039] By integrating the above objective functions, constraints, and decision variables, a multi-objective optimization model of operator mapping is constructed. Formally, it can be expressed as: ; Where, represents minimizing the total execution time, stands for minimizing energy consumption, stands for minimizing load imbalance, and each objective is a function value calculated based on the mapping scheme.

[0040] In step 102, if Figure 2 As shown, the specific steps include: Step 1: Initialize the population; Step 2: Classify the initialized population by non-dominated sorting; Step 3: The parent population with N individuals generates a child population with the same number through selection, crossover, and mutation; Step 4: Merge the parent population with the child population, and re-sort the merged 2N populations into a non-dominated order and calculate the congestion degree; Step 5: Regenerate the next generation population of N based on the non-dominated sorting level and crowding calculation results; Step 6: Repeat steps 3-5 until the maximum number of generations is reached, thereby obtaining an approximate Pareto front solution set.

[0041] Step 1 further includes: (1) Randomly generate a set of mapping schemes from operators to processing units.

[0042] In the process of initializing the population, we first need to define the scale of the problem and the decision variables, including the total number of operators that need to be mapped. and the total number of processing units available Each decision variable is a binary variable where Indicates the The operator is assigned to the processing units. Indicates no allocation.

[0043] Next, set the number of individuals in the population , each individual represents a mapping scheme from an operator to a processing unit. To generate the mapping scheme, first traverse each operator , and randomly select a processing unit for each operator The random selection can be performed by generating a random number between 0 and 1 and mapping it to the index of the processing unit. For example, a uniformly distributed random number generator can be used to implement this process. The generated random number determines which processing unit each operator should be assigned to.

[0044] For each selected processing unit, update the decision variable matrix and set Indicates the The operator is assigned to the Processing units, and ensure that each operator can only be assigned to one processing unit. The processing unit mapping results of all operators are combined to form a mapping scheme, thereby forming an initial population. The representation of each individual can be a vector or a matrix. For example, the vector form is ,in Indicates the Through the above process, the population is generated one by one. , ensuring that the mapping scheme of each individual has a certain diversity, thus providing rich initial solutions for the subsequent optimization process.

[0045] (2) Improve the initial population based on heuristic methods. Utilize known task characteristics or hardware resource conditions to update the initial mapping scheme with heuristic methods to improve the quality of the initial population.

[0046] First, task characteristics and hardware operator source information are collected. Task characteristics include the computational complexity, memory requirements, and data transfer volume of each operator. For example, the convolution operator typically has high computational complexity and large data transfer volume, while the activation operator has lower computational complexity. Hardware resource information includes the computing power, load, and resource utilization of each processing unit. For example, a GPU may have significantly higher computing power than a CPU, but its current load may be higher. Next, priorities are set based on task characteristics. Each operator is assigned a different priority based on its computational complexity and resource requirements. Operators with high computational requirements (such as convolution) are prioritized for allocation to processing units with high computational capabilities. Operators with low computational requirements (such as activation) can be allocated to processing units with lower computational capabilities. This allocation strategy helps improve overall computational efficiency. Next, a heuristic mapping scheme is generated. By leveraging the set priority information, high-priority operators are allocated to processing units with sufficient resources. Finally, an initial population is generated and adjusted. These schemes serve as the initial population for the genetic algorithm, which is then further optimized using the genetic algorithm.

[0047] Step 2 further includes: The process of non-dominated sorting is to stratify the individuals in the population to determine which individuals are not dominated by other individuals, thereby forming the Pareto front. First, for each individual in the current population, two key variables need to be initialized. Each individual The dominating set of It is used to store the other individuals it dominates, and the number of individuals it dominates Used to record How many other individuals dominate it. Initially, the dominating sets of all individuals are empty and the number of dominated individuals is set to zero.

[0048] Next, we start to calculate the dominance relationship between all individuals in the population. and , and compare them based on the objective function value of the multi-objective optimization problem. No better than individuals on all goals Worse, and better in at least one objective , then it is believed that Dominate In this case, the individual Will be added to The domination is centralized, while the individual The number of dominated Add 1. Similarly, if Dominate ,but The number of dominated Add 1. Through this process, the dominance and subordination of each individual can be determined.

[0049] After the dominance relationship is calculated, the first level of Pareto frontier (i.e. individuals with a non-dominated level of 1) is determined. These individuals are not dominated by any other individuals, so their dominance digit is 0. These non-dominated individuals are selected and included in the first level of frontier. , and assign them non-dominated level 1. Next, for each frontier belonging to the first layer Individual , find all the individuals it dominates, and for each dominated individual, reduce its dominated count by 1. If the dominated count is reduced to 0, it means that the individual is no longer dominated by other individuals, and it will be included in the second level Pareto frontier , and assign a non-dominated level of 0.9.

[0050] This process continues recursively. For each Pareto front level, individuals are identified as dominated by each individual and their dominance counts are updated. Each time an individual's dominance count reaches 0, it is added to the next Pareto front level. This process continues layer by layer until all individuals are assigned to a certain front level. Through the non-dominated sorting process, all individuals in the population are divided into multiple levels, each representing a non-dominated front. Individuals on the Pareto front are not dominated by other individuals on any of the objectives. The higher the level of the front level, the greater the superiority of the individual.

[0051] Step 3 further includes: During the selection phase, a ranking-based selection mechanism, such as tournament selection or roulette wheel selection, is employed. Specifically, all individuals are first ranked according to their non-dominated rank, with higher-ranked (better) individuals having higher fitness. Then, the selection operation randomly selects individuals from the parent population based on their fitness values ​​as candidate parents for the next generation. This selection method ensures that individuals with better performance are more likely to be selected, thereby preserving superior genes.

[0052] During the crossover phase, individuals selected in the selection process undergo a crossover with a certain probability (typically set to 0.8), generating new individuals. The crossover operation combines partial genes from two parents to form two new offspring individuals. Specifically, the mapping schemes of the two individuals are cut at random locations, and then the gene fragments on either side of the cut are swapped to generate a new mapping scheme. This crossover allows the beneficial characteristics of different parents to be transmitted and combined in the offspring, forming new individuals and enriching the solution space.

[0053] After crossover, the new individuals undergo mutation with a certain probability (typically set to a small probability, such as 0.01). The purpose of mutation is to increase population diversity and prevent the algorithm from becoming trapped in local optima. Mutation is implemented by randomly selecting one or more gene positions (i.e., the mapping positions of an operator) in the new individuals and randomly changing their values ​​to other possible processing units. This mutation operation can disrupt the current mapping pattern, introduce new solutions, and enhance population diversity.

[0054] Step 4 further includes: Merge the parent population of N with the child population of N to generate a new population of 2N. First, perform the non-dominated sorting shown in step 2 on the new population to obtain the classification information. Then, calculate the crowding degree of each individual in the new population. The specific process of calculating the crowding degree includes: (1) For each non-dominated level, sort the individuals in ascending order according to the objective function value for each optimization goal (e.g., computing time, energy consumption, and load balancing). For each individual, record its ranking position for different objective function values.

[0055] (2) For the boundary individuals (i.e., the individuals with the minimum and maximum values) in the objective function sorting, an infinite crowding distance is directly assigned (for example, set to a very large constant) to ensure that the boundary individuals are not easily eliminated because they represent extreme solutions to the solution space.

[0056] (3) For non-boundary individuals, the calculation of crowding degree needs to consider the difference in objective function value between it and its adjacent individuals. Specifically, for a certain individual , calculate the distance difference between its neighboring individuals on each objective function. The formula is: ; in, It is Individuals on target The crowding distance on . and Respectively represent Individuals on target The target value of the adjacent individuals before and after . and Respectively represent the current population in the target The crowding distance calculated in this way is normalized to ensure that the contributions of various targets are comparable.

[0057] (4) The total crowding degree of each individual is the sum of its crowding distances on all objective functions: ; Calculated in this way The larger it is, the sparser the individual is in the target space and the less crowded the area is in the solution space.

[0058] Step 5 further includes: (1) Prioritize high-ranking individuals based on their non-dominated ranking.

[0059] According to the non-dominated ranking of the combined parent and offspring populations, individuals are selected starting from the first non-dominated level. Individuals in each non-dominated level are non-dominated, so individuals with higher levels are retained first. Starting from non-dominated level 1, individuals are selected one by one to join the next generation population. If the number of individuals in the current non-dominated level is insufficient, , then all individuals in this level are added to the next generation population. If the number of individuals added to the current non-dominated level has caused the population to exceed the limit of NNN, then proceed to the next step and select the remaining individuals based on the crowding degree.

[0060] (2) When the non-dominated sorting levels are the same, individuals with higher diversity are selected according to the crowding calculation results.

[0061] When the number of individuals in a non-dominated class exceeds the total number of individuals in the population When , the individuals are sorted according to their crowding degree. Individuals with greater crowding degree have higher sparsity in the solution space, which means that these individuals can maintain better solution diversity in multi-objective optimization problems. The specific operation is as follows: Sort the individuals in the current non-dominated level from large to small according to their crowding degree. Select individuals with greater crowding degree from the sorting results in turn until the population required for the next generation is filled. Individuals.

[0062] Step 6 further includes: During the genetic algorithm's iterations, the algorithm first checks whether the current generation has reached the preset maximum. If so, the algorithm terminates and outputs the final Pareto front solution set as the optimization result. If not, the algorithm proceeds to the next iteration, including selection, crossover, and mutation operations, to generate a new offspring population. This new offspring population is merged into the current population, and the non-dominated sorting and crowding calculations are re-performed. The next generation population is then reselected based on the non-dominated sorting level and crowding degree. This process repeats until the maximum generation is reached.

[0063] In steps 103 to 105 , a fitting method based on Pareto polynomials is used to perform fitting optimization on the Pareto front solution set to generate a set of smooth and balanced operator mapping solutions.

[0064] like Figure 3As shown, the following processing steps are included: Step 1: Sort and filter the Pareto front solution set and retain the high-quality solutions in the non-dominated solution set; Step 2: Apply the polynomial fitting method to perform curve fitting on the screened Pareto front solution set to generate a smooth Pareto front for prediction and tuning; Step 3: Based on the fitting curve optimization solution set, a set of optimal mapping solutions that are balanced between various objectives are extracted by analyzing the fitting curve.

[0065] Specifically, step 1 further includes: First, all solution sets are classified into non-dominated ranks. The solution sets generated by the genetic algorithm are compared according to the objective function, and the individuals in each solution set are non-dominated. Specifically, for each solution, its performance on all objectives (such as computation time, energy consumption, and load balancing) is compared. If a solution outperforms the other solutions on all objectives, it is assigned a non-dominated rank of 1. For other solutions, if only some of the objectives are better than or equal to the other solutions, they are assigned a lower non-dominated rank. This process is repeated until all solutions have been assigned to the corresponding non-dominated rank.

[0066] Next, the solutions within the non-dominated hierarchy are further sorted. Within each non-dominated hierarchy, the system ranks the solutions by objective value. Specifically, for each optimization objective (such as computation time or energy consumption), all solutions within that non-dominated hierarchy are sorted in ascending or descending order based on the value of that objective to further determine the solution's ranking with respect to that objective. This process is repeated for each optimization objective, ensuring that the relative position of each solution with respect to each objective is clearly marked.

[0067] Then, for individuals with non-dominated rank 1, we select those individuals that perform well on multiple objectives by sorting the objective function. Assume that the objective function represents the computation time, Represents energy consumption, and when screening, priority is given to retaining those individuals that rank high on these two objectives. These individuals are selected as the high-quality solution set .

[0068] Next, we deal with the boundary solutions. Among the individuals after non-dominated sorting, those whose objective function values ​​are close to the limit (such as Very small, Extremely large solutions are treated specially. These solutions are retained in the high-quality solution set as reference data for extreme cases. These solutions are not removed due to their extreme behavior to ensure diversity in the solution set.

[0069] Finally, the high-quality solution set is output. After non-dominated sorting and screening, the high-quality solution set It contains solutions with balanced performance on different optimization objectives and will serve as the basic data for subsequent Pareto polynomial fitting.

[0070] Step 2 further includes: First, the selected non-dominated Pareto front solution set Perform preprocessing. The solution in each solution set can be expressed as a set of decision variables and the objective function value , where is the number of objectives in the multi-objective optimization problem. The purpose of preprocessing is to sort these solutions according to the size of each objective function value for subsequent fitting operations.

[0071] For each objective function , set the corresponding polynomial fitting model, the fitting formula is as follows: ; Where, For the objective function The fitting polynomial of is the coefficient to be determined, is the decision variable.

[0072] According to the Pareto front solution set solution points, and these points are substituted into the polynomial expression to form a system of equations. , target value The following relationships need to be met: ; This results in n equations forming a linear system of equations, where the unknowns are the coefficients of the polynomials. The least squares method is used to find the optimal coefficient combination by minimizing the sum of squares of the fitting error. The fitting error can be expressed as: ; Step 3 further includes: Based on the current priority goal or the trade-off between different goals, select an optimal solution from the fitted Pareto front solution set. For example, in some scenarios, if there is a higher requirement for computing time, the solution that optimizes time can be selected; in other scenarios, if energy consumption is more important, the solution that optimizes energy consumption can be selected. The specific operation is as follows: For each solution in the Pareto front solution set, the Pareto polynomial is used to calculate its value under the computational time objective. This step involves substituting the corresponding value of each solution into the fitted polynomial to obtain the computational time performance of each solution. After the calculation, all solutions are sorted by the objective function value, with the goal of finding the solution with the minimum computational time. After sorting, the solution with the minimum objective function value is selected, which is considered the solution that performs best under the current objective.

[0073] When balancing multiple optimization objectives, such as finding a trade-off between computing time and energy consumption, it is not enough to simply optimize a single objective. In this case, multiple objectives need to be considered comprehensively, usually by assigning a certain weight to each objective to reflect their relative importance. The specific steps are as follows: First, determine the weights for each objective. For example, a weight of 1 indicates the importance of computing time, while a weight of 2 indicates the importance of energy consumption. Weights can be adjusted dynamically based on user needs or the current system priorities. Use the Pareto polynomials for each objective to calculate the performance of each solution under each objective. These two polynomials provide the performance of each solution under both computing time and energy consumption. Combine the performance of these two objectives to calculate a weighted composite value. This value represents the overall performance of each solution after considering the different objectives. Sort all solutions and select the one with the best overall performance.

[0074] Therefore, this embodiment achieves great flexibility in the operator mapping process through a vectorized constraint model. Each operator's resource requirements, storage requirements, and computational requirements can be encapsulated as different constraints, which are then integrated into a vector for unified management. In this way, the system can dynamically add or remove specific constraints based on actual task requirements. This makes operator mapping optimization more flexible in different task scenarios, greatly improving the system's adaptability.

[0075] Furthermore, it provides customized optimization for specific task requirements. In heterogeneous systems, the computing requirements, execution time, and resource allocation of each task may be different. The patented method dynamically adjusts the operator mapping scheme based on the constraints of task requirements to ensure that the task completes the calculation efficiently while meeting resource constraints. Especially in real-time computing scenarios, this method can generate customized optimization objective function values ​​according to the specific requirements of the task, so that the system can quickly switch and reallocate resources between different tasks, significantly improving the efficiency and flexibility of task execution.

[0076] Furthermore, the operator mapping problem is transformed into a multi-objective optimization problem. Traditional operator mapping methods often focus on a single objective, but this invention constructs a multi-objective optimization mathematical model that comprehensively considers multiple performance indicators, including the system's computing speed, energy consumption, and load balancing. This transformation enables the system to find the optimal balance between multiple objectives, improving overall system performance.

[0077] The steps of the various methods above are divided only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are within the scope of protection of the present invention. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of the invention.

[0078] Another embodiment of the present invention relates to an operator mapping device for a heterogeneous system. The implementation details of the operator mapping device for a heterogeneous system of this embodiment are described in detail below. The following content is only provided for ease of understanding and is not required for implementing this solution. The operator mapping device for a heterogeneous system of this embodiment includes: A problem modeling module is used to model the operator mapping problem as the following multi-objective optimization problem: with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and the operator mapping scheme formed by assigning multiple different operators to different processing units as decision variables; The problem-solving module is used to solve multi-objective optimization problems based on the non-dominated sorting genetic algorithm and obtain the Pareto front solution set consisting of multiple different operator mapping schemes; A solution optimization module is used to obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set based on objective functions constructed with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units; The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target, and the Pareto polynomial corresponding to each target is obtained; According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set through the Pareto polynomial corresponding to the objective.

[0079] It is not difficult to find that this embodiment is an apparatus embodiment corresponding to the above-mentioned method embodiment, and this embodiment can be implemented in conjunction with the above-mentioned method embodiment. The relevant technical details and technical effects mentioned in the above-mentioned embodiment are still valid in this embodiment, and to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above-mentioned embodiment.

[0080] It is worth noting that all modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovations of the present invention, this embodiment does not include units that are not closely related to solving the technical problems proposed by the present invention. However, this does not mean that other units do not exist in this embodiment.

[0081] Another embodiment of the present invention relates to a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the operator mapping method for the heterogeneous system in the above-mentioned embodiments.

[0082] The memory and processor are connected using a bus, which can include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors and memories. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor.

[0083] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0084] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0085] That is, those skilled in the art will understand that all or part of the steps in the above-described method embodiments can be implemented by instructing the relevant hardware through a program. The program is stored in a storage medium and includes a number of instructions for causing a device (such as a microcontroller or chip) or a processor to execute all or part of the steps in the method embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0086] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. An operator mapping method for a heterogeneous system, characterized in that: The method comprises: The operator mapping problem is modeled as the following multi-objective optimization problem: the objectives are to minimize the total execution time of multiple different operators, minimize the total execution energy consumption, and maximize the total load balance of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and the operator mapping scheme formed by assigning multiple different operators to different processing units as the decision variable; Based on the non-dominated sorting genetic algorithm to solve the multi-objective optimization problem, a Pareto front solution set consisting of multiple different operator mapping schemes is obtained; Obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set according to the objective functions constructed with the goals of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units; The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target, and the Pareto polynomial corresponding to each target is obtained; According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set through the Pareto polynomial corresponding to the objective.

2. The operator mapping method for heterogeneous systems according to claim 1, characterized in that: The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target to obtain the Pareto polynomial corresponding to each target, including: For each target, set the corresponding polynomial fitting model as follows: ; Where, It is targeted The fitting polynomial of is the coefficient to be determined, is the decision variable, n is the number of operator mapping schemes in the Pareto front solution set; Substitute the n operator mapping schemes in the Pareto front solution set into the polynomial fitting model of each target respectively to form a linear equation system consisting of n equations for each target; The coefficients of the polynomial fitting model are solved by solving the linear equation system to obtain the Pareto polynomial for each target.

3. The operator mapping method for heterogeneous systems according to claim 2, characterized in that: The method of selecting the optimal operator mapping scheme from the Pareto front solution set by using the Pareto polynomial corresponding to the target according to the target to be optimized in the preset multi-objective optimization problem includes: According to any objective that needs to be optimized in the multi-objective optimization problem, the corresponding Pareto polynomial is used to calculate the objective function value of each operator mapping scheme in the Pareto front solution set under this objective; Select the operator mapping scheme with the smallest objective function value as the optimal operator mapping scheme for the objective; Alternatively, according to any multiple objectives that need to be optimized in the multi-objective optimization problem, the corresponding multiple Pareto polynomials are used to calculate the objective function values ​​of each operator mapping scheme in the Pareto front solution set under multiple objectives; According to the preset weights of multiple objectives, the objective function values ​​of each operator mapping scheme under multiple objectives are weighted to obtain the comprehensive performance of each operator mapping scheme under multiple objectives; The operator mapping scheme with the best overall performance is selected as the optimal operator mapping scheme for multiple objectives.

4. The operator mapping method for heterogeneous systems according to claim 3, characterized in that: Before performing curve fitting on each operator mapping scheme and the corresponding objective function value of each objective in the Pareto front solution set, the method further includes: According to the objective function value of each operator mapping scheme in the Pareto front solution set under each objective, multiple operator mapping schemes in the Pareto front solution set are screened.

5. The operator mapping method for heterogeneous systems according to claim 1, characterized in that: The non-dominated sorting genetic algorithm is used to solve the multi-objective optimization problem, and a Pareto front solution set consisting of multiple different operator mapping schemes is obtained, including: Based on the non-dominated sorting genetic algorithm, a set of operator mapping schemes are randomly generated; According to the computational complexity and execution resource requirements of each operator and the hardware resources of the processing unit, the randomly generated operator mapping scheme is adjusted to obtain the initialized population; By initializing the population, a Pareto front solution set consisting of multiple different operator mapping schemes is obtained.

6. The operator mapping method for heterogeneous systems according to claim 1, characterized in that: Before modeling the operator mapping problem as the following multi-objective optimization problem, it also includes: Mapping the execution resource requirement as an output parameter into a preset vector, where each element in the preset vector represents an execution resource requirement; Dynamically adjust the execution resource requirements in the preset vector based on the preset operator requirements.

7. The operator mapping method for heterogeneous systems according to claim 6, characterized in that: The execution resource requirements include at least the following: computing resource requirements, storage resource requirements, and input and output bandwidth requirements.

8. An operator mapping device for a heterogeneous system, characterized in that: The device comprises: A problem modeling module is used to model the operator mapping problem as the following multi-objective optimization problem: with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of the corresponding processing units, with the execution resource requirements of multiple different operators as constraints, and the operator mapping scheme formed by assigning multiple different operators to different processing units as decision variables; The problem-solving module is used to solve multi-objective optimization problems based on the non-dominated sorting genetic algorithm and obtain the Pareto front solution set consisting of multiple different operator mapping schemes; A solution optimization module is used to obtain the objective function value of each objective corresponding to each operator mapping scheme in the Pareto front solution set based on objective functions constructed with the objectives of minimizing the total execution time of multiple different operators, minimizing the total execution energy consumption, and maximizing the total load balance of corresponding processing units; The polynomial fitting method is used to perform curve fitting on each operator mapping scheme in the Pareto frontier solution set and the objective function value of each corresponding target, and the Pareto polynomial corresponding to each target is obtained; According to the objectives to be optimized in the preset multi-objective optimization problem, the optimal operator mapping scheme is selected from the Pareto front solution set through the Pareto polynomial corresponding to the objective.

9. A computer device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the operator mapping method for a heterogeneous system as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the operator mapping method for a heterogeneous system according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • FPGA resource-oriented neural network reconfigurable configuration mapping method

    CN116245150A

  • Heterogeneous missile group task reliability planning method based on multi-target dynamic optimization

    CN116702633A

  • Low-carbon automatic demand response optimization method and device and storage medium

    CN117559420A

  • Intelligent construction method based on data driving

    CN120013484A