Heterogeneous computing system task processing method, system and product based on energy consumption
By selecting the appropriate combination of heterogeneous computing power and storage devices based on task requirements and energy consumption data in distributed training tasks, the problem of increasing energy consumption in heterogeneous computing systems is solved, and energy consumption optimization and efficient utilization of resources are achieved.
Patent Information
- Application Number
- CN202411732111.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Under conventional distributed training tasks, the energy consumption between heterogeneous computing power equipment and storage equipment increases, resulting in excessive energy consumption and resource consumption.
By obtaining the task requirement parameters of the current training task and the energy consumption data of the heterogeneous computing system, determining the preselected heterogeneous computing power equipment and storage devices, optimizing the processing based on different combination relationships and energy consumption, and selecting the final combination relationship with the lowest energy consumption to perform the training task.
It effectively reduces the energy consumption between heterogeneous computing power equipment and storage equipment in distributed training tasks, and improves the matching degree and utilization efficiency of energy consumption.
Smart Images

Figure CN119200811B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, system and product for processing tasks in a heterogeneous computing system based on energy consumption. Background Art
[0002] The corresponding energy resource consumption during distributed training mainly comes from the calculation process and memory access process between heterogeneous computing devices and storage devices within the heterogeneous computing system.
[0003] The access adaptation between heterogeneous computing devices and storage devices corresponding to conventional distributed training tasks adopts the principle of nearest link or random allocation. If the performance and energy consumption differences between the allocated heterogeneous computing devices and storage devices are large, it will also lead to increased energy consumption.
[0004] Therefore, how to reduce the energy consumption of heterogeneous computing devices and storage devices allocated under distributed training tasks is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a heterogeneous computing system task processing method, system and product based on energy consumption to solve the problem of increased energy consumption between heterogeneous computing devices and storage devices allocated under conventional distributed training tasks.
[0006] In order to solve the above technical problems, the present invention provides a task processing method for a heterogeneous computing system based on energy consumption, comprising:
[0007] Obtain the task requirement parameters of the current training task and the energy consumption between the heterogeneous computing devices and storage devices in the heterogeneous computing system;
[0008] Determine the pre-selected heterogeneous computing power equipment according to the task requirement parameters;
[0009] Selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices;
[0010] Determine the final energy consumption based on the combination relationships between the preselected heterogeneous computing devices and the preselected storage devices and the energy consumption;
[0011] The current training task is executed according to the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the final energy consumption.
[0012] On the one hand, the task requirement parameters at least include the task data volume; and determining the pre-selected heterogeneous computing power device according to the task requirement parameters includes:
[0013] Obtaining a minimum memory capacity value within a memory capacity range of each of the storage devices;
[0014] Dividing the task data volume by the minimum memory capacity to determine the number of the heterogeneous computing devices;
[0015] The pre-selected heterogeneous computing power device is determined according to the number of the heterogeneous computing power devices.
[0016] On the other hand, selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices includes:
[0017] Selecting a target storage device with the lowest energy consumption corresponding to each of the pre-selected heterogeneous computing devices from among the energy consumptions;
[0018] Each of the target storage devices is used as the pre-selected storage device.
[0019] On the other hand, the energy consumption includes read energy consumption, write energy consumption and computational complexity energy consumption; selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices includes:
[0020] Determine energy consumption priority based on read energy consumption, write energy consumption and computational complexity energy consumption;
[0021] Determine the target storage device with the lowest target energy consumption corresponding to each pre-selected heterogeneous computing device according to the target energy consumption corresponding to the highest energy consumption priority;
[0022] The target storage device is used as the pre-selected storage device.
[0023] On the other hand, the final energy consumption is determined based on the combination relationships between the pre-selected heterogeneous computing devices and the pre-selected storage devices and the energy consumption, including:
[0024] Get the initial value, initial value reduction step size and number of iterations;
[0025] The final energy consumption is determined by combining the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices according to the initial value, the initial value reduction step and the number of iterations, and determining the final energy consumption through the combined relationship and the energy consumption corresponding to the combined relationship; wherein any one of the combined relationships includes at least two pre-selected heterogeneous computing devices and at least two pre-selected storage devices, and the sub-combinations corresponding to the pre-selected heterogeneous computing devices and pre-selected storage devices in the same combination are non-overlapping.
[0026] On the other hand, according to the initial value, the initial value reduction step size and the number of iterations, the combination relationship determined by combining the sub-combinations corresponding to the pre-selected heterogeneous computing devices and the pre-selected storage devices and the energy consumption corresponding to the combination relationship are determined to determine the final energy consumption, including:
[0027] Establishing a current first combination relationship according to the sub-combinations of each pre-selected heterogeneous computing power device and each pre-selected storage device;
[0028] Determine a first energy consumption target value according to the current first combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the current first combination relationship;
[0029] Taking the initial value as the current value, performing combination processing on the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices to determine a second combination relationship;
[0030] Determine a second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship;
[0031] If the first energy consumption target value is less than the second energy consumption target value, retain the current first combination relationship, determine a new current value according to the initial value reduction step and the initial value, increase the number of iterations by 1, and return to the step of combining the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, output the corresponding combination relationship and the final energy consumption;
[0032] If the first energy consumption target value is greater than or equal to the second energy consumption target value, obtain the acceptance probability and the random number, determine the current combination relationship according to the random number and the acceptance probability, determine the current value according to the initial value reduction step and the initial value, add 1 to the number of iterations, and return to the step of combining the sub-combinations corresponding to each of the pre-selected heterogeneous computing power devices and each of the pre-selected storage devices to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, output the corresponding combination relationship and the final energy consumption.
[0033] On the other hand, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, the number of iterations is determined by the number of arrangement combinations between each of the preselected heterogeneous computing devices and each of the preselected storage devices; before outputting the corresponding combination relationship and the final energy consumption, it also includes:
[0034] Acquire other heterogeneous computing devices of the heterogeneous computing system except the pre-selected heterogeneous computing devices;
[0035] Replacing one heterogeneous computing device of other heterogeneous computing devices with one heterogeneous computing device of each of the pre-selected heterogeneous computing devices to generate a new pre-selected heterogeneous computing device;
[0036] Under the current number of iterations, the new pre-selected heterogeneous computing power device and the sub-combination corresponding to each of the pre-selected storage devices are combined to determine a new second combination relationship; and the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship is returned to, until the number of iterations reaches the second preset number of iterations, the corresponding combination relationship and the final energy consumption are output;
[0037] Alternatively, obtaining other storage devices of the heterogeneous computing system except the pre-selected storage device;
[0038] replacing a storage device of other storage devices with a storage device of each of the pre-selected storage devices to generate a new pre-selected storage device;
[0039] At the current number of iterations, the sub-combinations corresponding to the pre-selected heterogeneous computing power devices and the new pre-selected storage devices are combined to determine a new second combination relationship; and the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power devices and the pre-selected storage devices corresponding to the second combination relationship is returned to, until the number of iterations reaches the second preset number of iterations, the corresponding combination relationship and final energy consumption are output.
[0040] On the other hand, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes:
[0041] Obtaining a third combination relationship corresponding to other heterogeneous computing devices and other storage devices in the heterogeneous computing system except for the combination relationship of the pre-selected heterogeneous computing devices and the pre-selected storage devices;
[0042] Add the third combination relationship corresponding to other heterogeneous computing devices and other storage devices to the combination relationship corresponding to the pre-selected heterogeneous computing devices and the pre-selected storage devices to form a fourth combination relationship;
[0043] At the current number of iterations, the fourth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the preselected heterogeneous computing power device and the preselected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and the final energy consumption are output.
[0044] On the other hand, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes:
[0045] Obtaining a fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device within the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device;
[0046] The fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device is deleted from the combination relationship corresponding to the pre-selected heterogeneous computing power device and the pre-selected storage device to form a sixth combination relationship;
[0047] At the current number of iterations, the sixth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the preselected heterogeneous computing power device and the preselected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and the final energy consumption are output.
[0048] On the other hand, the energy consumption between the pre-selected heterogeneous computing device and the pre-selected storage device includes read energy consumption, write energy consumption and computational complexity energy consumption, and the process of determining the energy consumption corresponding to the combination relationship includes:
[0049] Obtaining the read energy consumption, the write energy consumption, and the computational complexity energy consumption corresponding to the currently pre-selected heterogeneous computing power device in the combination relationship;
[0050] Performing average processing on the read energy consumption and the write energy consumption to determine a third energy consumption;
[0051] Dividing the data volume of the current training task by the number of pre-selected storage devices corresponding to the current pre-selected heterogeneous computing power device, determine the memory capacity corresponding to the current pre-selected heterogeneous computing power device;
[0052] Multiplying the memory capacity by the third energy consumption to obtain a fourth energy consumption;
[0053] Multiplying the computational complexity by the computational complexity energy consumption to obtain a fifth energy consumption;
[0054] The fourth energy consumption and the fifth energy consumption are added together to obtain an energy consumption target value corresponding to the currently pre-selected heterogeneous computing power device;
[0055] The energy consumption target values of each of the pre-selected heterogeneous computing devices are added together to obtain the energy consumption corresponding to the combination relationship.
[0056] In order to solve the above technical problems, the present invention also provides a heterogeneous computing system, including a host, a plurality of heterogeneous computing devices and a plurality of storage devices;
[0057] The host is connected to each heterogeneous computing device respectively; wherein each heterogeneous computing device generates energy consumption when accessing each storage device;
[0058] The host is used to execute the steps of the above-mentioned energy consumption-based heterogeneous computing system task processing method to complete the energy consumption processing of the current training task.
[0059] On the one hand, the memory architecture corresponding to the multiple storage devices is a separate memory architecture.
[0060] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the energy consumption-based heterogeneous computing system task processing method.
[0061] In order to solve the above technical problems, the present invention further provides a heterogeneous computing system task processing device based on energy consumption, comprising:
[0062] Memory for storing computer programs;
[0063] A processor is used to implement the steps of the energy consumption-based heterogeneous computing system task processing method when executing the computer program.
[0064] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the energy consumption-based heterogeneous computing system task processing method are implemented.
[0065] The beneficial effects of the present invention are that, first, the preselected heterogeneous computing power equipment is determined according to the task requirement parameters of the current training task, so as to ensure that the number of preselected heterogeneous computing power equipment is determined under the premise that the current training task can be successfully completed during the execution process. Secondly, the preselected storage devices with the same number as the preselected heterogeneous computing power equipment are selected to ensure that the preselected heterogeneous computing power equipment and the preselected storage equipment present a one-to-one matching relationship to meet the distributed training scenario of the current training task. Finally, based on the various combination relationships and energy consumption between each preselected heterogeneous computing power device and each pre-storage device, the final energy consumption is determined, and the energy consumption characteristics of the energy consumption optimization processing are used to determine the optimization processing method for the different combination relationships between each preselected heterogeneous computing power device and each preselected storage device, so as to improve the matching degree between each preselected heterogeneous computing power device and each preselected storage device, so as to reduce the energy consumption between each preselected heterogeneous computing power device and each preselected storage device, so as to facilitate the current training task to be executed according to the combination relationship between the preselected heterogeneous computing power device and the preselected storage device corresponding to the final energy consumption.
[0066] Secondly, in the process of obtaining the number of pre-selected heterogeneous computing devices, the minimum memory capacity of each storage device is used to obtain as many pre-selected heterogeneous computing devices as possible while ensuring that the storage device does not make mistakes. The target storage device corresponding to the minimum energy consumption parameter based on the sum of different energy consumption parameters is used as the pre-selected storage device for the current pre-selected heterogeneous computing device. The energy consumption parameter is considered in the preliminary selection process to reduce the energy consumption between the pre-selected heterogeneous computing device and the pre-selected storage device. The pre-selected storage device is selected based on the target energy consumption with the highest energy consumption priority. The selection efficiency of the pre-selected storage device is improved through the selection of an energy consumption parameter. The same number of storage devices as the pre-selected heterogeneous computing devices are randomly selected in the heterogeneous computing system as the pre-selected storage devices, which realizes the random selection of the pre-selected storage devices while improving the randomness and efficiency of the selection. The combination relationship obtained by combining the sub-combinations between each pre-selected heterogeneous computing power device and each pre-selected storage device is used to determine the final energy consumption according to the corresponding energy consumption. The iterative process involved in the entire determination process realizes the corresponding different combination relationships in different iterative processes to finally determine the energy consumption, so that the sub-combinations composed of the corresponding pre-selected heterogeneous computing power devices and pre-selected storage devices in each combination relationship are globally optimized, and the energy consumption between the pre-selected heterogeneous computing power devices and pre-selected storage devices under the combination relationship corresponding to the final energy consumption is reduced. In the process of determining the final energy consumption, different iterative processes are carried out, and the energy consumption target values corresponding to the adjacent iterations are compared with each energy consumption target value determined by the energy consumption under different combination relationships to determine the current combination relationship, and then compared again with the combination relationship of the next iteration number through the energy consumption parameter to determine the corresponding energy consumption target value, iterate once, compare once, and realize the energy consumption determination under the iterative method of global optimization, so that the energy consumption is small. The iteration under the new second combination relationship determined by replacing a heterogeneous computing device of other heterogeneous computing devices or replacing a storage device of other storage devices realizes global optimization, jumps out of the optimal solution selected by iteration based on the combination relationship between the original pre-selected heterogeneous computing devices and the pre-selected storage devices, and increases the search range while reducing energy consumption. Add the third combination relationship corresponding to the new other heterogeneous computing devices and storage devices to the original combination relationship, or delete the fifth combination relationship corresponding to the target heterogeneous computing device and the target storage device to form a new second combination relationship, so that it is iterated again, jumps out of the optimal solution selected by iteration based on the combination relationship between the original pre-selected heterogeneous computing devices and the pre-selected storage devices, and changes the search range while reducing energy consumption, thereby improving the flexibility and diversity of determining the optimal solution. The energy consumption target optimization value corresponding to the current combination relationship, that is, the determination of the energy consumption value, improves the accuracy of energy consumption determination by adding different energy consumption parameters.
[0067] In addition, the present invention also provides a heterogeneous computing system, a computer program product, a device and a medium, which have the same beneficial effects as the above-mentioned energy consumption-based heterogeneous computing system task processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1 An architectural diagram of a heterogeneous computing system in a separated memory scenario provided by an embodiment of the present invention;
[0070] Figure 2 A flowchart of a method for processing tasks in a heterogeneous computing system based on energy consumption provided by an embodiment of the present invention;
[0071] Figure 3 A schematic diagram of various combination relationships between various pre-selected heterogeneous computing devices and various pre-selected storage devices provided in an embodiment of the present invention;
[0072] Figure 4 A schematic diagram of task execution of a heterogeneous computing system with separate memory provided by an embodiment of the present invention;
[0073] Figure 5 A structural diagram of a task processing device for a heterogeneous computing system based on energy consumption provided by an embodiment of the present invention;
[0074] Figure 6 A structural diagram of a task processing device for a heterogeneous computing system based on energy consumption provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0075] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] The core of the present invention is to provide a heterogeneous computing system task processing method based on energy consumption, a heterogeneous computing system task processing method based on energy consumption, a system and a product to solve the problem of increased energy consumption between heterogeneous computing devices and storage devices allocated under conventional distributed training tasks.
[0077] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0078] Heterogeneous computing mainly refers to the computing method of using computing units with different types of instruction sets and architectures to form a system. Common types of computing units include central processing units (CPU), graphics processing units (GPU), digital signal processors (DSP), field-programmable gate arrays (FPGA), etc. Heterogeneous computing devices are different types of processors and corresponding memories. When processing different types of applications, their performance varies. A heterogeneous computing system is a system that integrates multiple computing units of different types and architectures to improve the level of computing power. In a multi-heterogeneous computing system, heterogeneous computing power (GPU, FPGA and other heterogeneous computing power devices) with different computing performance will be connected to the same distributed computing system for different neural network calculations. In this system, heterogeneous computing power can be allocated to perform neural network calculations that meet its computing characteristics, thereby improving the performance of the calculation.
[0079] In order to solve the problem of neural network training, different heterogeneous computing devices are connected to the same data center; memory optimization technologies such as split memory are also introduced into the data center to alleviate the corresponding memory problems in training. Combining split memory with heterogeneous computing systems is suitable for distributed training scenarios of neural networks. However, distributed training consumes a lot of energy and resources, which mainly comes from the calculation and memory access process of each device in the heterogeneous computing system. Due to the large differences in performance and energy consumption of each device, the energy consumption of the corresponding computing tasks in this scenario is relatively high.
[0080] Figure 1 An architecture diagram of a heterogeneous computing system in a separated memory scenario provided by an embodiment of the present invention, such as Figure 1 As shown, in this system, the computing power device includes a variety of heterogeneous computing power devices with different computing performance. The storage device includes the local video memory of the heterogeneous computing power device and the extended memory expanded using the separation memory technology. In this system, all extended memories and local memories of heterogeneous computing power devices can be called by other heterogeneous computing power devices and used directly as local memory resources. The energy consumption-based heterogeneous computing system task processing method provided by the present invention can solve the above-mentioned problem of high energy consumption.
[0081] Figure 2A flowchart of a method for processing tasks in a heterogeneous computing system based on energy consumption is provided in an embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0082] S11: Obtain the task requirement parameters of the current training task and the energy consumption between the heterogeneous computing devices and storage devices in the heterogeneous computing system;
[0083] S12: Determine the pre-selected heterogeneous computing power equipment according to the task requirement parameters;
[0084] S13: Selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices;
[0085] S14: determining the final energy consumption based on the combination relationships and energy consumptions between the pre-selected heterogeneous computing devices and the pre-selected storage devices;
[0086] S15: Execute the current training task according to the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the final energy consumption.
[0087] Specifically, the task requirement parameters of the current training task can be the total data volume or total data storage volume of the training data set corresponding to the task, or the model calculation complexity corresponding to the task. One or more task requirement parameters can be set according to actual conditions. The current training task can be a distributed training task, or it can be other model training tasks, model reasoning tasks or other services, etc., which are not limited here. Distributed training tasks are the process of decomposing and distributing machine learning model training tasks to multiple computing nodes for joint completion. They mainly rely on the idea of parallel computing, decomposing training tasks into multiple subtasks, and executing them in parallel on multiple computing nodes. The number of heterogeneous computing devices in a heterogeneous computing system is multiple, so that different training tasks can be executed and called for allocation.
[0088] In step S12, the pre-selected heterogeneous computing devices are determined based on the task requirement parameters. The corresponding pre-selected heterogeneous computing devices here correspond to as many heterogeneous computing devices as possible while ensuring that there are no errors in the operation of the memory devices. The task requirement parameters are divided by the minimum capacity value of the storage device to determine the maximum number of pre-selected storage devices.
[0089] The selection of the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices in step S13 may be a random call to the same number of storage devices as the pre-selected heterogeneous computing power devices in the heterogeneous computing system, or may be selection based on the energy consumption parameters between the heterogeneous computing power devices and the storage devices. This is not limited here, as long as the same number as the pre-selected heterogeneous computing power devices and a one-to-one correspondence can be formed. The energy consumption parameters here may be energy consumption parameters corresponding to reading and writing, or energy consumption of the calculation process. For different energy consumptions, the sum of all energy consumptions may be the minimum, or the energy consumption parameter with the highest priority may be selected from different energy consumption parameters as the main reference, and the remaining energy consumption parameters with lower priority may be selected as the secondary reference. The storage device with the smallest corresponding energy consumption parameter among all storage devices corresponding to the pre-selected heterogeneous computing power device is selected as the pre-selected storage device for preliminary matching of the current pre-selected heterogeneous computing power device.
[0090] The process of obtaining the read energy consumption and the write energy consumption can be measured by an energy consumption test tool, or by other test tools, and the final storage method is to put it into the adjacency matrix for recording and storage.
[0091] In some embodiments, energy consumption includes read energy consumption, write energy consumption and computational complexity energy consumption; the process of determining energy consumption between heterogeneous computing devices and storage devices in a heterogeneous computing system includes:
[0092] Obtain the current reading energy consumption corresponding to the preset data volume read by each heterogeneous computing device from each storage device and the first energy consumption of each heterogeneous computing device in a static state;
[0093] Determine the reading energy consumption according to the current reading energy consumption and the first energy consumption;
[0094] Correspondingly, the current write energy consumption corresponding to the preset data amount written by each heterogeneous computing device to each storage device and the second energy consumption of each heterogeneous computing device in a static state are obtained;
[0095] Determine the write energy consumption according to the current write energy consumption and the second energy consumption;
[0096] Correspondingly, each heterogeneous computing device executes data corresponding to the preset data volume and determines the computational complexity;
[0097] The computational complexity energy consumption is determined according to the computational complexity.
[0098] Specifically, the determination process of the read and write energy consumption is based on the current reading or writing of a certain preset amount of data by each heterogeneous computing device in the corresponding storage device, testing the heterogeneous computing energy consumption of the process, that is, the current read energy consumption and the current write energy consumption, and at the same time, recording the energy consumption of the static heterogeneous computing system during the test time, corresponding to the first energy consumption and the second energy consumption respectively. The corresponding read energy consumption and write energy consumption are obtained by the difference in the heterogeneous computing energy consumption of the two processes.
[0099] Regarding computational complexity and energy consumption, it is determined by determining the computational complexity of the data corresponding to the preset data volume. It can also be obtained by using some testing tools to let heterogeneous computing devices perform computing tasks.
[0100] This embodiment enriches the diversity and flexibility of energy consumption determination through different energy consumption parameter determination processes. At the same time, the energy consumption of reading and writing is determined by calculating the energy consumption difference between dynamic execution and static state, thereby improving the accuracy of energy consumption determination.
[0101] It should be noted that the sub-combinations between the pre-selected heterogeneous computing devices and the pre-selected storage devices in step S14 are mapping relationships between a pre-selected heterogeneous computing device and a pre-selected storage device. The mapping relationship here can be displayed in a list or a table, and is not limited here. For example, "1" represents the pre-selected heterogeneous computing device 1, and "A" represents the pre-selected storage device A. The sub-combination formed by the two is "1A". Of course, the pre-selected heterogeneous computing device 1 can also form different sub-combinations with other pre-selected storage devices (B, C, D, E, F, etc.), but in a combination relationship, a pre-selected heterogeneous computing device and a storage device can only appear once, so a combination relationship can include one sub-combination or multiple sub-combinations. For example, in a combination relationship, corresponding to {1A, 2B, 3C}, a combination relationship is formed, 1A is a sub-combination, 2B is a sub-combination, and 3C is a sub-combination. Figure 3 A schematic diagram of each combination relationship between each pre-selected heterogeneous computing device and each pre-selected storage device provided in an embodiment of the present invention, such as Figure 3 As shown, corresponding to different combination relationships, each pre-selected heterogeneous computing device and each storage device first form their own sub-combination, and then form a large combination relationship based on the sub-combination. The present invention determines the final energy consumption based on each large combination relationship and the corresponding energy consumption. Figure 3 In , there are 9 combinations of the current 3 pre-selected heterogeneous computing power and 3 pre-selected storage devices, and each combination relationship corresponds to 3 sub-combinations. Figure 3In the figure, the corresponding solid line is the current combination relationship, and the dotted line is the sub-combination that can be realized for each pre-selected heterogeneous computing device and each pre-selected storage device. Under the same combination relationship, the pre-selected heterogeneous computing device and pre-selected storage device in each sub-combination cannot be repeated.
[0102] Of course, in Figure 3 In the different combination relationships in, different combination relationships can also be generated in iterations according to other preset conditions. When one preset condition is met, other heterogeneous computing devices or storage devices can be added to replace the original pre-selected heterogeneous computing devices or the original pre-selected storage devices determined in step S12. Alternatively, other heterogeneous computing devices and storage devices can be added in a sub-combination relationship, or the sub-combination relationship of the original pre-selected heterogeneous computing devices and pre-selected storage devices can be deleted to generate different combination relationships, etc., which are not limited here.
[0103] In step S14, the generation process of the corresponding different combination relationships is based on different iterative processes, or all combination relationships are presented and the final energy consumption is calculated. Both methods are acceptable and are not limited here. The iterative process here can be local optimization or global optimization, which can be set according to the actual situation.
[0104] In step S15, the current training task is executed according to the combination relationship between the pre-selected heterogeneous computing power devices and the pre-selected storage devices corresponding to the selected final energy consumption.
[0105] An energy-consumption-based heterogeneous computing system task processing method provided by an embodiment of the present invention obtains the task requirement parameters of the current training task and the energy consumption between each heterogeneous computing power device and storage device in the heterogeneous computing system; determines the preselected heterogeneous computing power device according to the task requirement parameters; selects the same number of preselected storage devices as the preselected heterogeneous computing power device; determines the final energy consumption based on the combination relationship and energy consumption between each preselected heterogeneous computing power device and each preselected storage device; and executes the current training task according to the combination relationship between the preselected heterogeneous computing power device and the preselected storage device corresponding to the final energy consumption. First, the preselected heterogeneous computing power device is determined according to the task requirement parameters of the current training task to ensure that the number of preselected heterogeneous computing power devices is determined under the premise that the current training task can be successfully completed during the execution process. Secondly, the preselected storage devices are selected with the same number as the preselected heterogeneous computing power devices to ensure that the preselected heterogeneous computing power devices and the preselected storage devices present a one-to-one matching relationship to meet the distributed training scenario of the current training task. Finally, the final energy consumption is determined based on the combination relationships and energy consumption between each pre-selected heterogeneous computing power device and each pre-storage device. The energy consumption characteristics of energy consumption optimization processing are used to determine the optimization processing method for different combination relationships between each pre-selected heterogeneous computing power device and each pre-selected storage device, so as to improve the matching degree between each pre-selected heterogeneous computing power device and each pre-selected storage device, so as to reduce the energy consumption between each pre-selected heterogeneous computing power device and each pre-selected storage device, so as to facilitate the current training task to be executed according to the combination relationship between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the final energy consumption.
[0106] In some embodiments, the task requirement parameters include at least the task data volume; and determining the pre-selected heterogeneous computing device according to the task requirement parameters includes:
[0107] Obtain the minimum memory capacity of the memory capacity range of each storage device;
[0108] Divide the task data volume by the minimum memory capacity to determine the number of heterogeneous computing devices;
[0109] The pre-selected heterogeneous computing devices are determined based on the number of heterogeneous computing devices.
[0110] Specifically, the minimum memory capacity M of the memory capacity range of each storage device is obtained. min , divide the task data volume by the minimum memory capacity to determine the number of heterogeneous computing devices. The formula is:
[0111] q=S / M min ;
[0112] Among them, S is the amount of task data; q is the number of heterogeneous computing devices, that is, the number of pre-selected heterogeneous computing devices.
[0113] It should be noted that S in this embodiment is the total data volume of the training data set of the current training task, and can be obtained before the data set is input.
[0114] The process for obtaining the number of pre-selected heterogeneous computing devices provided in this embodiment uses the minimum memory capacity of each storage device to obtain as many pre-selected heterogeneous computing devices as possible while ensuring that the storage device does not fail.
[0115] In some embodiments, selecting the same number of pre-selected storage devices as the number of pre-selected heterogeneous computing devices includes:
[0116] Select the target storage device with the lowest energy consumption corresponding to each pre-selected heterogeneous computing power device from among the energy consumptions;
[0117] Each target storage device is used as a pre-selected storage device.
[0118] Specifically, this embodiment determines the target storage device with the minimum energy consumption corresponding to each pre-selected heterogeneous computing power device and each storage device through the sum of different energy consumption parameters, and uses the corresponding target storage device as the pre-selected storage device. If the target storage device with the minimum energy consumption corresponding to different pre-selected heterogeneous computing power devices is the same, it is necessary to check the size of the priority energy consumption parameters among the different energy consumption parameters, and give priority to referring to the minimum energy consumption of the priority energy consumption parameters as the target storage device of the current pre-selected heterogeneous computing power device, so that one pre-selected heterogeneous computing power device corresponds to one pre-selected storage device.
[0119] This embodiment provides a target storage device corresponding to the minimum energy consumption parameter based on the sum of different energy consumption parameters as a pre-selected storage device for the current pre-selected heterogeneous computing power device. The energy consumption parameters are considered in the preliminary selection process to reduce the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device.
[0120] In some embodiments, energy consumption includes read energy consumption, write energy consumption, and computational complexity energy consumption; selecting the same number of pre-selected storage devices as the number of pre-selected heterogeneous computing devices includes:
[0121] Determine energy consumption priority based on read energy consumption, write energy consumption and computational complexity energy consumption;
[0122] Determine the target storage device with the lowest target energy consumption corresponding to each pre-selected heterogeneous computing device according to the target energy consumption corresponding to the highest energy consumption priority;
[0123] Select the target storage device as the pre-selected storage device.
[0124] Specifically, under different energy consumption parameters, this embodiment considers the priority of each energy consumption parameter, and determines the target storage device with the smallest target energy consumption corresponding to each pre-selected heterogeneous computing power device based on the target energy consumption with the highest energy consumption priority, and uses its target storage device as the pre-selected storage device.
[0125] The determination of the energy consumption priority here can be based on experience values, can be set according to actual conditions, or can be calculated through a specific calculation method to find out the energy consumption parameter that has the greatest impact on energy consumption.
[0126] This embodiment provides a method for selecting a pre-selected storage device based on a target energy consumption with the highest energy consumption priority, and improves the selection efficiency of the pre-selected storage device through selection with an energy consumption parameter.
[0127] In some other embodiments, selecting the same number of pre-selected storage devices as the number of pre-selected heterogeneous computing devices includes:
[0128] In the heterogeneous computing system, storage devices having the same number as the pre-selected heterogeneous computing power devices are randomly selected as pre-selected storage devices.
[0129] Specifically, this embodiment randomly selects storage devices in the heterogeneous computing system that are the same in number as the pre-selected heterogeneous computing devices as pre-selected storage devices, thereby achieving random selection of the pre-selected storage devices while improving selection randomness and efficiency.
[0130] In some embodiments, the final energy consumption is determined based on the combination relationships and energy consumptions between the pre-selected heterogeneous computing devices and the pre-selected storage devices, including:
[0131] Get the initial value, initial value reduction step size and number of iterations;
[0132] According to the initial value, the initial value reduction step size and the number of iterations, the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device are combined to determine the combination relationship and the energy consumption corresponding to the combination relationship to determine the final energy consumption; wherein any combination relationship includes at least two pre-selected heterogeneous computing power devices and at least two pre-selected storage devices, and the sub-combinations corresponding to the pre-selected heterogeneous computing power devices and the pre-selected storage devices in the same combination are non-overlapping.
[0133] Specifically, in this embodiment, considering the determination process of each combination relationship between each pre-selected heterogeneous computing power device and each pre-selected storage device, it can be implemented by an iterative global optimization processing method, specifically, a dual iterative method based on the initial value, the initial value reduction step size and the number of iterations, corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device The corresponding sub-combination is combined and processed, and each sub-combination and the corresponding large combination relationship are already in Figure 3The initial value here can be a temperature value or other parameters, which is not limited here and can be set according to actual conditions. If the initial value is a temperature value, the corresponding initial value reduction step is the temperature value reduction step. In any combination relationship, at least two pre-selected heterogeneous computing power devices and at least two storage devices are included. The combination relationship here is composed of at least two sub-combinations, and the corresponding sub-combinations of pre-selected heterogeneous computing power devices and pre-selected storage devices in the same large combination relationship do not overlap, which also reflects that the frequency of appearance of pre-selected heterogeneous computing power devices and pre-selected storage devices in a large combination relationship can only be once.
[0134] An iterative relationship can be formed based on the initial value, the initial value reduction step size and the number of iterations. Alternatively, the initial value and the initial value reduction step size can be used as an iterative method, and the number of iterations can be used as an iterative method. There is no limitation on different iterative methods, and they can be set according to actual conditions.
[0135] The present embodiment provides a combination relationship obtained by combining sub-combinations between the pre-selected heterogeneous computing devices and the pre-selected storage devices to determine the final energy consumption according to the corresponding energy consumption. The entire determination process involves an iterative process to achieve different combination relationships in different iterative processes to finally determine the energy consumption, so that the sub-combinations of the pre-selected heterogeneous computing devices and the pre-selected storage devices corresponding to each combination relationship are globally optimized to achieve energy consumption reduction between the pre-selected heterogeneous computing devices and the pre-selected storage devices under the combination relationship corresponding to the final energy consumption.
[0136] In some embodiments, according to the initial value, the initial value reduction step size and the number of iterations, the combination relationship determined by combining the sub-combinations corresponding to the pre-selected heterogeneous computing devices and the pre-selected storage devices and the energy consumption corresponding to the combination relationship are determined to determine the final energy consumption, including:
[0137] Establishing a current first combination relationship according to the sub-combinations of each pre-selected heterogeneous computing power device and each pre-selected storage device;
[0138] Determine a first energy consumption target value according to the current first combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the current first combination relationship;
[0139] Taking the initial value as the current value, performing combination processing on the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device to determine a second combination relationship;
[0140] Determine a second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship;
[0141] If the first energy consumption target value is less than the second energy consumption target value, the current first combination relationship is retained, a new current value is determined according to the initial value reduction step size and the initial value, and the number of iterations is increased by 1, and the process returns to the step of combining the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, and the corresponding combination relationship and final energy consumption are output;
[0142] If the first energy consumption target value is greater than or equal to the second energy consumption target value, the acceptance probability is obtained, and a random number is obtained, and the current combination relationship is determined according to the random number and the acceptance probability. The current value is determined according to the initial value by reducing the step size and the initial value, and the number of iterations is increased by 1, and the process returns to the step of combining the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, and the corresponding combination relationship and final energy consumption are output.
[0143] Specifically, a current first combination relationship is established based on the sub-combination of each pre-selected heterogeneous computing power device and each pre-selected storage device. In the first combination relationship, it may be a sub-combination relationship formed with each pre-selected heterogeneous computing power device after the pre-selected storage device is determined in the above step S13. The first energy consumption target value is determined according to the energy consumption corresponding to the current first combination relationship. The initial value is used as the current value, and the sub-combination corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device is combined to determine the second combination relationship. The combination processing here may be to swap the positions between different pre-selected heterogeneous computing power devices and each pre-selected storage devices to achieve a change in the sub-combination between each pre-selected heterogeneous computing power device and each pre-selected storage device to form a large combination relationship as the second combination relationship. The second energy consumption target value is determined according to the corresponding energy consumption under the second combination relationship. The first energy consumption target value is compared with the second energy consumption target value. If the first energy consumption target value is less than the second energy consumption target value, the current first combination relationship is retained. At this time, it is necessary to reduce the initial value by the step size and the initial value to determine the new current value, and increase the number of iterations by 1, and continue to return to the step of "combining the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device to determine the second combination relationship" to obtain a new second combination relationship, and continue to determine a new second energy consumption target value, and compare the energy consumption target values until the current value and the number of iterations meet the corresponding preset relationship, then output the iterative combination relationship and final energy consumption.
[0144] If the first energy consumption target value is greater than or equal to the second energy consumption target value, the acceptance probability is obtained and a random number in the interval (0, 1) is generated. The current combination relationship needs to be determined based on the random number and the acceptance probability, and the iteration is continued. The iteration method is the same as the previous method and is not described here. Until the current value and the number of iterations meet the corresponding preset relationship, the combination relationship after iteration and the final energy consumption are output.
[0145] In the final energy consumption determination process provided by this embodiment, different iterative processes are performed, and the energy consumption target values under different combination relationships are determined by comparing the corresponding energy consumption target values under adjacent iteration times to determine the current combination relationship, and then the combination relationship with the next iteration number is compared again by determining the corresponding energy consumption target value through energy consumption parameters. The energy consumption is determined once by iteration and comparison, and the energy consumption is determined under the globally optimized iterative method, so that the energy consumption is minimal.
[0146] In some embodiments, determining the current combination relationship according to the random number and the acceptance probability includes:
[0147] If the acceptance probability is greater than the random number, the second combination relationship is used as the new current first combination relationship;
[0148] If the acceptance probability is less than or equal to the random number, the current first combination relationship is retained;
[0149] The process of determining the acceptance probability includes:
[0150] Performing difference processing on the first energy consumption target value and the second energy consumption target value to obtain an energy consumption target difference;
[0151] The energy consumption target difference is divided to obtain a first index to determine the acceptance probability.
[0152] Specifically, when the acceptance probability is greater than the random number, the second combination relationship is used as the new current first combination relationship. When the acceptance probability is less than or equal to the random number, the current first combination relationship is retained.
[0153] At this time, the acceptance probability is the difference between the second optimization target value and the first optimization target value to obtain the optimization target difference. The optimization target difference is divided by the current value to obtain the first index to determine the acceptance probability. The specific formula is as follows:
[0154] Probability of acceptance = ;
[0155] Among them, E new is the second optimization target value, E old is the first optimization target value, and T is the current value.
[0156] The present embodiment provides a method for determining a probabilistic acceptance criterion to speed up the process of obtaining the global optimal solution, thereby reducing the iteration cost of determining the final combination relationship, and simplifies the operation steps of parameter iteration, making it easy to implement.
[0157] In some embodiments, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, the number of iterations is determined by the number of arrangement combinations between each pre-selected heterogeneous computing power device and each pre-selected storage device; before outputting the corresponding combination relationship and the final energy consumption, it also includes:
[0158] Obtaining other heterogeneous computing devices of the heterogeneous computing system except the pre-selected heterogeneous computing devices;
[0159] Replace one heterogeneous computing device of other heterogeneous computing devices with one heterogeneous computing device of each pre-selected heterogeneous computing device to generate a new pre-selected heterogeneous computing device;
[0160] Under the current number of iterations, the new pre-selected heterogeneous computing devices and the sub-combinations corresponding to the pre-selected storage devices are combined to determine a new second combination relationship; and the process returns to the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing devices and the pre-selected storage devices corresponding to the second combination relationship, until the number of iterations reaches the second preset number of iterations, and the corresponding combination relationship and final energy consumption are output;
[0161] Alternatively, obtaining other storage devices other than the pre-selected storage devices of the heterogeneous computing system;
[0162] replacing a storage device of other storage devices with a storage device of each pre-selected storage device to generate a new pre-selected storage device;
[0163] At the current number of iterations, the sub-combinations corresponding to the pre-selected heterogeneous computing power devices and the new pre-selected storage devices are combined to determine a new second combination relationship; and the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power devices and the pre-selected storage devices corresponding to the second combination relationship is returned to, until the number of iterations reaches the second preset number of iterations, the corresponding combination relationship and final energy consumption are output.
[0164] Specifically, in the above embodiment, the number of iterations can be determined by the arrangement and combination of each pre-selected heterogeneous computing device and each pre-selected storage device. When the corresponding total number of iterations is greater than the number of iterations in the above embodiment, that is, the number of iterations reaches the first preset number of iterations and has not reached the second preset number of iterations, before the output combination relationship and the final energy consumption, it can also be searched in the following way to achieve global optimization.
[0165] Replace the other heterogeneous computing devices in the heterogeneous computing system except the pre-selected heterogeneous computing devices with one of the other heterogeneous computing devices in the sub-combination corresponding to each pre-selected storage device for combination processing to determine the second combination relationship, so as to subsequently determine the second energy consumption target value and perform subsequent comparison iterations. At this time, the iteration is performed by adding the current heterogeneous computing device to each pre-selected storage device until the number of iterations reaches the second preset number of iterations, and then the corresponding combination relationship and final energy consumption are output.
[0166] Alternatively, other storage devices are selected to combine the sub-combinations corresponding to the pre-selected heterogeneous computing devices and the new pre-selected storage devices under the current number of iterations to determine a new second combination relationship, which is the same as the iteration method corresponding to the embodiment in the previous paragraph and will not be repeated here.
[0167] The iteration provided in this embodiment is performed under a new second combination relationship determined by replacing a heterogeneous computing device of other heterogeneous computing devices or replacing a storage device of other storage devices, so as to achieve global optimization, and iterate and select the optimal solution by jumping out of the original combination relationship between pre-selected heterogeneous computing devices and pre-selected storage devices, thereby reducing energy consumption and increasing the search range.
[0168] In some embodiments, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes:
[0169] Obtaining a third combination relationship corresponding to other heterogeneous computing devices and other storage devices of the heterogeneous computing system except for the combination relationship of the pre-selected heterogeneous computing device and the pre-selected storage device;
[0170] Add the third combination relationship corresponding to the other heterogeneous computing devices and the other storage devices to the combination relationship corresponding to the pre-selected heterogeneous computing devices and the pre-selected storage devices to form a fourth combination relationship;
[0171] At the current number of iterations, the fourth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and final energy consumption are output.
[0172] Specifically, when the number of iterations reaches the first preset number of iterations, the energy consumption target values reached after all the arrangements and combinations of the sub-combination relationships formed by the pre-selected heterogeneous computing power devices and the pre-selected storage devices under the original combination relationships are completed exceed the energy consumption threshold, resulting in the current energy consumption value not being optimal. Therefore, it is necessary to obtain the third combination relationship corresponding to other heterogeneous computing power devices and other storage devices in the heterogeneous computing system except the combination relationship of the pre-selected heterogeneous computing power devices and the pre-selected storage devices, add the third combination relationship to the original combination relationship to form a fourth combination relationship as a new second combination relationship, and perform the subsequent iteration process the same as the iteration process in the above embodiment until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and output the corresponding combination relationship and final energy consumption.
[0173] In some other embodiments, when the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes:
[0174] Obtaining a fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device within the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device;
[0175] Deleting the fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device from the combination relationship corresponding to the pre-selected heterogeneous computing power device and the pre-selected storage device to form a sixth combination relationship;
[0176] At the current number of iterations, the sixth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and final energy consumption are output.
[0177] Specifically, in this embodiment, when the number of iterations reaches the first preset number of iterations, the energy consumption target value reached after all the arrangement and combination of the sub-combination relationships formed by the pre-selected heterogeneous computing power devices and the pre-selected storage devices under the original combination relationship are completed exceeds the energy consumption threshold, resulting in the current energy consumption value not reaching the optimal value. Therefore, it is necessary to obtain the fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device in the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device; delete the fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device from the combination relationship corresponding to the pre-selected heterogeneous computing power device and the pre-selected storage device to form a sixth combination relationship. After the sixth combination relationship is used as the new second combination relationship, the subsequent iteration process is the same as the iteration process in the above embodiment, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and the final energy consumption are output.
[0178] This embodiment provides a third combination relationship corresponding to adding new other heterogeneous computing power devices and storage devices to the original combination relationship, or deleting the fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device to form a new second combination relationship, so that it can be iterated again, jumping out of the original combination relationship between the pre-selected heterogeneous computing power devices and the pre-selected storage devices to iteratively select the optimal solution, while reducing energy consumption, changing the search range, and improving the flexibility and diversity of determining the optimal solution.
[0179] In some embodiments, the energy consumption between the pre-selected heterogeneous computing device and the pre-selected storage device includes read energy consumption, write energy consumption, and computational complexity energy consumption, and the process of determining the energy consumption corresponding to the combination relationship includes:
[0180] Obtain the read energy consumption, write energy consumption and computational complexity energy consumption corresponding to the currently pre-selected heterogeneous computing power device in the combination relationship;
[0181] The third energy consumption is determined by averaging the reading energy consumption and the writing energy consumption;
[0182] Divide the data volume of the current training task by the number of pre-selected storage devices corresponding to the current pre-selected heterogeneous computing power device to determine the memory capacity corresponding to the current pre-selected heterogeneous computing power device;
[0183] The memory capacity is multiplied by the third energy consumption to obtain a fourth energy consumption;
[0184] The fifth energy consumption is obtained by multiplying the computational complexity and the computational complexity energy consumption;
[0185] The fourth energy consumption and the fifth energy consumption are added together to obtain the energy consumption target value corresponding to the currently pre-selected heterogeneous computing power device;
[0186] The energy consumption target values of each pre-selected heterogeneous computing power device are added together to obtain the energy consumption corresponding to the combination relationship.
[0187] Specifically, the formula is as follows:
[0188] ;
[0189] in, is the computational complexity energy consumption corresponding to the i-th pre-selected heterogeneous computing device, F is the computational complexity, The fifth energy consumption is The energy consumption of reading from the i-th pre-selected heterogeneous computing device on the i-th pre-selected storage device; is the energy consumption of writing the i-th pre-selected heterogeneous computing device to the i-th pre-selected storage device, is the third energy consumption; S is the data volume of the current training task, and q is the number of pre-selected storage devices; The memory capacity corresponding to the currently pre-selected heterogeneous computing device; It is the fourth energy consumption.
[0190] It should be noted here that the quantity relationship of the pre-selected heterogeneous computing power devices and the pre-selected storage devices in this embodiment is the same, that is, the current combination relationship corresponds to q pre-selected heterogeneous computing power devices and q pre-selected storage devices, and the two types of devices present a one-to-one correspondence. When the pre-selected heterogeneous computing power device corresponding to the i-th position is selected, it corresponds to the corresponding pre-selected storage device under the sub-combination, that is, the i-th pre-selected storage device.
[0191] The energy consumption target optimization value corresponding to the current combination relationship provided in this embodiment, that is, the determination of the energy consumption value, improves the accuracy of energy consumption determination by adding different energy consumption parameters.
[0192] Further, Figure 4 A task execution diagram of a heterogeneous computing system with separate memory provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, it includes a heterogeneous computing system component information collection module, a distributed training task information collection module, a distributed training task energy consumption optimization module, and a distributed training task delivery module. Their respective names and functions are as follows:
[0193] 1. Heterogeneous computing system component information collection module: used to collect the energy consumption characteristics of memory and heterogeneous computing power in the heterogeneous computing system, and send them to the distributed training task energy consumption optimization module.
[0194] 2. Distributed training task information collection module: When a new distributed training task is issued, this module will collect relevant information of the distributed training computing task and send it to the distributed training task energy consumption optimization module.
[0195] 3. Distributed training task energy consumption optimization module: Based on the information of the components of the heterogeneous computing system and the information of the distributed training computing tasks, this module will schedule the execution of distributed training tasks with the goal of optimizing energy consumption, and send the scheduling results to the distributed training task delivery module.
[0196] 4. Distributed training task delivery module: Based on the final scheduling results, the distributed training tasks are delivered to the heterogeneous computing system for execution.
[0197] The modules are as follows:
[0198] 1. Heterogeneous computing system component information collection module:
[0199] a. Collect the energy consumption of heterogeneous computing power reading and writing any memory: In a heterogeneous computing system based on separate memory, there can be a rich interconnection and mutual access between heterogeneous computing power and memory device components. Specifically, for each heterogeneous computing power in the heterogeneous computing system, the memory (local video memory, non-local memory device) in the heterogeneous system can be read and accessed, so the energy consumption of accessing a certain amount of data between the heterogeneous computing power and the memory device components can be measured. This data can be tested through some memory accesses. For example, heterogeneous computing power A can be allowed to write or read 10G of data to memory component X to test the energy consumption of the heterogeneous computing system in this process. At the same time, the energy consumption of the heterogeneous computing system in the static state is recorded during this test time. Then, the energy consumption of heterogeneous computing power A writing or reading 10GB of data to memory component X is obtained by the difference in the energy consumption of the heterogeneous computing system in these two processes. Similar energy consumption data can also be obtained by some existing energy consumption test tools, or power testers, etc. Finally, the adjacency matrix can be used to record this information. Table 1 is an adjacency matrix record table, as shown in Table 1:
[0200] Table 1 Adjacency matrix record table
[0201]
[0202] b. Collect the energy consumption of heterogeneous computing power in processing computing tasks: In addition, this module also needs to collect the energy consumption required for each heterogeneous computing power to process a certain number of complex calculations. This can be achieved by using tools to let the heterogeneous computing power perform computing tasks and record the computational complexity of the computing tasks and the energy consumption of executing the computing tasks, thereby obtaining the energy consumption of the heterogeneous computing power in processing computing tasks.
[0203] 2. Distributed training task information collection module:
[0204] This module collects the total computing amount and total data access amount of the distributed training tasks that have arrived. The total computing amount can be estimated based on the artificial intelligence (AI) model structure. Some existing open source tools also provide model parameter quantities and statistical tools. The total data volume can be obtained by directly calculating the data volume of the input training data set.
[0205] 3. Distributed training task energy consumption optimization module:
[0206] According to the information obtained by the heterogeneous computing system component information collection module and the distributed training task information collection module, the distributed training task is scheduled to optimize the energy consumption of the computing task, and finally all relevant heterogeneous computing power and memory components for the distributed training task, as well as the correspondence between heterogeneous computing and memory components are obtained. Finally, the correspondence is sent to the distributed training task delivery module.
[0207] 4. Distributed training task delivery module:
[0208] According to the calculation results of the distributed training task energy consumption optimization module, this module first allocates memory devices to each heterogeneous computing power, and then issues the distributed training tasks that have arrived. Using data parallelism, it copies the AI network model to all relevant heterogeneous computing powers, and evenly distributes the training data required for training to all participating heterogeneous computing powers, and finally starts the distributed training task.
[0209] Based on the information obtained by the heterogeneous computing system component information collection module and the distributed training task information collection module, the energy-optimal computing power, memory allocation and corresponding method (D 1 , M 1 )、(D 2 , M 2 ), ..., (Dn, Mn), where D i Represents heterogeneous computing power i, M i Representative is D i Allocated memory devices, where 1≤i≤n.
[0210] Given that the computational complexity of the neural network of a distributed training task is F, and the total amount of data in the training data set is S, this data can be obtained based on the information collected by the distributed training task information collection module. The energy consumption required for Dx to read and write a unit (1GB) of data on My is , the computational complexity of the task in Dx computing unit (1TFLOPs) requires , which can be obtained from the heterogeneous computing system component information collection module.
[0211] First, based on the minimum memory capacity of the memory components in the heterogeneous computing system ,calculate , select the quantity q for heterogeneous computing power.
[0212] The initial value is given as , the number of iteration terminations is Q, and the current number of iterations is t=0.
[0213] According to q, randomly select q heterogeneous computing power and q memory components from the heterogeneous computing system and establish a corresponding relationship = [(Da, Ma), (Db, Mb), ..., (Dq, Mq)], as the current solution .
[0214] Calculate the energy consumption optimization target formula:
[0215] ;
[0216] Where q represents the total number of components in the current solution. In this formula, for the energy consumption of calculation (the first term of the summation formula), each heterogeneous computing power needs to calculate the complete neural network model, so it is necessary to sum the energy consumption of all heterogeneous computing powers to calculate the complete neural network training. For the energy consumption of memory access (the second term of the summation formula), the energy consumption of memory access per unit data during the calculation process can be obtained by taking the average of the read and write energy consumption, and then multiplying the average value by the memory access data volume of Di and summing them up to get the total memory access energy consumption.
[0217] is the computational complexity energy consumption corresponding to the i-th pre-selected heterogeneous computing device, F is the computational complexity, The fifth energy consumption is The energy consumption of reading from the i-th pre-selected heterogeneous computing device on the i-th pre-selected storage device; is the energy consumption of writing the i-th pre-selected heterogeneous computing device to the i-th pre-selected storage device, is the third energy consumption; S is the data volume of the current training task, and q is the number of pre-selected storage devices; The memory capacity corresponding to the currently pre-selected heterogeneous computing device; It is the fourth energy consumption.
[0218] It should be noted here that the number relationship of the pre-selected heterogeneous computing devices and the pre-selected storage devices in this embodiment is the same, that is, the current combination relationship corresponds to q pre-selected heterogeneous computing devices and q pre-selected storage devices, and the two devices present a one-to-one correspondence. When the pre-selected heterogeneous computing device corresponding to the i-th position is selected, it corresponds to the corresponding pre-selected storage device under the sub-combination, that is, the i-th pre-selected storage device. In this embodiment, combined with the relationship within , the i-th corresponding pre-selected heterogeneous computing device in the i-th position of Da, Db to Dq, and the pre-selected storage device in the i-th position of the selected Ma, Mb to Mq. Of course, the pre-selected storage device and pre-selected heterogeneous computing device in the corresponding relationship here will change in the new combination relationship, but in the current combination relationship, they are in the i-th position of the current combination relationship under a corresponding sub-combination.
[0219] Search for new solutions, from Replace a heterogeneous computing power; replace a memory component; add a (D, M) pair; reduce a (D, M) pair, and randomly select one as .
[0220] judge Whether the sum of the memory of all memory components is greater than S, if not, return to the previous step.
[0221] The initial value parameters are calculated as , where t is the current iteration number.
[0222] for , Calculate energy consumption index , calculate the energy function .
[0223] Determine whether the Z of the new solution is less than the Z of the current solution. If so, then Accept new interpretations , that is, another Otherwise, do not accept constant.
[0224] Determine whether t reaches the maximum number of iterations, that is, the number of iterations to terminate is Q. If t=Q, the algorithm ends and the output algorithm result is the current =[(Da, Ma), (Db, Mb), ..., (Dq, Mq)]. Otherwise, increment the current iteration number, return to the step of searching for a new solution, and continue iterating.
[0225] Furthermore, the present invention also provides a heterogeneous computing system, comprising a host, a plurality of heterogeneous computing devices and a plurality of storage devices;
[0226] The host is connected to each heterogeneous computing device respectively; wherein each heterogeneous computing device generates energy consumption when accessing each storage device;
[0227] The host is used to execute the steps of the above-mentioned energy consumption-based heterogeneous computing system task processing method to complete the energy consumption processing of the current training task.
[0228] For an introduction to a heterogeneous computing system provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above energy consumption-based heterogeneous computing system task processing method.
[0229] In some embodiments, the memory architecture corresponding to the multiple storage devices is a separate memory architecture.
[0230] Specifically, the core idea is to separate memory resources from traditional computing nodes to form one or more centralized memory pools, which are connected to computing nodes through the network to achieve dynamic configuration and sharing of memory resources.
[0231] The separated memory architecture provided in this embodiment realizes dynamic adjustment of resources and improves the flexibility and utilization rate of data center resources.
[0232] Furthermore, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of a heterogeneous computing system task processing method based on energy consumption.
[0233] For an introduction to a computer program product provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above energy consumption-based heterogeneous computing system task processing method.
[0234] The above describes in detail various embodiments corresponding to the method for processing tasks in a heterogeneous computing system based on energy consumption. On this basis, the present invention also discloses a heterogeneous computing system task processing device based on energy consumption corresponding to the above method. Figure 5 The structure diagram of a heterogeneous computing system task processing device based on energy consumption provided by an embodiment of the present invention. Figure 5 As shown, the task processing devices of the heterogeneous computing system based on energy consumption include:
[0235] An acquisition module 11 is used to obtain the task requirement parameters of the current training task and the energy consumption between the heterogeneous computing devices and storage devices in the heterogeneous computing system;
[0236] A first determination module 12 is used to determine the pre-selected heterogeneous computing power device according to the task requirement parameters;
[0237] A selection module 13, used to select the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices;
[0238] A second determination module 14 is used to determine the final energy consumption based on the combination relationships and energy consumptions between the pre-selected heterogeneous computing devices and the pre-selected storage devices;
[0239] The execution module 15 is used to execute the current training task according to the combination relationship between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the final energy consumption.
[0240] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0241] For an introduction to an energy consumption processing device for a heterogeneous computing system provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above energy consumption-based heterogeneous computing system task processing method.
[0242] Figure 6 A structural diagram of a task processing device for a heterogeneous computing system based on energy consumption provided by an embodiment of the present invention, such as Figure 6 As shown, the device comprises:
[0243] A memory 21, used for storing computer programs;
[0244] The processor 22 is used to implement the steps of the energy consumption-based heterogeneous computing system task processing method when executing a computer program.
[0245] The energy consumption-based heterogeneous computing system task processing device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0246] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an AI processor, which is used to process computing operations related to machine learning.
[0247] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the heterogeneous computing system task processing method based on energy consumption disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include but is not limited to the data involved in the heterogeneous computing system task processing method based on energy consumption, etc.
[0248] In some embodiments, the energy consumption-based heterogeneous computing system task processing device may also include a display screen 23 , an input and output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0249] Those skilled in the art can understand that Figure 6 The structure shown in the figure does not constitute a limitation on the task processing device of the heterogeneous computing system based on energy consumption, and may include more or less components than those shown in the figure.
[0250] The processor 22 calls the instructions stored in the memory 21 to implement the energy consumption-based heterogeneous computing system task processing method provided in any of the above embodiments.
[0251] For an introduction to an energy consumption-based heterogeneous computing system task processing device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above energy consumption-based heterogeneous computing system task processing method.
[0252] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by the processor 22, the steps of the above-mentioned energy consumption-based heterogeneous computing system task processing method are implemented.
[0253] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0254] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above energy consumption-based heterogeneous computing system task processing method.
[0255] The above is a detailed introduction to the energy-based heterogeneous computing system task processing method, system and product provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced 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 parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0256] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for processing tasks in a heterogeneous computing system based on energy consumption, characterized in that: include: Obtain the task requirement parameters of the current training task and the energy consumption between the heterogeneous computing devices and storage devices in the heterogeneous computing system; Determine the pre-selected heterogeneous computing power equipment according to the task requirement parameters; Selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices; The final energy consumption is determined based on each combination relationship between each pre-selected heterogeneous computing power device and each pre-selected storage device and the energy consumption; specifically comprising: obtaining an initial value, an initial value reduction step and an iteration number; according to the initial value, the initial value reduction step and the iteration number, the sub-combinations corresponding to each pre-selected heterogeneous computing power device and each pre-selected storage device are combined to determine the final energy consumption by the combination relationship and the energy consumption corresponding to the combination relationship; wherein any combination relationship includes at least two pre-selected heterogeneous computing power devices and at least two pre-selected storage devices, and the sub-combinations corresponding to the pre-selected heterogeneous computing power devices and the pre-selected storage devices in the same combination are non-overlapping; The current training task is executed according to the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the final energy consumption.
2. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 1, characterized in that: The task requirement parameters include at least the task data volume; Determine the pre-selected heterogeneous computing power equipment according to the task requirement parameters, including: Obtaining a minimum memory capacity value within a memory capacity range of each of the storage devices; Determine the number of the heterogeneous computing devices by dividing the task data volume by the minimum memory capacity; The pre-selected heterogeneous computing power device is determined according to the number of the heterogeneous computing power devices.
3. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 2, characterized in that: Selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices includes: Selecting a target storage device with the lowest energy consumption corresponding to each of the pre-selected heterogeneous computing devices from among the energy consumptions; Each of the target storage devices is used as the pre-selected storage device.
4. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 2, characterized in that: The energy consumption includes reading energy consumption, writing energy consumption and computational complexity energy consumption; Selecting the same number of pre-selected storage devices as the pre-selected heterogeneous computing power devices includes: Determine energy consumption priority based on read energy consumption, write energy consumption and computational complexity energy consumption; Determine the target storage device with the lowest target energy consumption corresponding to each pre-selected heterogeneous computing device according to the target energy consumption corresponding to the highest energy consumption priority; The target storage device is used as the pre-selected storage device.
5. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 1, characterized in that: Determining the final energy consumption by combining and processing the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices according to the initial value, the initial value reduction step size, and the number of iterations, and determining the final energy consumption by combining and processing the sub-combinations corresponding to the pre-selected heterogeneous computing devices and the energy consumption corresponding to the combination relationship, including: Establishing a current first combination relationship according to the sub-combinations of each pre-selected heterogeneous computing power device and each pre-selected storage device; Determine a first energy consumption target value according to the current first combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the current first combination relationship; Taking the initial value as the current value, performing combination processing on the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices to determine a second combination relationship; Determine a second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship; If the first energy consumption target value is less than the second energy consumption target value, retain the current first combination relationship, determine a new current value according to the initial value reduction step and the initial value, increase the number of iterations by 1, and return to the step of combining the sub-combinations corresponding to each of the pre-selected heterogeneous computing devices and each of the pre-selected storage devices to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, output the corresponding combination relationship and the final energy consumption; If the first energy consumption target value is greater than or equal to the second energy consumption target value, obtain the acceptance probability and the random number, determine the current combination relationship according to the random number and the acceptance probability, determine the current value according to the initial value reduction step and the initial value, add 1 to the number of iterations, and return to the step of combining the sub-combinations corresponding to each of the pre-selected heterogeneous computing power devices and each of the pre-selected storage devices to determine the second combination relationship, until the current value and the number of iterations meet the corresponding preset conditions, output the corresponding combination relationship and the final energy consumption.
6. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 5, characterized in that: When the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, the number of iterations is determined by the number of arrangement combinations between each of the preselected heterogeneous computing devices and each of the preselected storage devices; before outputting the corresponding combination relationship and the final energy consumption, it also includes: Acquire other heterogeneous computing devices of the heterogeneous computing system except the pre-selected heterogeneous computing devices; Replacing one heterogeneous computing device of other heterogeneous computing devices with one heterogeneous computing device of each of the pre-selected heterogeneous computing devices to generate a new pre-selected heterogeneous computing device; Under the current number of iterations, the new pre-selected heterogeneous computing power device and the sub-combination corresponding to each of the pre-selected storage devices are combined to determine a new second combination relationship; and the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power device and the pre-selected storage device corresponding to the second combination relationship is returned to, until the number of iterations reaches the second preset number of iterations, the corresponding combination relationship and the final energy consumption are output; Alternatively, obtaining other storage devices of the heterogeneous computing system except the pre-selected storage device; replacing a storage device of other storage devices with a storage device of each of the pre-selected storage devices to generate a new pre-selected storage device; At the current number of iterations, the sub-combinations corresponding to the pre-selected heterogeneous computing power devices and the new pre-selected storage devices are combined to determine a new second combination relationship; and the step of determining the second energy consumption target value according to the second combination relationship and the energy consumption between the pre-selected heterogeneous computing power devices and the pre-selected storage devices corresponding to the second combination relationship is returned to, until the number of iterations reaches the second preset number of iterations, the corresponding combination relationship and final energy consumption are output.
7. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 5, characterized in that: When the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes: Obtaining a third combination relationship corresponding to other heterogeneous computing devices and other storage devices in the heterogeneous computing system except for the combination relationship of the pre-selected heterogeneous computing devices and the pre-selected storage devices; Add the third combination relationship corresponding to other heterogeneous computing devices and other storage devices to the combination relationship corresponding to the pre-selected heterogeneous computing devices and the pre-selected storage devices to form a fourth combination relationship; At the current number of iterations, the fourth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the preselected heterogeneous computing power device and the preselected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and the final energy consumption are output.
8. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 5, characterized in that: When the number of iterations reaches the first preset number of iterations and does not reach the second preset number of iterations, and the final energy consumption exceeds the energy consumption threshold, before outputting the corresponding combination relationship and the final energy consumption, the method further includes: Obtaining a fifth combination relationship corresponding to the target heterogeneous computing power device and the target storage device within the combination relationship of the pre-selected heterogeneous computing power device and the pre-selected storage device; The fifth combination relationship corresponding to the target heterogeneous computing device and the target storage device is deleted from the combination relationship corresponding to the pre-selected heterogeneous computing device and the pre-selected storage device to form a sixth combination relationship; At the current number of iterations, the sixth combination relationship is taken as a new second combination relationship, and the step of determining the second energy consumption target value based on the energy consumption between the second combination relationship and the preselected heterogeneous computing power device and the preselected storage device corresponding to the second combination relationship is returned, until the number of iterations reaches the second preset number of iterations and the energy consumption of the corresponding combination relationship exceeds the energy consumption threshold, and the corresponding combination relationship and the final energy consumption are output.
9. The method for processing tasks in a heterogeneous computing system based on energy consumption according to claim 5, characterized in that: The energy consumption between the pre-selected heterogeneous computing device and the pre-selected storage device includes read energy consumption, write energy consumption and computational complexity energy consumption, and the process of determining the energy consumption corresponding to the combination relationship includes: Obtaining the read energy consumption, the write energy consumption, and the computational complexity energy consumption corresponding to the currently pre-selected heterogeneous computing power device in the combination relationship; Performing average processing on the read energy consumption and the write energy consumption to determine a third energy consumption; Dividing the data volume of the current training task by the number of pre-selected storage devices corresponding to the current pre-selected heterogeneous computing power device, determine the memory capacity corresponding to the current pre-selected heterogeneous computing power device; Multiplying the memory capacity by the third energy consumption to obtain a fourth energy consumption; Multiplying the computational complexity by the computational complexity energy consumption to obtain a fifth energy consumption; The fourth energy consumption and the fifth energy consumption are added together to obtain an energy consumption target value corresponding to the currently pre-selected heterogeneous computing power device; The energy consumption target values of each of the pre-selected heterogeneous computing devices are added together to obtain the energy consumption corresponding to the combination relationship.
10. A heterogeneous computing system, characterized in that: Includes a host, multiple heterogeneous computing devices, and multiple storage devices; The host is connected to each heterogeneous computing device respectively; wherein each heterogeneous computing device generates energy consumption when accessing each storage device; The host is used to execute the steps of the energy consumption-based heterogeneous computing system task processing method described in any one of claims 1 to 9 above to complete the energy consumption processing of the current training task.
11. The heterogeneous computing system according to claim 10, characterized in that: The memory architecture corresponding to the multiple storage devices is a separate memory architecture.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the energy consumption-based heterogeneous computing system task processing method described in any one of claims 1 to 9 are implemented.
13. A task processing device for a heterogeneous computing system based on energy consumption, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the energy consumption-based heterogeneous computing system task processing method as described in any one of claims 1 to 9 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the energy consumption-based heterogeneous computing system task processing method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Composed compute system with energy aware orchestration
US20220308927A1