Font Size: a A A

Research And Implementation Of Deep Learning Forward Inference Optimization Based On Loongson 3A4000

Posted on:2023-08-30Degree:MasterType:Thesis
Country:ChinaCandidate:S J WangFull Text:PDF
GTID:2558307058999439Subject:Computer technology
Abstract/Summary:
In order to meet the requirements of running the deep neural network model on different platforms,it is of great significance to optimize the forward inference of the deep neural network on different platforms.Convolutional neural network is widely used in the field of computer vision,with high accuracy in object detection,image classification and semantic segmentation.Meanwhile,because the convolution calculation as the main calculation method has high requirements on the computational power of the platform,forward inference optimization should be carried out according to the characteristics of each platform.At present,there is no complete framework for customization optimization of Loongson platform.In this thesis,a certain range of forward inference operators of Loongson 3A4000 platform are studied and implemented.The performance of some operators in convolutional neural network is improved by combining the characteristics of instruction set and pipeline,computing resources and multi-core and multi-thread capabilities of the platform.The main work of this thesis is as follows:(1)First,deep learning and convolutional neural network principles,program optimization ideas and Loongson 3A4000 platform are analyzed.Then through hot spot code analysis,the existing problems and optimization objectives of forward inference of convolutional neural network are proposed.(2)By analyzing the optimization objective and analyzing the conventional practice of convolution algorithm optimization,Im2 col algorithm is used to transform convolution operation into matrix multiplication operation in this thesis,and accelerating universal matrix multiplication accelerates convolution algorithm,which is key strategy in this thesis.Therefore,this thesis adopts the methods of block operation,parallelization of core computing and multithreading to optimize the general matrix multiplication on the Longson 3A4000 platform.(3)Meanwhile,Depthwise convolution forward inference is optimized by data packing technique.(4)For the problem of low memory utilization caused by the optimization algorithm of convolution algorithm,this thesis uses efficient algorithm MEC to improve im2 col algorithm on the platform.The memory utilization and execution performance of im2 col algorithm on loongson3A4000 platform are improved according to the hardware characteristics of the platform.At the end of the thesis,the forward inference results of convolutional neural network implemented on loongson 3A4000 platform are tested.Through analysis,it is concluded that the acceleration effect of matrix multiplication in this thesis is 5-10 times,and the acceleration effect of the overall model is improved by 8-10 times.
Keywords/Search Tags:Convolutional neural network forward inference, Loongson 3A4000, Indirect Convolution, Optimization on GEMM, Optimization on Memory Usage
Related items