Method and device for managing computing resources in data preprocessing stage in neural network
By monitoring and dynamically adjusting the resource usage information of computing nodes, load balancing and resource optimization are achieved, which solves the problem of low computing efficiency in the neural network data preprocessing stage and improves overall training efficiency and computing throughput.
Patent Information
- Application Number
- CN201880098036.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2038-09-30
AI Technical Summary
The existing technology has low computing efficiency in the data preprocessing stage of the neural network, causing the iterative calculation of the GPU to wait for data preparation, and the overall computing efficiency is greatly reduced. Especially when the amount of data is large or the network scale is small, there is a performance bottleneck.
Provides a computing resource management method that monitors resource usage information of multiple heterogeneous computing nodes, dynamically adjusts computing resources based on preset resource scheduling strategies, achieves load balancing and resource utilization optimization, and adaptively adjusts data preprocessing calculations , improve computing throughput.
By dynamically adjusting computing resources, we can achieve load balancing and efficient resource utilization, improve the overall training efficiency of neural networks, ensure that data preprocessing results are obtained on time during the model training phase, and improve the computing throughput of data preprocessing.
Smart Images

Figure CN112753016B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computing technology, and more specifically, to a method and device for managing computing resources applied to a data preprocessing stage in a neural network. Background Art
[0002] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.
[0003] The application of AI technology has penetrated into all walks of life. The training and rapid deployment capabilities of neural network models have become the core capabilities of technology companies. How to improve the speed of network model training has become a research hotspot and has attracted widespread attention. The neural network training process can be roughly divided into two stages, namely the data preprocessing stage and the network training stage. Among them, the speed of network training depends largely on the computing acceleration capabilities of dedicated hardware, such as the super computing power of GPU. Most of the research focuses on the miniaturization of network structure, quantization pruning, operator fusion acceleration, etc., while the speed of data preprocessing is often ignored. As a result, in many scenarios, a round of iterative calculations on the GPU has ended, and the next round of data is not ready yet, so it can only wait, which greatly reduces the overall computing efficiency.
[0004] At present, the existing technology still deploys data preprocessing calculations on the CPU, resulting in performance bottlenecks in many training scenarios, such as when the network scale is small and the data volume is large. Therefore, it is urgent to propose a method to improve the efficiency of data preprocessing. Summary of the invention
[0005] In view of this, the present application provides a method and device for managing computing resources applied to the data preprocessing stage in a neural network, which can dynamically adjust computing resources and achieve load balancing, thereby making more reasonable use of computing resources.
[0006] In a first aspect, a method for managing computing resources applied to a data preprocessing stage in a neural network is provided, wherein the computing resources include a plurality of heterogeneous computing nodes, and the method includes: separately monitoring resource usage information of the plurality of computing nodes, wherein the resource usage information is used to represent resource usage on each computing node; generating resource adjustment information corresponding to a node to be adjusted among the plurality of computing nodes according to the resource usage information and based on a preset resource scheduling strategy; and dynamically adjusting the computing resources of the node to be adjusted according to the resource adjustment information, being able to adaptively and dynamically adjust the calculation of data preprocessing according to the scale of the neural network and the actual data throughput requirements, and improving the computing throughput of data preprocessing by optimizing the computing deployment, thereby improving the overall training efficiency of the neural network.
[0007] Optionally, the resource scheduling strategy is set according to the computational throughput requirement of the data preprocessing stage during the model training stage of the neural network.
[0008] Optionally, the nodes to be adjusted may be a part of computing nodes determined from a plurality of heterogeneous computing nodes, or may be one or more computing nodes.
[0009] In a possible implementation, the resource scheduling strategy includes at least one of a load balancing strategy or a resource utilization strategy.
[0010] Optionally, the resource scheduling strategy includes at least one of a load balancing strategy or a resource utilization strategy. That is, the resource scheduling strategy may only include a load balancing strategy; or, the resource scheduling strategy may only include a resource utilization strategy; or, the resource scheduling strategy includes a load balancing strategy and a resource utilization strategy.
[0011] In one possible implementation, the resource scheduling strategy includes a load balancing strategy. If the load on the node to be adjusted is unbalanced, the resource adjustment information includes topology information for adjusting the node to be adjusted in the computing topology; wherein, according to the resource adjustment information, the computing resources are dynamically adjusted, including: according to the topology information, the topological position of the node to be adjusted in the computing topology is adjusted, and the computing load on the bottleneck computing node in the node to be adjusted is migrated to an idle computing node.
[0012] Here, when using computing resources to perform the data preprocessing stage, it is a basic requirement to achieve load balancing of computing resources. If load balancing is achieved, it can meet the model training stage to obtain the preprocessed data in the data preprocessing stage on time.
[0013] Optionally, the method further includes: modifying the information of the computing device corresponding to the idle computing node and the information of the computing device corresponding to the bottleneck computing node. Here, after migrating the computing load on the bottleneck computing node to the idle computing node, the information of the computing device corresponding to the computing node and the information of the computing device corresponding to the node to be adjusted can also be changed in time for subsequent monitoring and use.
[0014] Optionally, the resource scheduling strategy also includes a resource utilization strategy. If there is a first computing node among the nodes to be adjusted whose resource utilization is lower than a first resource utilization threshold, the resource adjustment information includes information about processing threads that need to be added or information about processes that need to be added; wherein, according to the resource adjustment information, the computing resources are dynamically adjusted, including: according to the information about the processing threads that need to be added, adding processing threads or processing processes to the path where the first computing node is located, wherein the added processing threads or processing processes include one or more newly added computing nodes.
[0015] Here, if the load balancing of computing resources has been met, but the resource utilization of computing nodes can be further improved, then the resource utilization strategy can be used to further optimize the deployment of computing resources, thereby further improving the overall training efficiency.
[0016] In a possible implementation, the method further includes: recording attribute information of the one or more newly added computing nodes, the attribute information including one or more of the following information: a computing device corresponding to the computing node, a computing type of the computing node, and an execution probability of the computing node;
[0017] The one or more newly added computing nodes are monitored.
[0018] In a second aspect, a device for managing computing resources applied to a data preprocessing stage in a neural network is provided, the device comprising a module for executing the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0019] In a third aspect, a computer-readable storage medium is provided, which stores a program, and the program enables a computer to execute the above-mentioned first aspect, and any one of the various implementation methods of the method for managing computing resources in the data preprocessing stage in a neural network.
[0020] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for managing computing resources in the data preprocessing stage in a neural network in the first aspect.
[0021] In a fifth aspect, a device for managing computing resources in a data preprocessing stage in a neural network is provided, the device comprising a processor, a memory and an interface. The processor is connected to the memory and the interface (or interface circuit). The memory is used to store instructions, the processor is used to execute the instructions, and the transceiver is used to communicate with other computing nodes under the control of the processor. When the processor executes the instructions stored in the memory, the execution causes the processor to execute the method for managing computing resources in the data preprocessing stage in the neural network in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is an example diagram of an application architecture of an embodiment of the present application.
[0023] Figure 2 is a schematic diagram of an example of the computational process of neural network model training.
[0024] Figure 3 It is a schematic flowchart of a method for managing computing resources in a data preprocessing stage in a neural network according to an embodiment of the present application.
[0025] Figure 4 It is a schematic diagram of an example of a specific implementation of a method for managing computing resources applied to a data preprocessing stage in a neural network according to an embodiment of the present application.
[0026] Figure 5 It is a schematic diagram of an example of adjusting computing resources using an embodiment of the present application.
[0027] Figure 6 It is a schematic diagram of another example of adjusting computing resources using an embodiment of the present application.
[0028] Figure 7 It is a schematic block diagram of a device for managing computing resources applied to a data preprocessing stage in a neural network according to an embodiment of the present application.
[0029] Figure 8 It is a schematic structural block diagram of a device for managing computing resources applied to a data preprocessing stage in a neural network according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0031] In the description of the embodiments of the present application, unless otherwise specified, "multiple" or "multiple" means two or more. In addition, "at least one" can be interpreted as "one or more"; "at least one" can be interpreted as "one or more".
[0032] The technical solutions of the embodiments of the present application can be applied to various training model scenarios, learning frameworks such as machine learning and deep learning, for example, the Tensorflow framework and neural network training model based on Google's open source software library.
[0033] It should be understood that the technical solution of the embodiment of the present application is not only applicable to single-machine homogeneous hardware resources, but also applicable to distributed cluster systems, and large-scale computing platforms with many heterogeneous computing units on each node in the distributed cluster system. On such a large-scale and complex hardware platform, in order to handle the preprocessing of neural network model training data and match the preprocessing speed with the network computing speed, an effective solution for dynamically deploying computing resources is required.
[0034] Figure 1 It is a schematic diagram of an architecture for heterogeneous computing of data preprocessing using an embodiment of the present application. Figure 1 The following is an example of image data. Figure 1 As shown, the architecture includes a plurality of computing units ( Figure 1 The description is based on two computing units as an example), each computing unit may include an encoder / decoder, a central processing unit (CPU), an advanced reduced instruction set microprocessor (ARM), a digital signal processor (DSP), a graphics processing unit (GPU) and an embedded neural network processor (NPU).
[0035] Among them, CPU, ARM, DSP, GPU, and NPU can support different operations.
[0036] It should be understood that this is only Figure 1 The architecture of is described as an example, and does not limit the application architecture of the embodiment of the present application. For example, Figure 1 The system may include more computing units, or each computing unit may include more types or numbers of processors, which is not specifically limited.
[0037] Model training (such as model training in neural networks) is a cross-device, multi-stage process, and the computational efficiency of any stage will affect the overall training speed. Figure 2 Figure 2 shows a schematic diagram of the calculation process in model training. Figure 2As shown, generally speaking, a training iteration calculation can be divided into two parts, namely: data preprocessing stage and model training stage (or training calculation stage). Among them, the data preprocessing stage includes four stages, namely: data reading / output (Data I / O), decoding (Decoding), preprocessing (Pre-Process), and enhancement (Augmentation). Among them, the Data I / O stage includes taking data from local storage, network file system, distributed file system, etc. to the pipeline for processing; the Decoding stage is to decode the compressed data; the Pre-Process stage is to perform necessary preprocessing on the data, such as cutting, etc.; the Augmentation stage is to enhance the data to enrich the diversity of sample data. The model training stage means: after the data preprocessing stage, the training calculation of the neural network begins.
[0038] Among them, the data preprocessing stage is most likely to affect the efficiency of the training model. The calculation process in the data preprocessing stage can be implemented using computing resources, for example, data preprocessing can be implemented on a central processing unit (CPU) or a graphics processing unit (GPU). However, the computing deployment of the prior art is fixed, that is, the calculation is statically deployed in advance, or simply placed on the CPU for calculation, which is not flexible enough, and it is difficult to make full use of computing resources to achieve high-throughput data preprocessing, and the data throughput requirements of different neural network models are not considered. For example, some lightweight network models have fast calculation speeds and require large data throughput, while some networks are relatively large in scale, slow in calculation speeds, and require small data throughput. The present application proposes a method for computing resource management in the data preprocessing stage of a neural network, which can adaptively and dynamically adjust the calculation of data preprocessing according to the scale of the neural network and the actual data throughput requirements, and flexibly adjust the computing resources by optimizing the computing deployment, thereby improving the computing throughput of data preprocessing, thereby improving the overall training efficiency of the neural network.
[0039] In the embodiment of the present application, the process of data preprocessing can be implemented by computing resources. Computing resources can be understood as computing devices, and computing can be implemented by multiple processors. Computing resources can implement one or more of the following computing functions: encoding, decoding, filtering, shearing, translation, rotation, contrast enhancement, color inversion, balance, color gain, brightness, sharpness, cutout, etc. The embodiment of the present application does not limit the type of processor, and the processor can be any one or more of the following: CPU, advanced reduced instruction set microprocessor (advanced RISC machine, ARM), digital signal processor (digital signal processing, DSP), GPU and other devices with computing power or data processing capabilities.
[0040] Figure 3 3 is a schematic flow chart of a method 300 for managing computing resources in a data preprocessing stage in a neural network according to an embodiment of the present application. The computing resources include multiple heterogeneous computing nodes, and the method 300 includes:
[0041] S310, respectively monitoring resource usage information of the plurality of computing nodes. The plurality of computing nodes form a computing topology. Each computing node can be used to process data in a data preprocessing process of a neural network.
[0042] The resource usage information is used to indicate the resource usage of each computing node. After obtaining the resource usage, it is possible to know which computing nodes have low resource utilization, which computing nodes have bottlenecks, which computing nodes are idle, and other situations, so as to obtain resource adjustment information corresponding to the node to be adjusted based on this information.
[0043] Exemplarily, the resource usage of each node may be detected through a device status monitoring process.
[0044] Optionally, each computing node can be understood as a logical node, and one computing node or multiple computing nodes can correspond to a computing device (such as a processor). The resource usage of each computing node can also be understood as the resource usage of the computing device corresponding to the computing node. Alternatively, each computing node can also be understood as a physical node, and the resource usage of the computing node can be understood as the resource usage of the computing device.
[0045] Optionally, the resource usage of a computing node or a computing device may include one or more of the following factors: processor utilization, memory occupancy, memory bandwidth utilization, network bandwidth utilization, disk I / O rate, thread waiting time, etc.
[0046] S320: Generate resource adjustment information corresponding to the node to be adjusted among the multiple computing nodes according to the resource usage information and based on a preset resource scheduling policy.
[0047] Optionally, the resource usage information may indicate which computing nodes have low resource utilization, or may also indicate which computing nodes have excessively high resource utilization. In this way, the computing nodes to be adjusted may be determined based on the resource usage information. The nodes to be adjusted here may be a part of computing nodes determined from a plurality of heterogeneous computing nodes, or may be one or more computing nodes, without limitation. The embodiment of the present application does not specifically limit the number of nodes to be adjusted.
[0048] The resource adjustment information may include various information required for computing resources, such as thread or process number, node attributes, processor corresponding to the node, etc., which is not specifically limited.
[0049] Optionally, the resource scheduling strategy is set according to the computational throughput requirement of the data preprocessing stage in the model training stage of the neural network.
[0050] The neural network model training phase occurs after the data preprocessing phase. The detailed description of these two phases can be found in the previous Figure 2 "Computational throughput requirement" means that when executing the model training phase, the calculation results of the data preprocessing phase need to be obtained within a certain period of time. In other words, the execution speed of the data preprocessing phase needs to match the requirements of the model training phase.
[0051] Optionally, the resource scheduling strategy includes at least one of a load balancing strategy or a resource utilization strategy. That is to say, the resource scheduling strategy may only include a load balancing strategy; or, the resource scheduling strategy may only include a resource utilization strategy; or, the resource scheduling strategy includes a load balancing strategy and a resource utilization strategy. Specifically, when using computing resources to perform the data preprocessing stage, it is a basic requirement for computing resources to achieve load balancing. If load balancing is achieved, it is sufficient to meet the model training stage to obtain the preprocessed data in the data preprocessing stage on time. For the case where the resource scheduling strategy includes a load balancing strategy and a resource utilization strategy: Further, if the load balancing of computing resources has been met, but the resource utilization of computing nodes can be further improved, then the resource utilization strategy can be used to further optimize the deployment of computing resources, thereby further improving the overall training efficiency.
[0052] S330: Dynamically adjust the computing resources of the node to be adjusted according to the resource adjustment information.
[0053] Optionally, the adjustment includes one or more of the following processing: adjusting the number of processing threads of the node to be adjusted, adjusting the number of processing processes of the node to be adjusted, and adjusting the topological position of the node to be adjusted in the computing topology.
[0054] In an embodiment of the present application, by monitoring the resource usage information of each computing node, and generating resource adjustment information of the nodes to be adjusted among multiple computing nodes based on the resource usage information and a preset resource scheduling strategy, and finally dynamically adjusting the computing resources of the nodes to be adjusted based on the resource adjustment information, the computing resources in the data preprocessing process can be dynamically adjusted, load balancing is achieved, computing parallelism is increased, and computing resources are utilized to the greatest extent, thereby accelerating the processing speed of data preprocessing in the neural network (accelerating the computing throughput of data I / O, decoding, preprocessing, and enhancement operations) and reducing the training time of the network model.
[0055] Optionally, the resource scheduling strategy includes a load balancing strategy, and if the load on the node to be adjusted is unbalanced, the resource adjustment information includes topology information for adjusting the node to be adjusted in the computing topology. In other words, if a load balancing strategy is adopted and an unbalanced load on the node to be adjusted is detected, the resource adjustment information generated in step S320 will include topology information for adjusting the node to be adjusted in the computing topology.
[0056] Among them, S330 includes:
[0057] According to the topology information, the topological position of the node to be adjusted in the computing topology is adjusted, and the computing load on the bottleneck computing node in the node to be adjusted is migrated to an idle computing node.
[0058] Specifically, if there are bottleneck computing nodes and idle computing nodes in the nodes to be adjusted, that is, a load imbalance occurs, then the computing load on the bottleneck computing node in the nodes to be adjusted can be migrated or transferred to the idle computing node. Optionally, judging the level of resource utilization on the computing node can be achieved through a second resource utilization threshold, for example: if there is a computing node with a resource utilization rate higher than or equal to the second resource utilization threshold, it is considered that the resource utilization rate on the computing node is too high, and it can be considered as a bottleneck computing node; if there is a computing node with a resource utilization rate lower than the second resource utilization threshold, it is considered that the resource utilization rate on the computing node is too low, and it can be considered as an idle computing node. It should be understood that the second resource utilization threshold is used as an example for description here, and it does not constitute a limitation on the embodiments of the present application. Among them, the resource adjustment information may include the topological information of the node to be adjusted in the computing topology. Here, the topological information of the node to be adjusted in the computing topology may include the adjusted topological position of the bottleneck computing node, and may also include the adjusted topological position of the idle computing node. Optionally, the computing load on the bottleneck computing node may be migrated or transferred to an idle computing node adjacent to or close to the bottleneck computing node to reduce the complexity of migration.
[0059] It should be understood that the second resource utilization threshold can be determined based on actual needs, and the embodiment of the present application does not limit the specific value of the second resource utilization threshold.
[0060] Optionally, the method 300 further includes:
[0061] The information of the computing device corresponding to the idle computing node and the information of the computing device corresponding to the bottleneck computing node are modified.
[0062] For example, the information of the computing device may include the properties of the computer device, the information of the node corresponding to the computing device, etc., which is not limited to this.
[0063] That is to say, after migrating the computing load on the bottleneck computing node to the idle computing node, it is also necessary to promptly change the information of the computing device corresponding to the computing node and the information of the computing device corresponding to the node to be adjusted for subsequent monitoring and use.
[0064] Furthermore, the resource scheduling strategy may also include a resource utilization strategy. Here, after the computing resources are adjusted using the load balancing strategy, if there is room for further improvement in resource utilization on some computing nodes, the resource utilization strategy may be used to further optimize the deployment of computing resources. In other words, the embodiments of the present application may combine the load balancing strategy and the resource utilization strategy as a judgment condition for adjusting computing resources.
[0065] Exemplarily, if there is a first computing node among the nodes to be adjusted whose resource utilization is lower than the first resource utilization threshold, the information to be adjusted includes information of a processing thread to be added or information of a process to be added;
[0066] Among them, S330 includes:
[0067] According to the information of the processing thread that needs to be added, a processing thread or a processing process is added to the path where the first computing node is located, wherein the added processing thread or processing process includes one or more newly added computing nodes.
[0068] Specifically, if the resource utilization rate on the first computing node is not high (it can also be understood as the resource utilization rate of the processor corresponding to the first computing node is not high), then a processing thread or a processing process can be added to the path where the first computing node is located. Here, judging the resource utilization rate on the first computing node can be achieved through the first resource utilization threshold, that is, if the resource utilization rate on the first computing node is lower than the first resource utilization threshold, it is considered that the resource utilization rate on the first computing node is not high. Among them, the resource adjustment information includes information about the processing threads that need to be added or information about the processes that need to be added. Here, the processing threads or processing processes added to the path where the first computing node is located may include one or more newly added computing nodes to increase the computing load on the node to be adjusted.
[0069] It should be understood that the first resource utilization threshold here can be determined based on actual needs, and the embodiment of the present application does not limit the specific value of the first resource utilization threshold.
[0070] It should also be understood that the embodiment of the present application does not limit the relationship between the first resource utilization threshold and the second resource utilization threshold, which may be the same or different, and there is no limitation on this.
[0071] It should also be understood that the above-mentioned embodiments of resource utilization strategy can be implemented independently without relying on load balancing strategy, and the embodiments of the present application are not limited to this.
[0072] Optionally, after adding the above one or more newly added computing nodes, the computing topology may be updated accordingly.
[0073] Optionally, the method 300 further includes:
[0074] Recording attribute information of the one or more newly added computing nodes, the attribute information including one or more of the following information: a computing device corresponding to the computing node, a computing type of the computing node, and an execution probability of the computing node;
[0075] The one or more newly added computing nodes are monitored.
[0076] That is to say, after adding one or more computing nodes, it is also necessary to record the attribute information of these computing nodes, where the attribute information may include one or more of the following information: the computing device (or processor) corresponding to the newly added computing node, the computing type of the newly added computing node, and the probability that the newly added computing node will be used to perform the neural network data preprocessing process in the future, so as to facilitate the detection of these newly added computing nodes and obtain the subsequent resource usage on these newly added computing nodes, so as to facilitate the subsequent adjustment of computing resources.
[0077] It should be understood that the method for managing computing resources in the embodiment of the present application may not be limited to the process of neural network data preprocessing, but may also be other training scenarios with data preprocessing requirements, such as fuzzy model scenarios and support vector machine training model scenarios, without limitation. Optionally, the embodiment of the present application is applicable to automated computing deployment tasks such as any heterogeneous hardware platform (including, distributed systems, embedded systems, and quasi-PC servers).
[0078] To facilitate understanding by those skilled in the art, a description is given below with reference to specific examples.
[0079] Figure 4 A schematic diagram showing an example of a specific implementation of a method for managing computing resources in a data preprocessing stage in a neural network according to an embodiment of the present application is shown. Figure 4 As shown, the management method of computing resources applied to the data preprocessing stage in a neural network in an embodiment of the present application can be implemented by the following components: a topology management component (or called a topology manager), a resource management component (or called a resource manager) and a state management component (or called a state manager).
[0080] The topology management component is used to manage computing topology, specifically to create dynamic topology graphs and process flows, manage thread pools, implement parallel computing, and fully utilize device computing resources.
[0081] The resource management component is used to manage the deployment of computing resources, specifically to monitor and manage computing, memory, thread and other resources, analyze the resource utilization of each computing device, and adjust the computing deployment and computing topology of the node based on the feedback information about the computing device. The resource management component can monitor the node or computing device through the device status monitoring process, and can monitor the following information: processor utilization, memory occupancy, memory bandwidth utilization, network bandwidth utilization, disk I / O rate, thread waiting time, etc.
[0082] The state management component is used to record the attribute information of the computing node, which includes parameters such as computing device, operator computing type, execution probability, etc. Optionally, when the data computing process needs to be redeployed across platforms, the state management component can transmit the node attribute information to the resource management component.
[0083] exist Figure 4 In the example, when the resource management component learns that the computing resource utilization rate of a computing node is not high, the resource management component can inform the topology management component that the topology needs to be adjusted and the processing thread needs to be added, so that the topology management component returns the thread number or process number to the resource management component; when the resource management component learns that the platform load is unbalanced, the resource management component can inform the state management component that the computing device corresponding to the node needs to be adjusted, so that the state management component returns the deployment device ID to the resource management component. When adding a computing node, the topology management component also needs to inform the state management component of the information of the newly added computing node, so that the state management component records the information of the newly added computing node. The state management component can feed back the record confirmation of the newly added computing node attribute information to the topology management component.
[0084] Specifically, the computing system initializes a session, which includes the initialization of the computing topology and the initialization of components (including: topology management component, resource management component and state management component). The resource management component can start the device status monitoring process and collect resource information of various devices on the hardware platform in real time, such as processor utilization, memory occupancy, memory bandwidth utilization, network bandwidth utilization, disk I / O rate, thread waiting time, etc. The computing system processes data based on the computing topology. At the same time, the resource management component synchronously analyzes the status information of each hardware device fed back by the device status monitoring process.
[0085] For example, if the resource management component detects that the resource utilization rate of some computing nodes in the computing topology or the path where the computing nodes are located is not high, it can notify the topology management component to increase the number of threads or processes calculated on the path, that is, dynamically add a path based on the original computing topology, and the path consists of multiple nodes and edges. Among them, a node represents a computing operation, and an edge represents the flow direction of processing data, which is used to indicate the processing flow of data. The topology management component can feed back the newly created thread ID or process ID to the resource management component so that the resource management component can update the monitoring and analysis scope. In addition, the topology management component also notifies the state management component of the newly added node. The state management component creates attribute information of the newly added node based on the newly added node, and returns the creation confirmation information of the attribute information of the newly added computing node to the topology management component.
[0086] Figure 5 A schematic diagram of an example of adjusting the computing topology of computing resources using an embodiment of the present application is provided. Figure 5 As shown, boxes of different shapes in the computing topology represent different processors (including processor A, processor B, processor C, and processor D), where the numbers in the boxes (including 1, 2, 3...10) represent different computing operations (which can be called operators or computing nodes). Figure 5 The figure above is the computing topology before adjustment. When the resource management module finds that the resource utilization of processor A and processor B is not high, it adjusts the computing topology to obtain Figure 5 The following computing topology is shown in the figure. Compared with the computing topology before adjustment, the adjusted computing topology adds computing branches of operators 1, 2, 3, 4, 5, and 7, that is, it adds parallel processing threads and improves the computing throughput of data processing.
[0087] For another example, if the resource management module detects that the resource utilization of certain computing nodes (i.e., bottleneck computing nodes and idle computing nodes) in the computing topology is unbalanced, for example, data volume congestion and load imbalance occur, the information of the bottleneck computing nodes and the idle computing nodes will be notified to the state management module. Based on the information of the bottleneck computing nodes and the idle computing nodes, the state management module deploys the calculation of the bottleneck computing nodes to the devices of the spatial nodes, thereby achieving load balancing. The state management module needs to modify the information of the bottleneck computing nodes and the idle computing nodes, and feed back the changed node attribute information to the resource management module. Based on the changed node attribute information, the resource management module updates the correspondence between the hardware devices and the computing nodes, and updates the monitoring analysis.
[0088] For example, Figure 6 A schematic diagram of another example of a computing topology using an embodiment of the present application is given. Figure 6 As shown, boxes of different shapes in the computing topology represent different processors, wherein the numbers in the boxes represent different computing operations (which may be referred to as operators or nodes or computing nodes). Figure 6 The figure above is the computing topology before adjustment. When the resource management module finds that the resource utilization of processor A and processor B is unbalanced, it adjusts the computing topology to obtain Figure 6 The following computing topology. Compared with the computing topology before adjustment, the computing topology after adjustment transfers the computing load on the bottleneck node 5 (the node corresponding to processor A) to the idle computing node 6 (the node corresponding to processor B), achieving load balancing.
[0089] It should be understood that Figure 5 and Figure 6 The examples are only for the convenience of those skilled in the art to understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific scenarios illustrated. Figure 5 and Figure 6It is obvious that various equivalent modifications or changes can be made, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0090] It should also be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0091] Combination of the above Figures 1 to 6 The management method of computing resources applied to the data preprocessing stage in a neural network according to an embodiment of the present application is described in detail. Figure 7 and Figure 8 The present invention describes a computing resource management device for use in a data preprocessing phase in a neural network according to an embodiment of the present application. It should be understood that the technical features described in the method embodiment are also applicable to the following device embodiment.
[0092] Figure 7 A schematic block diagram of a computing resource management device 700 for a data preprocessing stage in a neural network according to an embodiment of the present application is shown. The device 700 is used to execute the method embodiment described above. Optionally, the specific form of the device 700 can be a software component and / or hardware. Optionally, the device 700 can be a processor or a chip in a processor. The computing resources include multiple heterogeneous computing nodes, and the device 700 includes:
[0093] A monitoring module 710, configured to monitor resource usage information of the plurality of computing nodes respectively;
[0094] A generating module 720, configured to generate resource adjustment information corresponding to the node to be adjusted among the plurality of computing nodes according to the resource usage information and based on a preset resource scheduling policy;
[0095] The processing module 730 is used to dynamically adjust the computing resources of the node to be adjusted according to the resource adjustment information.
[0096] In an optional implementation, the resource scheduling strategy is set according to the computational throughput requirement of the data preprocessing stage in the model training stage of the neural network.
[0097] In an optional implementation, the resource scheduling strategy includes at least one of a load balancing strategy or a resource utilization strategy.
[0098] In an optional implementation, the resource scheduling strategy includes a load balancing strategy, and if there is a load imbalance in the node to be adjusted, the resource adjustment information includes topology information for adjusting the node to be adjusted in the computing topology;
[0099] The processing module 730 is used to dynamically adjust the computing resources according to the resource adjustment information, specifically including:
[0100] According to the topology information, the topological position of the node to be adjusted in the computing topology is adjusted, and the computing load on the bottleneck computing node in the node to be adjusted is migrated to an idle computing node.
[0101] In an optional implementation, the processing module 730 is further configured to:
[0102] The information of the computing device corresponding to the idle computing node and the information of the computing device corresponding to the bottleneck computing node are modified.
[0103] In an optional implementation, the resource scheduling strategy also includes a resource utilization strategy. If the resource utilization of a first computing node among the nodes to be adjusted is lower than a first resource utilization threshold, the information to be adjusted includes information about a processing thread to be added or information about a process to be added.
[0104] The processing module is used to dynamically adjust the computing resources according to the resource adjustment information, specifically including:
[0105] According to the information of the processing thread that needs to be added, a processing thread or a processing process is added to the path where the first computing node is located, wherein the added processing thread or processing process includes one or more newly added computing nodes.
[0106] In an optional implementation, the processing module 730 is further configured to:
[0107] Recording attribute information of the one or more newly added computing nodes, the attribute information including one or more of the following information: a computing device corresponding to the computing node, a computing type of the computing node, and an execution probability of the computing node;
[0108] The monitoring module 710 is further used to monitor the one or more newly added computing nodes.
[0109] It should be understood that the apparatus 700 according to the embodiment of the present application may be used to execute the method of the aforementioned method embodiment, for example, Figure 3 The method in the embodiment, and the above-mentioned and other management operations and / or functions of each module in the device 700 are respectively the corresponding steps of the method for implementing the aforementioned method embodiment, so the beneficial effects of the aforementioned method embodiment can also be achieved. For the sake of brevity, they are not described here.
[0110] It should also be understood that each module in the device 700 can be implemented in software and / or hardware form, and there is no specific limitation on this. In other words, the device 700 is presented in the form of functional modules. The "module" here can refer to a specific application integrated circuit ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions. Optionally, in a simple embodiment, a person skilled in the art can imagine that the device 700 can adopt Figure 8 The monitoring module 710, the generating module 720 and the processing module 730 can be Figure 8 The processor 801 shown is implemented. Specifically, the processor is implemented by executing a computer program stored in the memory. Optionally, when the device 700 is a chip, the functions and / or implementation processes of the transceiver involved in the device 700 can also be implemented by pins or interface circuits. Optionally, the memory is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit in the computer device located outside the chip, such as Figure 8 The memory 802.
[0111] Figure 8 FIG. 8 is a schematic structural diagram of a computing resource management device 800 for use in a data preprocessing phase in a neural network according to an embodiment of the present application. Figure 8 As shown, the device 800 includes: a processor 801.
[0112] In one possible implementation, the processor 801 is used to perform the following actions: monitor the resource usage information of the multiple computing nodes respectively; generate resource adjustment information corresponding to the node to be adjusted among the multiple computing nodes according to the resource usage information and based on a preset resource scheduling strategy; and dynamically adjust the computing resources of the node to be adjusted according to the resource adjustment information.
[0113] It should be understood that the processor 801 can call an interface to perform related transceiver or communication actions, wherein the called interface can be a logical interface or a physical interface, which is not limited. Optionally, the physical interface can be implemented by a transceiver circuit. Optionally, the device 800 also includes an interface 803.
[0114] Optionally, the device 800 further includes a memory 802 , in which the program code in the above method embodiment can be stored, so as to be called by the processor 801 .
[0115] Specifically, if the device 800 includes a processor 801, a memory 802, and an interface 803, the processor 801, the memory 802, and the interface 803 communicate with each other through an internal connection path to transmit control and / or data signals. In a possible design, the processor 801, the memory 802, and the interface 803 can be implemented by a chip, and the processor 801, the memory 802, and the interface 803 can be implemented in the same chip, or they can be implemented in different chips, or any two of the functions can be combined and implemented in one chip. The memory 802 can store program code, and the processor 801 calls the program code stored in the memory 802 to implement the corresponding functions of the device 800.
[0116] It should be understood that the device 800 can also be used to execute other steps and / or operations of the method in the above embodiment, which are not described here for the sake of brevity.
[0117] The present application also provides a computing system for a neural network, the computing system comprising one or more computing nodes, and a management device for computing resources used in a data preprocessing stage in a neural network (such as the device 700 described above), the management device being used to manage the one or more computing nodes. Optionally, the management device may be deployed on a computing device corresponding to any computing node, or may be deployed independently, without limitation.
[0118] The method disclosed in the above embodiment of the present application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can also be a system on chip (system on chip, SoC), a central processor unit (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), a microcontroller (micro controller unit, MCU), a programmable logic device (programmable logic device, PLD) or other integrated chips. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0119] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0120] Various aspects or features of the present application may be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used in the present application encompasses a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks, or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0121] It should also be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0122] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0127] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
Claims
1. A method for managing computing resources in the data preprocessing stage of a neural network, It is characterized in that The computing resources include a plurality of heterogeneous computing nodes, and the method includes: respectively monitoring resource usage information of the plurality of computing nodes; Generate resource adjustment information corresponding to the node to be adjusted among the multiple computing nodes according to the resource usage information and based on a preset resource scheduling strategy, wherein the resource scheduling strategy is set according to the computing throughput requirement of the data preprocessing stage in the model training stage of the neural network; According to the resource adjustment information, the computing resources of the node to be adjusted are dynamically adjusted.
2. The method according to claim 1, It is characterized in that The resource scheduling strategy includes at least one of a load balancing strategy and a resource utilization strategy.
3. The method according to claim 2, It is characterized in that The resource scheduling strategy includes a load balancing strategy. If there is a load imbalance in the node to be adjusted, the resource adjustment information includes topology information for adjusting the node to be adjusted in the computing topology; The dynamically adjusting the computing resources according to the resource adjustment information includes: According to the topology information, the topological position of the node to be adjusted in the computing topology is adjusted, and the computing load on the bottleneck computing node among the nodes to be adjusted is migrated to an idle computing node.
4. The method according to claim 3, It is characterized in that The method further comprises: The information of the computing device corresponding to the idle computing node and the information of the computing device corresponding to the bottleneck computing node are modified.
5. The method according to claim 3 or 4, It is characterized in that The resource scheduling strategy also includes a resource utilization strategy. If the resource utilization of a first computing node among the nodes to be adjusted is lower than a first resource utilization threshold, the resource adjustment information includes information about a processing thread to be added or information about a process to be added. The dynamically adjusting the computing resources according to the resource adjustment information includes: According to the information of the processing thread that needs to be added, a processing thread or a processing process is added to the path where the first computing node is located, wherein the added processing thread or processing process includes one or more newly added computing nodes.
6. The method according to claim 5, It is characterized in that The method further comprises: Recording attribute information of the one or more newly added computing nodes, the attribute information including one or more of the following information: a computing device corresponding to the computing node, a computing type of the computing node, and an execution probability of the computing node; The one or more newly added computing nodes are monitored.
7. A computing resource management device for use in a data preprocessing phase of a neural network, It is characterized in that The computing resource includes a plurality of heterogeneous computing nodes, and the device includes: A monitoring module, used to monitor resource usage information of the multiple computing nodes respectively; A generating module, configured to generate resource adjustment information corresponding to the nodes to be adjusted among the plurality of computing nodes according to the resource usage information and based on a preset resource scheduling strategy, wherein the resource scheduling strategy is set according to the computing throughput requirement of the model training stage of the neural network for the data preprocessing stage; A processing module is used to dynamically adjust the computing resources of the node to be adjusted according to the resource adjustment information.
8. The device according to claim 7, It is characterized in that The resource scheduling strategy includes at least one of a load balancing strategy and a resource utilization strategy.
9. The device according to claim 8, It is characterized in that The resource scheduling strategy includes a load balancing strategy. If there is a load imbalance in the node to be adjusted, the resource adjustment information includes topology information for adjusting the node to be adjusted in the computing topology; The processing module is used to dynamically adjust the computing resources according to the resource adjustment information, specifically including: According to the topology information, the topological position of the node to be adjusted in the computing topology is adjusted, and the computing load on the bottleneck computing node in the node to be adjusted is migrated to an idle computing node.
10. The device according to claim 9, It is characterized in that The processing module is also used for: The information of the computing device corresponding to the idle computing node and the information of the computing device corresponding to the bottleneck computing node are modified.
11. The device according to claim 9 or 10, It is characterized in that The resource scheduling strategy also includes a resource utilization strategy. If the resource utilization of a first computing node among the nodes to be adjusted is lower than a first resource utilization threshold, the resource adjustment information includes information about a processing thread to be added or information about a process to be added. The processing module is used to dynamically adjust the computing resources according to the resource adjustment information, specifically including: According to the information of the processing thread that needs to be added, a processing thread or a processing process is added to the path where the first computing node is located, wherein the added processing thread or processing process includes one or more newly added computing nodes.
12. The device according to claim 11, It is characterized in that The processing module is also used for: Recording attribute information of the one or more newly added computing nodes, the attribute information including one or more of the following information: a computing device corresponding to the computing node, a computing type of the computing node, and an execution probability of the computing node; The monitoring module is further used to monitor the one or more newly added computing nodes.
13. A computer program storage medium, It is characterized in that The computer program storage medium has program instructions, and when the program instructions are directly or indirectly executed, the method according to any one of claims 1 to 6 is implemented in a computing device.
14. A device for managing computing resources in the data preprocessing process of a neural network, It is characterized in that include: At least one processor and an interface, wherein the interface is used for the device to exchange information with one or more computing nodes, and when program instructions are executed in the at least one processor, the device implements the method as described in any one of claims 1-6.
15. The device according to claim 14, It is characterized in that The device further includes: a memory, in which the program instructions are stored.
16. A neural network computing system, It is characterized in that include: One or more computing nodes, and a computing resource management device as described in any one of claims 7 to 12 applied to the data preprocessing stage in a neural network.
