Font Size: a A A

Mac Language Memory Hierarchy Implementation Technology

Posted on:2020-06-26Degree:MasterType:Thesis
Country:ChinaCandidate:S Q LiFull Text:PDF
GTID:2428330575479892Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Machine learning is the core of artificial intelligence.It makes machines "smart" like human beings,and under the premise of ensuring new "knowledge",he will reintegrate the existing "knowledge system" to make it more perfect.To ensure better service.This paper implements the addition of address space on a deep learning processor-based compiler.The main implementation process of this paper is as follows:Study and understand the implementation principle of LLVM compiler,and clarify that LLVM compiler belongs to three-stage compiler.It is a highly modular compiler,and the front end and back end can be arbitrarily matched.LLVM can generate language-independent intermediate code,which is the output of the front end,the input of the back end,and the back end further processes the generated intermediate code for the intermediate language.In the event of a program error,we can not only debug the source program through the target code,but also debug the program through the LLVM intermediate language LLVM IR,which makes LLVM more concise and friendly.We can understand the implementation principle of parallel computing through CUDA parallel programming model and instruction architecture and GPU storage hierarchy.By understanding the storage hierarchy of the GPU: the principle of shared memory,global memory,constant memory,texture memory,and the implementation of CUDA compilation in LLVM,to better understand the processing ideas of multi-core processors.The main work of this paper is to add the address space of the MAC language in the LLVM compiler,namely Nbuf,Wbuf,Sbuf and LDbuf.Since LLVM can generate platform-independent object code,debugging of the LLVM front-end can be achieved by the LLVM intermediate code LLVM IR,which is equivalent to the debug target code.The main experiments in this paper are carried out in the LLVM front-end clang,using LLVM special language to add attributes in the clang front-end,using the compiled source code in the clang front-end to add the implementation of the address space,and then transmitting the code to generate LLVM.The middle of the LLVM IR,without the optimized LLVM IR,can see if the address space is generated correctly.Finally,we use two test cases,one is a simple Mac program variable declaration to verify the code added to the clang front end;the other is to use the Mac language to rewrite the neural network operator non-maximum value suppression nms,compile with clang Generate LLVM IR to further verify that the implementation of the address space added by the LLVM front end is correct.Finally,the experimental compilation of this paper,the results show that the experimental results are correct,we can view the correct address space information in the LLVM IR representation LLVM IR.
Keywords/Search Tags:LLVM IR, CUDA, Mac
PDF Full Text Request
Related items