Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Node fusion method and device and code generation method and device

A fusion method and node technology, applied in the field of data processing, can solve the problems of small computing granularity and inability to give full play to the computing performance of the hardware platform.

Active Publication Date: 2020-07-28
ALIBABA GRP HLDG LTD
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Usually, due to the small granularity of individual nodes in the computing graph, when deploying the computing graph on the hardware platform, most of the nodes are fused according to the dependencies between producers and consumers, and then deployed. However, by this method The calculation granularity of the operation obtained after fusion is still small, and the computing performance of the existing hardware platform cannot be fully utilized

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Node fusion method and device and code generation method and device
  • Node fusion method and device and code generation method and device
  • Node fusion method and device and code generation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] refer to figure 1 , shows a flow chart of the steps of the node fusion method according to Embodiment 1 of the present invention.

[0027] The method comprises the steps of:

[0028] S102. Number the nodes according to the dependencies among the nodes in the target computation graph.

[0029] In this embodiment, the target computation graph may be an entire computation graph, or a subgraph of an entire computation graph, which is not limited in this embodiment.

[0030] Nodes with dependencies in the target computation graph are connected by edges, each node corresponds to a tensor operation, and each edge corresponds to a tensor.

[0031] In this embodiment, there is a dependency relationship between each node in the calculation graph, such as a data dependency relationship or a control dependency relationship, etc. During calculation, the nodes with the dependency relationship have a time sequence relationship, then in this embodiment, according to the Dependencies...

Embodiment 5

[0131] refer to Figure 5a , shows a schematic flowchart of a tensor operation and code generation method according to Embodiment 5 of the present invention. Through this embodiment, an example is given to describe the above-mentioned combination of node fusion and code generation process.

[0132] The method provided in this embodiment includes the following steps:

[0133] S502. Number the nodes in the input target computation graph.

[0134] Specifically, for the specific requirements on the input target computation graph, refer to the above step S102, which will not be repeated in this embodiment.

[0135] In this example, if Figure 5b As shown, the methods for numbering the target computation graph include:

[0136] S5021. Initialize the node in the node queue as the root node, and number the root node.

[0137] S5022. Determine whether the node queue is empty. If it is empty, end; if not empty, execute step S5023.

[0138] S5023. Pop the node at the head of the q...

Embodiment 6

[0176] refer to Figure 6 , shows a structural block diagram of a node fusion device according to Embodiment 6 of the present invention.

[0177] The device provided in this embodiment includes: a numbering module 602 and a fusion module 604 .

[0178] The numbering module 602 is used to number the nodes according to the dependencies among the nodes in the target computing graph. The nodes with dependencies in the target computing graph are connected by edges, and each node corresponds to a tensor operation. Each edge corresponds to a tensor.

[0179] The fusion module 604 is configured to determine the layer where the node is located according to the numbering result, so as to determine the layer graph corresponding to the target computation graph, and perform layer-by-layer fusion of tensor operations according to the layer graph.

[0180] In an optional implementation manner, the numbering module 602 is specifically configured to: start from the root node of the target co...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a node fusion method and device and a code generation method and device. The node fusion method comprises: numbering nodes according to a dependency relationship among the nodes in a target calculation graph, connecting the nodes with the dependency relationship in the target calculation graph through edges, enabling each node to correspond to one tensor operation, and enabling each edge to correspond to one tensor; and determining a layer where the node is located according to a numbering result, determining a hierarchical graph corresponding to the target calculation graph, and carrying out layer-by-layer fusion of tensor operation according to the hierarchical graph, therefore, the nodes without dependency among layers can be fused as well, the calculation granularity of the fusion operation obtained after node fusion is enlarged, and the problems that in the prior art, the calculation granularity of the fusion operation obtained after fusionis small, and the calculation performance of an existing hardware platform cannot be brought into full play are solved.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of data processing, and in particular, to a node fusion method, a code generation method, and a device. Background technique [0002] In recent years, the application of artificial intelligence has exploded. The support of the basic software framework and the support of hardware computing power are the basic driving force for driving the innovation of artificial intelligence application business. The software infrastructure framework of the current mainstream artificial intelligence business can generally abstract the computing business of artificial intelligence into a calculation graph representation, and can perform calculations according to the definition in the calculation graph. Then the calculation graph can be deployed on the hardware platform, so as to be supported by the hardware computing power of the hardware platform itself. [0003] Usually, due to the small granularity ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30
CPCG06F8/30Y02D10/00
Inventor 龙国平杨军朱凯林伟
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products