Data processing method and device for neural network model based on operator fusion
AssigneeShenzhen Corerain Technologies Co., Ltd.
InventorsJiongkai Huang, Kuen Hung Tsoi, Xinyu Niu
Life of this patent
Estimating the term…
Abstract
A data processing method and device for a neural network model based on operator fusion are provided. The method includes: acquiring multiple neural network operators in a neural network model; fusing the multiple neural network operators according to a preset rule to obtain fused neural network operators; combining the fused neural network operators into computation instructions; and performing computation on the computation instructions by using a computation engine.
Claims17
A computer-implemented data processing method for a neural network model on a computer comprising a processor, wherein the method comprises:
- acquiring, using the processor, a plurality of neural network operators in the neural network model;
- fusing, using the processor, the plurality of neural network operators according to a preset rule to obtain fused neural network operators;
- combining, using the processor, the fused neural network operators into computation instructions;
- and
- performing, using the processor, computation on the computation instructions by using a computation engine;
- wherein the fusing, using the processor, the plurality of neural network operators according to a preset rule to obtain fused neural network operators comprises:
- discharging, using the processor, the plurality of neural network operators through convolution, activation function, pooling/up-sampling, shortcut, activation function, and global pooling in sequence, and fusing, using the processor, discharged neural network operators to obtain fused neural network operators.
A computation device, comprising:
- one or more processors;
- and
- a storage apparatus configured to store one or more programs,
- wherein the one or more programs, when being executed by the one or more processors, cause the one or more processors to implement:
- acquiring a plurality of neural network operators in the neural network model;
- fusing the plurality of neural network operators according to a preset rule to obtain fused neural network operators;
- combining the fused neural network operators into computation instructions;
- and
- performing computation on the computation instructions by using a computation engine;
- wherein the one or more programs, when being executed by the one or more processors, cause the one or more processors to implement:
- discharging the plurality of neural network operators through convolution, activation function, pooling/up-sampling, shortcut, activation function, and global pooling in sequence, and fusing discharged neural network operators to obtain fused neural network operators.
A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program comprises program instructions, and the program instructions, when being executed by a processor, implement:
- acquiring a plurality of neural network operators in the neural network model;
- fusing the plurality of neural network operators according to a preset rule to obtain fused neural network operators;
- combining the fused neural network operators into computation instructions;
- and
- performing computation on the computation instructions by using a computation engine;
- wherein the program instructions, when being executed by the processor, implement discharging the plurality of neural network operators through convolution, activation function, pooling/up-sampling, shortcut, activation function, and global pooling in sequence, and fusing discharged neural network operators to obtain fused neural network operators.
Dependencies are inferred from the claim text.