CN112912837A - Neural network compiling method, device, equipment, storage medium and program product - Google Patents
Neural network compiling method, device, equipment, storage medium and program product Download PDFInfo
- Publication number
- CN112912837A CN112912837A CN201880098337.7A CN201880098337A CN112912837A CN 112912837 A CN112912837 A CN 112912837A CN 201880098337 A CN201880098337 A CN 201880098337A CN 112912837 A CN112912837 A CN 112912837A
- Authority
- CN
- China
- Prior art keywords
- information
- compiling
- grouping
- determining
- tensor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
- G06F7/487—Multiplying; Dividing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Nonlinear Science (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种神经网络编译方法、装置、设备、存储介质及程序产品,所述方法包括:获取神经网络对应的中间表示信息,并根据中间表示信息确定分组信息(101);根据分组信息对神经网络的分组进行在线编译(102)。所述神经网络编译方法、装置、设备、存储介质及程序产品,可以预先根据神经网络的层分组结果确定中间表示信息,使得该中间表示信息中包括神经网络的层分组信息,再根据获取的中间表示信息确定神经网络的分组信息,并基于分组信息对神经网络进行编译,即使层间的张量维度不同,也能够根据分组信息编译神经网络。
A neural network compiling method, device, device, storage medium and program product, the method comprising: acquiring intermediate representation information corresponding to a neural network, and determining grouping information according to the intermediate representation information (101); The packets are compiled online (102). The neural network compiling method, device, device, storage medium and program product can determine the intermediate representation information in advance according to the layer grouping result of the neural network, so that the intermediate representation information includes the layer grouping information of the neural network, and then according to the obtained intermediate representation information. The representation information determines the grouping information of the neural network, and compiles the neural network based on the grouping information. Even if the tensor dimensions between layers are different, the neural network can be compiled according to the grouping information.
Description
PCT国内申请,说明书已公开。PCT domestic application, the description has been published.
Claims (18)
- An online neural network compiling method, comprising:acquiring intermediate representation information corresponding to a neural network, wherein the intermediate representation information is determined by performing layer grouping on the neural network in advance and according to a grouping result;determining grouping information of the neural network according to the intermediate representation information;and compiling the grouping of the neural network on line according to the grouping information.
- The method according to claim 1, wherein the grouping information includes input data tensor information, output data tensor information, preset tensor information of the grouping processing data;the compiling the grouping of the neural network on line according to the grouping information comprises the following steps:determining input data tensor information and preset tensor information of the grouping according to the grouping information;segmenting the grouped input data according to the preset tensor information and the input data tensor information to obtain segmented data;and compiling the grouping on line according to the segmentation data.
- The method of claim 2, wherein the input data tensor information comprises an input data identification; the preset tensor information comprises preset tensor dimensionality;the segmenting the grouped input data according to the preset tensor information and the input data tensor information to obtain segmented data comprises the following steps:determining input data of the group according to the input data identification;and segmenting the input data according to the preset tensor dimension to obtain segmented data, wherein the dimension of the segmented data is smaller than or equal to the preset tensor dimension.
- The method of claim 2, wherein the grouping information further comprises: global tensor information, time step information;the compiling the packet on-line according to the segmentation data comprises:reading one of the segmentation data according to a preset reading rule;determining a step length and a processing intercept point when the segmentation data is processed according to the grouped global tensor information;determining partition subdata according to the step length and the processing intercept point, and generating an instruction according to the time step information and the partition subdata in the grouping information;and judging whether the processing of the segmentation data is finished according to the processing intercept, if not, continuing to execute the step of determining the step length and the processing intercept when the segmentation data is processed according to the grouped global tensor information.
- The method according to claim 4, wherein if the segmented data is determined to be processed, determining whether all the segmented data is processed, and if not, continuing to perform the step of reading one of the segmented data according to a preset reading rule.
- The method of claim 1, wherein the intermediate representation information includes a number of packets of the neural network;the method further comprises the following steps:and determining the compiling quantity of the compiled packets, determining whether all the compiled packets are compiled according to the compiling quantity and the packet quantity, and if not, continuing to execute the step of compiling the packets of the neural network on line according to the packet information.
- The method of claim 6,the determining the compiling number of the compiling completion comprises:initializing a compiling identifier to be 0;after the grouping of the neural network is compiled online according to the grouping information, a new compiling identifier is obtained by superposing 1 on the compiling identifier;determining whether all the groups are compiled according to the compiling quantity and the grouping quantity, wherein the determining comprises the following steps:and comparing whether the compiling identification is consistent with the grouping quantity, and if so, determining that the grouping is finished after compiling.
- An online neural network compiling device, comprising:the acquisition module is used for acquiring intermediate representation information corresponding to the neural network, wherein the intermediate representation information is determined by performing layer grouping on the neural network in advance and according to a grouping result;a first determining module, configured to determine grouping information of the neural network according to the intermediate representation information;and the compiling module is used for compiling the grouping of the neural network on line according to the grouping information.
- The apparatus according to claim 8, wherein the grouping information includes input data tensor information, output data tensor information, preset tensor information of the grouping processing data;the compiling module comprises:a first determining unit configured to determine, according to the grouping information, input data tensor information and preset tensor information of the group;the dividing unit is used for dividing the grouped input data according to the preset tensor information and the input data tensor information to obtain divided data;and the compiling unit is used for compiling the grouping on line according to the segmentation data.
- The apparatus of claim 9, wherein the input data tensor information comprises an input data identification; the preset tensor information comprises preset tensor dimensionality;the segmentation unit is specifically configured to:determining input data of the group according to the input data identification;and segmenting the input data according to the preset tensor dimension to obtain segmented data, wherein the dimension of the segmented data is smaller than or equal to the preset tensor dimension.
- The apparatus of claim 9, wherein the grouping information further comprises: global tensor information, time step information;the compiling unit is specifically configured to:reading one of the segmentation data according to a preset reading rule;determining a step length and a processing intercept point when the segmentation data is processed according to the grouped global tensor information;determining partition subdata according to the step length and the processing intercept point, and generating an instruction according to the time step information and the partition subdata in the grouping information;and judging whether the processing of the segmentation data is finished according to the processing intercept, if not, continuing to execute the step of determining the step length and the processing intercept when the segmentation data is processed according to the grouped global tensor information.
- The apparatus of claim 11, wherein if the compiling unit determines that the split data is processed, the compiling module further includes a second determining unit configured to determine whether all the split data is processed, and if not, the compiling unit continues to perform the step of reading one of the split data according to a preset reading rule.
- The apparatus of claim 8, wherein the intermediate representation information comprises a number of packets of the neural network;the device further comprises:and the second determining module is used for determining the compiling quantity after compiling is finished, determining whether all the groups are compiled according to the compiling quantity and the grouping quantity, and if not, continuing to execute the step of compiling the groups of the neural network on line according to the grouping information by the compiling module.
- The apparatus of claim 13,the second determining module is specifically configured to:initializing a compiling identifier to be 0;after the compiling module carries out online compiling on the grouping of the neural network according to the grouping information, the second determining module obtains a new compiling identifier by superposing 1 on the compiling identifier;the second determining module determines whether all the groups are compiled according to the compiling quantity and the grouping quantity, and comprises the following steps:and comparing whether the compiling identification is consistent with the grouping quantity, and if so, determining that the grouping is finished after compiling.
- A computer comprising the apparatus of any one of claims 8-14.
- An electronic device, comprising:at least one processor; anda memory communicatively coupled to the at least one processor; wherein,the memory stores instructions executable by the at least one processor, the instructions, when executed by the at least one processor, causing the at least one processor to perform the method of any one of claims 1-7.
- A computer-readable storage medium having stored thereon computer-executable instructions configured to perform the method of any one of claims 1-7.
- A computer program product, characterized in that the computer program product comprises a computer program stored on a computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1-7.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/114543 WO2020093304A1 (en) | 2018-11-08 | 2018-11-08 | Method, apparatus, and device for compiling neural network, storage medium, and program product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112912837A true CN112912837A (en) | 2021-06-04 |
CN112912837B CN112912837B (en) | 2024-02-13 |
Family
ID=70611242
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201880098337.7A Active CN112912837B (en) | 2018-11-08 | 2018-11-08 | Neural network compilation methods, devices, equipment, storage media and program products |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112912837B (en) |
WO (1) | WO2020093304A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428616A (en) * | 2022-04-01 | 2022-05-03 | 北京清微智能信息技术有限公司 | Method for optimizing replacement cost in neural network compiling stage |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114385867A (en) * | 2020-10-16 | 2022-04-22 | 中科寒武纪科技股份有限公司 | Apparatus, method and computer program product for processing multidimensional data |
CN116796793A (en) * | 2023-04-27 | 2023-09-22 | 阿里巴巴(中国)有限公司 | Calculation method and device for neural network model |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106355244A (en) * | 2016-08-30 | 2017-01-25 | 深圳市诺比邻科技有限公司 | CNN (convolutional neural network) construction method and system |
CN106547605A (en) * | 2016-09-29 | 2017-03-29 | 乐视控股(北京)有限公司 | Compiled code sending method and compiled code dispensing device |
CN107103113A (en) * | 2017-03-23 | 2017-08-29 | 中国科学院计算技术研究所 | Towards the Automation Design method, device and the optimization method of neural network processor |
CN107918794A (en) * | 2017-11-15 | 2018-04-17 | 中国科学院计算技术研究所 | Neural network processor based on computing array |
CN108363559A (en) * | 2018-02-13 | 2018-08-03 | 北京旷视科技有限公司 | Multiplication processing method, equipment and the computer-readable medium of neural network |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106127297B (en) * | 2016-06-02 | 2019-07-12 | 中国科学院自动化研究所 | The acceleration of depth convolutional neural networks based on tensor resolution and compression method |
CN106650922B (en) * | 2016-09-29 | 2019-05-03 | 清华大学 | Hardware neural network conversion method, computing device, and software-hardware cooperation system |
CN107239315B (en) * | 2017-04-11 | 2019-11-15 | 赛灵思公司 | Programming model towards neural network heterogeneous computing platforms |
-
2018
- 2018-11-08 CN CN201880098337.7A patent/CN112912837B/en active Active
- 2018-11-08 WO PCT/CN2018/114543 patent/WO2020093304A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106355244A (en) * | 2016-08-30 | 2017-01-25 | 深圳市诺比邻科技有限公司 | CNN (convolutional neural network) construction method and system |
CN106547605A (en) * | 2016-09-29 | 2017-03-29 | 乐视控股(北京)有限公司 | Compiled code sending method and compiled code dispensing device |
CN107103113A (en) * | 2017-03-23 | 2017-08-29 | 中国科学院计算技术研究所 | Towards the Automation Design method, device and the optimization method of neural network processor |
CN107918794A (en) * | 2017-11-15 | 2018-04-17 | 中国科学院计算技术研究所 | Neural network processor based on computing array |
CN108363559A (en) * | 2018-02-13 | 2018-08-03 | 北京旷视科技有限公司 | Multiplication processing method, equipment and the computer-readable medium of neural network |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428616A (en) * | 2022-04-01 | 2022-05-03 | 北京清微智能信息技术有限公司 | Method for optimizing replacement cost in neural network compiling stage |
Also Published As
Publication number | Publication date |
---|---|
CN112912837B (en) | 2024-02-13 |
WO2020093304A1 (en) | 2020-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI794157B (en) | Automatic multi-threshold feature filtering method and device | |
CN114930401A (en) | Point cloud-based three-dimensional reconstruction method and device and computer equipment | |
WO2020024585A1 (en) | Method and apparatus for training object detection model, and device | |
CN111461164B (en) | Sample data set capacity expansion method and model training method | |
CN112912837A (en) | Neural network compiling method, device, equipment, storage medium and program product | |
CN104616031A (en) | Transfer learning method and device | |
CN106447592A (en) | Online personalized service of each feature descriptor | |
JP2018128996A5 (en) | ||
JP2010541078A5 (en) | ||
CN110969600A (en) | A product defect detection method, device, electronic device and storage medium | |
CN108763002A (en) | The method and system of cpu fault are predicted based on machine learning | |
CN110221900B (en) | A Dockerfile basic image version information automatic completion method and device | |
CN110413994B (en) | Hot topic generation method and device, computer equipment and storage medium | |
CN112868019A (en) | Feature processing method and device, storage medium and program product | |
CN116483598A (en) | AI defect repair localization by LSTM | |
CN103198489B (en) | Based on the obvious object automatic testing method of conspicuousness density and skirt response | |
CN107562703A (en) | Dictionary tree reconstructing method and system | |
CN111247517A (en) | Image processing method, device and system | |
CN115104092A (en) | Data synchronization method and related device | |
US20170140080A1 (en) | Performing And Communicating Sheet Metal Simulations Employing A Combination Of Factors | |
CN113282839A (en) | Internet data push processing method and system | |
CN112416301A (en) | Deep learning model development method and device, and computer-readable storage medium | |
JP6453685B2 (en) | Arithmetic control device, arithmetic control method, and arithmetic control program | |
CN110298690B (en) | Object class purpose period judging method, device, server and readable storage medium | |
CN112667144A (en) | Data block construction and comparison method, device, medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |