Method and device for generating operator data stream, equipment and medium
By acquiring and processing the data flow manually depicted by users, determining and sorting the data flow nodes, the problems of large amount of writing and low accuracy in operator data flow generation are solved, and efficient and low-cost data flow generation are achieved.
Patent Information
- Application Number
- CN202510446564.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the generation scheme of operator data flow is large in volume, high in time and labor costs, and the accuracy is difficult to guarantee.
By obtaining the manual depiction data flow of the target user, expanding the loop traversal statement, determining the identification information of the data flow node, deleting the multiplexed data transmission unit node, and sorting it according to the dependency relationship, a complete data flow is generated.
It reduces the amount of writing of operator data stream generation, improves generation efficiency and accuracy, and reduces costs.
Smart Images

Figure CN120371874A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a method, apparatus, device, and medium for generating an operator data stream. Background Art
[0002] With the development of artificial intelligence technology, more and more enterprises have begun to perform speech recognition, image generation, text generation, etc. through artificial intelligence (AI) processors. During the process of the AI processor performing speech recognition, image generation, text generation, etc., the AI processor needs to perform data calculations. An operator refers to a data calculation process that needs to be executed by the AI processor. An operator can be divided into multiple data calculation operations. Each data calculation operation requires the cooperation of a data transfer unit and a calculation unit in the AI processor. Before the AI processor executes an operator, a complete data stream of the operator needs to be generated. The complete data stream of the operator can be a data flow graph used to completely describe the process of the AI processor executing the operator through a domain-specific language (DSL). The complete data stream of the operator usually consists of multiple data stream nodes. Each data stream node corresponds to a transmission process that needs to be executed by the data transfer unit or a calculation process that needs to be executed by the calculation unit during the process of executing the operator. A data stream node is a DSL statement used to describe the corresponding transmission process that needs to be executed by the data transfer unit or the calculation process that needs to be executed by the calculation unit.
[0003] In the related art, a common scheme for generating an operator data stream is that technicians write the complete data stream of the operator. The scheme for generating an operator data stream in the related art requires manually writing the complete data stream of the operator, with a large amount of writing, high time cost and labor cost, and it is difficult to guarantee the accuracy. Summary of the Invention
[0004] The present invention provides a method, apparatus, device, and medium for generating an operator data stream to solve the problems of large writing amount, high time cost and labor cost, and difficult accuracy guarantee in the scheme for generating an operator data stream in the related art.
[0005] According to one aspect of the present invention, there is provided a method for generating an operator data stream, including:
[0006] Obtaining a manually depicted data stream of a target operator input by a target user according to data stream primitives;
[0007] Expanding the loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determining the identification information of each data stream node; wherein each data stream node is a data transfer unit node or a calculation unit node;
[0008] Delete the multiplexed data transfer unit nodes in each data flow node;
[0009] Determine the depth value of each data flow node according to the dependency relationships between the data transfer unit nodes and the computing unit nodes, the dependency relationships between the data transfer unit nodes, and the dependency relationships between the computing unit nodes in each data flow node;
[0010] Re-sort each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
[0011] According to another aspect of the present invention, there is provided a device for generating an operator data flow, including:
[0012] A data flow acquisition module, configured to acquire the manually depicted data flow of the target operator input by the target user according to the data flow primitive;
[0013] A node determination module, configured to expand the loop traversal statements in the manually depicted data flow to obtain each data flow node of the target operator, and determine the identification information of each data flow node; wherein, each data flow node is a data transfer unit node or a computing unit node;
[0014] A node deletion module, configured to delete the multiplexed data transfer unit nodes in each data flow node;
[0015] A depth value determination module, configured to determine the depth value of each data flow node according to the dependency relationships between the data transfer unit nodes and the computing unit nodes, the dependency relationships between the data transfer unit nodes, and the dependency relationships between the computing unit nodes in each data flow node;
[0016] A data flow generation module, configured to re-sort each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
[0017] According to another aspect of the present invention, there is provided an electronic device, where the electronic device includes:
[0018] At least one processor;
[0019] And a memory communicatively connected to the at least one processor;
[0020] Wherein, the memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating an operator data flow according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the method for generating an operator data stream according to any embodiment of the present invention when executed.
[0022] According to another aspect of the present invention, there is provided a computer program product including a computer program which implements the method for generating an operator data stream according to any embodiment of the present invention when executed by a processor.
[0023] The technical solution of the embodiment of the present invention obtains the manually depicted data stream of the target operator input by the target user according to the data stream primitive; then expands the loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determines the identification information of each data stream node; wherein each data stream node is a data transmission unit node or a computing unit node; deletes the reused data transmission unit nodes in each data stream node; determines the depth value of each data stream node according to the dependency relationship between the data transmission unit node and the computing unit node, the dependency relationship between the data transmission unit nodes, and the dependency relationship between the computing unit nodes in each data stream node; and finally re-orders each data stream node in ascending order of the depth value to obtain the complete data stream of the target operator, solving the problems in the related art that the writing amount of the operator data stream generation scheme is large, the time cost and labor cost are high, and the accuracy is difficult to guarantee. It can automatically determine each data stream node of the operator based on the statement input by the user for general description of the operator, and perform redundant node deletion processing and sorting processing on each initially determined data stream node of the operator to obtain a complete data stream that can be used to completely describe the process of the AI processor executing the operator through DSL, reducing the writing amount in the process of generating the operator data stream, improving the generation efficiency and accuracy of the operator data stream, and reducing the generation cost of the operator data stream.
[0024] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0026] Figure 1Flowchart of a method for generating an operator data stream provided in Embodiment 1 of the present invention.
[0027] Figure 2 Flowchart of a method for generating an operator data stream provided in Embodiment 2 of the present invention.
[0028] Figure 3 Schematic structural diagram of a device for generating an operator data stream provided in Embodiment 3 of the present invention.
[0029] Figure 4 Schematic structural diagram of an electronic device for implementing the method for generating an operator data stream according to an embodiment of the present invention. Detailed implementation manners
[0030] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0031] It should be noted that the terms "target", "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising", "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be noted that the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant regions.
[0033] Embodiment 1
[0034] Figure 1The flowchart of a method for generating an operator data stream provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of generating a complete data stream of an operator. This method can be executed by an operator data stream generation device, which can be implemented in the form of hardware and / or software, and the operator data stream generation device can be configured in an AI processor. As Figure 1 shown, the method includes:
[0035] Step 101, obtain the manually depicted data stream of the target operator input by the target user according to the data stream primitive.
[0036] Optionally, the computing unit can be a hardware module or a software module for performing calculations. Multiple groups of computing units can be set in the AI processor. Each group of computing units can be multiple computing units for performing calculations in parallel to cooperate to complete a specified data calculation operation. Each computing unit is set with a name. The name of the computing unit can be a string for identifying the computing unit. Exemplarily, a group of computing units for performing calculations in parallel to cooperate to complete a data calculation operation of multiplying two data to obtain the multiplication calculation result of the two data is set in the AI processor. A group of computing units for performing calculations in parallel to cooperate to complete a data calculation operation of adding two data to obtain the addition calculation result of the two data is also set in the AI processor.
[0037] Optionally, an outer storage area is set in the AI processor. The outer storage area can be a memory in the AI processor for storing data that needs to be calculated by the AI processor and the calculation results obtained. The outer storage area contains multiple storage units. Each storage unit can be an area divided from the outer storage area for storing data. Each storage unit can contain multiple sub-units of the same size. Each storage unit is set with a name. The name of the storage unit can be a string for identifying the storage unit.
[0038] Optionally, an inner storage area is set in the AI processor. The inner storage area can be a memory in the AI processor for storing data and calculation results required by each computing unit during calculation. The inner storage area contains multiple storage units. Each storage unit can be an area divided from the inner storage area for storing data. Each storage unit is set with a name. The name of the storage unit can be a string for identifying the storage unit. Each computing unit can read the data required for calculation from the storage unit of the inner storage area for calculation, and can write the obtained calculation results into the storage unit of the inner storage area.
[0039] Optionally, multiple data transfer units can be set in the AI processor. The data transfer unit can be a hardware module or a software module for data transfer between the outer storage area and the inner storage area. Each data transfer unit is set with a name. The name of the data transfer unit can be a string for identifying the data transfer unit. The data transfer unit can be used to read the data required by the computing unit during calculation from the storage unit in the outer storage area and write the read data required by the computing unit during calculation into the storage unit in the inner storage area, so as to transfer the data required by the computing unit during calculation from the outer storage area to the inner storage area. The data transfer unit can be used to read the calculation result obtained by the computing unit from the storage unit in the inner storage area and write the read calculation result into the storage unit in the outer storage area, so as to transfer the calculation result obtained by the computing unit from the inner storage area to the outer storage area.
[0040] Optionally, an operator can refer to a data calculation process that requires the AI processor to execute. An operator can be divided into multiple data calculation operations. Each data calculation operation requires the cooperation of the data transfer unit and the computing unit in the AI processor to execute. The execution process of each data calculation operation is as follows: read the data required by the computing unit during the process of completing the data calculation operation from the storage unit in the outer storage area through the data transfer unit and write the read data into the storage unit in the inner storage area; calculate the data required by the computing unit during the process of completing the data calculation operation read from the storage unit in the inner storage area through multiple computing units for parallel calculation to obtain a calculation result and write the calculation result into the storage unit in the inner storage area; read the calculation result obtained by the computing unit from the storage unit in the inner storage area through the data transfer unit and write the read calculation result into the storage unit in the outer storage area.
[0041] Optionally, before the AI processor executes an operator, a complete data flow of the operator needs to be generated. The complete data flow of the operator can be a data flow graph for completely describing the data flow process of the AI processor executing the operator through DSL. The complete data flow of the operator usually consists of multiple data flow nodes. Each data flow node corresponds to a transmission process that needs to be executed by the data transfer unit or a calculation process that needs to be executed by the computing unit during the process of executing the operator. The data flow node is a DSL statement for describing the corresponding transmission process that needs to be executed by the data transfer unit or the calculation process that needs to be executed by the computing unit. The target operator can refer to an operator that needs to generate a complete data flow at the current moment.
[0042] Optionally, the target user may be a technical person in charge of managing the AI processor. The data flow primitive may be composed of an application cache primitive, a data conversion primitive, a loop traversal primitive, a data transfer unit trigger primitive, and a computing unit trigger primitive. The manually depicted data flow of the target operator may be a set of DSL statements written by the target user according to the data flow primitive for generalizing and describing two data that need to be calculated in each data calculation operation in the target operator, storage units in the inner storage area required by the target operator, storage units in the outer storage area required by the target operator, and the execution flow of the data calculation operation in the target operator.
[0043] Optionally, the application cache primitive may be a template for generating DSL statements describing the storage units in the inner storage area required by the operator. The application cache primitive may be DSL statements that do not include the name, subunit shape, and subunit quantity of the storage units in the inner storage area required by the operator. The subunit shape of the storage unit may be information for describing the data capacity that the subunits in the storage unit can store. Exemplarily, the subunit shape of the storage unit is [32 32], indicating that the subunits in the storage unit can store a 32×32 digital matrix. The subunit quantity of the storage unit may refer to the total number of subunits included in the storage unit. The application cache primitive includes a name filling position, a subunit shape filling position, and a subunit quantity filling position. The name filling position is the position for filling in the name of the storage unit in the inner storage area that needs to be used. The subunit shape filling position is the position for filling in the subunit shape of the storage unit in the inner storage area that needs to be used. The subunit quantity filling position is the position for filling in the subunit quantity of the storage unit in the inner storage area that needs to be used. Exemplarily, the application cache primitive is "ArrayID = AllocBufArray(shape[4], count)", where "ArrayID" is the name filling position, "shape[4]" is the subunit shape filling position, and "count" is the subunit quantity filling position. By filling in the name, subunit shape, and subunit quantity of any storage unit in the inner storage area that needs to be used into the identification information filling position, subunit shape filling position, and subunit quantity filling position of the application cache primitive respectively, the DSL statement describing the storage unit can be obtained.
[0044] Optionally, the data transformation primitive can be a template for generating DSL statements that describe the storage units in the outer storage area to be used in the operator. The data transformation primitive can be a DSL statement that does not include the name, data storage location, and data shape of the storage units in the outer storage area to be used in the operator. The data storage location of the storage unit can be information used to describe the position in the storage unit of the data associated with the operator that has been stored in the storage unit or the data associated with the operator that the storage unit needs to store. The data associated with the operator that has been stored in the storage unit can refer to the data that the operator needs to use. The data associated with the operator that the storage unit needs to store can refer to the calculation result obtained by the operator. The data shape can be information used to describe the shape of the data associated with the operator that has been stored in the storage unit or the data associated with the operator that the storage unit needs to store. Exemplarily, the data shape of the storage unit is [32 128], indicating that the data associated with the operator that has been stored in the storage unit or the data associated with the operator that the storage unit needs to store is a 32×128 digital matrix. The data transformation primitive includes a name filling position, a data storage location filling position, and a data shape filling position. The name filling position is the position for filling in the name of the storage unit in the outer storage area to be used. The data storage location filling position is the position for filling in the data storage location of the storage unit in the outer storage area to be used. The data shape filling position is the position for filling in the data shape of the storage unit in the outer storage area to be used. Exemplarily, the data transformation primitive is "ArrayID = TransBufArray(address, shape[4])". "ArrayID" is the name filling position, "address" is the data storage location filling position, and "shape[4]" is the data shape filling position. By filling in the name, data storage location, and data shape of any storage unit in the outer storage area to be used into the name filling position, data storage location filling position, and data shape filling position of the data transformation primitive respectively, a DSL statement describing the storage unit can be obtained.
[0045] Optionally, the loop traversal statement of the operator can be a DSL statement used to generally describe the execution process of each data calculation operation in the operator. The loop traversal primitive can refer to the information that needs to be fixedly included at the beginning of the loop traversal statement of the operator. Exemplarily, the loop traversal primitive is "Loop(grid in GridArray)".
[0046] Optionally, the data transfer unit trigger primitive may be a template for generating a DSL statement that describes a transfer process executed by a data movement unit in an operator. The data transfer unit trigger primitive may be a DSL statement in an operator that describes a transfer process executed by a data movement unit without including the name of the data movement unit, the data transfer source, the data transfer destination, and the identification information of the data to be transferred used in the transfer process executed by the data movement unit. The data to be transferred is the data that needs to be transferred by the data movement unit during the transfer process. The data transfer source is the name of the storage unit that stores the data to be transferred before the transfer. The data transfer destination is the name of the storage unit that stores the data to be transferred after the transfer. The identification information of the data to be transferred may be a string used to uniquely identify the data to be transferred. The data transfer unit trigger primitive includes a name filling position, a data transfer source filling position, a data transfer destination filling position, and a data identification filling position. The name filling position is the position for filling in the name of the data movement unit used in the transfer process. The data transfer source filling position is the position for filling in the data transfer source of the data movement unit used in the transfer process. The data transfer destination filling position is the position for filling in the data transfer destination of the data movement unit used in the transfer process. The data identification filling position is the position for filling in the identification information of the data to be transferred of the data movement unit used in the transfer process. Exemplarily, the data transfer unit trigger primitive is "DataTransfer(DUID, ArrayID, ArrayID, [])". "DUID" is the name filling position, the first "ArrayID" is the data transfer source filling position, the second "ArrayID" is the data transfer destination filling position, and "[]" is the data identification filling position. A DSL statement describing the transfer process can be obtained by filling in the name of the data movement unit, the data transfer source, the data transfer destination, and the identification information of the data to be transferred used in any transfer process executed by the data movement unit into the name filling position, the data transfer source filling position, the data transfer destination filling position, and the data identification filling position of the data transfer unit trigger primitive respectively.
[0047] Optionally, the computing unit trigger primitive can be a template for generating a DSL statement that describes a computing process executed by a computing unit in an operator. The computing unit trigger primitive can be a DSL statement that describes a computing process executed by a computing unit in an operator and does not include the name of the computing unit, the sequence of storage unit names, and the sequence of data identifiers used in the computing process executed by the computing unit. The sequence of storage unit names can be a sequence composed of the names of the respective storage units that the computing unit needs to use in the computing process. The sequence of data identifiers can be a sequence composed of the identification information of the respective data that the computing unit needs to use in the computing process. The identification information of the data can be information used to uniquely identify the data. The computing unit trigger primitive includes a name filling position, a sequence of storage unit name filling positions, and a sequence of data identifier filling positions. The name filling position is the position for filling in the name of the computing unit used in the computing process executed by the computing unit. The sequence of storage unit name filling positions is the position for filling in the sequence of storage unit names of the computing unit used in the computing process. The sequence of data identifier filling positions is the position for filling in the sequence of data identifiers of the computing unit used in the computing process. Exemplarily, the computing unit trigger primitive is "Compute(CUID, [ArrayID], [])". "CUID" is the name filling position, [ArrayID] is the sequence of storage unit name filling positions, and "[]" is the sequence of data identifier filling positions. The DSL statement describing the computing process can be obtained by filling in the name of the computing unit, the sequence of storage unit names, and the sequence of data identifiers used in any computing process executed by the computing unit into the name filling position, the sequence of storage unit name filling positions, and the sequence of data identifier filling positions of the computing unit trigger primitive, respectively.
[0048] Optionally, obtaining the manually drawn data flow of the target operator input by the target user according to the data flow primitive includes: providing the data flow primitive to the target user, and obtaining the manually drawn data flow of the target operator input by the target user according to the data flow primitive; wherein, the data flow primitive includes an application cache primitive, a data conversion primitive, a loop traversal primitive, a data transfer unit trigger primitive, and a computing unit trigger primitive.
[0049] Optionally, providing the data flow primitive to the target user includes: sending the data flow primitive to the terminal device of the target user. After receiving the data flow primitive, the target user can write the manually drawn data flow of the target operator according to the data flow primitive and send the manually drawn data flow of the target operator to the AI processor through the terminal device, thereby inputting the manually drawn data flow of the target operator. The manually drawn data flow of the target operator sent by the target user to the AI processor through the terminal device can be obtained, thereby obtaining the manually drawn data flow of the target operator input by the target user according to the data flow primitive.
[0050] Optionally, the manually depicted data flow of the target operator includes data description statements of the target operator, outer storage unit description statements, inner storage unit description statements, and loop traversal statements.
[0051] Optionally, the data description statements of the target operator are multiple DSL statements used to generally describe the two data to be calculated in each data calculation operation in the target operator. The data description statements of the target operator include DSL statements corresponding to the two data to be calculated in each data calculation operation in the target operator. For each data calculation operation, the DSL statements corresponding to the two data to be calculated in the data calculation operation can be DSL statements used to describe the two data to be calculated in the data calculation operation. The DSL statements corresponding to the two data to be calculated in the data calculation operation include the data shapes, coordinate offsets, and identification information of the two data to be calculated in the data calculation operation. The data shape of the data can be information used to describe the shape of the data. The coordinate offset of the data can be information used to characterize the positional relationship between the data and other data. The identification information of the data can be a string used to uniquely identify the data. The identification information of the two data to be calculated in each data calculation operation in the target operator can be determined according to the data description statements of the target operator.
[0052] Optionally, in a specific instance, the target operator can be divided into 8 data calculation operations: the first data calculation operation, the second data calculation operation, the third data calculation operation, the fourth data calculation operation, the fifth data calculation operation, the sixth data calculation operation, the seventh data calculation operation, and the eighth data calculation operation. The data description statements of the target operator are as follows:
[0053] “{ / / {shape,offset,input}
[0054] grid0:{[32,32],[0,0],[L0,R0]}
[0055] grid1:{[32,32],[32,0],[L0,R1]}
[0056] grid2:{[32,32],[0,32],[L1,R0]}
[0057] grid3:{[32,32],[32,32],[L1,R1]}
[0058] grid4:{[32,32],[0,64],[L2,R0]}
[0059] grid5:{[32,32],[32,64],[L2,R1]}
[0060] grid6: {[32, 32], [0, 96], [L3, R0]}
[0061] grid7: {[32, 32], [32, 96], [L3, R1]}
[0062] }
[0063] Among them, the DSL statement corresponding to the data used in the first data calculation operation is "grid0: {[32, 32], [0, 0], [L0, R0]}", and the identification information of the two data to be calculated in the first data calculation operation is "L0" and "R0". The DSL statement corresponding to the data used in the second data calculation operation is "grid1: {[32, 32], [32, 0], [L0, R1]}", and the identification information of the two data to be calculated in the second data calculation operation is "L0" and "R1". The DSL statement corresponding to the data used in the third data calculation operation is "grid2: {[32, 32], [0, 32], [L1, R0]}", and the identification information of the two data to be calculated in the third data calculation operation is "L1" and "R0". The DSL statement corresponding to the data used in the fourth data calculation operation is "grid3: {[32, 32], [32, 32], [L1, R1]}", and the identification information of the two data to be calculated in the fourth data calculation operation is "L1" and "R1". The DSL statement corresponding to the data used in the fifth data calculation operation is "grid4: {[32, 32], [0, 64], [L2, R0]}", and the identification information of the two data to be calculated in the fifth data calculation operation is "L2" and "R0". The DSL statement corresponding to the data used in the sixth data calculation operation is "grid5: {[32, 32], [32, 64], [L2, R1]}", and the identification information of the two data to be calculated in the sixth data calculation operation is "L2" and "R1". The DSL statement corresponding to the data used in the seventh data calculation operation is "grid6: {[32, 32], [0, 96], [L3, R0]}", and the identification information of the two data to be calculated in the seventh data calculation operation is "L3" and "R0". The DSL statement corresponding to the data used in the eighth data calculation operation is "grid7: {[32, 32], [32, 96], [L3, R1]}", and the identification information of the two data to be calculated in the eighth data calculation operation is "L3" and "R1".
[0064] Optionally, the outer storage unit description statement of the target operator is a plurality of DSL statements used to generally describe the storage units in the outer storage area required by the target operator. The storage units in the outer storage area required by the target operator include the storage units in the outer storage area that respectively store one of the two data to be calculated in each data calculation operation of the target operator, and the storage unit in the outer storage area for storing the calculation results of each data calculation operation of the target operator. The outer storage unit description statement of the target operator includes DSL statements for describing each storage unit in the outer storage area required by the target operator.
[0065] Optionally, the data with identification information of "L0", "L1", "L2", "L3" in the above specific example is stored in the storage unit with identification information of "id0" in the outer storage area. The data with identification information of "R0", "R1" in the above specific example is stored in the storage unit with identification information of "id1" in the outer storage area. The storage unit for storing the calculation results of each data calculation operation of the target operator is the storage unit with identification information of "id2" in the outer storage area. The outer storage unit description statement of the target operator is as follows:
[0066] id0 = TransBufArray(A0, [32, 128])
[0067] id1 = TransBufArray(A1, [64, 32])
[0068] id2 = TransBufArray(A2, [64, 128])
[0069] Among them, "id0 = TransBufArray(A0, [32, 128])" is a DSL statement for describing the storage unit with identification information of "id0" in the outer storage area that stores the data with identification information of "L0", "L1", "L2", "L3". "id1 = TransBufArray(A1, [64, 32])" is a DSL statement for describing the storage unit with identification information of "id1" in the outer storage area that stores the data with identification information of "R0", "R1". "id2 = TransBufArray(A2, [64, 128])" is a DSL statement for describing the storage unit with identification information of "id2" in the outer storage area for storing the calculation results of each data calculation operation of the target operator.
[0070] Optionally, the inner storage unit description statement of the target operator is a plurality of DSL statements used to generally describe the storage units in the inner storage area required for the target operator. The storage units in the inner storage area required for the target operator include the storage units in the inner storage area for storing one of the two data to be calculated in each data calculation operation of the target operator, and the storage units in the inner storage area for storing the calculation results of each data calculation operation of the target operator. The inner storage unit description statement of the target operator includes DSL statements for describing each storage unit in the inner storage area required for the target operator.
[0071] Optionally, in the above specific example, the storage units in the inner storage area for storing one of the two data to be calculated in each data calculation operation of the target operator are the storage units with identification information "id3" and "id4" in the inner storage area. The storage unit in the inner storage area for storing the calculation results of each data calculation operation of the target operator is the storage unit with identification information "id5" in the inner storage area. The inner storage unit description statement of the target operator is as follows:
[0072] id3 = AllocBufArray([32, 32], 2)
[0073] id4 = AllocBufArray([32, 32], 2)
[0074] id5 = AllocBufArray([32, 32], 2)
[0075] Among them, "id3 = AllocBufArray([32, 32], 2)" is a DSL statement for describing the storage unit with identification information "id3" in the inner storage area for storing one of the two data to be calculated in each data calculation operation of the target operator. "id4 = AllocBufArray([32, 32], 2)" is a DSL statement for describing the storage unit with identification information "id4" in the inner storage area for storing one of the two data to be calculated in each data calculation operation of the target operator. "id5 = AllocBufArray([32, 32], 2)" is a DSL statement for describing the storage unit with identification information "id5" in the inner storage area for storing the calculation results of each data calculation operation of the target operator.
[0076] Optionally, the loop traversal statement of the target operator can be a DSL statement used to generally describe the execution process of each data calculation operation in the target operator. The loop traversal statement of the target operator contains two DSL statements that can be used to describe the transfer process of transferring the two data to be calculated in the data calculation operation from the storage units in two outer storage areas to the storage units in two inner storage areas through the data transfer unit after filling in the identification information of the two data to be calculated in the data calculation operation, a set of DSL statements that can be used to describe the calculation process of calculating the two data to be calculated in the data calculation operation transferred to the storage units in the two inner storage areas through a set of calculation units and writing the calculation result of the data calculation operation into the storage unit in one inner storage area after filling in the sequence composed of the identification information of the two data to be calculated in the data calculation operation, and a DSL statement that can be used to describe the transfer process of transferring the calculation result of the data calculation operation from the storage unit in the inner storage area to the storage unit in the inner storage area through the data transfer unit after filling in the identification information of the data calculation operation.
[0077] Optionally, in the above specific example, the loop traversal statement of the target operator is as follows:
[0078] Loop(grid in GridArray):
[0079] DataTransfer(DU0,id0,id3,grid.offset)
[0080] DataTransfer(DU1,id1,id4,grid.offset)
[0081] Compute(CU0,[id3,id4,id5],grid.offset)
[0082] Compute(CU1,[id3,id4,id5],grid.offset)
[0083] Compute(CU2,[id3,id4,id5],grid.offset)
[0084] Compute(CU3,[id3,id4,id5],grid.offset)
[0085] DataTransfer(DU2,id5,id2,grid.offset)
[0086] Among them, "DataTransfer(DU0,id0,id3,grid.offset)" and "DataTransfer(DU1,id1,id4,grid.offset)" are two DSL statements that can be used to describe the transfer process of transferring two data to be calculated in a data calculation operation from storage units in two outer storage areas to storage units in two inner storage areas after filling in the identification information of the two data to be calculated in the data calculation operation. The two "grid.offset" included are the positions for filling in the identification information of the two data to be calculated in the data calculation operation respectively. "Compute(CU0,[id3,id4,id5],grid.offset)", "Compute(CU1,[id3,id4,id5],grid.offset)", "Compute(CU2,[id3,id4,id5],grid.offset)", and "Compute(CU3,[id3,id4,id5],grid.offset) are a set of DSL statements that can be used to describe the calculation process of calculating two data to be calculated in a data calculation operation transferred to storage units in two inner storage areas by a set of computing units and writing the calculation result of the data calculation operation into a storage unit in an inner storage area after filling in the sequence composed of the identification information of the two data to be calculated in the data calculation operation. The included grid.offset is the position for filling in the sequence composed of the identification information of the two data to be calculated in the data calculation operation. "DataTransfer(DU2,id5,id2,grid.offset)" is a DSL statement that can be used to describe the transfer process of transferring the calculation result of a data calculation operation from a storage unit in an inner storage area to a storage unit in an inner storage area after filling in the identification information of the data calculation operation. The included grid.offset is the position for filling in the identification information of the data calculation operation. The identification information of the data calculation operation can be a string used to uniquely identify the data calculation operation. The identification information of the first data calculation operation is grid0, the identification information of the second data calculation operation is grid1, the identification information of the third data calculation operation is grid2, the identification information of the fourth data calculation operation is grid3, the identification information of the fifth data calculation operation is grid4, the identification information of the sixth data calculation operation is grid5, the identification information of the seventh data calculation operation is grid6, and the identification information of the eighth data calculation operation is grid7.
[0087] Step 102: Expand the loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determine the identification information of each data stream node.
[0088] Among them, each data stream node is a data transmission unit node or a computing unit node.
[0089] Optionally, expanding the loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator includes: according to the sequence of DSL statements corresponding to the two data that need to be calculated in each data calculation operation in the data description statement of the target operator, for each data calculation operation in each target operator, perform the following operations in sequence: fill the identification information of the two data that need to be calculated in the data calculation operation into the two DSL statements that can be used to describe the transmission process of the two data that need to be calculated in the data calculation operation from the storage units in the two outer storage areas to the storage units in the two inner storage areas through the data transfer unit after filling the identification information of the two data that need to be calculated in the data calculation operation, to obtain two DSL statements that can be used to describe the transmission process of the two data that need to be calculated in the data calculation operation from the storage units in the two outer storage areas to the storage units in the two inner storage areas through the data transfer unit; fill the sequence composed of the identification information of the two data that need to be calculated in the data calculation operation into the set of DSL statements that can be used to describe the calculation process of calculating the two data that need to be calculated in the data calculation operation transmitted to the storage units in the two inner storage areas by a set of computing units and writing the calculation result of the data calculation operation into the storage unit in one inner storage area after filling the sequence composed of the identification information of the two data that need to be calculated in the data calculation operation, to obtain a set of DSL statements that can be used to describe the calculation process of calculating the two data that need to be calculated in the data calculation operation transmitted to the storage units in the two inner storage areas by a set of computing units and writing the calculation result of the data calculation operation into the storage unit in one inner storage area; fill the identification information of the data calculation operation into the DSL statement that can be used to describe the transmission process of the calculation result of the data calculation operation from the storage unit in the inner storage area to the storage unit in the inner storage area through the data transfer unit after filling the identification information of the data calculation operation, to obtain a DSL statement that can be used to describe the transmission process of the calculation result of the data calculation operation from the storage unit in the inner storage area to the storage unit in the inner storage area through the data transfer unit; determine each obtained DSL statement as a data stream node of the target operator. The obtained data stream nodes of the target operator are arranged in the order of acquisition.
[0090] Optionally, the data transfer unit node may refer to a data flow node used to describe the transmission process. The computing unit node may refer to a data flow node used to describe the computing process. The identification information of the data flow node may be a digital number used to identify the data flow node.
[0091] Optionally, determining the identification information of each data flow node includes: according to the writing order of each data flow node, assigning a digital number to each data flow node as the identification information of the data flow node. The writing order of each data flow node is the arrangement order of each data flow node. Assign the digital number 0 as the identification information of the data flow node to the data flow node ranked first, assign the digital number 1 as the identification information of the data flow node to the data flow node ranked second, and assign the digital number 2 as the identification information of the data flow node to the data flow node ranked third. And so on. Except for the data flow node ranked first, the digital number of each data flow node is the digital number of the previous data flow node plus 1. The digital number of the data flow node ranked first is the smallest, and the digital number of the data flow node ranked last is the largest.
[0092] Optionally, expand the loop traversal statement in the above specific example to obtain each data flow node of the target operator, and determine the identification information of each data flow node. The identification information of each data flow node of the target operator obtained after expanding the loop traversal statement in the manually depicted data flow and each data flow node are as follows:
[0093] 0:DataTransfer(DU0,id0,id3,L0)
[0094] 1:DataTransfer(DU1,id1,id4,R0)
[0095] 2:Compute(CU0,[id3,id4,id5],[L0,R0])
[0096] 3:Compute(CU1,[id3,id4,id5],[L0,R0])
[0097] 4:Compute(CU2,[id3,id4,id5],[L0,R0])
[0098] 5:Compute(CU3,[id3,id4,id5],[L0,R0])
[0099] 6:DataTransfer(DU2,id5,id2,grid0)
[0100] 7:DataTransfer(DU0,id0,id3,L0)
[0101] 8:DataTransfer(DU1,id1,id4,R1)
[0102] 9:Compute(CU0,[id3,id4,id5],[L0,R1])
[0103] 10:Compute(CU1,[id3,id4,id5],[L0,R1])
[0104] 11:Compute(CU2,[id3,id4,id5],[L0,R1])
[0105] 12:Compute(CU3,[id3,id4,id5],[L0,R1])
[0106] 13:DataTransfer(DU2,id5,id2,grid1)
[0107] 14:DataTransfer(DU0,id0,id3,L1)
[0108] 15:DataTransfer(DU1,id1,id4,R0)
[0109] 16:Compute(CU0,[id3,id4,id5],[L1,R0])
[0110] 17:Compute(CU1,[id3,id4,id5],[L1,R0])
[0111] 18:Compute(CU2,[id3,id4,id5],[L1,R0])
[0112] 19:Compute(CU3,[id3,id4,id5],[L1,R0])
[0113] 20:DataTransfer(DU2,id5,id2,grid2)
[0114] 21:DataTransfer(DU0,id0,id3,L1)
[0115] 22:DataTransfer(DU1,id1,id4,R1)
[0116] 23:Compute(CU0,[id3,id4,id5],[L1,R1])
[0117] 24: Compute(CU1, [id3, id4, id5], [L1, R1])
[0118] 25: Compute(CU2, [id3, id4, id5], [L1, R1])
[0119] 26: Compute(CU3, [id3, id4, id5], [L1, R1])
[0120] 27: DataTransfer(DU2, id5, id2, grid3)
[0121] 28: DataTransfer(DU0, id0, id3, L2)
[0122] 29: DataTransfer(DU1, id1, id4, R0)
[0123] 30: Compute(CU0, [id3, id4, id5], [L2, R0])
[0124] 31: Compute(CU1, [id3, id4, id5], [L2, R0])
[0125] 32: Compute(CU2, [id3, id4, id5], [L2, R0])
[0126] 33: Compute(CU3, [id3, id4, id5], [L2, R0])
[0127] 34: DataTransfer(DU2, id5, id2 grid4)
[0128] 35: DataTransfer(DU0, id0, id3, L2)
[0129] 36: DataTransfer(DU1, id1, id4, R1)
[0130] 37: Compute(CU0, [id3, id4, id5], [L2, R1])
[0131] 38: Compute(CU1, [id3, id4, id5], [L2, R1])
[0132] 39: Compute(CU2, [id3, id4, id5], [L2, R1])
[0133] 40: Compute(CU3, [id3, id4, id5], [L2, R1])
[0134] 41: DataTransfer(DU2, id5, id2, grid5)
[0135] 42: DataTransfer(DU0, id0, id3, L3)
[0136] 43: DataTransfer(DU1, id1, id4, R0)
[0137] 44: Compute(CU0, [id3, id4, id5], [L3, R0])
[0138] 45: Compute(CU1, [id3, id4, id5], [L3, R0])
[0139] 46: Compute(CU2, [id3, id4, id5], [L3, R0])
[0140] 47: Compute(CU3, [id3, id4, id5], [L3, R0])
[0141] 48: DataTransfer(DU2, id5, id2, grid6)
[0142] 49: DataTransfer(DU0, id0, id3, L3)
[0143] 50: DataTransfer(DU1, id1, id4, R1)
[0144] 51: Compute(CU0, [id3, id4, id5], [L3, R1])
[0145] 52: Compute(CU1, [id3, id4, id5], [L3, R1])
[0146] 53: Compute(CU2, [id3, id4, id5], [L3, R1])
[0147] 54: Compute(CU3, [id3, id4, id5], [L3, R1])
[0148] 55: DataTransfer(DU2, id5, id2, grid7)
[0149] Among them, the data flow nodes with identification information 0-6 are multiple data flow nodes for describing the execution process of the first data calculation operation. The data flow nodes with identification information 7-13 are multiple data flow nodes for describing the execution process of the second data calculation operation. The data flow nodes with identification information 14-20 are multiple data flow nodes for describing the execution process of the third data calculation operation. The data flow nodes with identification information 21-27 are multiple data flow nodes for describing the execution process of the fourth data calculation operation. The data flow nodes with identification information 28-34 are multiple data flow nodes for describing the execution process of the fifth data calculation operation. The data flow nodes with identification information 35-41 are multiple data flow nodes for describing the execution process of the sixth data calculation operation. The data flow nodes with identification information 42-48 are multiple data flow nodes for describing the execution process of the seventh data calculation operation. The data flow nodes with identification information 49-55 are multiple data flow nodes for describing the execution process of the eighth data calculation operation.
[0150] Step 103, delete the reused data transfer unit nodes in each data flow node.
[0151] Optionally, the reused data transfer unit node may refer to a data transfer unit node in which the data to be transferred in the described transfer process has been stored at the data transfer destination in the transfer process. The reused data transfer unit node is a redundant data flow node that can be deleted and repeats data transfer.
[0152] Optionally, deleting the reused data transfer unit nodes in each data flow node includes: performing the following operations on each data transfer unit node in each data flow node: according to the data transfer destination of the data transfer unit node and the identification information of the data to be transferred, search whether there is already a cache containing the data to be transferred in the cache array corresponding to the target operator; if there is already a cache containing the data to be transferred in the cache array corresponding to the target operator, determine that the data transfer unit node is a reused data transfer unit node, and delete the reused data transfer unit node.
[0153] Optionally, the data transfer destination of the data transfer unit node and the identification information of the data to be transferred are the data transfer destination and the identification information of the data to be transferred included in the data transfer unit node. The cache array corresponding to the target operator may refer to the storage unit required to be used in the target operator. The cache containing the data to be transferred may refer to the storage unit storing the data to be transferred.
[0154] Optionally, according to the data transfer destination of the data transfer unit node and the identification information of the data to be transferred, search whether there is already a cache containing the data to be transferred in the cache array corresponding to the target operator, including: detecting whether there is data stored in the storage unit to which the data transfer destination of the data transfer unit node belongs, and the identification information of the data is the identification information of the data to be transferred by the data transfer unit node; if so, determine that there is already a cache containing the data to be transferred in the cache array corresponding to the target operator; if not, determine that there is no cache containing the data to be transferred in the cache array corresponding to the target operator.
[0155] Optionally, if there is no cache containing the data to be transferred in the cache array corresponding to the target operator, determine that the data transfer unit node is not a multiplexing data transfer unit node, and retain the multiplexing data transfer unit node.
[0156] Optionally, in the above specific example, the data flow nodes with identification information of 7, 15, 21, 22, 29, 35, 36, 43, 49, 50 are multiplexing data transfer unit nodes, and the above multiplexing data transfer unit nodes are deleted from each data flow node of the target operator obtained after expanding the loop traversal statement in the manually depicted data flow.
[0157] Step 104: Determine the depth value of each data flow node according to the dependency relationship between the data transfer unit node and the computing unit node, the dependency relationship between the data transfer unit nodes, and the dependency relationship between the computing unit nodes in each data flow node.
[0158] Optionally, determining the depth value of each data flow node according to the dependency relationship between the data transfer unit node and the computing unit node, the dependency relationship between the data transfer unit nodes, and the dependency relationship between the computing unit nodes in each data flow node includes: determining the dependency relationship between the data transfer unit node and the computing unit node in each data flow node; determining the dependency relationship between the data transfer unit nodes and the dependency relationship between the computing unit nodes in each data flow node; determining the parent node and the child node of each data flow node according to the dependency relationship between the data transfer unit node and the computing unit node, the dependency relationship between the data transfer unit nodes, and the dependency relationship between the computing unit nodes in each data flow node; determining the depth value of each data flow node according to the parent node and the child node of each data flow node.
[0159] Optionally, for each computing unit node, the computing process of the computing unit node cannot start until the transmission processes of the data transmission unit nodes that belong to the same data computing operation and are before the computing unit node are completed. Therefore, the data transmission unit nodes that belong to the same data computing operation as the computing unit node are data transmission unit nodes that have a dependency relationship with the computing unit node and are the data transmission unit nodes on which the computing unit node depends.
[0160] Optionally, for each data computing operation, the transmission process of the last data transmission unit node among the data transmission unit nodes that belong to the data computing operation cannot start until the computing processes of the computing unit nodes that belong to the data computing operation are completed. Therefore, the computing unit nodes that belong to the data computing operation are computing unit nodes that have a dependency relationship with the last data transmission unit node among the data transmission unit nodes that belong to the data computing operation and are the computing unit nodes on which the last data transmission unit node among the data transmission unit nodes that belong to the data computing operation depends.
[0161] Optionally, determining the dependency relationships between the data transmission unit nodes and the computing unit nodes in each data flow node includes: for each computing unit node, determining the data transmission unit nodes that are before the computing unit node among the data transmission unit nodes that belong to the same data computing operation as the computing unit node as the data transmission unit nodes on which the computing unit node depends; for each data computing operation, determining the computing unit nodes that belong to the data computing operation as the computing unit nodes on which the last data transmission unit node among the data transmission unit nodes that belong to the data computing operation depends.
[0162] Optionally, in each data flow node of the target operator obtained after deleting the multiplexing data transmission unit nodes in the above specific example, the data transmission unit nodes with identification information 0 and 1 are the data transmission unit nodes on which the computing unit nodes with identification information 2, 3, 4, and 5 depend. The computing unit nodes with identification information 2, 3, 4, and 5 are the computing unit nodes on which the data transmission unit node with identification information 6 depends.
[0163] Optionally, for each data transfer unit node, the transmission process of the data transfer unit node can only start after the transmission processes of other data transfer unit nodes with the same name of the data transfer unit as the data transfer unit node located before the data transfer unit node are completed. Therefore, other data transfer unit nodes with the same name of the data transfer unit as the data transfer unit node located before the data transfer unit node are other data transfer unit nodes that have a dependency relationship with the data transfer unit node, and are other data transfer unit nodes that the data transfer unit node depends on.
[0164] Optionally, for each computing unit node, the computing process of the computing unit node can only start after the computing processes of other computing unit nodes with the same name of the computing unit as the computing unit node located before the computing unit node are completed. Therefore, other computing unit nodes with the same name of the computing unit as the computing unit node located before the computing unit node are other computing unit nodes that have a dependency relationship with the computing unit node, and are other computing unit nodes that the computing unit node depends on.
[0165] Optionally, determining the dependency relationships between data transfer unit nodes and between computing unit nodes in each data flow node includes: for each data transfer unit node, determining other data transfer unit nodes with the same name of the data transfer unit as the data transfer unit node located before the data transfer unit node as other data transfer unit nodes that the data transfer unit node depends on; for each computing unit node, determining other computing unit nodes with the same name of the computing unit as the computing unit node located before the computing unit node as other computing unit nodes that the data transfer unit node depends on.
[0166] Optionally, among the data flow nodes of the target operator obtained after deleting the multiplexed data transfer unit nodes in the above specific example, the data transfer unit node with an identification information of 0 is an other data transfer unit node that the data transfer unit node with an identification information of 14 depends on. The data transfer unit node with an identification information of 1 is an other data transfer unit node that the data transfer unit node with an identification information of 8 depends on. The computing unit node with an identification information of 2 is an other computing unit node that the computing unit node with an identification information of 9 depends on.
[0167] Optionally, the parent node of a data flow node can refer to an other data flow node that the data flow node depends on among the other data flow nodes arranged before the data flow node. The child node of a data flow node can refer to an other data flow node that depends on the data flow node among the other data flow nodes arranged after the data flow node.
[0168] Optionally, according to the dependency relationships between data transfer unit nodes and computing unit nodes in each data flow node, the dependency relationships between data transfer unit nodes, and the dependency relationships between computing unit nodes, determine the parent nodes and child nodes of each data flow node, including: for each data flow node, determine each other data flow node that the data flow node depends on as a parent node of the data flow node, and determine each other data flow node that depends on the data flow node as a child node of the data flow node.
[0169] Optionally, the depth value of a data flow node can be a numerical value used to represent the priority of the data flow node. The smaller the depth value of the data flow node, the higher the priority of the data flow node, and the transmission process or computing process described by the data flow node needs to be executed first. The larger the depth value of the data flow node, the lower the priority of the data flow node, and the transmission process or computing process described by the data flow node needs to be executed later.
[0170] Optionally, according to the parent nodes and child nodes of each data flow node, determine the depth value of each data flow node, including: starting from the data flow node ranked first, perform the following operations for each data flow node: if there is no parent node of the data flow node, determine the depth value of the data flow node to be 0; if there is a parent node of the data flow node, add 1 to the maximum value of the depth values of all the parent nodes of the data flow node as the depth value of the data flow node.
[0171] Optionally, in the above specific example, the identification information, each data flow node, and the depth value of each data flow node of the target operator obtained after deleting the multiplexed data transfer unit node are as follows:
[0172] 0:DataTransfer(DU0,id0,id3,L0) 0
[0173] 1:DataTransfer(DU1,id1,id4,R0) 0
[0174] 2:Compute(CU0,[id3,id4,id5],[L0,R0])1
[0175] 3:Compute(CU1,[id3,id4,id5],[L0,R0])1
[0176] 4:Compute(CU2,[id3,id4,id5],[L0,R0])1
[0177] 5:Compute(CU3,[id3,id4,id5],[L0,R0])1
[0178] 6:DataTransfer(DU2,id5,id2,grid0) 2
[0179] 8:DataTransfer(DU1,id1,id4,R1) 1
[0180] 9:Compute(CU0,[id3,id4,id5],[L0,R1])2
[0181] 10:Compute(CU1,[id3,id4,id5],[L0,R1])2
[0182] 11:Compute(CU2,[id3,id4,id5],[L0,R1])2
[0183] 12:Compute(CU3,[id3,id4,id5],[L0,R1])2
[0184] 13:DataTransfer(DU2,id5,id2,grid1) 3
[0185] 14:DataTransfer(DU0,id0,id3,L1) 1
[0186] 16:Compute(CU0,[id3,id4,id5],[L1,R0])3
[0187] 17:Compute(CU1,[id3,id4,id5],[L1,R0])3
[0188] 18:Compute(CU2,[id3,id4,id5],[L1,R0])3
[0189] 19:Compute(CU3,[id3,id4,id5],[L1,R0])3
[0190] 20:DataTransfer(DU2,id5,id2,grid2)4
[0191] 23:Compute(CU0,[id3,id4,id5],[L1,R1])4
[0192] 24:Compute(CU1,[id3,id4,id5],[L1,R1])4
[0193] 25:Compute(CU2,[id3,id4,id5],[L1,R1])4
[0194] 26: Compute(CU3, [id3, id4, id5], [L1, R1]) 4
[0195] 27: DataTransfer(DU2, id5, id2, grid3) 5
[0196] 28: DataTransfer(DU0, id0, id3, L2) 3
[0197] 30: Compute(CU0, [id3, id4, id5], [L2, R0]) 5
[0198] 31: Compute(CU1, [id3, id4, id5], [L2, R0]) 5
[0199] 32: Compute(CU2, [id3, id4, id5], [L2, R0]) 5
[0200] 33: Compute(CU3, [id3, id4, id5], [L2, R0]) 5
[0201] 34: DataTransfer(DU2, id5, id2 grid4) 6
[0202] 37: Compute(CU0, [id3, id4, id5], [L2, R1]) 6
[0203] 38: Compute(CU1, [id3, id4, id5], [L2, R1]) 6
[0204] 39: Compute(CU2, [id3, id4, id5], [L2, R1]) 6
[0205] 40: Compute(CU3, [id3, id4, id5], [L2, R1]) 6
[0206] 41: DataTransfer(DU2, id5, id2, grid5) 7
[0207] 42: DataTransfer(DU0, id0, id3, L3) 5
[0208] 44: Compute(CU0, [id3, id4, id5], [L3, R0]) 7
[0209] 45: Compute(CU1, [id3, id4, id5], [L3, R0]) 7
[0210] 46: Compute(CU2, [id3, id4, id5], [L3, R0]) 7
[0211] 47: Compute(CU3, [id3, id4, id5], [L3, R0]) 7
[0212] 48: DataTransfer(DU2, id5, id2, grid6) 8
[0213] 51: Compute(CU0, [id3, id4, id5], [L3, R1]) 8
[0214] 52: Compute(CU1, [id3, id4, id5], [L3, R1]) 8
[0215] 53: Compute(CU2, [id3, id4, id5], [L3, R1]) 8
[0216] 54: Compute(CU3, [id3, id4, id5], [L3, R1]) 8
[0217] 55: DataTransfer(DU2, id5, id2, grid7) 9
[0218] Step 105: Re - sort each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
[0219] Optionally, re - sorting each data flow node in ascending order of the depth value includes: re - sorting each data flow node in ascending order of the depth value; among them, the data flow node with a lower depth value is arranged in front of the data flow node with a higher depth value, and among multiple data flow nodes with the same depth value, the data transfer unit node is arranged before the computing unit node, multiple data transfer unit nodes with the same depth value are randomly arranged, and multiple computing unit nodes with the same depth value are randomly arranged. The data flow node sequence obtained after re - sorting in ascending order of the depth value is a data flow graph that can be used to completely describe the process of the AI processor executing the operator through DSL.
[0220] Optionally, in the above specific example, the complete data flow of the target operator obtained after re - sorting in ascending order of the depth value is as follows:
[0221] 0: DataTransfer(DU0, id0, id3, L0) 0
[0222] 1:DataTransfer(DU1,id1,id4,R0) 0
[0223] 8:DataTransfer(DU1,id1,id4,R1) 1
[0224] 14:DataTransfer(DU0,id0,id3,L1) 1
[0225] 2:Compute(CU0,[id3,id4,id5],[L0,R0])1
[0226] 3:Compute(CU1,[id3,id4,id5],[L0,R0])1
[0227] 4:Compute(CU2,[id3,id4,id5],[L0,R0])1
[0228] 5:Compute(CU3,[id3,id4,id5],[L0,R0])1
[0229] 6:DataTransfer(DU2,id5,id2,grid0)2
[0230] 9:Compute(CU0,[id3,id4,id5],[L0,R1])2
[0231] 10:Compute(CU1,[id3,id4,id5],[L0,R1])2
[0232] 11:Compute(CU2,[id3,id4,id5],[L0,R1])2
[0233] 12:Compute(CU3,[id3,id4,id5],[L0,R1])2
[0234] 28:DataTransfer(DU0,id0,id3,L2) 3
[0235] 13:DataTransfer(DU2,id5,id2,grid1) 3
[0236] 16:Compute(CU0,[id3,id4,id5],[L1,R0])3
[0237] 17:Compute(CU1,[id3,id4,id5],[L1,R0])3
[0238] 18: Compute(CU2, [id3, id4, id5], [L1, R0]) 3
[0239] 19: Compute(CU3, [id3, id4, id5], [L1, R0]) 3
[0240] 20: DataTransfer(DU2, id5, id2, grid2) 4
[0241] 23: Compute(CU0, [id3, id4, id5], [L1, R1]) 4
[0242] 24: Compute(CU1, [id3, id4, id5], [L1, R1]) 4
[0243] 25: Compute(CU2, [id3, id4, id5], [L1, R1]) 4
[0244] 26: Compute(CU3, [id3, id4, id5], [L1, R1]) 4
[0245] 42: DataTransfer(DU0, id0, id3, L3) 5
[0246] 27: DataTransfer(DU2, id5, id2, grid3) 5
[0247] 30: Compute(CU0, [id3, id4, id5], [L2, R0]) 5
[0248] 31: Compute(CU1, [id3, id4, id5], [L2, R0]) 5
[0249] 32: Compute(CU2, [id3, id4, id5], [L2, R0]) 5
[0250] 33: Compute(CU3, [id3, id4, id5], [L2, R0]) 5
[0251] 34: DataTransfer(DU2, id5, id2 grid4) 6
[0252] 37: Compute(CU0, [id3, id4, id5], [L2, R1]) 6
[0253] 38: Compute(CU1, [id3, id4, id5], [L2, R1]) 6 It should be noted that in line , there seems to be a missing comma between "id2" and "grid4" in the original text. This might be an error in the original input. The translation is done as accurately as possible based on the provided text.
[0254] 39: Compute(CU2, [id3, id4, id5], [L2, R1]) 6
[0255] 40: Compute(CU3, [id3, id4, id5], [L2, R1]) 6
[0256] 41: DataTransfer(DU2, id5, id2, grid5) 7
[0257] 44: Compute(CU0, [id3, id4, id5], [L3, R0]) 7
[0258] 45: Compute(CU1, [id3, id4, id5], [L3, R0]) 7
[0259] 46: Compute(CU2, [id3, id4, id5], [L3, R0]) 7
[0260] 47: Compute(CU3, [id3, id4, id5], [L3, R0]) 7
[0261] 48: DataTransfer(DU2, id5, id2, grid6) 8
[0262] 51: Compute(CU0, [id3, id4, id5], [L3, R1]) 8
[0263] 52: Compute(CU1, [id3, id4, id5], [L3, R1]) 8
[0264] 53: Compute(CU2, [id3, id4, id5], [L3, R1]) 8
[0265] 54: Compute(CU3, [id3, id4, id5], [L3, R1]) 8
[0266] 55: DataTransfer(DU2, id5, id2, grid7) 9
[0267] Optionally, after re - sorting each data stream node in ascending order of the depth value to obtain the complete data stream of the target operator, the following steps are further included: executing the complete data stream of the target operator. According to the arrangement order of each data stream node in the complete data stream of the target operator, starting from the first data stream node in the complete data stream of the target operator, the transmission process executed by the data transfer unit or the calculation process executed by the calculation unit described in each data stream node in the complete data stream of the target operator is sequentially executed. Multiple data stream nodes with the same depth value can be executed in parallel.
[0268] In the technical solution of the embodiment of the present invention, by obtaining the manually depicted data stream of the target operator input by the target user according to the data stream primitive; then expanding the loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determining the identification information of each data stream node; where each data stream node is a data transfer unit node or a calculation unit node; deleting the reused data transfer unit nodes in each data stream node; according to the dependency relationships between the data transfer unit nodes and the calculation unit nodes, between the data transfer unit nodes, and between the calculation unit nodes in each data stream node, determining the depth value of each data stream node; and finally re - sorting each data stream node in ascending order of the depth value to obtain the complete data stream of the target operator, the problem that the writing amount of the operator data stream generation scheme in the related technology is large, the time cost and labor cost are high, and the accuracy is difficult to guarantee is solved. It can automatically determine each data stream node of the operator based on the statement input by the user for generally describing the operator, and perform redundant node deletion processing and sorting processing on each initially determined data stream node of the operator to obtain a complete data stream that can be used to completely describe the process of the AI processor executing the operator through DSL, reducing the writing amount in the generation process of the operator data stream, improving the generation efficiency and accuracy of the operator data stream, and reducing the generation cost of the operator data stream.
[0269] Embodiment 2
[0270] Figure 2 It is a flowchart of a method for generating an operator data stream provided by the second embodiment of the present invention. The embodiment of the present invention can be combined with each optional solution in one or more of the above - mentioned embodiments. As Figure 2 shown, the method includes:
[0271] Step 201: Provide the data stream primitive to the target user, and obtain the manually depicted data stream of the target operator input by the target user according to the data stream primitive.
[0272] Among them, the data flow primitives include an application cache primitive, a data conversion primitive, a loop traversal primitive, a data transfer unit trigger primitive, and a computing unit trigger primitive.
[0273] Step 202: Expand the loop traversal statements in the manually depicted data flow to obtain the respective data flow nodes of the target operator, and assign a numerical number to each data flow node in the order of writing of the respective data flow nodes as the identification information of the data flow node.
[0274] Among them, each data flow node is a data transfer unit node or a computing unit node.
[0275] Step 203: Delete the multiplexed data transfer unit nodes in each data flow node.
[0276] Step 204: Determine the dependency relationships between the data transfer unit nodes and the computing unit nodes in each data flow node.
[0277] Step 205: Determine the dependency relationships between the data transfer unit nodes and the dependency relationships between the computing unit nodes in each data flow node.
[0278] Step 206: Determine the parent nodes and child nodes of each data flow node according to the dependency relationships between the data transfer unit nodes and the computing unit nodes, the dependency relationships between the data transfer unit nodes, and the dependency relationships between the computing unit nodes in each data flow node.
[0279] Step 207: Determine the depth values of each data flow node according to the parent nodes and child nodes of each data flow node.
[0280] Step 208: Reorder each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
[0281] The technical solution of the embodiment of the present invention can provide the data flow primitives to the user, obtain the statements for generally describing the operator input by the user according to the data flow primitives, can automatically determine the respective data flow nodes of the operator based on the statements for generally describing the operator input by the user, and perform redundant node deletion processing and sorting processing on the initially determined respective data flow nodes of the operator to obtain a complete data flow that can be used to completely describe the process of the AI processor executing the operator through the DSL, reducing the writing amount in the generation process of the operator data flow, improving the generation efficiency and accuracy of the operator data flow, and reducing the generation cost of the operator data flow.
[0282] Embodiment III
[0283] Figure 3Schematic diagram of a structure of an operator data stream generation device provided in Embodiment 3 of the present invention. The device may be configured in an electronic device. As Figure 3 shown, the device includes: a data stream acquisition module 301, a node determination module 302, a node deletion module 303, a depth value determination module 304, and a data stream generation module 305.
[0284] Among them, the data stream acquisition module 301 is configured to acquire a manually depicted data stream of a target operator input by a target user according to data stream primitives; the node determination module 302 is configured to expand loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determine identification information of each data stream node; wherein each data stream node is a data transmission unit node or a computing unit node; the node deletion module 303 is configured to delete duplicate data transmission unit nodes in each data stream node; the depth value determination module 304 is configured to determine depth values of each data stream node according to dependency relationships between data transmission unit nodes and computing unit nodes in each data stream node, dependency relationships between data transmission unit nodes, and dependency relationships between computing unit nodes; the data stream generation module 305 is configured to re-sort each data stream node in ascending order of depth values to obtain a complete data stream of the target operator.
[0285] The technical solution of the embodiment of the present invention is to acquire a manually depicted data stream of a target operator input by a target user according to data stream primitives; then expand loop traversal statements in the manually depicted data stream to obtain each data stream node of the target operator, and determine identification information of each data stream node; wherein each data stream node is a data transmission unit node or a computing unit node; delete duplicate data transmission unit nodes in each data stream node; determine depth values of each data stream node according to dependency relationships between data transmission unit nodes and computing unit nodes in each data stream node, dependency relationships between data transmission unit nodes, and dependency relationships between computing unit nodes; and finally re-sort each data stream node in ascending order of depth values to obtain a complete data stream of the target operator, which solves the problems that the writing amount of the operator data stream generation scheme in the related art is large, the time cost and labor cost are high, and the accuracy is difficult to guarantee. It can automatically determine each data stream node of the operator based on the statement input by the user for general description of the operator, and perform redundant node deletion processing and sorting processing on each initially determined data stream node of the operator to obtain a complete data stream that can be used to completely describe the process of the AI processor executing the operator through DSL, reduce the writing amount in the generation process of the operator data stream, improve the generation efficiency and accuracy of the operator data stream, and reduce the generation cost of the operator data stream.
[0286] In an alternative embodiment of the embodiment of the present invention, optionally, the data stream acquisition module 301 is specifically configured to: provide data stream primitives to a target user, and acquire a manually depicted data stream of a target operator input by the target user according to the data stream primitives; wherein, the data stream primitives include an application cache primitive, a data conversion primitive, a loop traversal primitive, a data transfer unit trigger primitive, and a computing unit trigger primitive.
[0287] In an alternative embodiment of the embodiment of the present invention, optionally, when the node determination module 302 performs an operation of determining identification information of each data stream node, it is specifically configured to: assign a digital number to each data stream node as the identification information of the data stream node in the writing order of each data stream node.
[0288] In an alternative embodiment of the embodiment of the present invention, optionally, the node deletion module 303 is specifically configured to perform the following operations on each data transfer unit node among each data stream node: search whether a cache containing the data to be transmitted already exists in the cache array corresponding to the target operator according to the data transmission destination of the data transfer unit node and the identification information of the data to be transmitted; if a cache containing the data to be transmitted already exists in the cache array corresponding to the target operator, determine that the data transfer unit node is a reused data transfer unit node, and delete the reused data transfer unit node.
[0289] In an alternative embodiment of the embodiment of the present invention, optionally, the depth value determination module 304 is specifically configured to: determine the dependency relationship between the data transfer unit nodes and the computing unit nodes in each data stream node; determine the dependency relationship between the data transfer unit nodes and the dependency relationship between the computing unit nodes in each data stream node; determine the parent nodes and child nodes of each data stream node according to the dependency relationship between the data transfer unit nodes and the computing unit nodes, the dependency relationship between the data transfer unit nodes, and the dependency relationship between the computing unit nodes in each data stream node; determine the depth value of each data stream node according to the parent nodes and child nodes of each data stream node.
[0290] In an alternative embodiment of the embodiment of the present invention, optionally, when the depth value determination module 304 performs an operation of determining the depth value of each data stream node according to the parent nodes and child nodes of each data stream node, it is specifically configured to: start from the first data stream node, and perform the following operations on each data stream node: if there is no parent node of the data stream node, determine that the depth value of the data stream node is 0; if there is a parent node of the data stream node, add 1 to the maximum value of the depth values of all the parent nodes of the data stream node as the depth value of the data stream node.
[0291] In an alternative embodiment of the embodiment of the present invention, optionally, the operator data stream generation device further includes: an execution module, configured to execute the complete data stream of the target operator.
[0292] The operator data stream generation device provided by the embodiment of the present invention can execute the operator data stream generation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0293] Embodiment 4
[0294] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the operator data stream generation method of the embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, an electronic device, a blade electronic device, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0295] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0296] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0297] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for generating an operator data stream.
[0298] In some embodiments, the method for generating an operator data stream can be implemented as a computer program that is tangibly embodied in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed onto the heterogeneous hardware accelerator via the ROM and / or the communication unit. When the computer program is loaded into the RAM and executed by the processor, one or more steps of the method for generating an operator data stream described above can be executed. Alternatively, in other embodiments, the processor can be configured to execute the method for generating an operator data stream by any other suitable means (e.g., by means of firmware).
[0299] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0300] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, such that when the computer programs are executed by the processors, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or electronic device.
[0301] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0302] To provide for interaction with a user, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the heterogeneous hardware accelerator. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0303] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0304] A computing system may include a client and an electronic device. The client and the electronic device are generally far from each other and usually interact via a communication network. The relationship between the client and the electronic device is generated by computer programs running on respective computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0305] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0306] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for generating an operator data stream, characterized in that, Including: Obtain the manually depicted data flow of the target operator input by the target user according to the data flow primitive; Unfold the loop traversal statements in the manually depicted data flow to obtain each data flow node of the target operator, and determine the identification information of each data flow node; wherein, each data flow node is a data transmission unit node or a computing unit node; Delete the reused data transmission unit nodes in each data flow node; Determine the depth value of each data flow node according to the dependency relationships between the data transmission unit nodes and the computing unit nodes in each data flow node, the dependency relationships between the data transmission unit nodes, and the dependency relationships between the computing unit nodes; Re-sort each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
2. The method for generating an operator data stream according to claim 1, wherein Obtain the manually depicted data flow of the target operator input by the target user according to the data flow primitive, including: Provide the data flow primitive to the target user, and obtain the manually depicted data flow of the target operator input by the target user according to the data flow primitive; Wherein, the data flow primitive includes an application cache primitive, a data conversion primitive, a loop traversal primitive, a data transmission unit trigger primitive, and a computing unit trigger primitive.
3. The method for generating an operator data stream according to claim 1, wherein Determine the identification information of each data flow node, including: Assign a digital number to each data flow node in the writing order of each data flow node as the identification information of the data flow node.
4. The method for generating an operator data stream according to claim 1, wherein Delete the reused data transmission unit nodes in each data flow node, including: Perform the following operations for each data transmission unit node in each data flow node: According to the data transmission destination of the data transmission unit node and the identification information of the data to be transmitted, search whether there is a cache containing the data to be transmitted in the cache array corresponding to the target operator; If there is a cache containing the data to be transmitted in the cache array corresponding to the target operator, determine that the data transmission unit node is a reused data transmission unit node, and delete the reused data transmission unit node.
5. The method for generating an operator data stream according to claim 1, wherein Determine the depth value of each data flow node according to the dependency relationships between the data transmission unit nodes and the computing unit nodes in each data flow node, the dependency relationships between the data transmission unit nodes, and the dependency relationships between the computing unit nodes, including: Determine the dependency relationships between the data transmission unit nodes and the computing unit nodes in each data flow node; Determine the dependency relationships between the data transmission unit nodes and the dependency relationships between the computing unit nodes in each data flow node; Determine the parent node and child node of each data flow node according to the dependency relationships between the data transmission unit nodes and the computing unit nodes in each data flow node, the dependency relationships between the data transmission unit nodes, and the dependency relationships between the computing unit nodes; Determine the depth value of each data flow node according to the parent node and child node of each data flow node.
6. The method for generating an operator data stream according to claim 5, wherein Determine the depth value of each data flow node according to the parent node and child node of each data flow node, including: Starting from the data flow node ranked first, perform the following operations for each data flow node: If there is no parent node of the data flow node, determine that the depth value of the data flow node is 0; If there is a parent node of the data flow node, add 1 to the maximum value of the depth values of all the parent nodes of the data flow node as the depth value of the data flow node.
7. The method for generating an operator data stream according to claim 1, wherein After re - sorting each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator, it further includes: Execute the complete data flow of the target operator.
8. An operator data stream generation device, characterized in that, It includes: A data flow acquisition module, configured to acquire the manually depicted data flow of the target operator input by the target user according to the data flow primitive; A node determination module, configured to expand the loop traversal statements in the manually depicted data flow to obtain each data flow node of the target operator, and determine the identification information of each data flow node; wherein each data flow node is a data transmission unit node or a computing unit node; A node deletion module, configured to delete the reused data transmission unit nodes in each data flow node; A depth value determination module, configured to determine the depth value of each data flow node according to the dependency relationships between the data transmission unit nodes and the computing unit nodes, the dependency relationships between the data transmission unit nodes, and the dependency relationships between the computing unit nodes in each data flow node; A data flow generation module, configured to re - sort each data flow node in ascending order of the depth value to obtain the complete data flow of the target operator.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; And a memory communicatively connected to the at least one processor; Wherein, the memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating the operator data flow according to any one of claims 1 - 7.
10. A computer-readable storage medium, characterized in that, The computer - readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the method for generating the operator data flow according to any one of claims 1 - 7 when executed.