Data processing method and device, equipment and storage medium
By dividing data into sub-data in a distributed computing system and performing the computation of the next sub-data during the computation synchronization process, the problem of the sequential relationship between the computation process and the communication process is solved, thereby improving data processing efficiency and resource utilization.
Patent Information
- Application Number
- CN202510694356.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
In distributed computing systems, the sequential relationship between computation and global protocol communication leads to excessively long processing times and low efficiency in data processing tasks.
By dividing the data to be processed into multiple sub-data, and synchronizing the data while performing sub-data calculations on the computing card, the calculation process and communication process overlap, reducing processing time.
It improves data processing efficiency, shortens the total time of data processing tasks, and makes full use of the computing card's computing cores and memory bandwidth.
Smart Images

Figure CN123178045A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed computing technology, and in particular to data processing methods, apparatus, devices and storage media. Background Technology
[0002] In distributed computing systems, in order to efficiently execute data processing tasks, the data processing tasks are often distributed to multiple computing cards (e.g., multiple graphics cards) for parallel processing. Each computing card is responsible for processing a portion of the data or tasks, and then the calculation results are aggregated, thereby reducing the computational and memory pressure on a single computing card.
[0003] Since the results from multiple computing cards need to be merged, communication between the cards needs to be achieved through All Reduce (AR) communication. That is, AR communication is used to synchronize the computation results from multiple computing cards.
[0004] However, since the computation process and AR communication are sequential, AR communication depends on the computation results. The computation process must be performed first, followed by AR communication, which results in a long processing time and low data processing efficiency. Summary of the Invention
[0005] This application provides a data processing method, apparatus, device, and storage medium, which reduces the processing time of data processing tasks and improves data processing efficiency.
[0006] To achieve the above objectives, this application adopts the following technical solution:
[0007] Firstly, a data processing method is provided, comprising: acquiring data to be processed from each of multiple computing cards executing a data processing task; each computing card including a computation operator and a communication operator; the computation operator performing computation operations on the input data; and the communication operator transmitting data between the multiple computing cards. The data to be processed includes n sub-data, where n is a positive integer greater than 1. The computation operator is used to perform computation on the i-th sub-data to obtain the i-th computation result. The communication operator is used to synchronize the i-th computation result across the multiple computing cards, where i is a positive integer less than n. During the synchronization of the i-th computation result, the computation operator is used to perform computation on the (i+1)-th sub-data until the n-th computation result is synchronized via the communication operator. The computation results on each computing card are summarized to obtain the target result of the data processing task.
[0008] The solution provided in this application offers a data processing approach that divides the data to be processed on a single computing card into multiple sub-data. The computation of one sub-data is performed on the computing card, and while synchronizing the results of the current sub-data, the computation of the next sub-data is performed. This allows the computation and communication processes to overlap, reducing the processing time of data processing tasks and improving data processing efficiency.
[0009] One possible implementation, where the above-mentioned computation based on the operator to calculate the i-th sub-data to obtain the i-th calculation result, can be specifically implemented as follows: Attention calculation is performed on the input matrix, key-value cache, and attention mask in the i-th sub-data based on the computation operator to obtain an intermediate result. Here, the key-value cache is used to cache the key-value matrix and the value matrix, and the attention mask is used to determine whether the data in the key-value cache undergoes attention calculation or not. The intermediate result is then matrix-multiplied with the weight values of the computation card to obtain the i-th calculation result. By calculating the result of only one sub-data at a time, the computation and storage requirements can be significantly reduced, thus enabling the handling of longer data processing tasks or allowing the computation process to be implemented using less memory.
[0010] Another possible implementation, based on the above-mentioned attention calculation on the input matrix, key-value cache, and attention mask in the i-th sub-data, to obtain intermediate results, can be specifically implemented as follows: The input matrix is used as the query matrix. An attention score is calculated based on the query matrix and the key-value matrix in the key-value cache. An intermediate result is obtained based on the attention score and the value matrix in the key-value cache. The attention score is obtained by using the input matrix as the query matrix and calculating on a portion of the key-value matrix in the key-value cache. This score measures the correlation between each data point in the current sub-data and a portion of historical data stored in the key-value cache, thus accurately capturing the relationship between the current data and its related context (defined by the key-value cache and attention mask).
[0011] Another possible implementation, where the computation operator performs calculations on the (i+1)th sub-data during the data synchronization of the i-th calculation result, can be specifically implemented as follows: While the communication operator begins synchronizing the i-th calculation result, the computation operator immediately begins calculating the (i+1)-th sub-data. By starting to calculate the (i+1)-th sub-data immediately while waiting for the i-th calculation result to complete data synchronization, some or even all of the communication delay can be "hidden." That is, communication time no longer completely blocks subsequent computation tasks, thereby shortening the overall task execution time. Furthermore, this overlapping strategy ensures that the computation operator can continue working while communication is in progress, improving the utilization of the computing card's computing cores and memory bandwidth, thus making fuller use of the computing card's resources.
[0012] Another possible implementation is that, during the data synchronization process of the i-th calculation result, the calculation operator performs calculations on the (i+1)-th sub-data. Specifically, when the communication operator begins synchronizing the i-th calculation result, the calculation operator performs calculations on the (i+1)-th sub-data after a first time interval. By introducing a "first time interval," the communication operator is given a brief opportunity to use resources "prioritized," which helps ensure a smoother data synchronization process.
[0013] Another possible implementation method, as described above, includes splitting the data to be processed into n sub-data.
[0014] Another possible implementation is to split the data to be processed into n sub-data points, as described above. Specifically, this can be achieved by splitting the data to be processed into n sub-data points according to a custom quantity value. Using a custom quantity value for splitting means that the number of sub-data points to be split into can be dynamically determined based on actual needs, computational load, or the requirements of a specific algorithm, rather than being fixed to a certain value. This allows the system to adapt to different sizes of data to be processed and different performance goals.
[0015] Another possible implementation involves splitting the data to be processed into n sub-data units. Specifically, this can be achieved by splitting the data into n sub-data units based on the computing card's hardware capabilities, where the size of n is related to the hardware's computing capacity. By utilizing the computing card's hardware characteristics, such as determining the number of sub-data units n based on its memory capacity and bandwidth, it can be ensured that each sub-data unit can be efficiently processed by the computing card. For example, n can be adjusted so that the size of each sub-data unit is just right for the computing card's video memory, avoiding memory overflow due to excessively large sub-data units or insufficient utilization of the computing card's computing power due to excessively small sub-data units.
[0016] Another possible implementation, the data processing method provided in this application, further includes: pre-splitting the data to be processed to obtain multiple pre-split data. The value of n under the splitting condition is obtained based on the difference between the predicted computation time of the computation operator for a single pre-split data and the predicted communication time of the communication operator's computation result for a single pre-split data. Dynamically adjusting the size of n using the predicted value allows for more efficient utilization of the computing and communication capabilities of the computing card, reducing idle waiting time. Furthermore, this dynamic adjustment enables the computation and communication processes to be executed in parallel as much as possible, minimizing communication latency and significantly improving overall throughput and data processing efficiency.
[0017] Another possible implementation involves splitting conditions including: the predicted computation time equals the predicted communication time; or, the difference between the predicted computation time and the predicted communication time is less than or equal to a time threshold.
[0018] Another possible implementation is to summarize the calculation results on each computing card to obtain the target result of the data processing task. Specifically, this can be achieved by concatenating the n calculation results on each computing card according to the splitting order of the data to be processed to obtain the target result of the data processing task.
[0019] Secondly, a data processing apparatus is provided, comprising: an acquisition module, a data processing module, and a summarization module. Wherein:
[0020] The aforementioned acquisition module is used to acquire the data to be processed from each of the multiple computing cards executing the data processing task. Each computing card includes a computation operator and a communication operator. The computation operator is used to perform computation operations on the input data, and the communication operator is used to transmit data between the multiple computing cards. The data to be processed includes n sub-data, where n is a positive integer greater than 1.
[0021] The aforementioned data processing module is used to perform calculations on the i-th sub-data based on computation operators to obtain the i-th calculation result. The i-th calculation result is then synchronized across multiple computing cards using a communication operator, where i is a positive integer less than n. During the synchronization of the i-th calculation result, calculations are performed on the (i+1)-th sub-data based on computation operators until the n-th calculation result is synchronized via the communication operator.
[0022] The above-mentioned summary module is used to summarize the calculation results on each calculation card to obtain the target result of the data processing task.
[0023] One possible implementation is that the aforementioned data processing module is specifically used to: perform attention calculations on the input matrix, key-value cache, and attention mask in the i-th sub-data based on the computation operator, to obtain an intermediate result. The key-value cache is used to cache the key-value matrix and the value matrix, and the attention mask is used to determine whether the data in the key-value cache undergoes attention calculation or not. The intermediate result is then matrix-multiplied with the weight values of the computation card to obtain the i-th computation result.
[0024] Another possible implementation, specifically the data processing module described above, is used to: use the input matrix as a query matrix, calculate the attention score based on the query matrix and the key-value matrix in the key-value cache, and obtain the intermediate result based on the attention score and the value matrix in the key-value cache.
[0025] Another possible implementation is that the above data processing module is specifically used to: when the communication operator starts to synchronize the data of the i-th calculation result, the calculation operator immediately starts to calculate the (i+1)-th sub-data.
[0026] Another possible implementation is that the above data processing module is specifically used to: calculate the (i+1)th sub-data after the first time interval of the calculation operator when the communication operator starts to synchronize the data of the i-th calculation result.
[0027] In another possible implementation, the data processing module described above is also used to: split the data to be processed into n sub-data.
[0028] Another possible implementation is that the data processing module described above is specifically used to: split the data to be processed into n sub-data according to a custom quantity value.
[0029] Another possible implementation is that the data processing module described above is specifically used to: split the data to be processed into n sub-data based on the hardware computing conditions of the computing card, where the size of n is related to the hardware computing conditions.
[0030] In another possible implementation, the data processing module described above is further configured to: pre-split the data to be processed to obtain multiple pre-split data. Based on the difference between the predicted computation time of the computation operator for a single pre-split data and the predicted communication time of the computation result of the communication operator for a single pre-split data, the value of n that satisfies the splitting condition is obtained.
[0031] Another possible implementation involves splitting conditions including: the predicted computation time equals the predicted communication time; or, the difference between the predicted computation time and the predicted communication time is less than or equal to a time threshold.
[0032] Another possible implementation is that the above-mentioned summarization module is also used to concatenate the n calculation results on each calculation card according to the splitting order of the data to be processed, so as to obtain the target result of the data processing task.
[0033] The data processing apparatus provided in the second aspect is used to execute the data processing method provided in the first aspect or any possible implementation of the first aspect. The technical effects corresponding to any implementation of the second aspect can be referred to the technical effects corresponding to any implementation of the first aspect, and will not be repeated here.
[0034] Thirdly, a computing device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is executed by the processor to implement the data processing method described in the first aspect or any implementation thereof.
[0035] Fourthly, a computer-readable storage medium is provided, wherein at least one computer program is stored therein, and the at least one computer program is loaded and executed by a processor to implement the data processing method as described in the first aspect or any implementation thereof.
[0036] Fifthly, a computer program product is provided, comprising a computer program or instructions, which, when executed by a processor, implement the data processing method described in the first aspect or any implementation thereof.
[0037] In a sixth aspect, a chip is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor executes to implement the data processing method as described in the first aspect or any implementation thereof.
[0038] A seventh aspect provides a distributed computing system for executing the data processing method described in the first aspect or any implementation thereof. In one implementation, the distributed computing system includes a management node for executing the data processing method described in the first aspect or any implementation thereof. In another implementation, the distributed computing system includes at least one computing node for executing the data processing method described in the first aspect or any implementation thereof.
[0039] The solutions provided in aspects three through seven above are used to implement the methods provided in aspect one above, and their specific implementations will not be described in detail here. The technical effects corresponding to any implementation of the solutions provided in aspects three through seven above can be found in the technical effects corresponding to any implementation of aspect one above, and will not be described in detail here.
[0040] It should be noted that any of the possible implementations of any of the above aspects can be combined, provided that the solutions do not contradict each other. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of parallel data processing provided in an exemplary embodiment;
[0042] Figure 2 This is a timing diagram of the computation and communication processes provided in an exemplary embodiment;
[0043] Figure 3 This is a schematic diagram of the architecture of a distributed computing system provided in an exemplary embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the architecture of another distributed computing system provided in an exemplary embodiment of this application;
[0045] Figure 5 This is a schematic diagram of the architecture of another distributed computing system provided in an exemplary embodiment of this application;
[0046] Figure 6 This is a flowchart of a data processing method provided in an exemplary embodiment of this application;
[0047] Figure 7 This is a schematic diagram illustrating the timing relationship between the computation and communication processes provided in an exemplary embodiment of this application;
[0048] Figure 8 This is a schematic diagram of a data processing scheme provided in an exemplary embodiment of this application;
[0049] Figure 9 This is a schematic diagram illustrating another data processing scheme provided by an exemplary embodiment of this application;
[0050] Figure 10 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application;
[0051] Figure 11 This is a schematic diagram of the structure of a computing device provided in an exemplary embodiment of this application. Detailed Implementation
[0052] In the embodiments of this application, in order to clearly describe the technical solutions of the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different. The technical features described by "first" and "second" have no sequential or size order.
[0053] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner to facilitate understanding.
[0054] In the embodiments of this application, at least one can also be described as one or more, and multiple can be two, three, four or more, and this application does not impose any restrictions.
[0055] Furthermore, the network architecture and scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0056] It should be noted that all information (including but not limited to device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the subject or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the data processing tasks and data to be processed involved in this application were obtained with full authorization.
[0057] To facilitate understanding, the key terms and concepts involved in this application will be explained below.
[0058] A computing card, also known as an acceleration chip, acceleration device, accelerator, or accelerator card, is a specialized hardware device or computer system designed to accelerate computation in AI scenarios. In this application, a computing card may be, for example, a graphics processing unit (GPU), a neural network processing unit (NPU), an intelligent processing unit (IPU), a tensor processing unit (TPU), a domain-specific architecture (DSA) chip, a graphics card, etc., and is not limited to these.
[0059] An operator (OP) is a computational unit or function that runs on a computing card. In the field of deep learning, neural network layers and even the entire model are composed of operators, which correspond to the computational logic within the neural network layers. For example, a convolutional layer is an operator; the weight summation process in a fully-connected layer (FClayer) is also an operator.
[0060] Parallelism in distributed computing refers to the practice in a distributed computing system where tasks are distributed across multiple computing cards for parallel processing. Each card is responsible for processing a portion of the data or tasks, and the results are then aggregated. By employing parallelism, the parallel computing resources of the distributed computing system can be fully utilized, significantly reducing task execution time and improving efficiency. Taking AI scenarios as an example, tasks within an AI model are divided, and these divided tasks are distributed across different devices (such as computing cards), allowing these devices to collaborate and complete the overall computational tasks of the model (such as inference or training tasks). This approach effectively overcomes the limitations of individual devices in terms of storage capacity and computing power, enabling the processing of ultra-large-scale models.
[0061] Figure 1 This diagram illustrates parallel data processing. The data for a data processing task is divided into multiple data sets to be processed, and these data sets are distributed across multiple computing cards (such as multiple GPUs). Each computing card is responsible for processing a portion of the data or a portion of the task. After each computing card has processed its portion and synchronized the data, the results from the computing cards are merged to obtain the target result corresponding to the data processing task. For example, if there are four computing cards capable of executing a computation task, and the data processing task is a matrix, the task can be divided into four data sets to be processed by rows. Computing card 1 is responsible for processing the first part of the data processing task (e.g., the first quarter of the rows), computing card 2 is responsible for processing the second part (e.g., the middle quarter of the rows), computing card 3 is responsible for processing the third part (e.g., the last quarter of the rows), and computing card 4 is responsible for processing the fourth part (e.g., the last quarter of the rows). Each computing card independently and in parallel processes its own data and synchronizes the results to other computing cards. Since the data synchronization of the calculation results can only be performed after the calculation is completed, each computing card, after receiving the calculation results synchronized from the other computing cards, summarizes its own calculation results with the calculation results of the other three computing cards to obtain the target result.
[0062] During parallel processing across multiple computing cards, the timing diagrams of the computation and communication processes are as follows: Figure 2 As shown. Because the calculation and communication processes are sequential, and the communication process depends on the calculation results from the computing card, the calculation process must be performed first, followed by the communication process. For example... Figure 2 The blocks marked with slashes represent the computation time for the computation process, while the blank blocks represent the communication time for the communication process. Therefore, the total processing time is: computation time + communication time.
[0063] However, because the calculation and communication processes are sequential, the entire data processing task takes too long and the data processing efficiency is low.
[0064] Based on this, this application provides a data processing scheme that divides the data to be processed on a single computing card into multiple sub-data. The calculation of each sub-data is performed on the computing card, and while synchronizing the calculation result of the current sub-data, the calculation of the next sub-data is performed simultaneously. This allows the calculation and communication processes to overlap, reducing the processing time of data processing tasks and improving data processing efficiency.
[0065] The solutions provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0066] The solution provided in this application can be applied to Figure 3 In the illustrated distributed computing system 100, for example... Figure 3 As shown, the distributed computing system 100 includes a host 101 and multiple computing cards 102. The distributed computing system 100 can access wired or wireless networks.
[0067] The distributed computing system 100 possesses storage and distributed computing capabilities, enabling it to execute data processing tasks using a parallel strategy. These tasks may include, for example, inference or training tasks for AI models. Schematic, the distributed computing system 100 includes a host 101 and multiple computing cards 102, with communication connections between the host 101 and the multiple computing cards 102.
[0068] In some embodiments, the computing card 102 is also referred to as an acceleration device, accelerator, acceleration chip, acceleration card, etc. The computing card 102 may be, for example, a GPU, NPU, IPU, TPU, DSA chip, graphics card, etc., and this application is not limited thereto. The number of host 101 and computing card 102 shown in the figures is merely illustrative; the number of host 101 can be one or more, and the number of computing cards 102 can be more or less, and this application does not limit this.
[0069] In this embodiment, the host 101 is an integrated device or module including a processor, memory, and other related components, which works in conjunction with the computing cards 102 to achieve various complex computing functions. The host 101 can control multiple computing cards 102 to execute data processing tasks in parallel. Taking the data processing task as the training task of an AI model as an example, the host 101 responds to the training request of the AI model and controls multiple computing cards 102 to execute the training task of the AI model in parallel. For example, it sends various data to be processed in the AI model to multiple computing cards 102. Each computing card 102, based on the received data to be processed, calls the corresponding computing operator, processes the input data of the computing operator, and then calls the communication operator to synchronize the calculation results of the computing operator, thereby realizing the training task of the AI model. It should be noted that this is only an example, and the parallel strategy adopted by the distributed computing system 100 to execute the training task can be set according to actual needs. This application does not limit it in this regard.
[0070] Optionally, the processor in the host 101 may be one or more central processing units (CPUs), field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, or any other suitable circuitry.
[0071] like Figure 3As shown, the distributed computing system 100 integrates a host 101 and multiple computing cards 102 into a single server, which may be, for example, a standalone physical server. In this implementation environment, the host 101 is used to implement the data processing functions of the distributed computing system. The host 101 and the computing cards 102 are connected via a peripheral component interconnect express (PCIe) link, and data exchange between the host 101 and the computing cards 102 occurs through the PCIe link. The individual computing cards 102 are connected via high-speed interconnect links, such as cache coherent system (CCS), RDMA over converged Ethernet (RoCE), compute express link (CXL), universal chiplet interconnect express (UCIe), cache coherent interconnect for accelerators (CCIX), etc., and this application is not limited to these.
[0072] The solution provided in this application can also be applied to Figure 4 In another distributed computing system 200, as illustrated, for example... Figure 4 As shown, the distributed computing system 200 is a computing cluster. The distributed computing system 200 includes multiple computing nodes, wherein each computing node includes a host 201 and multiple computing cards 202.
[0073] Optionally, the communication connections between the computing nodes can be networks such as Ethernet, Fibre Channel, remote direct memory access (RDMA), RDMA over converged Ethernet (RoCE) network, InfiniBand (IB) network, etc., and this application is not limited to these.
[0074] In addition, Figure 4 In the illustrated distributed computing system 200, multiple computing cards performing data processing tasks can be deployed on the same computing node, or the multiple computing cards can be deployed on different computing nodes. The deployment of multiple computing cards on different computing nodes includes the following scenarios:
[0075] (1) Any two computing cards in the multiple computing cards belong to different computing nodes. For example, the multiple computing cards that execute the task include computing card A, computing card B and computing card C, which are deployed on computing node 1, computing node 2 and computing node 3 respectively.
[0076] (2) At least two computing cards are deployed on the same computing node. For example, the multiple computing cards that perform the task include computing card A, computing card B and computing card C. Computing card A and computing card B are deployed on computing node 1 and computing card C is deployed on computing node 2.
[0077] For any given computing node, it is a device that possesses both computing and storage capabilities, such as a server or desktop computer; this application is not limited to these. The various computing cards 202 within a computing node are connected via a high-speed interconnect link. This high-speed interconnect link is also referred to as the intra-node network. A computing node can be an independent physical server, or a virtualized node such as a virtual machine or container. In this case, the virtual machine or container can be deployed on at least one computing device (e.g., a server). In this implementation environment, the host 201 within any computing node is used to implement the data processing functions of the distributed computing system.
[0078] In some embodiments, the distributed computing system 200 includes not only multiple computing nodes but also a management node. The management node manages the multiple computing nodes, for example, by invoking each computing node to execute tasks. It should be noted that the management node can be a node in the distributed computing system 200 independent of the multiple computing nodes, such as an integrated device or module including a processor, memory, and other related components. The management node can also be a node selected from the multiple computing nodes to manage other nodes; this application does not limit this. Illustratively, refer to... Figure 5 , Figure 5 This is a schematic diagram of the architecture of a distributed computing system provided in an embodiment of this application. Figure 5 As shown, the distributed computing system 200 includes a management node and multiple computing nodes (or worker nodes). Each computing node includes a host 201 and multiple computing cards 202. The host 201 and computing cards 202 interact via a PCIe link, and the computing cards 202 communicate with each other via a high-speed interconnect link. In this scenario, the management node is used to implement the data processing function of the distributed computing system; that is, the management node divides and distributes the data corresponding to the data processing tasks.
[0079] It should be noted that the above Figures 3 to 5The distributed computing system illustrated is for illustrative purposes only and does not constitute a limitation of this application. In other embodiments, the aforementioned distributed computing system can also be deployed on a cloud platform. A cloud platform, short for cloud computing platform, refers to a service that provides computing, networking, and storage capabilities based on hardware and software resources. By processing and analyzing massive amounts of data remotely through the network "cloud" and then returning the results to the user, it features large scale, distribution, virtualization, high availability, scalability, on-demand service, and security. Cloud platforms can achieve rapid provisioning and release of configurable computing resources with relatively low management costs or low interaction complexity between users and service providers.
[0080] Furthermore, the aforementioned wireless or wired networks utilize standard communication technologies and / or protocols. These networks are typically Transmission Control Protocol / Internet Protocol (TCP / IP) networks within data center networks, as well as RDMA networks such as RoCE networks and InfiniBand (IB) networks, etc., without limitation. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0081] The data processing methods described in this application are described below.
[0082] Figure 6 This application provides a data processing method for a distributed computing system. This distributed computing system can... Figure 3 The schematic distributed computing system 100 in the figure is, or is Figure 4 , 5 The diagram illustrates a distributed computing system 200.
[0083] like Figure 6 As shown, the data processing method may include:
[0084] Step 602: The distributed computing system obtains the data to be processed from each of the multiple computing cards executing the data processing task.
[0085] In the embodiments of this application, the data processing task performed by the distributed computing system can be an inference / generation task or a training task of an AI model, or a data processing task in the pre-fill stage of long sequence inference (such as a large language model processing long text), but it is not limited to these, and this application does not limit it. Schematic, the distributed computing system includes a host and multiple computing cards. In response to the task execution request, the host sends execution instructions for the data to be processed in the data processing task to each computing card in a parallel manner. Each computing card processes the input data to be processed based on the received execution instructions.
[0086] Optionally, the computing card includes computing operators and communication operators, but is not limited thereto, and the embodiments of this application do not specifically limit this.
[0087] Computation operators are used to perform computational operations on the input data. Specifically, computation operators are used to perform various numerical calculations, logical operations, and other operations on the input data to be processed. For example, computation operators include matrix multiplication operators, convolution operators, matrix addition operators, and so on, and are not limited to these.
[0088] Communication operators are used to transfer data between multiple computing cards, thereby ensuring the collaborative operation of various computing cards in a distributed computing system. Examples of communication operators include the send operator, the recv operator, the allreduce operator, the allgather operator, and so on, and are not limited to these.
[0089] It should be noted that the functions of the aforementioned communication and computation operators are determined based on their main characteristics; some communication operators may also possess computational functions. For example, the allreduce operator performs reduction calculations (such as summation and averaging) on the data across various computation cards, and also transmits data and synchronizes results between different computation cards.
[0090] In some embodiments, the acquisition of data to be processed can be determined based on the number of computing cards. For example, if a distributed computing system has 10 computing cards (such as GPUs), the data of the data processing task can be divided into 10 parts, each part of which is used as data to be processed, and each GPU processes one part of the data to be processed.
[0091] Step 604: The distributed computing system splits the data to be processed into n sub-data.
[0092] The method of splitting the data to be processed includes any of the following, but is not limited thereto, and the embodiments of this application do not specifically limit it:
[0093] Method 1: Split according to batch size. That is, divide the entire dataset for the data processing task into several smaller batches based on the batch size. For example, if the dataset has 1000 samples, and the batch size is set to 100, the dataset will be divided into 10 batches, each containing 100 samples. Or, if the dataset for the data processing task consists of 8 sentences or 8 images, these 8 sentences or 8 images will be divided into 8 or 4 batches.
[0094] Method 2: Segment by horizontal / vertical dimensions. This involves dividing the entire dataset corresponding to the data processing task into several sub-data sets based on the range of data rows or columns. For example, assuming the data is a single table, the dataset will be divided into multiple smaller tables based on the row, column, and column dimensions.
[0095] Method 3: Segment data according to data attribute dimensions. For example, segment data into different data to be processed based on business functions (such as user management, order processing, payment system, etc.).
[0096] Optionally, the size of n can be determined in the following manner, but is not limited thereto, and the embodiments of this application do not specifically limit it in this way:
[0097] Method 1: n is a custom quantity value. That is, the data to be processed is split into n sub-data points according to a custom quantity value. In this case, n is not a fixed value; users can customize the value of n based on the actual needs of the data processing task.
[0098] Method 2: Determine n based on the computing card's hardware capabilities. That is, based on the computing card's hardware capabilities (such as memory, computing power, and bandwidth), split the data to be processed into n sub-data units, where the size of n is related to the hardware capabilities. For example, suppose the data to be processed contains 100,000 records, each record being an image. The computing card is a GPU, each GPU has 12GB of video memory, and each GPU requires 4GB of video memory to process 1000 records at a time. Therefore, a GPU can process a maximum of 3000 records at a time. Thus, the 100,000 records need to be split into 34 sub-data units, each containing approximately 2941 to 3000 records; that is, n is 34.
[0099] Method 3: A recommended value for n is obtained by preprocessing the data to be processed. Specifically, the data to be processed is pre-splitted to obtain multiple pre-split data sets. The value of n that satisfies the splitting condition is determined by the difference between the predicted computation time of the computation operator for a single pre-split data set and the predicted communication time of the communication operator for the computation result of a single pre-split data set. This method dynamically adjusts the computation time of the computation operator and the communication time of the communication operator, thereby reducing the gap between computation and communication times and avoiding situations where communication is idle during computation, or vice versa.
[0100] The splitting conditions include: the predicted calculation time is equal to the predicted communication time; or, the difference between the predicted calculation time and the predicted communication time is less than or equal to the time threshold.
[0101] The time threshold is a minimum value configured to determine the difference between computation time and communication time. The size of the time threshold can be configured according to actual needs.
[0102] Step 606: The distributed computing system performs calculations on the i-th sub-data based on the computation operators to obtain the i-th calculation result.
[0103] The i-th sub-data element includes, but is not limited to, the input matrix, key-value cache, and attention mask. The input matrix is the i-th data element to be processed. The key-value cache is used to cache the key-value matrix and value matrix. That is, the key-value cache is used to cache the key-value matrix and value matrix preceding the i-th sub-data element. By using the key-value cache, the recalculation of the key-value matrix and value matrix at each step can be avoided. The attention mask is used to determine whether the data in the key-value cache should undergo attention calculation or not. The attention mask allows for flexible selection of which data can continue to undergo attention calculation, thus adapting to different task requirements.
[0104] For example, by loading the input matrix, key-value cache, and attention mask from the i-th sub-data set, attention computation is performed on the input matrix, key-value cache, and attention mask from the i-th sub-data set based on the computation operator to obtain an intermediate result. The intermediate result is then matrix-multiplied with the weight values of the computation card to obtain the i-th computation result.
[0105] Specifically, in calculating the intermediate results, the input matrix is used as the query matrix. An attention score is calculated based on the query matrix and the key-value matrix in the key-value cache. The intermediate results are then obtained based on the attention score and the value matrix in the key-value cache. The formula for calculating the intermediate results can be applied as follows:
[0106]
[0107] Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k Let Q and K be the number of columns, i.e., the vector dimensions, and T be the transpose.
[0108] For example, suppose a computing card has 5 sub-data sets. The input matrix, key-value buffer, and attention mask from the first sub-data set are loaded into the computing operator on the computing card. Based on the input matrix, key-value buffer, and attention mask from the first sub-data set, the computing operator calculates the first result corresponding to the first sub-data set. Then, based on the input matrix, key-value buffer, and attention mask from the second sub-data set, the computing operator calculates the second result corresponding to the second sub-data set. The above steps are repeated to perform the calculation process for subsequent sub-data sets.
[0109] Step 608: The distributed computing system synchronizes the i-th calculation result across multiple computing cards based on the communication operator.
[0110] Data synchronization refers to synchronizing the calculation results in this computing card to other computing cards.
[0111] Optionally, data synchronization can be achieved through any of the following methods, but is not limited thereto, and the embodiments of this application do not specifically limit this:
[0112] Method 1: Broadcast the i-th calculation result directly to other computing cards. Computing card A receives the i-th calculation result. The computing cards participating in the communication include: computing card A, computing card B, and computing card C. After computing card A performs the broadcast operation, computing cards A, B, and C all receive the i-th calculation result.
[0113] Method 2: After reducing the i-th calculation result, broadcast it to other calculation cards. For example, when the calculation process is a reduction operation, the calculation results on multiple calculation cards are reduced. Optionally, the reduction method includes, but is not limited to, summation, finding the maximum value, finding the minimum value, finding the average value, or user-defined operations. By performing the reduction operation, the calculation results on different calculation cards can be integrated together. For example, the calculation results on calculation cards A, B, and C can be reduced by summation. Calculation card A has calculation result A, calculation card B has calculation result B, and calculation card C has calculation result C. After reduction, the result of calculation results A, B, and C is calculation result A + calculation result B + calculation result C. Calculation cards A, B, and C will all store calculation result A + calculation result B + calculation result C.
[0114] Step 610: During the process of synchronizing the i-th calculation result, the distributed computing system performs calculations on the (i+1)-th sub-data based on the calculation operator until the n-th calculation result is synchronized through the communication operator.
[0115] In this embodiment, the calculation process and data synchronization process are described through steps 606 and 608, respectively. Since the computing card includes multiple sub-data, the calculation process of the (i+1)th sub-data can be executed during the data synchronization process of the i-th calculation result. This allows the computing operators and communication operators in the computing card to run in parallel, reducing the overall time for executing data processing tasks and improving the execution efficiency of data processing tasks.
[0116] For example, assuming n is 3, the data to be processed on the computing card is divided into three sub-data. After the computing card performs calculations on the first sub-data using the calculation operator, it obtains the first calculation result. After obtaining the first calculation result, the computing card synchronizes the first calculation result data to other computing cards through the communication operator. During the data synchronization of the first calculation result, the computing card performs calculations on the second sub-data using the calculation operator, obtaining the second calculation result. After obtaining the second calculation result, the computing card synchronizes the second calculation result along with the data to other computing cards through the communication operator. During the data synchronization of the second calculation result, the computing card performs calculations on the third sub-data using the calculation operator, obtaining the third calculation result. After obtaining the third calculation result, the computing card synchronizes the third calculation result to other computing cards through the communication operator. Thus, the computing card completes the processing of the data to be processed.
[0117] In some embodiments, when the communication operator begins data synchronization for the i-th calculation result, the computation operator can immediately begin computation for the (i+1)-th sub-data. Alternatively, when the communication operator begins data synchronization for the i-th calculation result, the computation operator can perform computation for the (i+1)-th sub-data after a first time interval.
[0118] like Figure 7 The diagram shows the timing relationship between the computation and communication processes. Assume n is 3, and the data to be processed on the computation card is divided into three sub-data.
[0119] like Figure 7 As shown in Figure (a), assuming the computation time for the computation operator to the sub-data and the communication time for the communication operator to the computation result are equal, both the computation time and the communication time are 10 seconds (s). The communication time of the computation card to the first computation result and the computation time of the computation card to the second sub-data completely overlap, that is, while communicating about the first computation result, the second sub-data is computed in parallel. The final total data processing time is 40 seconds, which saves 20 seconds compared to the method of synchronizing data only after obtaining the computation result.
[0120] like Figure 7 As shown in Figure (b), when the computation time of the computation operator to the sub-data is greater than the communication time of the communication operator to the computation result, assuming the computation time is 10s and the communication time is 5s, the communication time of the computation card to the first computation result and the computation time of the computation card to the second sub-data partially overlap. That is, while communicating about the first computation result, the second sub-data is computed in parallel. Therefore, the final total data processing time is 35s, which saves 25s compared to the method of data synchronization only after obtaining the computation result.
[0121] like Figure 7 As shown in Figure (c), when the computation time of the computation operator to the sub-data is less than the communication time of the communication operator to the computation result, assuming the computation time is 8s and the communication time is 10s, the communication time of the computation card to the first computation result and the computation time of the computation card to the second sub-data partially overlap. That is, while communicating about the first computation result, the second sub-data is computed in parallel. Therefore, the final total data processing time is 38s, which saves 22s compared to the method of synchronizing data only after obtaining the computation result.
[0122] Step 612: The distributed computing system aggregates the computation results from each computing card to obtain the target result of the data processing task.
[0123] In this context, target data refers to the result obtained after the data to be processed corresponding to the data processing task has been calculated by the computing card. Alternatively, target data refers to the result obtained by summarizing the calculation results of multiple computing cards that have performed the data processing task.
[0124] For example, the n calculation results from each computing card are concatenated according to the splitting order of the data to be processed to obtain the target result of the data processing task. Alternatively, the n calculation results from the computing card itself and the calculation results synchronized with other computing cards can be concatenated according to the splitting order of the data to be processed to obtain the target result of the data processing task.
[0125] Alternatively, the target result of the data processing task can be obtained by taking a weighted average of the n calculation results from each computing card. For example, the target result of the data processing task can be obtained by taking a weighted average of the n calculation results from the computing card itself and the calculation results synchronized with other computing cards.
[0126] In summary, this application provides a data processing method that divides the data to be processed on a single computing card into multiple sub-data. The calculation of each sub-data is performed on the computing card, and while synchronizing the calculation result of the current sub-data, the calculation of the next sub-data is performed simultaneously. This allows the calculation and communication processes to overlap, reducing the processing time of data processing tasks and improving data processing efficiency.
[0127] The above mainly introduces the data processing solution provided in this application. The following will introduce the data processing solution provided in this application with specific examples.
[0128] like Figure 8 The diagram shows a data processing scheme, which mainly includes the following steps: data splitting, calculation and communication, and result assembly.
[0129] Data splitting. The distributed computing system executes data processing tasks through multiple computing cards and obtains the data to be processed from each of these cards. After obtaining the data to be processed from each computing card, the input matrix, key-value cache, and attention mask within the data to be processed are split into n sub-data.
[0130] Computation and Communication. After receiving n sub-data points, the computation operator in the computation card performs a computation on the first sub-data point and obtains the first calculation result. The communication operator in the computation card synchronizes the first calculation result to other computation cards. While the communication operator is synchronizing the first calculation result to other computation cards, the computation card performs a computation on the second sub-data point using the computation operator, obtaining the second calculation result. After obtaining the second calculation result, the computation card synchronizes the second calculation result with the data to other computation cards using the communication operator. While synchronizing the second calculation result, the computation card performs a computation on the third sub-data point using the computation operator, obtaining the third calculation result. After obtaining the third calculation result, the computation card synchronizes the third calculation result to other computation cards using the communication operator. This process is repeated until the nth calculation result is synchronized to other computation cards.
[0131] Result concatenation. The distributed computing system concatenates n computation results according to the order in which the data to be processed is split, to obtain the target result of the data processing task.
[0132] like Figure 9 The diagram illustrates a data processing scheme. The data for the data processing task is divided into multiple data sets to be processed, and these data sets are distributed across multiple computing cards (such as multiple GPUs). Each computing card is responsible for processing a portion of the data or a portion of the task. After each computing card determines its respective portion of the data or task, the data to be processed on each card is further divided into n sub-data sets. Computation operators on the computing cards perform calculations on these sub-data sets, and communication operators on the computing cards synchronize the calculation results. While the communication operators are synchronizing the calculation results for the current sub-data set, the computation operators are calculating the next sub-data set. Finally, the calculation results from all the computing cards are merged to obtain the target result corresponding to the data processing task.
[0133] For example, consider four computing cards capable of performing computational tasks. The data processing task is a matrix, which can be divided row-wise into four data segments to be processed. Computing card 1 is responsible for calculating the first part of the data processing task (e.g., the first quarter of the rows), computing card 2 for the second part (e.g., the middle quarter of the rows), computing card 3 for the third part (e.g., the last quarter of the rows), and computing card 4 for the fourth part (e.g., the last quarter of the rows). After determining the data to be processed for each computing card, the data is further divided into three sub-data segments. Each computing card performs computation and communication parallel processing on these three sub-data segments. For instance, after computing card 1 calculates the first result for the first sub-data segment, it synchronizes this result to computing cards 2, 3, and 4. Finally, after receiving the synchronized results from the other computing cards, each computing card concatenates its own result with the results from the other three cards to obtain the target result.
[0134] The foregoing mainly describes the solution provided in this application. Accordingly, this application also provides a data processing apparatus for implementing the above-described method embodiments.
[0135] In some embodiments, the data processing apparatus includes hardware structures and / or software modules corresponding to the execution of each function in order to achieve the above-described functions. Those skilled in the art will readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0136] This application embodiment can divide the data processing device into functional modules according to the above method embodiment. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0137] In some embodiments, this application provides a data processing apparatus for implementing the functions of the data processing apparatus in the above-described data processing method embodiments. For example... Figure 10The diagram shows the structure of the data processing device. The data processing device may include an acquisition module 1001, a data processing module 1002, and a summarization module 1003.
[0138] The acquisition module 1001 is used to execute Figure 6 The illustrated method includes step 602. The data processing module 1002 is used to execute... Figure 6 The illustrated method includes steps 604, 606, 608, and 610. The summary module 1003 is used for execution. Figure 6 The illustrated method includes step 612.
[0139] like Figure 11 As shown, the computing device provided in this application embodiment may include a processor 1101, a bus 1102, a communication interface 1103, and a memory 1104. The processor 1101, the memory 1104, and the communication interface 1103 communicate with each other via the bus 1102. It should be understood that this application does not limit the number of processors and memories in the computing device.
[0140] Bus 1102 can be a PCI bus, an Extended Industry Standard Architecture (EISA) bus, or a UB bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 11 The bus 1102 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1102 may include a path for transmitting information between various components of the computing device (e.g., memory 1104, processor 1101, communication interface 1103).
[0141] Processor 1101 may include any one or more processors such as CPU, graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0142] The memory 1104 may include volatile memory, such as random access memory (RAM). The processor 1101 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0143] The communication interface 1103 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device and other devices or communication networks.
[0144] The memory 1104 stores executable program code, which the processor 1101 executes to implement the functions of the data processing device or the CPU core in the aforementioned method embodiments. That is, the memory 1104 stores information for executing the aforementioned data processing methods.
[0145] In another aspect, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the data processing method provided in the above-described method embodiments.
[0146] In another aspect, a computer program product is provided, which includes a computer program or instructions that, when executed by a processor, implement the data processing method described above.
[0147] In another aspect, a chip is provided, including at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor performs to implement the data processing method as described above.
[0148] In another aspect, a computer system is provided, which includes a network device and a control device; when the network device and the control device execute instructions, they perform data processing methods as described above.
[0149] The method steps in this embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a computing device. Of course, the processor and storage medium can also exist as discrete components in the computing device.
[0150] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data processor such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD). The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method, characterized in that, The method includes: The system acquires the data to be processed from each of multiple computing cards that perform data processing tasks. Each computing card includes a computing operator and a communication operator. The computing operator is used to perform calculation operations on the input data, and the communication operator is used to transmit data between the multiple computing cards. The data to be processed includes n sub-data, where n is a positive integer greater than 1. The i-th sub-data is calculated based on the computation operator to obtain the i-th calculation result; the i-th calculation result is synchronized among the multiple computing cards based on the communication operator, where i is a positive integer less than n; During the process of synchronizing the i-th calculation result, the (i+1)-th sub-data is calculated based on the calculation operator until the n-th calculation result is synchronized through the communication operator; The calculation results from each computing card are summarized to obtain the target result of the data processing task.
2. The method according to claim 1, characterized in that, The step of performing calculations on the i-th sub-data based on the calculation operator to obtain the i-th calculation result includes: Based on the computation operator, attention calculation is performed on the input matrix, key-value cache, and attention mask in the i-th sub-data to obtain an intermediate result. The key-value cache is used to cache the key-value matrix and the value matrix, and the attention mask is used to determine whether the data in the key-value cache should undergo the attention calculation or not. The intermediate result and the weight value of the calculation card are multiplied by a matrix to obtain the i-th calculation result.
3. The method according to claim 2, characterized in that, The intermediate results obtained by performing attention calculations on the input matrix, key-value cache, and attention mask in the i-th sub-data based on the computation operator include: The input matrix is used as the query matrix, and the attention score is calculated based on the query matrix and the key-value matrix in the key-value cache. The intermediate result is obtained based on the attention score and the value matrix in the key-value cache.
4. The method according to any one of claims 1 to 3, characterized in that, The process of synchronizing the data of the i-th calculation result, including calculating the (i+1)-th sub-data based on the calculation operator, includes: When the communication operator starts to synchronize data for the i-th calculation result, the calculation operator starts to calculate the (i+1)-th sub-data. Alternatively, when the communication operator begins to synchronize the data of the i-th calculation result, the calculation operator performs the calculation of the (i+1)-th sub-data after a first time interval.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The data to be processed is split into n sub-data according to a custom quantity value.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: splitting the data to be processed into n sub-data according to the hardware computing conditions of the computing card, wherein the size of n is related to the hardware computing conditions.
7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The data to be processed is pre-splitned to obtain multiple pre-split data; The value of n under the condition of splitting is obtained by the difference between the predicted computation time of the computation operator for a single pre-splitting data and the predicted communication time of the computation result of the communication operator for a single pre-splitting data.
8. The method according to claim 7, characterized in that, The splitting conditions include: the predicted calculation time is equal to the predicted communication time; or, the difference between the predicted calculation time and the predicted communication time is less than or equal to a time threshold.
9. The method according to any one of claims 1 to 8, characterized in that, The step of summarizing the calculation results from each computing card to obtain the target result of the data processing task includes: The n calculation results on each computing card are concatenated according to the splitting order of the data to be processed to obtain the target result of the data processing task.
10. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the data to be processed from each of the multiple computing cards that perform the data processing task. Each computing card includes a computing operator and a communication operator. The computing operator is used to perform calculation operations on the input data, and the communication operator is used to transmit data between the multiple computing cards. The data to be processed includes n sub-data, where n is a positive integer greater than 1. The data processing module is used to perform calculations on the i-th sub-data based on the calculation operator to obtain the i-th calculation result; The data processing module is also used to synchronize the i-th calculation result among the multiple computing cards based on the communication operator, where i is a positive integer less than n; The data processing module is further configured to perform calculations on the (i+1)th sub-data based on the calculation operator during the process of synchronizing the i-th calculation result, until the n-th calculation result is synchronized through the communication operator; The aggregation module is also used to aggregate the calculation results on each computing card to obtain the target result of the data processing task.
11. A computing device, characterized in that, The computing device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data processing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the data processing method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed by a processor, implement the data processing method as described in any one of claims 1 to 9.
