Data recording processing method, apparatus, device, and computer program product
By collecting accelerator card runtime data during large model training and inference and reconstructing global communication operators based on matching patterns, the lack of observability in existing technologies is solved, enabling non-intrusive business execution monitoring and optimization.
Patent Information
- Application Number
- CN202510662053.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies lack effective observability methods during large model training and inference, making fault detection and performance optimization difficult, and additional interception and testing methods pose performance and security risks.
By collecting the accelerator card's operational data during business operations, obtaining the record sequence, and identifying associated records based on the matching patterns of a pre-set rule base, the global communication operator can be dynamically restored, avoiding additional data entry and testing.
It enables non-intrusive restoration of the overall business execution status, improves the accuracy of fault detection and the efficiency of performance optimization, and avoids performance and security risks.
Smart Images

Figure CN123157656A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application generally relate to information technology, and more specifically, to data recording and processing methods, apparatus, devices, and computer program products. Background Technology
[0002] In recent years, large-scale artificial intelligence (AI) models, such as Large Language Models (LLMs), have developed rapidly and are widely used in various industries. Large-scale model operations typically include two phases: training and inference. The training phase involves designing a specific model structure, inputting training data into the algorithm, and refining model parameters by optimizing the loss function. The training process usually involves multiple iterations, the number of which is not fixed but depends on the total amount of data. In the inference phase after model training is complete, the model's structure and parameters are fixed, serving as a stable input-output conversion service.
[0003] Large models have a massive number of parameters, and a single AI hardware accelerator card cannot handle the training and inference tasks. To address this issue, parallel computing has been introduced for large model operations. Parallel computing technology uses various parallel strategies to distribute the computational tasks of large models across large-scale accelerator clusters to support the training and inference of large models. Summary of the Invention
[0004] The embodiments of this application provide a data recording and processing scheme. This scheme can dynamically restore the execution status of the entire business without the need for additional data entry points in the business or interruption of the business for testing.
[0005] In a first aspect, a method for data recording processing is provided. The method includes: acquiring a set of record sequences for a set of accelerator cards, wherein each record sequence in the set of record sequences corresponds to a communication operator sequence executed by the corresponding accelerator card; identifying a set of associated records from multiple record sequences in the set of record sequences based on a matching pattern of associated records; and identifying a global communication operator corresponding to the set of associated records based on the set of associated records, wherein each set of associated records corresponds to a set of communication operators, and the global communication operator is executed through the execution of the set of communication operators. Thus, a method is provided for non-intrusive dynamic reconstruction of global communication operators from runtime records generated by the operator execution itself.
[0006] In some embodiments of the first aspect, the first record corresponding to the first communication operator in a set of record sequences includes: the operator name of the first communication operator; the execution start time and execution end time of the first communication operator; and the communication volume generated by executing the first communication operator. This indicates aspects that can be collected for business records such as global operators and business states and processes.
[0007] In some embodiments of the first aspect, the first record further includes at least one of the following: an identifier of the communication domain to which the first communication operator belongs; or an accelerator kernel task associated with the first communication operator. Thus, more comprehensive runtime records are collected for the execution of the operator, enabling the reconstruction of finer-grained service states and processes.
[0008] In some embodiments of the first aspect, a set of associated records includes a first record from a first record sequence and a second record from a second record sequence, and identifying a set of associated records based on a matching pattern includes: associating the first record and the second record based on a match between the operator name, execution start time, and execution end time indicated by the first record and the operator name, execution start time, and execution end time indicated by the second record. Thus, a method is provided for determining associated operators corresponding to global communication operators executed on different cards.
[0009] In some embodiments of the first aspect, associating the first record and the second record includes: associating the first record and the second record based on matching the operator name, execution start time, execution end time, and communication domain identifier of the first record with the operator name, execution start time, execution end time, and communication domain identifier of the second record. Therefore, considering the collected communication domain identifier when determining the associated operator can improve the accuracy of global operator reconstruction.
[0010] In some embodiments of the first aspect, records in a set of record sequences are matched with a set of record patterns indicating parallel computing types; and based on the record patterns that match the records in the set of record patterns, the parallel computing type of the communication operator corresponding to the record is identified. Thus, a method is provided for reconstructing the parallel computing type of a communication operator from its running record.
[0011] In some embodiments of the first aspect, a first record pattern in a set of record patterns indicates a first parallel computing type and includes at least one of the following: the operator name and traffic range of the matching record of the first record pattern; or the operator name of the preceding record and the operator name of the following record in the corresponding record sequence. Thus, a matching pattern capable of reconstructing the parallel computing type of an operator is provided.
[0012] In some embodiments of the first aspect, the method further includes: identifying the communication domain to which a set of communication operators belong, based on the parallelism of the global communication operators and the topological distribution of the set of communication operators on a set of accelerator cards. Thus, a method is provided to reconstruct the communication domain of a communication operator from its runtime record.
[0013] In some embodiments of the first aspect, identifying the communication domain to which a set of communication operators belong includes: identifying the communication domain to which a set of communication operators belong based on the parallelism, the topology distribution, and an identifier of the communication domain indicated by a set of associated records. Therefore, considering the collected communication domain identifier in communication domain reconstruction can improve the accuracy of communication domain reconstruction.
[0014] In some embodiments of the first aspect, a set of record sequences includes a first record sequence corresponding to a first accelerator card, the first record sequence including records of multiple computation iterations executed by the first accelerator card, and the method further includes: segmenting the record sequence based on a record pattern indicating the end of an iteration, identifying the computation iteration corresponding to each record in the multiple computation iterations. Thus, a method for dividing multiple iterations of a service operation from operator execution records is provided.
[0015] In some embodiments of the first aspect, the recording pattern indicating the end of an iteration includes at least one of the following: a sequence of one or more operators indicating the end of an iteration; a respective traffic range for one or more operators; or a relative magnitude relationship of the traffic of one or more operators. Thus, a matching pattern is provided capable of identifying the end of a service iteration in order to delineate iterations.
[0016] In a second aspect, a data recording and processing apparatus is provided. The apparatus includes: an acquisition module configured to acquire a set of record sequences for a set of accelerator cards, wherein each record sequence in the set of record sequences corresponds to a communication operator sequence executed by the corresponding accelerator card; a first identification module configured to identify a set of associated records from multiple record sequences in the set of record sequences based on a matching pattern of associated records; and a second identification module configured to identify a global communication operator corresponding to the set of associated records based on the set of associated records. Each set of associated records corresponds to a set of communication operators, and the global communication operators are executed by executing the set of communication operators.
[0017] In some embodiments of the second aspect, the first record corresponding to the first communication operator in a set of record sequences includes: the operator name of the first communication operator; the execution start time and execution end time of the first communication operator; and the communication volume generated by executing the first communication operator.
[0018] In some embodiments of the second aspect, the first record further includes at least one of the following: an identifier of the communication domain to which the first communication operator belongs; or an accelerator kernel task associated with the first communication operator.
[0019] In some embodiments of the second aspect, a set of associated records includes a first record from a first record sequence and a second record from a second record sequence, and the first identification module includes: a record association module configured to associate the first record and the second record based on matching the operator name, execution start time and execution end time indicated by the first record with the operator name, execution start time and execution end time indicated by the second record.
[0020] In some embodiments of the second aspect, the record association module includes: a communication domain-based association module, configured to associate the first record and the second record based on the matching of the operator name, execution start time, execution end time and communication domain identifier of the first record with the operator name, execution start time, execution end time and communication domain identifier of the second record.
[0021] In some embodiments of the second aspect, the apparatus further includes: a matching module configured to match a record in a set of record sequences with a set of record patterns indicating parallel computing types; and a third identification module configured to identify the parallel computing type of a communication operator corresponding to a record based on a record pattern that matches a record in a set of record patterns.
[0022] In some embodiments of the second aspect, a first recording pattern in a set of recording patterns indicates a first parallel computing type and includes at least one of the following: the operator name and traffic range of the matching record of the first recording pattern; or the operator name of the preceding record and the operator name of the matching record in the corresponding recording sequence.
[0023] In some embodiments of the second aspect, the apparatus further includes: a fourth identification module configured to identify the communication domain to which a set of communication operators belong, based on the parallelism of global communication operators and the topological distribution of a set of communication operators on a set of accelerator cards.
[0024] In some embodiments of the second aspect, the fourth identification module includes: a communication domain identification module configured to identify a communication domain to which a set of communication operators belong, based on the parallelism, the topology distribution, and an identifier of the communication domain indicated by a set of associated records.
[0025] In some embodiments of the second aspect, a set of record sequences includes a first record sequence corresponding to a first accelerator card, the first record sequence including records of multiple computational iterations performed by the first accelerator card, and the apparatus further includes: a fifth identification module configured to segment the record sequence by a record pattern based on an indication iteration end operator, identifying computational iterations corresponding to each record in the multiple computational iterations.
[0026] In some embodiments of the second aspect, the recording pattern indicating the end of iteration includes at least one of the following: a sequence of one or more operators indicating the end of iteration; a respective traffic range of one or more operators; or a relative magnitude relationship of the traffic of one or more operators.
[0027] In a third aspect, an electronic device is provided. The electronic device includes a processor and a memory storing computer instructions that, when executed by the processor, cause the electronic device to operate according to the method described in the first aspect or any of its embodiments.
[0028] In a fourth aspect, a computer program product is provided. The computer program product includes instructions that, when executed by an electronic device, cause the electronic device to perform actions according to the method of the first aspect or any embodiment thereof.
[0029] In a fifth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when executed by an electronic device, cause the electronic device to perform actions according to the method of the first aspect or any embodiment thereof. Attached Figure Description
[0030] Figure 1 A schematic diagram illustrates an example environment in which several embodiments of this application can be implemented;
[0031] Figure 2 A flowchart of an example method according to some embodiments of this application is shown;
[0032] Figure 3 An interaction diagram of example logic modules according to some embodiments of this application is shown;
[0033] Figure 4 A functional block diagram of an example module capable of performing service restoration processing according to some embodiments of this application is shown;
[0034] Figure 5 A schematic block diagram of an example data recording and processing apparatus according to some embodiments of this application is shown; and
[0035] Figure 6 A schematic block diagram of an example device that can be used to implement embodiments of this application is shown. Detailed Implementation
[0036] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0037] In the description of embodiments of this application, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0038] Parallel computing relies on ensemble communication semantics. Here, ensemble communication refers to the collaborative work of multiple processes within a machine (or between multiple machines) to complete a specific communication task. Ensemble communication involves data exchange between multiple processes, typically one-to-many, many-to-one, or all-to-all data exchange. In this paper, ensemble communication also broadly refers to point-to-point communication, that is, two processes (or devices) collaborating to complete a specific communication task.
[0039] During large-scale model training and inference operations, especially during training, the amount of data involved is enormous, and the number of machines in the cluster is massive. Furthermore, the communication process is complex due to the numerous and varied communications between machines and between multiple accelerator cards within a machine, as well as parallel communication. Currently, there are no effective technical means to ensure observability during the operational process. Conversely, as the parallel scale increases, the probability of failures objectively increases, making the operation and maintenance of training more challenging, and Model FLOPS Utilization (MFU) decreases with increasing parallel scale. MFU is a commonly used metric for evaluating the utilization of chip computing performance by a model implementation; it indicates the ratio of matrix computing power consumed by the model in one forward and backward computation to the machine computing power.
[0040] However, fault detection, delimitation, and performance optimization all rely on the observability of computational processes (e.g., AI model training and inference). This observability makes it possible to identify faulty cards and networks, as well as those experiencing performance degradation. Some solutions intercept function calls during the process and segment substrings for each iteration based on the similarity of the intercepted strings. Then, for each operator call on a suspected abnormal machine, a probe is injected to measure execution time. However, this method only covers the iteration identifiers, lacks a comprehensive understanding of the overall process, and suffers from substring misidentification, requiring service interruption for confirmation. Furthermore, this method injects additional communication events into the process during data collection, introducing performance and security risks.
[0041] To address the aforementioned and other issues, embodiments of this application provide a data recording and processing scheme. In this scheme, during business operations, data is collected from a set of accelerator card collectors to obtain a set of record sequences. Each record sequence corresponds to a communication operator sequence executed by the corresponding accelerator card. Furthermore, based on the matching patterns of associated records in a preset rule base, a set of associated records from multiple record sequences within the set of record sequences is identified, and the global communication operator corresponding to this set of associated records is accordingly identified. This set of associated records corresponds to a set of communication operators executed on each of the multiple accelerator cards, and the global communication operator is executed by executing this set of communication operators. The execution of the global communication operator is scheduled to be performed in parallel on multiple accelerator cards.
[0042] This solution provides a method for dynamically reconstructing global operators in business operation from the operator's own execution record based on matching patterns, without the need for additional event tracking or injection, or additional probing to verify the accuracy of the reconstruction. In some embodiments, various attributes such as the parallel type of business iteration and global operators, communication domain, and the timing relationship between preceding and subsequent operators can also be reconstructed, enabling full observation of the business execution process without the need for additional probing programs for auxiliary observation.
[0043] First refer to Figure 1 This illustrates a schematic diagram of an example environment 100 in which various embodiments of this application can be implemented. For example... Figure 1 As shown, the example environment 100 includes a computing device 110 and a set of computing nodes 120-1, 120-2, ..., and 120-M (individually or collectively referred to as computing nodes 120). Computing nodes 120 can be implemented as any suitable form of machine with computing capabilities. Multiple computing nodes can be interconnected to form a computing cluster to work collaboratively to handle large-scale computing tasks, such as training and inference of large models.
[0044] Each compute node 120 may include multiple accelerator cards, such as accelerator cards 130-1, 130-2, ..., and 130-N (individually or collectively referred to as accelerator cards 130) for compute node 120-1. An accelerator is a hardware device that accelerates specific types of computational tasks through optimized design and proprietary architecture. In AI training and / or inference scenarios, examples of accelerator cards may include, but are not limited to, compute cards such as Graphics Processing Units (GPUs), Neural Processing Units (NPUs), Tensor Processing Units (TPUs), and Field-Programmable Gate Arrays (FPGAs). During the execution of AI tasks, multiple accelerator cards on one or more machines can execute their respective portions of a global communication operator in parallel and communicate with each other to exchange necessary information to ultimately obtain the global computational result.
[0045] The computing device 110 is capable of performing various actions according to embodiments of this application. For example, the computing device 110 can acquire data records of operator execution during computing service execution reported from the computing node 120, and reconstruct the service process from them. Embodiments of this application will be described in more detail below in the context of the actions performed by the computing device 110. For ease of explanation, the computing device 110 is shown as a separate entity from a group of computing nodes 120. However, it should be understood that in some embodiments, the computing device 110 may also be implemented as one of the computing nodes 120.
[0046] The computing device 110 can be implemented as any device with corresponding computing capabilities, examples of which may include, but are not limited to, desktop computers, server computers, mainframes, etc. It should be understood that although shown as a single device, the computing device 110 can also be implemented in any other form suitable for performing the corresponding functions, such as multiple centralized devices, distributed devices, and / or deployed in the cloud, etc.
[0047] The computing device 110 can communicate with the computing node 120 to obtain its service operation records, and automatically process and analyze the acquired data synchronously or asynchronously with the execution of the service. Multiple computing nodes 120 and accelerator cards 130 within computing nodes 120 can also communicate with each other to exchange information, for example, information required to execute global operators. It should be understood that the embodiments of this application do not limit the communication method of the entities; communication can be, for example, wired or wireless. Wired methods may include, but are not limited to, fiber optic connections, Universal Serial Bus (USB) connections, etc., while wireless methods may include, but are not limited to, mobile communication technologies (including, but not limited to, cellular mobile communication, Wi-Fi, Bluetooth, etc.).
[0048] It should be understood that the architecture and functionality in example environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this application. Furthermore, other devices, systems, or components, not shown, may also be present in example environment 100. Additionally, embodiments of this application can be applied to other environments with different structures and / or functionalities.
[0049] Figure 2 A flowchart of an example method 200 for a database according to some embodiments of this application is shown. Example method 200 can be, for example, by... Figure 1 The computing device 110 shown performs the operation. It should be understood that method 200 may also include additional actions not shown, and the scope of this application is not limited in this respect. The following is in conjunction with... Figure 1 Example environment 100 is used to describe method 200 in detail.
[0050] At 210, a set of record sequences is acquired for each of a group of accelerator cards, wherein each record sequence in the set of record sequences corresponds to a sequence of communication operators executed by the corresponding accelerator card. For example, computing device 110 may acquire a set of record sequences for at least a portion of the accelerator cards 130 in a group of computing nodes 120, each record sequence corresponding to a sequence of communication operators executed by a corresponding accelerator card.
[0051] In some embodiments, probes can be deployed on each computing node 120 to collect data. The probes can use non-intrusive methods such as dynamic interception to collect the aggregated communication operation data of each card on the computing node online during business operation, and then aggregate and report it to the computing device 110.
[0052] These records are data strings generated by the business operations themselves and do not require additional injection of tracking points. Each record includes information about a communication operator executed by the corresponding accelerator card. The execution of this communication operator is usually part of a global communication operator executed by multiple processes on multiple cards. The communication operator is a communication operation for collective communication, and various hardware providers provide parallel collective communication libraries to support collective communication.
[0053] Common communication operator types include, but are not limited to, the following examples: Broadcast, which sends data from one process to all other processes; Scatter, which sends data in shards to other processes; Gather, which sends data from multiple processes to a specified process; AllGather, which sends data from all processes to all other processes (can be considered a combination of Gather and Broadcast); Reduce, which sends data from multiple processes to a specified process and performs some operation (e.g., summation, maximum value, etc.) on that process; AllReduce, which sends data from all processes to all other processes and performs a reduction operation on each process; and AlltoAll, which sends data from each process to all other processes and receives data from all other processes.
[0054] In some embodiments, the record corresponding to a certain communication operator in the set of records includes the operator name, execution start time, execution end time, and the communication traffic generated by the accelerator card executing the communication operator with the outside world. In some embodiments, the record may also include the identifier of the communication domain to which the communication operator belongs, or one or both of the accelerator kernel tasks associated with the communication operator. Parallel communication is actually executed within a series of communication domains, each of which may correspond to multiple accelerator cards. For example, communication domain TP0 corresponds to cards 0-7, and TP1 corresponds to cards 8-15, and so on. Each accelerator card in each communication domain can execute a series of set communication operators, and each set communication operator coordinates the information exchange between multiple accelerator cards within that communication domain. The above information in the record is data generated by the service operation itself and does not require additional event injection.
[0055] At 220, a set of associated records from multiple record sequences in a set of record sequences is identified based on a matching pattern of associated records. For example, computing device 110 can identify a set of associated records from multiple record sequences in a set of record sequences based on a matching pattern of associated records.
[0056] In some embodiments, computing device 110 may identify associated records based on matching operator names (e.g., identical or arguably identical) indicated by two or more records from different record sequences, execution start times, and execution end times (e.g., executed within the same time period). As described below, a global communication operator is executed through the execution of this set of communication operators. In some embodiments where records include communication domain identifiers, in addition to the matching criteria described above, computing device 110 additionally checks whether the communication domain identifiers of each record match (e.g., identical or arguably identical) when identifying associated records, and only identifies these records as associated if their communication domain identifiers also match each other.
[0057] At 230, a global communication operator corresponding to a set of associated records is identified based on that set of associated records, wherein each of the associated records corresponds to a set of communication operators, and the global communication operator is executed through the execution of that set of communication operators. For example, computing device 110 may identify a global communication operator corresponding to a set of associated records identified at 220. In some embodiments, the computing device may add additional information about its identification as an attribute of the corresponding record.
[0058] As mentioned earlier, each of these associated records corresponds to a set of communication operators. The operator names and execution times of these communication operators match, indicating that the execution of these communication operators is part of the execution of a global communication operator. In other words, the global communication operator is executed in parallel by processes on multiple accelerator cards using a certain type of parallel computing. During execution, each process executes its corresponding communication operator and communicates with each other to exchange the necessary data, thereby completing the execution of the global communication operator.
[0059] In some embodiments, the computing device 110 may be configured with a preset rule base including various matching patterns to dynamically identify iterations of computing services, the aforementioned global communication operators, and their various attributes from the collected record sequences, thereby reconstructing the execution process of the service. (To be continued later...) Figure 3 and Figure 4 The rule base and the reconstruction of the business process will be described in more detail.
[0060] Method 200 restores the global communication operators in the business operation based on matching between operator operation records, without the need for additional event injection or additional testing to confirm the accuracy of the restoration, thereby avoiding performance and security risks caused by additional event injection, as well as interruptions caused by detection.
[0061] Figure 3Interaction diagram 300 illustrates example logic modules according to some embodiments of this application. Interaction diagram 300 shows probe 301, analysis service 302, and optionally operation and optimization application 303. These logic modules may be deployed, for example, in... Figure 1 In the device. As an example, probe 301 can be deployed on compute node 120, analysis service 302 can be included on compute device 110, and operation and optimization application 303 can be included on compute device 110 or another device. The following will combine Figure 1 To describe Figure 3 Interactive diagrams in the text.
[0062] At 310, the analytics service 302 has a pre-built dynamic rule base. This rule base can include rules used to identify various aspects of the computational business operation. Subsequently, at 350, based on this rule base, the analytics service 302 can perform matching operations on a large number of data strings collected during the business operation to identify records that match specific rules (e.g., matching using a dynamic sliding window). On this basis, various aspects of the business operation process can be reconstructed from the operational data.
[0063] In some embodiments, these matching patterns may include the form <operator name, traffic threshold rule, operator start timestamp, operator end timestamp>. For example, if the operator name and traffic in a record satisfy the operator name and traffic threshold rule indicated by a certain matching pattern, the analysis service 302 may identify aspects corresponding to that matching pattern, such as attributes of the operator, and attach them to the record.
[0064] In some embodiments, the rule base may include an iteration end matching pattern for dividing an operator string into multiple iterations, a matching pattern for identifying the parallel computation type (also known as the parallel domain) of a communication operator, a parallel domain restoration rule for identifying the communication domain to which the communication operator belongs, and a matching pattern / condition / rule for restoring the associated records of a global operator, etc.
[0065] In some embodiments, the rule base is configurable. For example, the threshold operator name in a rule can be qualified in the form of a regular expression, the traffic threshold can be dynamically adjusted, multiple rule weights can be configured, and attributes of the time window used to perform the matching (e.g., sliding, scrolling, step size, etc.) can be configured, and so on.
[0066] At 320, probe 301 collects execution data of the communication operators on the compute node 120 where it is deployed. Probe 310 can generate independent data for each accelerator card 130 of compute node 120. In some embodiments, one probe can be deployed on each compute node 120 that needs data collection, which collects data from multiple accelerator cards on that node and merges and reports it to analysis service 302.
[0067] Probe 301 uses non-intrusive data acquisition methods such as eBPF and LD_PRELOAD to dynamically intercept and collect aggregated communication operation data for each card during service operation (i.e., online) on compute node 120. Here, "non-intrusive" means that it does not modify the code of the observed object (i.e., the service) or generate additional communication events or operators other than those of the service itself. Probe 301 can be dynamically started or stopped as needed; the data acquisition does not affect the normal operation of the service and does not require pausing or interrupting the service.
[0068] A single record of the ensemble communication operation data collected by probe 301 can include the communication operator name, operator start timestamp, operator end timestamp, and operator communication volume. For example, probe 301 can collect multiple record sequences in the following form for multiple accelerator cards:
[0069] Card 1: {Operator A(Name, Communication Volume, Start Time, End Time), Operator B(Name, Communication Volume, Start Time, End Time)...}; Card 2: {Operator A(Name, Communication Volume, Start Time, End Time), Operator B(Name, Communication Volume, Start Time, End Time)...}; ...
[0070] In some embodiments, the record may also include the communication domain identifier to which the operator belongs. In some embodiments, the record may also include kernel task information (e.g., wait, notify, rdma-payload, etc.) of the AI hardware accelerator corresponding to the operator. As probe 301 collects more operational records, more granular business states can be reconstructed.
[0071] At 330, probe 301 transmits the collected operation record 305 to analysis service 302. In some embodiments, probe 301 can collect data online and synchronously send the collected data stream to analysis service. In some embodiments, offline collection can also be adopted. Then, analysis service 302 receives the operation record at 340 and performs restoration processing on the operation record at 350. In some embodiments, analysis service 302 can receive business record 305 online and restore it synchronously to achieve real-time observation during business operation. In some embodiments, analysis service can also receive data offline and restore it asynchronously with business operation (e.g., after business ends) to backtrack problems to support subsequent optimization, etc.
[0072] For example, analysis service 302 can perform preprocessing such as decoding and standardization on the aggregated communication operation data of each card to extract operation records including valid operator names, communication volume, timestamps, and communication domain identifiers to which operators belong. For example, analysis service 302 can determine the execution order of multiple operators on each card based on the start time information and end time information of each operator in each card, thereby determining the sequence of operation records. In some embodiments, such preprocessing can also be performed by probe 301.
[0073] Analysis service 302 can perform actual restoration processing on pre-processed record sequences (e.g., each sequence corresponds to one card). The restoration processing only targets data strings generated by the business operation itself, such as <operator name, traffic volume, timestamp, communication domain identifier>, without needing to inject additional data formed by instrumentation points.
[0074] In the restoration process, Analysis Service 302 can perform multi-dimensional fusion and correlation analysis between the string stream of <operator name, communication volume, timestamp, communication domain identifier> and the rule base to restore the business object, such as combining... Figure 4 This will be described in more detail. The restored business objects may include, for example, iterations, global operators, and their attributes (e.g., parallel type, communication domain, statistics, etc.), etc. This rule-based analysis method (i.e., white-box analysis) has lower resource costs than methods such as recognition algorithms, requires no warm-up (i.e., the business must run for a period of time in advance), is accurate on the first try, has a low false positive rate, and does not require secondary confirmation such as dial-up testing.
[0075] Figure 4 A functional component block diagram of an example dynamic matching and restoration component 400 is shown, which can perform restoration processing according to some embodiments of the present disclosure. For example, the dynamic matching and restoration component 400 can be implemented as follows: Figure 3 It is part of the analytics service 302 and is used to perform Figure 3 The restoration process 350. The following is described in the context of component 400 as part of analytics service 302. Figure 4 .
[0076] As shown in the figure, component 400 may optionally include a decoding and normalization component 410. For raw collection communication run data reported to the analysis service 301 by a probe (e.g., probe 310), the decoding and normalization component 410 may perform preprocessing, converting the acquired raw data into a sequence of operator run records suitable for business reconstruction processing. For example, the decoding and normalization component 410 may decode the run data, such as converting numeric codes into corresponding operator names. For example, the decoding and normalization component 410 may perform normalization processing on the data, such as null value smoothing, data boundary normalization, etc. In some embodiments, the functionality of this component may also be performed entirely or partially at the probe side (e.g., probe 301).
[0077] The execution of computational tasks such as AI training and inference typically involves multiple computational iterations. Therefore, the record sequence corresponding to each accelerator card can include records of multiple computational iterations performed with that accelerator card. Component 400 includes an iteration restoration component 420 to restore the computational iterations. By segmenting the record sequence based on the record pattern indicating the end of the iteration, the iteration restoration component 420 can identify the computational iteration corresponding to each record in multiple computational iterations. For example, the iteration restoration component 420 can add an indication of the iteration to which the operator belongs as an additional attribute to the operator record. For example, the iteration restoration component 420 can identify the operator string belonging to the iteration, such as "[Iteration 1][Operator A, Operator B, Operator C…Operator Z…Operator ZZ]".
[0078] In one example implementation, for aggregated communication runtime data of the accelerator card, the iterative restoration component 420 can dynamically match (e.g., from a pre-built rule base of 310) iteration end feature rules. For example, the iteration end feature rule can indicate that the operator record at the end of the iteration needs to match the pattern "[operator name Z][communication volume greater than x, less than y]...[operator name ZZ][communication volume greater than u, less than v]". The iterative restoration component 420 can then identify the end of the iteration and segment the iteration accordingly.
[0079] As a non-restrictive example, the parallel partitioning rules for a certain model may include the following: matching the operator pattern at the end of the iteration [ALL-Reduce][communication volume > 2 billion bits] [ALL-Reduce][communication volume between 1 billion and 2 billion bits], and the two operators are adjacent after being sorted according to timestamps and cannot skip (e.g., separated by operator C), and the matching pattern is a dynamic sliding window.
[0080] In parallel computing, when the parallelism of a certain parallel type is N, the operator of that parallel type will be executed on N cards of one or more machines. In this case, the operators executed by the N cards are part of the corresponding global communication operators. Component 400 includes a global communication operator restoration component 430 to restore the global communication operators. For aggregated communication execution data of multiple cards, the global communication operator restoration component 430 can aggregate global operators based on global operator matching rules (e.g., from a pre-built rule base of 310). Such matching rules indicate that operator records should be identified as associated matching patterns / conditions (in other words, these operators should be identified as corresponding to the same global communication operator).
[0081] By dynamically matching multiple operators within the same domain and time interval using local boundary optimization algorithms such as sliding windows, the global communication operator reconstruction component 430 can identify these operators as associated operators. For example, the global communication operator reconstruction component 430 can perform multi-dimensional dynamic association based on the operator name in the operator record, the start and end timestamps of execution, and optionally the communication domain identifier, and then associate and aggregate global communication operators according to set communication semantic rules.
[0082] For example, the parallel execution of the same global operator across different cards has a synchronous relationship. As shown in the non-restrictive example in Table 1, operator a is executed in parallel on cards 1 and 2 of machine 1, and on cards 1 and 2 of machine 2. The execution of operator a on each of these four cards must be synchronized. For example, in one implementation, this synchronization can be represented by a notify-wait mechanism, where each card executing operator a must notify the others of the end of the communication. On the other hand, different global operators may be executed asynchronously, and their timing relationships can be asynchronous. For example, the execution of operator b can start before operator a finishes, without waiting for operator a to finish, and communication between multiple operators can be executed in parallel.
[0083] As an example, for an all-reduce operator of the Tensor Parallelism (TP) type with a parallelism of N, which will be introduced below, the global communication operator restoration component 420 can aggregate them into a TP-view all-reduce global operator by associating them through rules such as operator name, same communication domain, and timestamp within a certain range.
[0084] Table 1: Example Operator Records
[0085]
[0086] The global communication operator restoration component 430 also includes sub-components for restoring the attributes of global communication operators, such as a parallel type restoration component 431, a communication domain restoration component 432, and a statistics restoration component 433. In some embodiments, the analysis service 302 can match each operator record with a set of record patterns (e.g., from a preset rule base of 310) indicating the parallel computing type, and identify the parallel computing type of the communication operator corresponding to the record based on the record patterns that match the record in the set of record patterns. In some such embodiments, the record pattern indicating a certain parallel computing type may include the operator name and communication range of the matching record of the record pattern, or the operator name of the preceding record and the operator name of the following record in the corresponding record sequence, or may include both of the above.
[0087] exist Figure 4 In the example, analysis service 302 uses parallel type restoration component 431 to perform this restoration. Parallel type restoration component 431 can match parallel type matching patterns (e.g., from a pre-built rule base of 310) operator-by-operator for the aggregated communication run data of the accelerator card, thereby obtaining the parallel computation type to which each operator belongs. For example, the matching pattern for the TP parallel type can include aspects such as: [operator name], [communication threshold range], and timing dependency rules [preceding operator name, subsequent operator name]. Each operator belongs to a certain parallel type, and this restoration can be considered as a parent class belonging to the global communication operators. For example, parallel type restoration component 431 can add the determined parallel computation type as an additional attribute of the corresponding operator record. Furthermore, the parallel type of the global operators to which these operators belong can also be derived.
[0088] Examples of parallel computing types include, but are not limited to, the following: Data Parallelism (DP), which accelerates model training and inference by dividing data into multiple parts and processing them simultaneously on different computing devices (such as GPUs or CPUs); Pipeline Parallelism (PP), which assigns different layers or stages of the model to different devices, each responsible for completing its corresponding computational task, similar to an assembly line, thereby improving the efficiency of model training and inference; Tensor Parallelism (TP), which divides tensors (e.g., weight matrices) in the model into multiple parts and distributes these parts across different devices for parallel computation to accelerate the model's computation process; Sequence Parallelism (SP), which divides sequential data into multiple parts and allows each device to process different sequence parts simultaneously, thereby improving the model's computational efficiency; Context Parallelism (CP), which achieves parallel processing across multiple devices (GPUs) by partitioning the network input and all activations along the sequence length dimension; and Expert Parallelism. Parallelism (EP) is a parallel strategy for Mixture of Experts (MoE), where the model is composed of multiple experts (sub-models). Expert parallelism achieves parallel computation by assigning different experts to different devices.
[0089] Various types of parallel communication actually execute within a series of communication domains. For each type, multiple communication domain instances can exist, and each communication domain instance includes multiple physical accelerator cards (e.g., NPUs). For example, for the TP type, there can be communication domain instances TP0, TP1, TP2, ... TP0. Furthermore, the communication of TP0 includes the actual communication of physical cards Rank0, Rank1, ... Rank7, and the communication of TP0 includes the actual communication of physical cards Rank8, Rank9, ... Rank15. In addition, each physical card can belong to multiple communication domain instances. Each communication domain can execute a series of aggregate communication operators, such as the aforementioned AllGather or AlltoAll. Each operator coordinates the information exchange among multiple cards within the communication domain.
[0090] In some embodiments, the analysis component 302 may identify the communication domain to which the set of communication operators belongs (i.e., the communication domain to which the global communication operator belongs) based on (e.g., based on the parallelism of the global communication operator determined by method 200) and the topological distribution of its corresponding set of communication operators on the accelerator card. In some such embodiments, the analysis component 302 may also additionally consider the identifier of the communication domain indicated by the set of associated records to identify the communication domain to which the set of communication operators belongs.
[0091] exist Figure 4 In the example, analysis service 302 uses communication domain restoration component 432 to perform this restoration. Communication domain restoration component 432 can run data on a per-card set of communications to match communication domain rules (e.g., from a pre-built rule base of 310) on an operator-by-operator basis and determine the communication domain instance based on the matching results.
[0092] When the record includes a communication domain identifier, the communication domain reconstruction component 432 can extract the meaning of each part of the communication domain identifier string using regular expressions to determine the corresponding communication domain instance. Alternatively, the analysis service 302 can also correlate the simulation algorithm of the communication group to determine the communication domain instance, for example, based on the parallelism of the simulation algorithm and the communication distribution of the actually executed communication operators on the accelerator card.
[0093] The communication domain restoration component 432 can recombine the communication domain identifiers collected in the records into a readable and user-friendly representation to indicate the identified communication domain instance. For example, the identifier "worldComm 0_1_172.17.0.2%eth060003_3 1741147936477189" can be extracted and integrated into a form similar to "PP_SendRecv_num0_xx_xx". Each operator running record corresponds to an operator belonging to a certain communication domain, and this restoration can be considered as a parent class belonging to global communication operators. For example, the communication domain restoration component 431 can add the identified communication domain instance as an additional attribute of the corresponding operator record.
[0094] exist Figure 4 In the example, the analysis service 302 also uses the statistics restoration component 432 to restore other statistics. For the aggregated communication operation data of each card, the statistics restoration component 432 can perform statistical analysis on the operator operation records through statistical rules (e.g., from a pre-built rule base of 310) to determine various global operator secondary calculation superposition attributes such as TopN communication volume during business operation and quantiles (95th percentile, 50th percentile, etc.) of communication duration (e.g., based on end timestamp - start timestamp).
[0095] As described above, by matching the topological relationships between the cards containing the operators from multiple dimensions (e.g., based on the machine number and the card number within the machine), the elements themselves (<operator name, communication volume, operator start timestamp, operator end timestamp>) in the collected records, and the temporal relationships between elements (e.g., a specific operator name + specific execution order + communication volume from the start of the iteration), the communication process of parallel computation during model training or inference can be reconstructed. The reconstructed information can include the operator streams for each card during the training iteration, the parallel communication type (e.g., reflecting the synchronization and sequence relationships between corresponding operators between cards), communication domains, communication operators, and other object instances and states, as well as statistical information of object instances such as runtime, communication volume, and number of communications.
[0096] It should be understood that Figure 4 The components mentioned are merely exemplary logical divisions. In actual implementations, components can be combined or further divided; actions described as performed by one component can actually be performed by another component; some components or parts of their functionality can be omitted; and dynamically matched components can also have additional components.
[0097] Now continue with the reference. Figure 3 In 360, the analytics service 302 can store the restoration results generated at 350 locations. In some embodiments, the analytics service 302 can store the restoration results in a database, file system, or other locations. These restoration results cover the distributed operation process at the business layer and represent observations of the business operation process, thus avoiding the lack of observable processes for business results due to overly low-level hardware metrics. For example, the analytics service 302 can add the restored information as an additional attribute to the collected operator operation records. For example, the analytics service 302 can also generate reports or data formats suitable for technical personnel to read and / or suitable for operation, maintenance, and application optimization. Other appropriate formats can also be used to store the restoration results.
[0098] As described above, the restoration results saved by the analysis service 302 may include at least a portion of the following information: business iterations and their states and sub-objects, such as iteration segments in the record sequence, iteration execution duration, whether the iteration ended normally, and the corresponding operator sequence within the iteration (indicating a series of operator objects and their execution order); the communication parallelism type of the operator, such as data parallelism, model parallelism, and other communication parallelism types described above; the communication domain instance to which the operator belongs (e.g., identified as DP0, DP1, PP0, etc.); global communication operators, which are associated and aggregated as multiple executions of the same operator involving multiple cards within the same communication domain; and other states of the aggregated communication, such as the number of times, traffic, throughput, latency, or other statistical or secondary processing information.
[0099] Because the restoration results reflect the observable operational processes of the business rather than just the results (e.g., losses), they can subsequently be used for operational assurance and / or performance tuning. Optionally, at 370, the analysis service 302 can pass the restoration results 315 to the operations and optimization application 303. The operations and optimization application 303 receives the restoration results 315 at 380 and applies the results at 390.
[0100] For example, operations and maintenance services can ensure operations and maintenance based on the restored objects, such as performing real-time operations and maintenance monitoring, fault delimitation, and degradation location. For example, optimization services can perform performance tuning based on the restored objects, such as performance monitoring, bottleneck identification, degradation discovery and optimization, and observation of optimization effects. Depending on the implementation and usage purpose, operations and optimization application 303 can receive, save, and analyze the saved results in real-time or offline. Furthermore, the restored results can also be provided to other operations and / or optimization applications (not shown) for real-time or offline use.
[0101] The embodiments described above provide a non-intrusive solution for aggregated communication data acquisition and service reconstruction, which realizes a "digital twin" of the distributed training process of a large model. This solution achieves high-precision service reconstruction through simple peripheral observation methods without requiring intrusive modifications to the upper-layer training and / or inference services. The entire process is ready to use immediately and can be dynamically started and stopped. The service twin reconstructed using this solution can promote various service scenario applications, such as improving the overall availability of the cluster and supporting enhanced training efficiency.
[0102] By reconstructing various business status information, diverse analytical needs can be supported. For example, restoring iteration duration facilitates the detection of abnormal iterations, enabling users to quickly perceive training performance fluctuations during training and optimize the cluster or training MFU in a timely manner. Similarly, restoring communication group duration facilitates training parameter performance analysis, allowing business personnel to quickly analyze the rationality of the current communication group division and thus rapidly adjust strategies. Furthermore, by reconstructing information such as iterations, communication groups, and the timing of communication events, fault localization and identification of slow cards / slow networks can be achieved quickly. The reconstructed business process data provides business personnel with mapping analysis data from business information to underlying hardware, as well as layer-by-layer performance execution observation, enabling the discovery of degradation and optimization. On the other hand, the reconstruction results also provide maintenance personnel with a means to quickly identify, delimit, and locate faults after they occur, thereby improving the platform's operational efficiency.
[0103] Figure 5 A schematic block diagram of an example device 500 for data recording according to some embodiments of this application is shown. Device 500 may be implemented as, for example, or included in... Figure 1In the computing device 110. The apparatus 500 may include multiple modules for performing various corresponding actions according to embodiments of this application. For example... Figure 5 As shown, the device 500 may include an acquisition module 510, a first identification module 520, and a second identification module 530.
[0104] The acquisition module 510 is configured to acquire a set of record sequences for a set of accelerator cards, wherein the record sequences in the set of record sequences correspond to the communication operator sequences executed by the corresponding accelerator cards. The first identification module 520 is configured to identify a set of associated records from multiple record sequences in the set of record sequences based on a matching pattern of associated records. The second identification module 530 is configured to identify the global communication operator corresponding to a set of associated records based on a set of associated records. Each set of associated records corresponds to a set of communication operators, and the global communication operators are executed by executing this set of communication operators.
[0105] In some embodiments, the first record corresponding to the first communication operator in a set of record sequences includes: the operator name of the first communication operator; the execution start time and execution end time of the first communication operator; and the communication volume generated by executing the first communication operator.
[0106] In some embodiments, the first record further includes at least one of the following: an identifier of the communication domain to which the first communication operator belongs; or an accelerator kernel task associated with the first communication operator.
[0107] In some embodiments, a set of associated records includes a first record from a first record sequence and a second record from a second record sequence, and the first identification module 520 includes: a record association module configured to associate the first record and the second record based on matching the operator name, execution start time and execution end time indicated by the first record with the operator name, execution start time and execution end time indicated by the second record.
[0108] In some embodiments, the record association module includes: a communication domain-based association module, configured to associate the first record and the second record based on the matching of the operator name, execution start time, execution end time and communication domain identifier of the first record with the operator name, execution start time, execution end time and communication domain identifier of the second record.
[0109] In some embodiments, the apparatus 500 further includes: a matching module configured to match records in a set of record sequences with a set of record patterns indicating parallel computing types; and a third identification module configured to identify the parallel computing type of a communication operator corresponding to a record based on a record pattern that matches a record in a set of record patterns.
[0110] In some embodiments, a first recording pattern in a set of recording patterns indicates a first parallel computing type and includes at least one of the following: the operator name and traffic range of the matching record of the first recording pattern; or the operator name of the preceding record and the operator name of the matching record in the corresponding recording sequence.
[0111] In some embodiments, the apparatus 500 further includes a fourth identification module configured to identify the communication domain to which a set of communication operators belong, based on the parallelism of global communication operators and the topological distribution of a set of communication operators on a set of accelerator cards.
[0112] In some embodiments, the fourth identification module includes a communication domain identification module configured to identify a communication domain to which a set of communication operators belong, based on the parallelism, the topology distribution, and an identifier of the communication domain indicated by a set of associated records.
[0113] In some embodiments, a set of record sequences includes a first record sequence corresponding to a first accelerator card, the first record sequence including records of multiple computation iterations performed by the first accelerator card, and the apparatus 500 further includes: a fifth identification module configured to segment the record sequence by a record pattern based on an indication iteration end operator, identifying computation iterations corresponding to each record in the multiple computation iterations.
[0114] In some embodiments, the recording pattern indicating the end of iteration includes at least one of the following: a sequence of one or more operators indicating the end of iteration; a respective traffic range of one or more operators; or a relative magnitude relationship of the traffic of one or more operators.
[0115] Figure 6 A schematic block diagram of an example device 600 is shown, which can be used to implement embodiments of this application. Device 600 can be used to implement... Figure 1 The computing device 110 shown is functional. As shown, device 600 includes a processing unit 601, which can perform various appropriate actions and processes according to computer program instructions stored in random access memory (RAM) 603 and / or read-only memory (ROM) 602, or computer program instructions loaded from storage unit 608 into RAM 603 and / or ROM 602. Various programs and data required for the operation of device 600 may also be stored in RAM 603 and / or ROM 602. The processing unit 601 and RAM 603 and / or ROM 602 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0116] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0117] Processing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processing unit 601 include, but are not limited to, CPUs, GPUs, various special-purpose computing chips, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processing unit 601 performs the various methods and processes described above. For example, in some embodiments, the above methods and processes can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via RAM and / or ROM and / or communication unit 609. When the computer program is loaded into RAM and / or ROM and executed by processing unit 601, one or more actions of the various methods and processes described above can be performed. Alternatively, in other embodiments, processing unit 601 can be configured to perform one or more actions of the methods and processes described above by any other suitable means (e.g., by means of firmware). In addition, the communication unit 609 also includes a network interface card (NIC) with certain processing capabilities, such as a smart NIC with a built-in processor and / or memory. In this case, some units in the processing unit 601 can be mounted on the NIC, so that the NIC can work together with other processors such as the device's central processing unit to undertake the processing tasks of the device 600, and is at least configured to perform one or more actions performed by the NIC in the various methods and processes described above.
[0118] This application may be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this application. A computer-readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage medium used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0119] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0120] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages and conventional procedural programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some exemplary implementations, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of this application.
[0121] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products according to exemplary implementations of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0122] These computer-readable program instructions can be provided to the processing components of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by a computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram. As described above, the processing components of these general-purpose computers, special-purpose computers, or other programmable data processing apparatuses may include processing components of a central processing unit and a network interface card (NIC), and some of these functions / actions may be performed by the NIC as described in the embodiments of this application.
[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various exemplary embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0125] Embodiments of this application have been described. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles of the embodiments, their practical application, or improvements to the technology in the market, or to enable others skilled in the art to understand the various embodiments disclosed herein.
Claims
1. A data recording and processing method, characterized in that, include: Obtain a set of record sequences for a set of accelerator cards, wherein the record sequences in the set of record sequences correspond to the communication operator sequences executed by the corresponding accelerator cards; Based on the matching pattern of associated records, a set of associated records from multiple record sequences in the set of record sequences is identified; and Based on the set of associated records, a global communication operator corresponding to the set of associated records is identified, wherein each set of associated records corresponds to a set of communication operators, and the global communication operator is executed by executing the set of communication operators on at least a portion of the set of accelerator cards.
2. The method according to claim 1, characterized in that, The first record corresponding to the first communication operator in the set of record sequences includes: The operator name of the first communication operator; The execution start time and execution end time of the first communication operator; and The communication traffic generated by executing the first communication operator.
3. The method according to claim 2, characterized in that, The first record also includes at least one of the following: The identifier of the communication domain to which the first communication operator belongs; or The accelerator kernel task associated with the first communication operator.
4. The method according to claim 1, characterized in that, The set of associated records includes a first record from a first record sequence and a second record from a second record sequence, and the set of associated records is identified based on the matching pattern as follows: Based on the matching of the operator name, execution start time, and execution end time indicated by the first record with the operator name, execution start time, and execution end time indicated by the second record, the first record and the second record are associated.
5. The method according to claim 4, characterized in that, The association between the first record and the second record includes: Based on the matching of the operator name, execution start time, execution end time, and communication domain identifier of the first record with the operator name, execution start time, execution end time, and communication domain identifier of the second record, the first record and the second record are associated.
6. The method according to claim 1, characterized in that, Also includes: Match the records in the set of records with a set of record patterns that indicate the type of parallel computing; as well as Based on the record pattern that matches the record in the set of record patterns, identify the parallel computing type of the communication operator corresponding to the record.
7. The method according to claim 6, characterized in that, The first recording pattern in the set of recording patterns indicates a first parallel computing type and includes at least one of the following: The operator name and communication range of the matching record in the first recording pattern; or The matching record is the operator name of the preceding record and the operator name of the following record in its respective record sequence.
8. The method according to claim 1, characterized in that, Also includes: Based on the parallelism of the global communication operator and the topological distribution of the set of communication operators on the set of accelerator cards, the communication domain to which the set of communication operators belongs is identified.
9. The method according to claim 8, characterized in that, The communication domain to which the set of communication operators belongs includes: The communication domain to which the set of communication operators belong is identified based on the parallelism, the topology distribution, and the identifier of the communication domain indicated by the set of associated records.
10. The method according to claim 1, characterized in that, The set of record sequences includes a first record sequence corresponding to the first accelerator card, the first record sequence including records of multiple computation iterations performed by the first accelerator card, and the method further includes: The record sequence is segmented by using a record pattern based on an indicator of the end of the iteration, thereby identifying the computation iteration corresponding to each record in the plurality of computation iterations.
11. The method according to claim 10, characterized in that, The recording pattern indicating the end of iteration operator includes at least one of the following: A sequence of one or more operators that indicate the end of an iteration; The respective traffic ranges of the one or more operators; or The relative magnitude of the communication volume of the one or more operators.
12. A data recording and processing apparatus, characterized in that, include: The acquisition module is configured to acquire a set of record sequences for a set of accelerator cards, wherein the record sequences in the set of record sequences correspond to the communication operator sequences executed by the corresponding accelerator cards; The first identification module is configured to identify a set of associated records from multiple record sequences in the set of record sequences based on a matching mode of associated records; as well as The second identification module is configured to identify a global communication operator corresponding to the set of associated records based on the set of associated records, wherein the set of associated records corresponds to a set of communication operators respectively, and the global communication operator is executed by executing the set of communication operators on at least a portion of the set of accelerator cards.
13. The apparatus according to claim 12, characterized in that, The first record corresponding to the first communication operator in the set of record sequences includes: The operator name of the first communication operator; The execution start time and execution end time of the first communication operator; and The communication traffic generated by executing the first communication operator.
14. The apparatus according to claim 13, characterized in that, The first record also includes at least one of the following: The identifier of the communication domain to which the first communication operator belongs; or The accelerator kernel task associated with the first communication operator.
15. The apparatus according to claim 12, characterized in that, The set of associated records includes a first record from a first record sequence and a second record from a second record sequence, and the first identification module includes: The record association module is configured to associate the first record with the second record based on matching the operator name, execution start time, and execution end time indicated by the first record with the operator name, execution start time, and execution end time indicated by the second record.
16. The apparatus according to claim 15, characterized in that, The record association module includes: The association module based on the communication domain is configured to associate the first record and the second record based on matching the operator name, execution start time, execution end time and communication domain identifier of the first record with the operator name, execution start time, execution end time and communication domain identifier of the second record.
17. The apparatus according to claim 12, characterized in that, Also includes: The matching module is configured to match records in the set of record sequences with a set of record patterns that indicate the type of parallel computing. as well as The third identification module is configured to identify the parallel computing type of the communication operator corresponding to the record based on the record pattern that matches the record in the set of record patterns.
18. The apparatus according to claim 17, characterized in that, The first recording pattern in the set of recording patterns indicates a first parallel computing type and includes at least one of the following: The operator name and communication range of the matching record in the first recording pattern; or The matching record is the operator name of the preceding record and the operator name of the following record in its respective record sequence.
19. The apparatus according to claim 12, characterized in that, Also includes: The fourth identification module is configured to identify the communication domain to which the set of communication operators belong, based on the parallelism of the global communication operators and the topological distribution of the set of communication operators on the set of accelerator cards.
20. The apparatus according to claim 19, characterized in that, The fourth identification module includes: The communication domain identification module is configured to identify the communication domain to which the set of communication operators belong, based on the parallelism, the topology distribution, and the identifier of the communication domain indicated by the set of associated records.
21. The apparatus according to claim 12, characterized in that, The set of record sequences includes a first record sequence corresponding to the first accelerator card, the first record sequence including records of multiple computation iterations performed by the first accelerator card, and the device further includes: The fifth identification module is configured to segment the record sequence based on the record pattern of the indicator iteration end operator, and identify the calculation iteration corresponding to each record in the plurality of calculation iterations.
22. The apparatus according to claim 21, characterized in that, The recording pattern indicating the end of iteration operator includes at least one of the following: A sequence of one or more operators that indicate the end of an iteration; The respective traffic ranges of the one or more operators; or The relative magnitude of the communication volume of the one or more operators.
23. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 11.
24. A computer program product, characterized in that, The computer program product includes instructions that, when executed by an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 11.
25. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 11.
