Electronic device for performing distributed training in heterogeneous computing environment, and control method thereof
The electronic device addresses delays in distributed learning by assigning weights to nodes and converting learning results, optimizing data distribution and processing across heterogeneous nodes, thus enhancing the efficiency of large-scale deep learning model processing.
Patent Information
- Application Number
- PCT/KR2024/003317
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-17
- Filing Date
- 2024-03-15
- Publication Date
- 2024-10-17
AI Technical Summary
Distributed learning in heterogeneous computing environments faces delays due to differences in computing performance and network speed among nodes, leading to inefficiencies in processing large-scale deep learning models.
An electronic device with a communication interface and processor that assigns weights to computational nodes based on their profile information, distributes AI models and data, and converts learning results to facilitate efficient data processing across nodes, ensuring seamless data transmission and processing in heterogeneous environments.
This approach enables faster and more efficient distributed learning by optimizing data distribution and processing across nodes with varying performance and network speeds, reducing overall learning time and improving the speed of distributed learning processes.
Smart Images

Figure KR2024003317_17102024_PF_FP_ABST
Abstract
Description
Electronic device for performing distributed learning in a heterogeneous computing environment and its control method
[0001] The present disclosure relates to an electronic device and a control method thereof, and more particularly, to an electronic device for performing distributed learning in a heterogeneous computing environment and a control method thereof.
[0002] Recently, for higher-level services, seamless training of large-scale deep learning models using large amounts of data has become increasingly important. However, training these deep learning models is too complex to be processed smoothly, resulting in long computing times.
[0003] To address these challenges, parallel processing of complex deep learning model training in a centralized high-performance computing environment is emerging as the most promising solution. High-performance computing environments support clusters of computing nodes equipped with computing devices such as graphics processing units (GPUs) and neural processing units (NPUs), rather than typical servers comprised solely of central processing units (CPUs). Data parallel processing is primarily employed here, distributing AI models and data to each computing device and integrating the trained models.
[0004] Distributed learning, which utilizes computer clusters to train AI models through distributed computing, is being utilized as a method of training AI models. When performing distributed learning using a computer cluster, the master node of the computer cluster can aggregate training results from each node and train the AI model. However, if there is a delay in obtaining computational results from some nodes within the cluster due to differences in computing performance or network speed, the entire distributed learning process can be delayed.
[0005] An electronic device according to one or more embodiments of the present disclosure includes a communication interface for performing communication with a plurality of computational nodes; a memory for storing profile information for the plurality of computational nodes and at least one command; and a processor for assigning a weight for dividing the artificial intelligence model and learning data to each of the plurality of computational nodes based on the profile information of each of the plurality of computational nodes, distributing the artificial intelligence model and the learning data to the plurality of computational nodes according to the assigned weight, and controlling the plurality of computational nodes to train the divided artificial intelligence model using the distributed learning data, thereby performing distributed learning of the artificial intelligence model; wherein the processor converts learning result data received from a first computational node among the plurality of computational nodes into data in a format that can be processed by each of the plurality of computational nodes, and controls the second computational node among the plurality of computational nodes to train the distributed artificial intelligence model using the converted data.
[0006] A method for controlling an electronic device according to one or more embodiments of the present disclosure includes: assigning a weight for dividing an artificial intelligence model and learning data to each of a plurality of computational nodes based on profile information of each of the plurality of computational nodes; distributing the artificial intelligence model and the learning data to the plurality of computational nodes according to the assigned weight; and controlling the plurality of computational nodes to train the divided artificial intelligence model using the distributed learning data, thereby performing distributed learning of the artificial intelligence model; wherein the performing distributed learning includes converting learning result data received from a first computational node among the plurality of computational nodes into data in a format that each of the plurality of computational nodes can process, and controlling a second computational node among the plurality of computational nodes to train the distributed artificial intelligence model using the converted data.
[0007] A non-transitory computer-readable recording medium including a program for executing a control method of an electronic device according to one or more embodiments of the present disclosure, the control method comprising: a step of assigning a weight for dividing the artificial intelligence model and learning data to each of the plurality of computational nodes based on profile information of each of the plurality of computational nodes; a step of distributing the artificial intelligence model and the learning data to the plurality of computational nodes according to the assigned weight; and a step of performing distributed learning of the artificial intelligence model by controlling the plurality of computational nodes to train the divided artificial intelligence model using the distributed learning data; wherein the step of performing distributed learning includes converting learning result data received from a first computational node among the plurality of computational nodes into data in a format that each of the plurality of computational nodes can process, and controlling a second computational node among the plurality of computational nodes to train the distributed artificial intelligence model using the converted data.
[0008] FIG. 1 is a diagram illustrating a distributed learning system according to one or more embodiments of the present disclosure.
[0009] FIGS. 2A and 2B are block diagrams illustrating a configuration of an electronic device according to one or more embodiments of the present disclosure.
[0010] FIG. 3 is a diagram illustrating a method for an electronic device according to one or more embodiments of the present disclosure to partition data into computational nodes.
[0011] FIG. 4 is a drawing for explaining profile information of a computing device according to one or more embodiments of the present disclosure.
[0012] FIGS. 5 and 6 are diagrams illustrating a method for supporting data transmission and reception between computational nodes by an electronic device according to one or more embodiments of the present disclosure.
[0013] FIG. 7 is a diagram illustrating a method for providing a UI for setting an operation node according to one or more embodiments of the present disclosure.
[0014] The present embodiments may be modified and have various embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope to specific embodiments, but should be understood to encompass various modifications, equivalents, and / or alternatives of the embodiments of the present disclosure. In connection with the description of the drawings, similar reference numerals may be used for similar components.
[0015] In describing the present disclosure, if it is determined that a specific description of a related known function or configuration may unnecessarily obscure the gist of the present disclosure, a detailed description thereof will be omitted.
[0016] Additionally, the following embodiments may be modified in various other forms, and the scope of the technical concepts of the present disclosure is not limited to the following embodiments. Rather, these embodiments are provided to further faithfully and completely convey the technical concepts of the present disclosure to those skilled in the art.
[0017] The terminology used in this disclosure is for the purpose of describing specific embodiments only and is not intended to limit the scope of the rights. Singular expressions include plural expressions unless the context clearly dictates otherwise.
[0018] In this disclosure, expressions such as “has,” “can have,” “includes,” or “may include” indicate the presence of a corresponding feature (e.g., a component such as a number, function, operation, or part), and do not exclude the presence of additional features.
[0019] In this disclosure, expressions such as “A or B,” “at least one of A and / or B,” or “one or more of A or / and B” can include all possible combinations of the listed items. For example, “A or B,” “at least one of A and B,” or “at least one of A or B” can all refer to (1) including at least one A, (2) including at least one B, or (3) including both at least one A and at least one B.
[0020] The expressions “first,” “second,” “first,” or “second,” etc., used in this disclosure can describe various components, regardless of order and / or importance, and are only used to distinguish one component from another, but do not limit the components.
[0021] When it is said that a component (e.g., a first component) is “(operatively or communicatively) coupled with / to” or “connected to” another component (e.g., a second component), it should be understood that said component may be directly coupled to said other component, or may be coupled via another component (e.g., a third component).
[0022] On the other hand, when it is said that a component (e.g., a first component) is "directly connected" or "directly connected" to another component (e.g., a second component), it can be understood that no other component (e.g., a third component) exists between said component and said other component.
[0023] The expression "configured to" used in the present disclosure may be used interchangeably with, for example, "suitable for," "having the capacity to," "designed to," "adapted to," "made to," or "capable of." The term "configured to" may not necessarily mean only "specifically designed to" in terms of hardware.
[0024] Instead, in some contexts, the phrase "a device configured to" may mean that the device, in conjunction with other devices or components, is "capable of" performing A, B, and C. For example, the phrase "a processor configured (or set) to perform A, B, and C" may refer to a dedicated processor (e.g., an embedded processor) for performing those operations, or a general-purpose processor (e.g., a CPU or application processor) that can perform those operations by executing one or more software programs stored in a memory device.
[0025] In the embodiments, a 'module' or 'part' performs at least one function or operation, and may be implemented as hardware or software, or as a combination of hardware and software. Furthermore, a plurality of 'modules' or 'parts' may be integrated into at least one module and implemented as at least one processor, except for a 'module' or 'part' that needs to be implemented as a specific hardware.
[0026] Meanwhile, the various elements and areas in the drawings are schematically drawn. Therefore, the technical concept of the present invention is not limited by the relative sizes or spacing depicted in the attached drawings.
[0027] Hereinafter, with reference to the attached drawings, embodiments according to the present disclosure will be described in detail so that a person having ordinary knowledge in the technical field to which the present disclosure pertains can easily implement the present disclosure.
[0028] FIG. 1 is a diagram illustrating a distributed learning system according to one or more embodiments of the present disclosure.
[0029] The electronic device (100) can store a learning dataset (112) and learning code (113) for performing distributed learning. Here, the learning dataset (112) and learning code (113) may be data for training an artificial intelligence model.
[0030] In addition, the electronic device (100) can perform distributed learning of an artificial intelligence model (111) learned through data parallelism using multiple computational nodes (200).
[0031] A computational node may include at least one computational device (e.g., an accelerator) to provide computational resources. Specifically, the computational device may refer to a device for performing training and inference of an artificial intelligence model. For example, the computational device may include one or more of a GPU, CPU, APU, MIC, DSP, NPU, MPU, hardware computational device, or machine learning computational device.
[0032] At this time, one computational node may include a computational device of the same type. And, a plurality of computational nodes may include computational devices of different types. For example, a first computational node may include at least one first computational device. And, a second computational node may include at least one second computational device. And, a third computational node may include at least one third computational device. At this time, the types of the first computational device, the second computational device, and the third computational device may be different. The computational speeds of the first computational device, the second computational device, and the third computational device may be different. Alternatively, the memory capacities of the first computational device, the second computational device, and the third computational device may be different. Alternatively, the communication speeds between the first computational device, the second computational device, and the third computational device and the electronic device (100) may be different. The electronic device (100) may divide the learning dataset (112) and distribute it to each of the plurality of computational nodes.
[0033] And, by using the learning data set (112) distributed to each of the multiple operation nodes, the electronic device (100) can perform distributed learning of the artificial intelligence model (111).
[0034] That is, the electronic device (100) can control a plurality of computational nodes by using a learning dataset (112) distributed to each of the plurality of computational nodes. In addition, the electronic device (100) can receive the results of learning performed from the plurality of computational nodes and train an artificial intelligence model (111) by synthesizing the received results.
[0035] Additionally, although not shown in the drawing, an electronic device (100) according to one or more embodiments of the present disclosure can perform distributed inference of an artificial intelligence model through model parallelism and data parallelism using a plurality of computational nodes.
[0036] That is, the electronic device (100) can divide the artificial intelligence model (111) and the learning dataset (112) that have not completed learning and distribute them to each of a plurality of operation nodes.
[0037] By using the artificial intelligence model (111) and learning dataset (112) distributed to each of the multiple operation nodes, the electronic device (100) can perform distributed learning of the artificial intelligence model (111).
[0038] FIGS. 2A and 2B are block diagrams illustrating a configuration of an electronic device according to one or more embodiments of the present disclosure. Referring to FIG. 2A, the electronic device (100) may include a memory (110), a communication interface (120), and a processor (150). The electronic device (100) may omit some of the above components and may further include other components. In this case, a plurality of computing devices may be included in the electronic device (100), but this is only one embodiment, and may be implemented as separate devices from the electronic device (100).
[0039] And, the electronic device (100) may be implemented as a server, but is not limited thereto.
[0040] The memory (110) can store at least one instruction regarding the electronic device (100). The memory (110) can store an operating system (O / S) for driving the electronic device (100). In addition, the memory (110) can store various software programs or applications for operating the electronic device (100) according to various embodiments of the present disclosure. In addition, the memory (110) can include a semiconductor memory such as a flash memory or a magnetic storage medium such as a hard disk.
[0041] Specifically, the memory (110) can store various software modules for operating the electronic device (100) according to various embodiments of the present disclosure, and the processor (150) can control the operation of the electronic device (100) by executing various software modules stored in the memory (110). That is, the memory (110) is accessed by the processor (150), and data reading / recording / modifying / deleting / updating, etc. can be performed by the processor (150).
[0042] Meanwhile, in the present disclosure, the term memory (110) may be used to mean a memory (110), a ROM (not shown), a RAM (not shown) in a processor (150), or a memory card (not shown) (e.g., a micro SD card, a memory stick) mounted on an electronic device (100).
[0043] The memory (110) can store an artificial intelligence model (111) for performing distributed learning or distributed inference. At this time, the memory (110) can store a learning dataset (112) for training the artificial intelligence model (111). In addition, the memory (110) can store input data for performing inference of the artificial intelligence model (111).
[0044] And, the communication interface (120) includes a circuitry and is a configuration capable of communicating with external devices and servers. The communication interface (120) can communicate with external devices or servers based on a wired or wireless communication method. The communication interface (120) may include a Bluetooth module (not shown), a Wi-Fi module (not shown), an IR (infrared) module, a LAN (Local Area Network) module, an Ethernet module, etc. Here, each communication module may be implemented in the form of at least one hardware chip. In addition to the above-described communication method, the wireless communication module may include at least one communication chip that performs communication according to various wireless communication standards such as Zigbee, USB (Universal Serial Bus), MIPI CSI (Mobile Industry Processor Interface Camera Serial Interface), 3G (3rd Generation), 3GPP (3rd Generation Partnership Project), LTE (Long Term Evolution), LTE-A (LTE Advanced), 4G (4th Generation), 5G (5th Generation), etc. However, this is only one embodiment, and the communication interface (120) can utilize at least one communication module among various communication modules.
[0045] The communication interface (120) may be connected to a plurality of computational devices constituting a plurality of computational nodes. At least one of an artificial intelligence model, learning data, and input data for performing distributed learning or distributed inference may be transmitted to each of the plurality of computational nodes via the communication interface (120).
[0046] The processor (150) can control the overall operation and function of the electronic device (100). Specifically, the processor (150) is connected to the configuration of the electronic device (100) including the memory (110), and can control the overall operation of the electronic device (100) by executing at least one command stored in the memory (110) as described above.
[0047] The processor (150) may be implemented in various ways. For example, the processor (150) may be implemented as at least one of an application specific integrated circuit (ASIC), a logic integrated circuit, an embedded processor, a microcomputer (Micom), a microprocessor, hardware control logic, a hardware finite state machine (FSM), and a digital signal processor (DSP).
[0048] In particular, the processor (150) may include one or more processors. Specifically, the one or more processors may include one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), an Accelerated Processing Unit (APU), a Many Integrated Core (MIC), a Digital Signal Processor (DSP), a Neural Processing Unit (NPU), a Main Processing Unit (MPU), a hardware computing unit, or a machine learning computing unit. The one or more processors may control one or any combination of other components of the electronic device, and may perform operations related to communication or data processing. The one or more processors may execute one or more programs or instructions stored in a memory. For example, the one or more processors may perform a method according to an embodiment of the present disclosure by executing one or more instructions stored in a memory.
[0049] When a method according to one or more embodiments of the present disclosure includes multiple operations, the multiple operations may be performed by one processor or by multiple processors. That is, when a first operation, a second operation, and a third operation are performed by a method according to one or more embodiments, the first operation, the second operation, and the third operation may all be performed by the first processor, or the first operation and the second operation may be performed by the first processor (e.g., a general-purpose processor) and the third operation may be performed by the second processor (e.g., an artificial intelligence-specific processor).
[0050] One or more processors may be implemented as a single core processor including one core, or may be implemented as one or more multicore processors including multiple cores (e.g., homogeneous multicores or heterogeneous multicores). When one or more processors are implemented as a multicore processor, each of the multiple cores included in the multicore processor may include internal processor memory, such as cache memory or on-chip memory, and a common cache shared by the multiple cores may be included in the multicore processor. In addition, each of the multiple cores (or some of the multiple cores) included in the multicore processor may independently read and execute program instructions for implementing a method according to one or more embodiments of the present disclosure, or all (or some) of the multiple cores may be linked to read and execute program instructions for implementing a method according to one or more embodiments of the present disclosure.
[0051] When a method according to one or more embodiments of the present disclosure includes a plurality of operations, the plurality of operations may be performed by one core among the plurality of cores included in a multi-core processor, or may be performed by the plurality of cores. For example, when a first operation, a second operation, and a third operation are performed by a method according to one or more embodiments, the first operation, the second operation, and the third operation may all be performed by a first core included in the multi-core processor, or the first operation and the second operation may be performed by a first core included in the multi-core processor, and the third operation may be performed by a second core included in the multi-core processor.
[0052] In embodiments of the present disclosure, the processor (150) may mean a system on a chip (SoC) in which one or more processors and other electronic components are integrated, a single-core processor, a multi-core processor, or a core included in a single-core processor or a multi-core processor, wherein the core may be implemented as a CPU, a GPU, an APU, a MIC, a DSP, an NPU, a hardware computing device, or a machine learning computing device, but embodiments of the present disclosure are not limited thereto.
[0053] The operation of the processor (150) for implementing various embodiments of the present disclosure may be implemented through a plurality of modules.
[0054] Specifically, data for a plurality of modules according to the present disclosure can be stored in a memory (110), and the processor (150) can access the memory (110) to load the data for the plurality of modules into a memory or buffer within the processor (150), and then implement various embodiments according to the present disclosure using the plurality of modules.
[0055] However, at least one of the plurality of modules according to the present disclosure may be implemented in hardware and included in the processor (150) in the form of a system on chip.
[0056] Alternatively, at least one of the plurality of modules according to the present disclosure may be implemented as a separate external device, and the electronic device (100) and each module may communicate and perform operations according to the present disclosure.
[0057] Meanwhile, referring to FIG. 2b, an electronic device (100) according to one or more embodiments of the present disclosure may include a memory (110), a communication interface (120), a display (130), a user interface (140), and a processor (150).
[0058] Since the memory (110), communication interface (120), and processor (150) have been described with reference to FIG. 2a, redundant descriptions are omitted.
[0059] The display (130) may be implemented as a display in various forms, such as a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display panel (PDP), etc. The display (130) may also include a driving circuit, a backlight unit, etc., which may be implemented in forms such as an a-si TFT (amorphous silicon thin film transistor), an LTPS (low temperature poly silicon) TFT, an OTFT (organic TFT), etc. Meanwhile, the display (130) may be implemented as a touch screen combined with a touch sensor, a flexible display, a three-dimensional display (3D display, three-dimensional dispaly), etc. In addition, according to an embodiment of the present disclosure, the display (130) may include not only a display panel that outputs an image, but also a bezel that houses the display panel. In particular, according to an embodiment of the present disclosure, the bezel may include a touch sensor (not shown) for detecting user interaction.
[0060] The user interface (140) may be implemented as a device such as a button, a touch pad, a mouse, and a keyboard, or as a touch screen capable of performing the above-described display function and operation input function. Here, the button may be a mechanical button, a touch pad, a wheel, or any other type of button formed in any area of the front, side, or back of the main body of the electronic device (100).
[0061] Hereinafter, the operation of the processor (150) according to the present disclosure will be described in detail with reference to the attached drawings.
[0062] FIG. 3 is a diagram illustrating a method for an electronic device according to one or more embodiments of the present disclosure to partition data into computational nodes.
[0063] Referring to FIG. 3, the processor (150) can obtain profile information of multiple computational nodes (S310). Specifically, the processor (150) can obtain profile information of multiple computational devices constituting multiple computational nodes.
[0064] That is, the profile information of each of the multiple operation nodes may refer to the profile information of the multiple operation devices constituting each of the multiple operation nodes. In this case, the multiple operation devices constituting the multiple operation nodes may be operation devices connected to the electronic device (100) via a communication interface (120).
[0065] For example, the profile information of the first operation node may refer to the profile information of the first operation device constituting the first operation node. And, the profile information of the second operation node may refer to the profile information of the second operation device constituting the second operation node.
[0066] The memory (110) can store profile information for each of the plurality of computing devices. Furthermore, the processor (150) can load the profile information for each of the plurality of computing devices stored in the memory (110). Alternatively, the processor (150) can request profile information from the plurality of computing devices and receive profile information for the plurality of computing devices from the plurality of computing devices.
[0067] The profile information of the computing device may include information about the properties of the computing device and the performance of the computing device. Specifically, the profile information of the computing device may include at least one of the identification information of the computing device (e.g., the model name of the computing device), information about the manufacturer of the computing device, information about the computing speed of the computing device, information about the network speed of the computing device, information about the memory capacity of the computing device, information about the memory bandwidth of the computing device, a learning method of the computing device, and a data format that the computing device can process.
[0068] The identification information of the computing device may include at least one of the name, model name, and unique number of the computing device.
[0069] The computational speed information of a computational device may refer to the computational speed of the computational device according to the type of computational data. Here, the type of computational data may refer to the floating point of the computational data.
[0070] For example, the type of the operation data can be FP16, FP32, or FP64. FP16 can refer to a floating point format in which a normal floating point number is represented by a sign bit, 5 exponent bits, and 10 significant digit bits. FP32 can refer to a floating point format in which a normal floating point number is represented by a single bit, 8 exponent bits, and 23 significant digit bits. FP64 can refer to a floating point format in which a normal floating point number is represented by a sign bit, 11 exponent bits, and 52 significant digit bits.
[0071] The network speed information of the computing device may refer to the communication speed between the electronic device (100) and the computing device. For example, the network speed between the electronic device (100) and the first computing device may be 100 Gbps. In addition, the network speed between the electronic device (100) and the second computing device may be 1 Gbps.
[0072] The learning method of a computing device can refer to whether or not compilation is performed during machine learning. In other words, the learning method of a computing device can refer to whether or not the computing device includes a machine learning compiler.
[0073] FIG. 4 is a drawing for explaining profile information of a computing device according to one or more embodiments of the present disclosure.
[0074] Referring to FIG. 4, the memory (110) can store profile information (410) of the computing device. At this time, the manufacturer of the computing device may be A. And, the model name of the computing device may be S100. The computing speed of FP64 data of the computing device may be 9.7 TFLOPS (Tera Floating-Point Operations Per Second). And, the computing speed of FP32 data of the computing device may be 19.5 TFLOPS. And, the computing speed of FP16 data of the computing device may be 312 TFLOPS. And, the memory capacity of the computing device may be 80 GB. And, the network speed of the computing device may be 100 Gbps.
[0075] Based on the profile information of each of the plurality of computational nodes, the processor (150) may assign a weight to each of the plurality of computational nodes (S320). Here, the weight may refer to a weight for distributing the AI model and learning data when performing distributed learning. Additionally, the weight may refer to a weight for distributing the AI model when performing distributed inference.
[0076] According to one or more embodiments of the present disclosure, based on the computational speed of the plurality of computational nodes, the processor (150) can assign a weight to each of the plurality of computational devices.
[0077] Here, the computational speed of a computational node may refer to the computational speed of the computational device that constitutes the computational node. In this case, the computational speed may refer to the computational speed of the bit-precision data of the parameters that constitute the artificial intelligence model.
[0078] For example, if the bit precision of the parameters constituting the artificial intelligence model is FP64, the processor (150) can assign weights for distributing the artificial intelligence model and learning data to each of the plurality of computational devices based on the computational speed of the FP64 data of the plurality of computational nodes.
[0079] Specifically, the processor (150) can assign a weight to each of the plurality of operation nodes according to the mathematical expression 1 below.
[0080] Mathematical formula 1
[0081] Weight of the computation node = a * computation speed of the computation device that constitutes the computation node * number of computation devices that constitute the computation node
[0082] Here, a can be any real number.
[0083] For example, a may be 1, the FP64 data processing speed of the first computational unit constituting the first computational node may be 9.7 TFLOPS, and the FP64 data processing speed of the second computational unit constituting the second computational node may be 90.5 TFLOPS. In addition, the first computational node may include two first computational units, and the second computational node may include three second computational units. In this case, the processor (150) may assign a weight of 19.4 to the first computational node, and a weight of 271.5 to the second computational node.
[0084] The communication speed between multiple computational nodes and the electronic device (100) may vary for each computational node. In this case, if data is distributed to computational nodes based solely on performance information of the computational nodes, the speed of distributed learning or distributed inference may be reduced due to computational nodes with low network speeds.
[0085] According to one or more embodiments of the present disclosure, based on the computational speed of the plurality of computational nodes and the network speed of the plurality of computational nodes, the processor (150) may assign a weight to each of the plurality of computational devices.
[0086] Specifically, the processor (150) can assign a weight to each of the plurality of computational units based on the mathematical expression 2 below.
[0087] Mathematical formula 2
[0088] Weight of the computation node = (a * computation speed + b * network speed) * number of computation devices that make up the computation node
[0089] Here, a and b can be any real numbers.
[0090] For example, a may be 1 and b may be 0.01. In addition, the first computation node may include two first computation devices. The computation speed of the first computation device may be 9.7 TFLOPS, and the network speed of the first computation device may be 200 Gbps. The computation speed of the second computation device may be 90.5 TFLOPS, and the network speed of the second computation device may be 100 Gbps. In this case, the processor (150) may assign a weight of 2.6 to the first computation device and a weight of 23.4 to the second computation device.
[0091] As described above, weights are assigned to computational nodes based on their performance and network speed, thereby reducing the data distributed to computational nodes with slower network speeds. This can address the issue of computational nodes with slower network speeds slowing down distributed learning or distributed inference.
[0092] Meanwhile, if weights are assigned to each of the plurality of operation nodes, the processor (150) can distribute data to the plurality of operation nodes according to the assigned weights (S330). At this time, the data distributed to the plurality of operation nodes may be data for each of the plurality of operation nodes to perform distributed learning or distributed learning. That is, the processor (150) can distribute an artificial intelligence model and learning data for performing distributed learning to the plurality of operation nodes according to the assigned weights. Alternatively, the processor (150) can distribute an artificial intelligence model for performing distributed inference to the plurality of operation nodes according to the assigned weights.
[0093] Specifically, the processor (150) can distribute data according to the ratio of the weight of each of the plurality of operation nodes to the sum of the weights assigned to the plurality of operation nodes.
[0094] For example, when performing distributed learning, if the sum of all weights assigned to multiple operation nodes is 100 and the weight assigned to the first operation node is 2, the processor (150) can distribute 2% of the artificial intelligence model and 2% of the learning data to the first operation node.
[0095] Meanwhile, the size of data distributed to some computational nodes based on the assigned weights may be greater than the sum of the memory capacities of some computational nodes. In this case, the sum of the memory capacities of some computational nodes may refer to the sum of the memory capacities of the computational devices constituting some computational nodes. In this case, the processor (150) may adjust the size of data distributed to multiple computational nodes so that data is distributed to some computational nodes in proportion to the sum of the memory capacities of some computational devices constituting some computational nodes.
[0096] Specifically, the processor (150) may redistribute excess data exceeding the memory capacity of some of the artificial intelligence models and learning data distributed to some of the computational nodes based on the assigned weights to the remaining computational nodes, excluding some of the computational nodes. At this time, the processor (150) may distribute the data to the plurality of computational nodes so that the excess data is distributed according to the weights of the remaining computational nodes.
[0097] When data is distributed to multiple operation nodes, the processor (150) can control the multiple operation nodes to perform distributed learning or distributed inference using the distributed data (S340).
[0098] Specifically, when learning data and an artificial intelligence model are distributed to each of a plurality of computing devices, the processor (150) can control the plurality of computing devices to train the distributed artificial intelligence model using the distributed learning data.
[0099] Alternatively, when an artificial intelligence model is distributed to multiple computational devices, the processor (150) can control multiple computational nodes to perform distributed inference using input data and the artificial intelligence model distributed to the multiple computational devices.
[0100] Meanwhile, while performing distributed learning or distributed inference, data may be transmitted and received between multiple computational nodes. In this case, the data transmitted and received between the multiple computational nodes may be learning result data obtained as a result of learning for a specific layer. Here, the learning result data may be at least one of the gradient obtained through learning for a specific layer and the parameter values for the specific layer, but is not limited thereto.
[0101] For example, a second operation node among a plurality of operation nodes can perform distributed learning or distributed inference using data received from a first operation node among a plurality of operation nodes.
[0102] At this time, the data protocols of each computational device constituting the multiple computational nodes may differ. Specifically, the data protocol of the first computational device constituting the first computational node may differ from the data protocol of the second computational device constituting the second computational node. In this case, a problem may arise where data received from the second computational node cannot be processed by the first computational node.
[0103] Specifically, if the data protocols between computational nodes differ, the formats of data that the computational nodes can process may differ. Here, the data format can refer to the method or rules for representing or storing data. Specifically, the data format can refer to the structure, layout, encoding method, etc. of the data. For example, the data format can be an open format such as JSON, XML, or CSV, or a format that follows a independently defined standard. In this case, the data can be expressed as a tensor structure, and the way in which the tensor is expressed may vary depending on the language used.
[0104] In order to solve the above-described problem, the electronic device (100) according to the present disclosure can control the data output from the first operation node to be converted into data that can be processed by each of the plurality of operation nodes, and transmit the converted data to the second operation node so that the second operation node performs distributed learning or distributed inference.
[0105] That is, the electronic device (100) according to the present disclosure can support distributed learning of heterogeneous computational nodes by converting learning result data output from one of a plurality of computational nodes into a data format according to a universal data protocol that can be processed by each of the plurality of computational nodes.
[0106] An electronic device (100) according to the present disclosure can perform distributed learning and distributed inference by encoding and decoding data transmitted and received by a plurality of computational nodes.
[0107] That is, the electronic device (100) according to the present disclosure can convert the format of data output from a first operation node into data in a format that can be processed by each of a plurality of operation nodes and transmit the data to a second operation node, and control the second operation node to perform distributed learning or distributed inference using the received data.
[0108] At this time, the data being converted from the data output from the first operation node may be data required for the second operation node to perform distributed learning or distributed inference.
[0109] FIG. 5 and FIG. 6 are diagrams for explaining a method in which an electronic device (100) according to one or more embodiments of the present disclosure supports data transmission and reception between computational nodes.
[0110] In FIGS. 5 and 6, the layers of the artificial intelligence model distributed to the first operation node (201), the second operation node (202), and the third operation node (203) may be adjacent layers among the layers constituting the artificial intelligence model. That is, the nth layer constituting the artificial intelligence model may be distributed to the first operation node, the n+1th layer constituting the artificial intelligence model may be distributed to the second operation node, and the n+2th layer constituting the artificial intelligence model may be distributed to the third operation node. At this time, the output data of the nth layer may be the input data of the n+1th layer. In addition, the output data of the n+1th layer may be the input data of the n+2th layer. Here, n may be a natural number greater than or equal to 1.
[0111] Figure 5 is a diagram for explaining the data flow between multiple computational nodes when performing distributed learning in the forward propagation direction.
[0112] Referring to FIG. 5, the processor (150) can input data obtained from the operation node to which the (n-1) layer is distributed into the first decoder (201a) and convert it into a data protocol that the first operation node (201) can process.
[0113] When n is 1, the processor (150) can control the first operation node (201) to perform learning using the artificial intelligence model and learning data distributed to the first operation node (201).
[0114] In addition, the processor (150) can input the first data output from the first operation node (201) into the first encoder (201b) and convert the data protocol of the first data into a predefined data protocol. At this time, the first encoder (201b) may be an encoder corresponding to the first operation node.
[0115] That is, the processor (150) can input the first data output from the first operation node (201) into the first encoder (201b) and convert the data format of the first data into a predefined data format. At this time, the predefined data format may be data in a format that each of the plurality of operation nodes can process.
[0116] At this time, the first data output from the first operation node (201) may include a learning result data value obtained by performing learning of the nth layer.
[0117] In addition, the processor (150) can input the first data converted into a predefined data format into the second decoder (202a) to convert the data format of the first data into a data format that can be processed by the second operation node (202). Accordingly, the second operation node (202) can perform learning of the (n+1) layer using the data output by the second decoder (202a).
[0118] In addition, the processor (150) can input the second data output from the second operation node (202) into the second encoder (202b) to convert the data format of the second data into a predefined data format. At this time, the second encoder (202b) may be an encoder corresponding to the second operation node (202).
[0119] At this time, the second data output from the second operation node (202) may include a learning result data value obtained by performing learning of the n+1 layer.
[0120] In addition, the processor (150) can input the second data converted into a predefined data format into the third decoder (203a), thereby converting the data format of the second data into a data format that can be processed by the third operation node (203). Accordingly, the third operation node (203) can perform learning of the (n+2) layer using the data output by the third decoder (203a).
[0121] And, data output from the third operation node (203) can be input to the third encoder (203b) to be converted into a predefined data format, and the converted third data can be input to a decoder corresponding to the operation node to which the (n+3) layer is distributed. And, the processor (150) can control the operation node to which the (n+3) layer is distributed to learn using the data output from the decoder.
[0122] Meanwhile, when the electronic device (100) performs distributed inference using multiple operation nodes, the flow of data between the multiple operation nodes may be as described with reference to FIG. 5.
[0123] Figure 6 is a diagram for explaining the flow of data when performing distributed learning in the back propagation direction.
[0124] Referring to FIG. 6, the processor (150) may input at least a portion of third data output from the third operation node (203) to the third encoder (203b), thereby converting the data format of the third data into a predefined data format. At this time, the third encoder (203b) may be an encoder corresponding to the third operation node (203).
[0125] At this time, the third data output from the third operation node (203) may include learning result data values obtained by performing learning of the n+2nd layer. Here, the learning result data may include at least one of the gradient and parameter values obtained by performing learning of the n+2nd layer.
[0126] In addition, the processor (150) can input third data converted into a predefined data format into the second decoder (202a) to convert the data format of the third data into a data format that can be processed by the second operation node (202). Accordingly, the second operation node (202) can perform learning of the (n+1) layer using the data output by the second decoder (202a).
[0127] In addition, the processor (150) can input the second data output from the second operation node (202) into the second encoder (202b) to convert the data format of the second data into a predefined data format. At this time, the second encoder (202b) may be an encoder corresponding to the second operation node (202).
[0128] At this time, the second data output from the second operation node (202) may include a learning result data value obtained by performing learning of the n+1th layer. Here, the learning result data may include at least one of a gradient and a parameter value obtained by performing learning of the n+1th layer.
[0129] In addition, the processor (150) can input second data converted into a predefined data format into the first decoder (201a), thereby converting the data format of the second data into a data format that can be processed by the first operation node (201). Accordingly, the first operation node (201) can perform learning of the n-th layer using the data output by the first decoder (201a).
[0130] Meanwhile, when the processor (150) converts data output from a specific operation node into a predefined data format, it can add information about epochs, which are training units, and information about time to the data output from the specific operation node.
[0131] That is, the processor (150) can identify the learning execution time of each of the plurality of operation nodes from information about the epoch and information about the time added to the output data.
[0132] That is, the processor (150) can identify the learning execution time per epoch of each of the plurality of operation nodes from the learning results performed by each of the plurality of operation nodes.
[0133] Accordingly, the processor (150) can adjust the data distributed to each of the plurality of computational nodes as epochs, which are part of the distributed learning process, are performed.
[0134] Specifically, the processor (150) can reduce the data distributed to a computational node whose learning execution time is greater than or equal to a threshold value among a plurality of computational nodes. Here, the threshold value may be a preset value or greater than the average value of the learning execution times of the plurality of computational nodes. Alternatively, the threshold value may be a value that falls outside a preset range in the distribution of the learning execution times of the plurality of computational nodes. Alternatively, the threshold value may be the longest time among the learning execution times of the plurality of computational nodes.
[0135] For example, for the first epoch, if the average value of the execution time of a plurality of operation nodes is 3 seconds and the preset value is 2 seconds, the processor (150) can reduce the data distributed to the operation nodes whose learning execution time is 5 seconds or longer. At this time, the processor (150) can adjust the data distributed to the operation nodes whose learning execution time is 5 seconds or longer so that it is included in another operation node. In addition, the processor (150) can control the plurality of operation nodes to perform learning according to the second epoch based on the redistributed data.
[0136] Meanwhile, the electronic device (100) according to the present disclosure can obtain user input for setting a computational node to perform distributed learning from a user, and perform distributed learning using the computational node set according to the user input.
[0137] FIG. 7 is a diagram illustrating a method for providing a UI for setting an operation node according to one or more embodiments of the present disclosure.
[0138] Referring to FIG. 7, the processor (150) may provide a user with a UI (700) that can set up multiple computational nodes capable of performing distributed learning. At this time, the processor (150) may control the display (130) to display the UI (700). Alternatively, the processor (150) may transmit information for displaying the UI (700) to a user terminal device.
[0139] At this time, the user can set the computation device that constitutes the computation node through the UI element (710) for selecting the computation device that constitutes the computation node.
[0140] At this time, when at least one computational device is selected, the processor (150) can distinguish and display a computational device that can perform distributed learning together with the at least one selected computational device and a computational device that cannot perform distributed learning together with the at least one selected computational device.
[0141] Here, if at least one of the selected computing devices does not support machine learning compilation, the computing device capable of performing distributed learning with the at least one selected computing device may be a computing device that does not support machine learning compilation. For example, A100, B100, and C100 may be devices that support machine learning compilation, while D100 and S100 may be devices that do not support machine learning compilation.
[0142] And, if at least one of the selected computational devices does not support machine learning compilation, the computational device that cannot perform distributed learning together with the at least one selected computational device may be a computational device that supports machine learning compilation.
[0143] Alternatively, if at least one selected computational device supports machine learning compilation, the computational device capable of performing distributed learning with the at least one selected computational device may be a computational device that supports machine learning compilation. Furthermore, if at least one selected computational device supports machine learning compilation, the computational device that cannot perform distributed learning with the at least one selected computational device may be a computational device that does not support machine learning compilation.
[0144] In addition, the user can select the number of computational devices constituting each computational node through a UI element (720) for selecting the number of computational devices constituting each computational node. In addition, the user can add computational nodes for performing distributed learning or distributed inference through a UI element (730) for adding computational nodes.
[0145] As described above, when a computational node for performing distributed learning is set, the processor (150) can perform distributed learning using the set computational node.
[0146] Meanwhile, the terms "part" or "module" used in the present disclosure include units composed of hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A "part" or "module" may be an integrally composed component, a minimum unit performing one or more functions, or a portion thereof. For example, a module may be composed of an application-specific integrated circuit (ASIC).
[0147] Various embodiments of the present disclosure may be implemented as software including instructions stored in a machine-readable storage medium that can be read by a machine (e.g., a computer). The device, which is a device capable of calling instructions stored in the storage medium and operating according to the called instructions, may include an electronic device (100) according to the disclosed embodiments. When the instructions are executed by a processor, the processor may directly or under the control of the processor perform a function corresponding to the instructions using other components. The instructions may include code generated or executed by a compiler or interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, "non-transitory" means that the storage medium does not contain signals and is tangible, but does not distinguish between data being stored semi-permanently or temporarily in the storage medium.
[0148] According to one or more embodiments, the methods according to the various embodiments disclosed herein may be provided as a computer program product. The computer program product may be traded as a commodity between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or online through an application store (e.g., Play Store™). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.
[0149] Each component (e.g., a module or a program) according to various embodiments may be composed of one or more entities, and some of the aforementioned sub-components may be omitted, or other sub-components may be further included in various embodiments. Alternatively or additionally, some components (e.g., a module or a program) may be integrated into a single entity, which may perform the same or similar functions as those performed by each of the respective components prior to integration. Operations performed by a module, program, or other component according to various embodiments may be executed sequentially, in parallel, iteratively, or heuristically, or at least some operations may be executed in a different order, omitted, or other operations may be added.
Claims
1. In an electronic device that performs distributed learning of an artificial intelligence model in a heterogeneous computing environment, A communication interface that communicates with multiple operation nodes; A memory storing profile information for the plurality of operation nodes and at least one command; and Based on the profile information of each of the plurality of operation nodes, a weight is assigned to each of the plurality of operation nodes for dividing the artificial intelligence model and learning data, Distribute the artificial intelligence model and the learning data to the plurality of computational nodes according to the weights assigned above, A processor for performing distributed learning of the artificial intelligence model by controlling the plurality of computational nodes to learn the divided artificial intelligence model using the distributed learning data; The above processor, Converting the learning result data received from the first operation node among the plurality of operation nodes into data in a format that each of the plurality of operation nodes can process, An electronic device that controls a second operation node among the plurality of operation nodes to train an artificial intelligence model distributed to the second operation node using the converted data.
2. In paragraph 1, The above processor, Convert the learning result data received from the first operation node into data in a predefined format, An electronic device that converts the above-described type of data into data in a format that the second operation node can process.
3. In paragraph 1, The above profile information includes performance information of a plurality of operation nodes constituting the plurality of operation nodes and network speed information of the plurality of operation nodes, The above processor, An electronic device that assigns weights for distributing the artificial intelligence model and learning data to each of the plurality of computational nodes based on performance information and network speed information of each of the plurality of computational nodes.
4. In paragraph 1, An electronic device that distributes the artificial intelligence model and the learning data to the plurality of computational nodes according to a ratio of the weights assigned to each of the plurality of computational nodes to the sum of the weights assigned to the plurality of computational nodes.
5. In paragraph 1, The above processor, An electronic device that distributes the artificial intelligence model and the learning data to the plurality of computational nodes so that the artificial intelligence model and the learning data are distributed to the plurality of computational nodes in an amount equivalent to the memory capacity of the at least one computational node when the size of the artificial intelligence model and the learning data allocated to at least one computational node among the plurality of computational nodes according to the weights exceeds the memory capacity of the at least one computational node.
6. In paragraph 1, The above processor, Each of the above multiple computational nodes identifies the computational time required to train the distributed artificial intelligence model, An electronic device that adjusts the sizes of the distributed artificial intelligence model and the divided learning data based on the operation time of each of the plurality of operation nodes.
7. In paragraph 1, The above processor, Obtaining user input for selecting a computation node for performing the distributed learning among the plurality of computation nodes; An electronic device that performs distributed learning of the artificial intelligence model using the selected operation nodes.
8. In paragraph 1, The above processor, Identify the learning execution time of the above multiple operation nodes, Identifying a computation node among the above multiple computation nodes whose learning execution time is greater than a threshold value, An electronic device that reduces data distributed to the above operation nodes.
9. A method for controlling an electronic device that performs distributed learning of an artificial intelligence model in a heterogeneous computing environment. A step of assigning a weight to each of the plurality of operation nodes for dividing the artificial intelligence model and learning data based on the profile information of each of the plurality of operation nodes; A step of distributing the artificial intelligence model and the learning data to the plurality of computational nodes according to the weights assigned above; and A step of performing distributed learning of the artificial intelligence model by controlling the plurality of computational nodes to learn the divided artificial intelligence model using the distributed learning data; The steps for performing the above distributed learning are: Converting the learning result data received from the first operation node among the plurality of operation nodes into data in a format that each of the plurality of operation nodes can process, A control method for controlling a second operation node among the plurality of operation nodes to train an artificial intelligence model distributed to the second operation node using the converted data.
10. In paragraph 9, The above control method is, Convert the learning result data received from the first operation node into data in a predefined format, A control method for converting data of the above-described type into data in a format that can be processed by the second operation node.
11. In paragraph 9, The above profile information includes performance information of a plurality of operation nodes constituting the plurality of operation nodes and network speed information of the plurality of operation nodes, The step of assigning the above weights is: A control method for assigning weights for distributing the artificial intelligence model and learning data to each of the plurality of computational nodes based on performance information and network speed information of each of the plurality of computational nodes.
12. In paragraph 9, The step of distributing the above artificial intelligence model and the above learning data to the plurality of computational nodes is: A control method for distributing the artificial intelligence model and the learning data to the plurality of operation nodes according to the ratio of the weight assigned to each of the plurality of operation nodes to the sum of the weights assigned to the plurality of operation nodes.
13. In paragraph 9, The step of distributing the above artificial intelligence model and the above learning data to the plurality of computational nodes is: A control method for distributing the artificial intelligence model and the learning data to the plurality of computational nodes so that, when the size of the artificial intelligence model and the learning data allocated to at least one computational node among the plurality of computational nodes according to the weights exceeds the memory capacity of the at least one computational node, the artificial intelligence model and the learning data are distributed to the at least one computational node in an amount equal to the memory capacity of the at least one node.
14. In paragraph 9, The above control method is, A step of identifying the computation time required for each of the plurality of computation nodes to train the distributed artificial intelligence model; and A control method further comprising: a step of adjusting the sizes of the distributed artificial intelligence model and the divided learning data based on the operation time of each of the plurality of operation nodes.
15. In paragraph 9, The above control method is, A step of obtaining user input for selecting a computation node for performing the distributed learning among the plurality of computation nodes; and A control method further comprising: a step of performing distributed learning of the artificial intelligence model using the selected operation nodes.
Citation Information
Patent Citations
Testing device for solar streetlights
KR102699194B1
Network-based approach for training supervised learning classifiers
US20170279839A1
Machine learning accelerator mechanism
US20230053289A1
Systems and methods for distributed learning for wireless edge dynamics
US20230068386A1
Systems and methods for updating models for image processing using federated learning
US20230102233A1
