Communication method, system and device, equipment and storage medium
By dividing computing nodes and defining communication primitive interfaces in a heterogeneous computing environment, the problem of low communication efficiency between heterogeneous hardware devices is solved, and efficient communication and model parameter synchronization between heterogeneous hardware devices are achieved.
Patent Information
- Application Number
- CN202311601328.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2024-10-18
AI Technical Summary
Existing communication methods cannot achieve effective communication between heterogeneous hardware devices in a heterogeneous computing environment, resulting in inefficient model parameter synchronization and information transfer.
By dividing computing nodes and defining communication primitive interfaces, including data sending address, receiving address, data scale, data type, logical sequence number identification of communication root node and target communication device, broadcast, distribution and full protocol interfaces are used to implement heterogeneous hardware devices communication between.
It achieves efficient communication between heterogeneous hardware devices, ensures the efficiency of distributed training tasks and the synchronization consistency of model parameters, and is suitable for heterogeneous computing power environments.
Smart Images

Figure CN118802909A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method, system, device, equipment and storage medium. Background Art
[0002] In a distributed training scenario, each node is responsible for processing part of the data and model parameters, and then passing the calculation results to other nodes. Distributed training technology can be implemented using different parallel strategy algorithms, such as data parallelism and model parallelism. In data parallelism, different nodes process different batches of data, while in model parallelism, different nodes are responsible for processing different parts of the model. Regardless of which parallel strategy is used, it involves information transmission and model parameter synchronization between parallel computing nodes. Therefore, in order to ensure the convergence and consistency of the global model, it is necessary to define the way of information transmission between computing nodes through collective communication technology.
[0003] However, the existing collective communication primitive interfaces are all used in homogeneous computing environments, and there is a lack of collective communication solutions for heterogeneous computing environments. In addition, the communication protocols of various hardware devices in heterogeneous computing environments are different, and it is impossible to use the communication library of a single hardware manufacturer to achieve information transmission and parameter synchronization between heterogeneous hardware devices. It can be seen that how to provide a communication solution for heterogeneous computing environments and across heterogeneous computing has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] Embodiments of the present application provide a communication method, system, apparatus, device and storage medium to solve the problem that existing communication methods cannot achieve communication between heterogeneous hardware devices.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a communication method, which is executed by a server, and the method includes:
[0007] Based on the computing structure information of each hardware device in the heterogeneous computing power pool, the computing nodes are divided, where the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are divided into different computing nodes;
[0008] Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0009] Configuring the communication primitive interface to each computing node;
[0010] Based on the communication primitive interface, a distributed training task is performed with each computing node.
[0011] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0012] Optionally, the performing a distributed training task with each computing node based on the communication primitive interface includes:
[0013] Based on the Scatter interface, different training data in the training data set are distributed to each computing node, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0014] Initializing model parameters of the training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0015] Based on the AllReduce interface, the gradient values obtained by each computing unit in each iterative training are aggregated, and the aggregated gradient values are broadcast to each computing unit.
[0016] Optionally, before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes:
[0017] Preprocessing the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0018] Dividing the training data set into a plurality of data slices, where different data slices include different training data;
[0019] The distributing different training data in the training data set to each computing node based on the Scatter interface includes:
[0020] Based on the Scatter interface, the multiple data slices are distributed to the computing nodes.
[0021] Optionally, before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes:
[0022] Reading a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0023] Based on the task configuration file, the distributed training task is configured for each computing node.
[0024] In a second aspect, an embodiment of the present application provides a communication method, which is executed by a computing node, and the method includes:
[0025] A communication primitive interface configured by a receiving server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0026] Based on the communication primitive interface, a distributed training task is performed with the server.
[0027] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0028] Optionally, the performing a distributed training task with the server based on the communication primitive interface includes:
[0029] Based on the Scatter interface, receiving the training data sent by the server to the computing node;
[0030] Based on the Broadcast interface, receiving the initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0031] Using the training data to train the training model, to obtain a gradient value of each of the computing units in the computing node;
[0032] Based on the AllReduce interface, sending the gradient value of each computing unit in the computing node to the server;
[0033] An aggregated gradient value broadcasted by the server is received, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0034] Optionally, after receiving the aggregated gradient value broadcasted by the server, the method further includes:
[0035] The model parameters of the training model are updated according to the aggregated gradient values.
[0036] Optionally, the receiving, based on the Scatter interface, training data sent by the server to the computing node includes:
[0037] Based on the Scatter interface, receive the data slices sent by the server to the computing node.
[0038] In a third aspect, an embodiment of the present application further provides a communication system, the communication system comprising a server and a plurality of computing nodes, wherein:
[0039] The server is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes;
[0040] The server is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0041] The server is used to configure the communication primitive interface to each computing node;
[0042] The server is used to perform distributed training tasks with each computing node based on the communication primitive interface;
[0043] Each of the computing nodes is used to receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0044] Each computing node is used to perform distributed training tasks with the server based on the communication primitive interface.
[0045] In a fourth aspect, an embodiment of the present application provides a communication device, applied to a server, the communication device comprising:
[0046] The first division module is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes;
[0047] A first determination module is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0048] A first configuration module, configured to configure the communication primitive interface to each computing node;
[0049] The first execution module is used to execute the distributed training task with each computing node based on the communication primitive interface.
[0050] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0051] Optionally, the first execution module includes:
[0052] A first distribution unit is used to distribute different training data in the training data set to each computing node based on the Scatter interface, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0053] A first initialization unit, configured to initialize model parameters of a training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0054] The first aggregation unit is used to aggregate the gradient values obtained by each computing unit in each iterative training based on the AllReduce interface, and broadcast the aggregated gradient values to each computing unit.
[0055] Optionally, the communication device further includes:
[0056] A first preprocessing module is used to preprocess the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0057] A first partitioning module, used to partition the training data set into a plurality of data slices, where different data slices include different training data;
[0058] The first distribution unit includes:
[0059] The first distribution subunit is used to distribute the multiple data slices to the computing nodes based on the Scatter interface.
[0060] Optionally, the communication device further includes:
[0061] A first reading module is used to read a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0062] The second configuration module is used to configure the distributed training task for each computing node based on the task configuration file.
[0063] In a fifth aspect, an embodiment of the present application provides a communication device, applied to a computing node, the communication device comprising:
[0064] A first receiving module is used to receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0065] The second execution module is used to execute the distributed training task with the server based on the communication primitive interface.
[0066] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0067] Optionally, the second execution module includes:
[0068] A first receiving unit, configured to receive, based on the Scatter interface, training data sent by the server to the computing node;
[0069] A second receiving unit is used to receive, based on the Broadcast interface, initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0070] A first training unit, configured to train the training model using the training data to obtain a gradient value of each of the computing units in the computing node;
[0071] A first sending unit, configured to send the gradient value of each computing unit in the computing node to the server based on the AllReduce interface;
[0072] The third receiving unit is used to receive the aggregated gradient value broadcasted by the server, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0073] Optionally, the communication device further includes:
[0074] The first updating module is used to update the model parameters of the training model according to the aggregated gradient value.
[0075] Optionally, the first receiving unit includes:
[0076] The first receiving subunit is used to receive the data slices sent by the server to the computing node based on the Scatter interface.
[0077] In a sixth aspect, an embodiment of the present application further provides a server, the server comprising a transceiver and a processor, the processor being configured to:
[0078] Based on the computing structure information of each hardware device in the heterogeneous computing power pool, the computing nodes are divided, where the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are divided into different computing nodes;
[0079] Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0080] The transceiver is used for:
[0081] Configuring the communication primitive interface to each computing node;
[0082] The processor is used to:
[0083] Based on the communication primitive interface, a distributed training task is performed with each computing node.
[0084] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0085] Optionally, the processor is specifically configured to:
[0086] Based on the Scatter interface, different training data in the training data set are distributed to each computing node, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0087] Initializing model parameters of the training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0088] Based on the AllReduce interface, the gradient values obtained by each computing unit in each iterative training are aggregated, and the aggregated gradient values are broadcast to each computing unit.
[0089] Optionally, the processor is further configured to:
[0090] Preprocessing the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0091] Dividing the training data set into a plurality of data slices, where different data slices include different training data;
[0092] The distributing different training data in the training data set to each computing node based on the Scatter interface includes:
[0093] Based on the Scatter interface, the multiple data slices are distributed to the computing nodes.
[0094] Optionally, the processor is further configured to:
[0095] Reading a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0096] Based on the task configuration file, the distributed training task is configured for each computing node.
[0097] In a seventh aspect, an embodiment of the present application further provides a computing node, wherein the server includes a transceiver and a processor, and the transceiver is used to:
[0098] A communication primitive interface configured by a receiving server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0099] The processor is used to:
[0100] Based on the communication primitive interface, a distributed training task is performed with the server.
[0101] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0102] Optionally, the processor is specifically configured to:
[0103] Based on the Scatter interface, receiving the training data sent by the server to the computing node;
[0104] Based on the Broadcast interface, receiving the initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0105] Using the training data to train the training model, to obtain a gradient value of each of the computing units in the computing node;
[0106] Based on the AllReduce interface, sending the gradient value of each computing unit in the computing node to the server;
[0107] An aggregated gradient value broadcasted by the server is received, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0108] Optionally, the processor is further configured to:
[0109] The model parameters of the training model are updated according to the aggregated gradient values.
[0110] Optionally, the transceiver is specifically used for:
[0111] Based on the Scatter interface, receive the data slices sent by the server to the computing node.
[0112] In an eighth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the communication method of the first aspect when executed by the processor, or implements the steps of the communication method of the second aspect when executed by the processor.
[0113] In the ninth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the communication method of the first aspect are implemented, or when the computer program is executed by the processor, the steps of the communication method of the second aspect are implemented.
[0114] The communication method of the embodiment of the present application includes dividing the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes; determining the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data scale, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs; configuring the communication primitive interface to each computing node; based on the communication primitive interface, executing distributed training tasks with each computing node. In this method, the server first divides the hardware devices with the same computing structure information into one computing node and the hardware devices with different computing structure information into different computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, and then defines the communication primitive interface between each computing node, so as to perform distributed training tasks with each computing node based on the defined communication primitive interface, thereby realizing communication between heterogeneous hardware devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0115] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0116] Figure 1 It is one of the flow charts of the communication method provided in the embodiment of the present application;
[0117] Figure 2 This is the second flow chart of the communication method provided in the embodiment of the present application;
[0118] Figure 3 is a framework diagram of a communication system provided in an embodiment of the present application;
[0119] Figure 4 It is one of the structural diagrams of a communication device provided in one embodiment of the present application;
[0120] Figure 5 This is the second structural diagram of the communication device provided in one embodiment of the present application;
[0121] Figure 6 is a structural diagram of a server provided in an embodiment of the present application;
[0122] Figure 7 It is a structural diagram of a computing node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0123] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0124] The present application embodiment provides a communication method, which is executed by a server. Figure 1 , Figure 1 is a flow chart of a communication method provided in an embodiment of the present application, such as Figure 1 As shown, the following steps are included:
[0125] Step 101: based on the computing structure information of each hardware device in the heterogeneous computing power pool, divide the computing nodes, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes;
[0126] In this step, the hardware devices in the heterogeneous computing power pool are divided, and the hardware devices with the same computing structure information are divided into the same container as a separate computing node. Generally speaking, hardware devices from the same manufacturer have the same computing structure information.
[0127] Step 102: Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0128] In this step, due to the differences in the communication protocols of heterogeneous computing hardware devices, it is necessary to define a unified communication primitive interface in the heterogeneous computing pool based on the functional requirements of the communication primitive interface. Exemplarily, the information format of the communication primitive can be: xccl communication primitive interface name (input parameters, output parameters, communication operation information).
[0129] Specifically, for different communication operations in the heterogeneous computing power distributed training data parallel strategy, the communication primitive interface examples defined are as follows:
[0130] 1. Broadcast communication operation
[0131] (1) Interface example: xcclBroadcast(const void*sendbuff,void*recvbuff,intcount,xccl_DataType datatype,int root,xccl_Comm comm)
[0132] (2) Interface description:
[0133] sendbuff: data sending address
[0134] recvbuff: data receiving address
[0135] count: data size
[0136] datatype: data type
[0137] root: logical rankID of the communication root node
[0138] comm: specifies the device participating in the communication (i.e. the target communication device mentioned above) and the communication device (communicator) to which the process belongs
[0139] 2. Scatter communication operation
[0140] (1) Interface example: xcclScatter(const void*sendbuff,void*recvbuff,int count,xccl_DataType datatype,int root,xccl_Op op,xccl_Comm comm)
[0141] (2) Interface description:
[0142] sendbuff: data sending address
[0143] recvbuff: data receiving address
[0144] count: data size
[0145] datatype: data type
[0146] root: logical rankID of the communication root node
[0147] op: implements scatter communication related operations, including data set segmentation and broadcasting
[0148] comm: specifies the device participating in the communication (i.e. the target communication device mentioned above) and the communication device (communicator) to which the process belongs
[0149] 3. AllReduce communication operation
[0150] (1) Interface example: xcclAllReduce(const void*sendbuff,void*recvbuff,intcount,xccl_DataType datatype,xccl_Op op,xccl_Comm comm)
[0151] (2) Interface description:
[0152] sendbuff: data sending address
[0153] recvbuff: data receiving address
[0154] count: data size
[0155] datatype: data type
[0156] op: implements allreduce communication related operations, encapsulating operations including reduce, broadcast, etc.
[0157] comm: specifies the device participating in the communication (i.e. the target communication device mentioned above) and the communication device (communicator) to which the process belongs
[0158] Step 103: configuring the communication primitive interface to each computing node;
[0159] In this step, the server configures the defined communication primitive interface to each computing node, so that the subsequent server can perform distributed training tasks with each computing node based on the communication primitive interface.
[0160] Step 104: Based on the communication primitive interface, execute the distributed training task with each computing node.
[0161] In this step, the core idea of distributed training technology is to decompose a huge training task into multiple smaller subtasks, and then assign these subtasks to different computing nodes for parallel computing. Each computing node is responsible for processing part of the data and model parameters, and then passes the calculation results to other computing nodes. This parallel computing can make full use of distributed computing resources, reduce training time and computing costs, and improve the convergence speed of the model. Distributed training technology can be implemented using different parallel strategy algorithms, such as data parallelism and model parallelism. In data parallelism, different nodes process different batches of data, while in model parallelism, different nodes are responsible for processing different parts of the model. It should be noted that the communication primitive interface defined in this application is mainly used in communication schemes under data parallel strategies.
[0162] In one implementation, the server first divides the hardware devices with the same computing structure information into one computing node and the hardware devices with different computing structure information into different computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, and then defines the communication primitive interface between each computing node, so as to perform distributed training tasks with each computing node based on the defined communication primitive interface, thereby realizing communication between heterogeneous hardware devices.
[0163] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0164] In one implementation, the Broadcast interface can be understood as a one-to-many communication primitive interface, that is, one data sender and multiple data receivers. It can broadcast a node's own data to other nodes in the cluster. Its application scenario is usually model parameter initialization.
[0165] The Scatter interface can be understood as a one-to-many communication primitive interface, that is, one data sender and multiple data receivers. It can distribute the data of a node to other nodes in the cluster in different data subsets. Its application scenario is usually data distribution.
[0166] The AllReduce interface can be understood as a many-to-many communication primitive, that is, multiple data senders and multiple data receivers. The results of data reduction operations on all nodes in the cluster can be sent to all nodes. Its application scenarios usually involve synchronization of various model parameters.
[0167] In this implementation, different communication primitive interfaces may be used to improve the efficiency of distributed training.
[0168] Optionally, the performing a distributed training task with each computing node based on the communication primitive interface includes:
[0169] Based on the Scatter interface, different training data in the training data set are distributed to each computing node, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0170] Initializing model parameters of the training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0171] Based on the AllReduce interface, the gradient values obtained by each computing unit in each iterative training are aggregated, and the aggregated gradient values are broadcast to each computing unit.
[0172] In one implementation, the server performs distributed training tasks with each computing node based on a communication primitive interface, specifically:
[0173] Based on the Scatter interface, the server distributes different training data in the training data set to each computing node. Furthermore, the training data distributed to the computing node can be distributed to each computing unit in the computing node, and the aforementioned hardware device can be regarded as a computing unit;
[0174] Based on the Broadcast interface, the server initializes the model parameters of the training model of each computing unit to ensure that each computing unit uses the same training model. Then each computing unit can independently perform local training on the model using the aforementioned allocated training data. The training specifically includes two processes: forward propagation and back propagation, and calculates the gradient value obtained from each training.
[0175] Based on the AllReduce interface, the server aggregates the gradient values obtained by each computing unit in each iterative training, and broadcasts the aggregated gradient values to each computing unit, so that each computing unit updates the model parameters of the training model according to the aggregated gradient values, thereby ensuring that the model on each computing unit remains consistent after each iterative training.
[0176] In this implementation, the server defines a communication primitive interface between each computing node, and based on the defined communication primitive interface, performs distributed training tasks with each computing node, thereby enabling communication between heterogeneous hardware devices.
[0177] Optionally, before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes:
[0178] Preprocessing the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0179] Dividing the training data set into a plurality of data slices, where different data slices include different training data;
[0180] The distributing different training data in the training data set to each computing node based on the Scatter interface includes:
[0181] Based on the Scatter interface, the multiple data slices are distributed to the computing nodes.
[0182] In one implementation, before the server performs distributed training tasks with each computing node based on the communication primitive interface, it first needs to perform preprocessing operations such as data cleaning and data format conversion on multiple pieces of data to be trained, and then store the data locally after the preprocessing operations. The aforementioned multiple pieces of data to be trained can be understood as data preprocessing scripts. Then, the training data set obtained by preprocessing is divided to obtain multiple data slices. The server then distributes the multiple data slices to each computing node based on the Scatter interface.
[0183] In this implementation, the server pre-processes the training data, which is beneficial for obtaining the training data set required for subsequent model training. Furthermore, the training data set is divided into data slices, which is beneficial for each subsequent computing node to independently process the assigned data slices, thereby improving the speed of model training.
[0184] Optionally, before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes:
[0185] Reading a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0186] Based on the task configuration file, the distributed training task is configured for each computing node.
[0187] In one implementation, the server creates a relevant task configuration file in advance, specifically, the task configuration file includes network configuration information and model configuration information. The network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type.
[0188] This will help the server to load the task configuration file in a timely manner, call the training data and start the training process.
[0189] The present application embodiment provides a communication method, which is executed by a computing node. Figure 2 , Figure 2 is a flow chart of a communication method provided in an embodiment of the present application, such as Figure 2 As shown, the following steps are included:
[0190] Step 201: Receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0191] Step 202: Based on the communication primitive interface, execute a distributed training task with the server.
[0192] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0193] Optionally, the performing a distributed training task with the server based on the communication primitive interface includes:
[0194] Based on the Scatter interface, receiving the training data sent by the server to the computing node;
[0195] Based on the Broadcast interface, receiving the initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0196] Using the training data to train the training model, to obtain a gradient value of each of the computing units in the computing node;
[0197] Based on the AllReduce interface, sending the gradient value of each computing unit in the computing node to the server;
[0198] An aggregated gradient value broadcasted by the server is received, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0199] Optionally, after receiving the aggregated gradient value broadcasted by the server, the method further includes:
[0200] The model parameters of the training model are updated according to the aggregated gradient values.
[0201] Optionally, the receiving, based on the Scatter interface, training data sent by the server to the computing node includes:
[0202] Based on the Scatter interface, receive the data slices sent by the server to the computing node.
[0203] It should be noted that this embodiment is Figure 1 The implementation method of the corresponding computing node in the embodiment shown in the figure can be found in the specific implementation method. Figure 1 In order to avoid repeated description, the relevant description of the embodiment shown will not be repeated in this embodiment, and the same beneficial effects can still be achieved.
[0204] The embodiment of the present application further provides a communication system, the communication system comprising a server and a plurality of computing nodes, wherein:
[0205] The server is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes;
[0206] The server is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0207] The server is used to configure the communication primitive interface to each computing node;
[0208] The server is used to perform distributed training tasks with each computing node based on the communication primitive interface;
[0209] Each of the computing nodes is used to receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0210] Each computing node is used to perform distributed training tasks with the server based on the communication primitive interface.
[0211] See also Figure 3 , Figure 3 This is an architecture diagram of the communication system. The system consists of a design state and an operating state. The design state consists of a data set, a training configuration file package, and a model training script. The training configuration file package covers a networking configuration file, a model configuration file, etc. The operating state includes a front-end presentation layer of a heterogeneous computing power distributed training framework and a back-end runtime layer of a heterogeneous computing power distributed training framework.
[0212] The training process using the communication system is as follows:
[0213] 1. Offline preparation stage
[0214] 1. Data preprocessing and storage: Perform preprocessing operations such as data cleaning and data format conversion based on data preprocessing scripts, and store data locally;
[0215] 2. Cluster networking environment configuration: Perform networking information configuration for heterogeneous computing hardware equipment cluster environment. The networking configuration information includes the number of homogeneous computing nodes, computing node Internet Protocol (IP) addresses, hardware device physical and logical serial numbers, hardware device IP addresses, etc., and call the XCCL communication library interface;
[0216] 3. Model configuration: Configure the data parallel splitting method, epoch number (the number of times the learning algorithm works in the entire training data set), loss function operator, loss scale, etc. in the model configuration file, and define the optimizer type as a parameter update tool;
[0217] 4. Model training script: define the training network, calculation operator call, etc. in the model training script;
[0218] 5. The training-related configuration work is completed in the offline stage and is called and executed as a design state and waiting to be run.
[0219] 2. Online Training Phase
[0220] 1. Complete network parameter initialization in the running state;
[0221] 2. Load the data set and training configuration file through the running front-end presentation layer, and call the training script to start the training process;
[0222] 3. Execute the training script through the runtime backend compilation and operation layer, and synchronize and update the distributed training parameters across heterogeneous computing hardware devices through the XCCL communication interface during the training process.
[0223] In addition, it should be understood that when the above-mentioned communication system is executed, it can implement each process of a communication method in the aforementioned embodiment and can achieve the same technical effect. In order to avoid repetition, it will not be described here.
[0224] See also Figure 4 , Figure 4 : is a structural diagram of a communication device provided in an embodiment of the present application, which is applied to a server, and the communication device includes:
[0225] The first division module 401 is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes;
[0226] The first determination module 402 is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0227] A first configuration module 403, configured to configure the communication primitive interface to each computing node;
[0228] The first execution module 404 is used to execute the distributed training task with each computing node based on the communication primitive interface.
[0229] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0230] Optionally, the first execution module includes:
[0231] A first distribution unit is used to distribute different training data in the training data set to each computing node based on the Scatter interface, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0232] A first initialization unit, configured to initialize model parameters of a training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0233] The first aggregation unit is used to aggregate the gradient values obtained by each computing unit in each iterative training based on the AllReduce interface, and broadcast the aggregated gradient values to each computing unit.
[0234] Optionally, the communication device further includes:
[0235] A first preprocessing module is used to preprocess the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0236] A first partitioning module, used to partition the training data set into a plurality of data slices, where different data slices include different training data;
[0237] The first distribution unit includes:
[0238] The first distribution subunit is used to distribute the multiple data slices to the computing nodes based on the Scatter interface.
[0239] Optionally, the communication device further includes:
[0240] A first reading module is used to read a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0241] The second configuration module is used to configure the distributed training task for each computing node based on the task configuration file.
[0242] It should be noted that this embodiment is Figure 1 The specific implementation of the corresponding device side embodiment can be found in Figure 1 To avoid repeated description, the relevant description of the embodiment shown in is not repeated in this embodiment, and the same beneficial effects can be achieved.
[0243] See also Figure 5 , Figure 5 : is a structural diagram of a communication device provided in an embodiment of the present application, which is applied to a computing node, and the communication device includes:
[0244] The first receiving module 501 is used to receive the communication primitive interface configured by the server, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0245] The second execution module 502 is used to execute the distributed training task with the server based on the communication primitive interface.
[0246] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0247] Optionally, the second execution module includes:
[0248] A first receiving unit, configured to receive, based on the Scatter interface, training data sent by the server to the computing node;
[0249] A second receiving unit is used to receive, based on the Broadcast interface, initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0250] A first training unit, configured to train the training model using the training data to obtain a gradient value of each of the computing units in the computing node;
[0251] A first sending unit, configured to send the gradient value of each computing unit in the computing node to the server based on the AllReduce interface;
[0252] The second receiving unit is used to receive the aggregated gradient value broadcasted by the server, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0253] Optionally, the communication device further includes:
[0254] The first updating module is used to update the model parameters of the training model according to the aggregated gradient value.
[0255] Optionally, the first receiving unit includes:
[0256] The first receiving subunit is used to receive the data slices sent by the server to the computing node based on the Scatter interface.
[0257] It should be noted that this embodiment is Figure 2 The specific implementation of the corresponding device side embodiment can be found in Figure 2 Corresponding Figure 1 To avoid repeated description, the relevant description of the embodiment shown in is not repeated in this embodiment, and the same beneficial effects can be achieved.
[0258] The embodiment of the present application also provides a server. Since the principle of solving the problem by the server is similar to the communication method in the embodiment of the present application, the implementation of the server can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 6 As shown, the server of the embodiment of the present application includes: a processor 600, which is used to read the program in the memory 620 and execute the following process:
[0259] Based on the computing structure information of each hardware device in the heterogeneous computing power pool, the computing nodes are divided, where the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are divided into different computing nodes;
[0260] Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs;
[0261] configuring the communication primitive interface to each computing node via the transceiver 610;
[0262] Based on the communication primitive interface, a distributed training task is performed with each computing node.
[0263] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 may store data used by the processor 600 when performing operations.
[0264] Optionally, the communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
[0265] Optionally, the processor 600 is further configured to read the memory 620 and perform the following steps:
[0266] Based on the Scatter interface, different training data in the training data set are distributed to each computing node, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit;
[0267] Initializing model parameters of the training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model;
[0268] Based on the AllReduce interface, the gradient values obtained by each computing unit in each iterative training are aggregated, and the aggregated gradient values are broadcast to each computing unit.
[0269] Optionally, the processor 600 is further configured to read the memory 620 and perform the following steps:
[0270] Preprocessing the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion;
[0271] Dividing the training data set into a plurality of data slices, where different data slices include different training data;
[0272] Optionally, the processor 600 is further configured to read the memory 620 and perform the following steps:
[0273] Based on the Scatter interface, the multiple data slices are distributed to the computing nodes.
[0274] Optionally, the processor 600 is further configured to read the memory 620 and perform the following steps:
[0275] Reading a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type;
[0276] Based on the task configuration file, the distributed training task is configured for each computing node.
[0277] The server provided in the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
[0278] The present application also provides a computing node. Since the principle of the computing node to solve the problem is similar to the communication method in the present application, the implementation of the computing node can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 7 As shown, the computing node of the embodiment of the present application includes: a processor 700, which is used to read the program in the memory 720 and execute the following process:
[0279] Receiving the communication primitive interface configured by the server through the transceiver 710, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs;
[0280] Based on the communication primitive interface, a distributed training task is performed with the server.
[0281] Among them, Figure 7 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 700 and memory represented by memory 720. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 710 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. The processor 700 is responsible for managing the bus architecture and general processing, and the memory 720 may store data used by the processor 700 when performing operations.
[0282] Optionally, the communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
[0283] Optionally, the processor 700 is further configured to read the memory 720 and perform the following steps:
[0284] Based on the Scatter interface, receiving the training data sent by the server to the computing node;
[0285] Based on the Broadcast interface, receiving the initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model;
[0286] Using the training data to train the training model, to obtain a gradient value of each of the computing units in the computing node;
[0287] Based on the AllReduce interface, sending the gradient value of each computing unit in the computing node to the server;
[0288] An aggregated gradient value broadcasted by the server is received, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
[0289] Optionally, the processor 700 is further configured to read the memory 720 and perform the following steps:
[0290] The model parameters of the training model are updated according to the aggregated gradient values.
[0291] Optionally, the processor 700 is further configured to read the memory 720 and perform the following steps:
[0292] Based on the Scatter interface, receive the data slices sent by the server to the computing node.
[0293] The computing node provided in the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
[0294] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned communication method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0295] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0296] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0297] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A communication method, characterized in that: Executed by a server, the method includes: Based on the computing structure information of each hardware device in the heterogeneous computing power pool, the computing nodes are divided, where the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are divided into different computing nodes; Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; Configuring the communication primitive interface to each computing node; Based on the communication primitive interface, a distributed training task is performed with each computing node.
2. The communication method according to claim 1, characterized in that: The communication primitive interface includes a broadcast interface, a scatter interface and an allreduce interface.
3. The communication method according to claim 2, characterized in that: The performing a distributed training task with each computing node based on the communication primitive interface includes: Based on the Scatter interface, different training data in the training data set are distributed to each computing node, wherein each computing unit in the same computing node uses the same training data, and each hardware device in each computing node serves as a computing unit; Initializing model parameters of the training model of each computing unit based on the Broadcast interface, wherein each computing unit uses the same training model; Based on the AllReduce interface, the gradient values obtained by each computing unit in each iterative training are aggregated, and the aggregated gradient values are broadcast to each computing unit.
4. The communication method according to claim 3, characterized in that: Before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes: Preprocessing the plurality of pieces of data to be trained to obtain a plurality of pieces of training data, wherein the training data set includes the plurality of pieces of training data, and the preprocessing includes at least one of the following: data cleaning, data format conversion; Dividing the training data set into a plurality of data slices, where different data slices include different training data; The distributing different training data in the training data set to each computing node based on the Scatter interface includes: Based on the Scatter interface, the multiple data slices are distributed to the computing nodes.
5. The communication method according to any one of claims 1 to 4, characterized in that: Before executing the distributed training task with each computing node based on the communication primitive interface, the method further includes: Reading a pre-created task configuration file, wherein the task configuration file includes network configuration information and model configuration information; wherein the network configuration information includes at least one of the following: the number of homogeneous computing nodes, the Internet Protocol IP address of the computing node, the physical serial number and logical serial number of the hardware device, and the IP address of the hardware device; the model configuration information includes at least one of the following: data parallel segmentation method, iteration round, loss function operator, loss level, and optimizer type; Based on the task configuration file, the distributed training task is configured for each computing node.
6. A communication method, characterized in that: Executed by a computing node, the method includes: A communication primitive interface configured by a receiving server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; Based on the communication primitive interface, a distributed training task is performed with the server.
7. The communication method according to claim 6, characterized in that: The communication primitive interface includes a Broadcast interface, a Scatter interface and an AllReduce interface.
8. The communication method according to claim 7, characterized in that: The performing a distributed training task with the server based on the communication primitive interface includes: Based on the Scatter interface, receiving the training data sent by the server to the computing node; Based on the Broadcast interface, receiving the initial model parameters of the training model configured by the server to each computing unit in the computing node, wherein each hardware device in the computing node serves as a computing unit, and each computing unit in the computing node uses the same training model; Using the training data to train the training model, to obtain a gradient value of each of the computing units in the computing node; Based on the AllReduce interface, sending the gradient value of each computing unit in the computing node to the server; An aggregated gradient value broadcasted by the server is received, where the aggregated gradient value is obtained by the server aggregating the gradient value of each computing unit of all computing nodes.
9. The communication method according to claim 8, characterized in that: After receiving the aggregated gradient value broadcasted by the server, the method further includes: The model parameters of the training model are updated according to the aggregated gradient values.
10. The communication method according to claim 8, characterized in that: The receiving, based on the Scatter interface, training data sent by the server to the computing node includes: Based on the Scatter interface, receive the data slices sent by the server to the computing node.
11. A communication system, characterized in that: The communication system comprises a server and a plurality of computing nodes, wherein: The server is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes; The server is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: data sending address, data receiving address, data size, data type, logical serial number identification of the communication root node, target communication device, and communication device to which the target communication process belongs; The server is used to configure the communication primitive interface to each computing node; The server is used to perform distributed training tasks with each computing node based on the communication primitive interface; Each of the computing nodes is used to receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; Each computing node is used to perform distributed training tasks with the server based on the communication primitive interface.
12. A communication device, characterized in that: Applied to a server, the communication device comprises: The first division module is used to divide the computing nodes based on the computing structure information of each hardware device in the heterogeneous computing power pool, wherein the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are respectively divided into different computing nodes; A first determination module is used to determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; A first configuration module is used to configure the communication primitive interface to each computing node The first execution module is used to execute the distributed training task with each computing node based on the communication primitive interface.
13. A communication device, characterized in that: Applied to a computing node, the communication device comprises: A first receiving module is used to receive a communication primitive interface configured by a server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; The second execution module is used to execute the distributed training task with the server based on the communication primitive interface.
14. A server, characterized in that: The server includes a transceiver and a processor, wherein the processor is configured to: Based on the computing structure information of each hardware device in the heterogeneous computing power pool, the computing nodes are divided, where the hardware devices with the same computing structure information are divided into one computing node, and the hardware devices with different computing structure information are divided into different computing nodes; Determine the communication primitive interface between the divided computing nodes, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; The transceiver is used for: Configuring the communication primitive interface to each computing node; The processor is used to: Based on the communication primitive interface, a distributed training task is performed with each computing node.
15. A computing node, characterized in that: The computing node comprises a transceiver and a processor, wherein the transceiver is used for: A communication primitive interface configured by a receiving server, wherein the communication primitive interface includes at least one of the following information: a data sending address, a data receiving address, a data size, a data type, a logical serial number identifier of a communication root node, a target communication device, and a communication device to which a target communication process belongs; The processor is used to: Based on the communication primitive interface, a distributed training task is performed with the server.
16. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the communication method according to any one of claims 1 to 5 when executed by the processor, or implements the steps of the communication method according to any one of claims 6 to 10 when executed by the processor.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the communication method according to any one of claims 1 to 5, or which, when executed by the processor, implements the steps of the communication method according to any one of claims 6 to 10.
Citation Information
Cited By
Heterogeneous hardware cluster distributed training method and device, electronic equipment and medium
CN120066731A
Heterogeneous hardware cluster distributed training method and device, electronic equipment and medium
CN120066731B
