天堂国产午夜亚洲专区-少妇人妻综合久久蜜臀-国产成人户外露出视频在线-国产91传媒一区二区三区

當(dāng)前位置:主頁 > 科技論文 > 軟件論文 >

領(lǐng)域編程語言SIMC到SIMD的代碼轉(zhuǎn)換技術(shù)

發(fā)布時間:2018-02-02 09:53

  本文關(guān)鍵詞: clang SIMD 代碼轉(zhuǎn)換 領(lǐng)域編程語言 編譯工具 出處:《吉林大學(xué)》2017年碩士論文 論文類型:學(xué)位論文


【摘要】:隨著現(xiàn)代社會的計算機技術(shù)高速發(fā)展,對計算機高性能計算能力也提出了更高的需求,尤其在特定的多媒體圖像與無線通訊領(lǐng)域的研發(fā)場景中,需要大量密集型的數(shù)據(jù)運算操作,傳統(tǒng)數(shù)據(jù)串行處理方法難以達到理想效果,在CPU物理性能達到瓶頸的情況下,CPU的主流處理方法則是進行SIMD(單指令多數(shù)據(jù))操作,其使用SIMD寄存器完成數(shù)據(jù)并行處理來取得加速收益。同時,隨著編譯器技術(shù)的不斷發(fā)展,領(lǐng)域?qū)<姨岢霾崿F(xiàn)了通過相關(guān)編譯器自動生成高性能代碼的解決方案,因此,完整的SIMD代碼自動化轉(zhuǎn)換技術(shù)在程序生產(chǎn)環(huán)境中存在實際意義,其可以縮短研發(fā)周期,降低人力成本,同時保證SIMD程序的準(zhǔn)確性并進行相關(guān)程序優(yōu)化。本文中和特定領(lǐng)域算法特征,基于clang編譯器擴展了一套自定義高層語言SIMC到SIMD程序自動轉(zhuǎn)換工具。其中SIMC是一種面向圖像與無線通訊領(lǐng)域擴展的類C程序語言,SIMC進行了一些語言擴展,例如加入矩陣、向量、復(fù)數(shù)等關(guān)鍵字,其能夠完整描述應(yīng)用特征;同時還擴展了對算子表達式的描述(如矩陣卷積、矩陣和運算表達式)。作為編譯器輸入語言SIMC可以提升開發(fā)效率,降低程序優(yōu)化成本與算法復(fù)雜度。經(jīng)過編譯之后,可自動生成針對特定硬件平臺的SIMD程序。SIMC到SIMD的編譯轉(zhuǎn)換工具主要工作集中在clang編譯器的擴展開發(fā),在編譯器的詞法、語法、語義分析過程中,本文通過對SIMC程序的特定關(guān)鍵字和算子表達式進行并行性分析,在中間表示AST上進行針對特殊表達式的節(jié)點變換,其為代碼轉(zhuǎn)換工具的核心工作。其中具體實現(xiàn)設(shè)計可分為對特定表達式的擴展及其轉(zhuǎn)換接口設(shè)計,變量基礎(chǔ)信息收集,循環(huán)迭代區(qū)間并行性分析,調(diào)用SIMD內(nèi)置函數(shù)接口設(shè)計,本論文框架分別介紹了SIMC語言設(shè)計說明及其算法特征,SIMD操作原理,clang編譯器及其擴展原理,代碼并行性分析及其實現(xiàn)模塊設(shè)計。最后一步,對特定算法的SIMC程序自動轉(zhuǎn)換生成的SIMD代碼進行正確性與性能驗證,通過對比其程序性能與專家手工優(yōu)化版本相一致,最終測試數(shù)據(jù)表明,在X86平臺上SIMC-SIMD編譯轉(zhuǎn)換工具可以將程序時間運行效率較之串行語言提高3.85-6.59倍。
[Abstract]:With the rapid development of computer technology in modern society, there is a higher demand for high performance computing power of computer, especially in the research and development of specific multimedia image and wireless communication field. A large number of intensive data operations are required, so the traditional method of serial data processing is difficult to achieve ideal results. When the physical performance of CPU reaches the bottleneck, the mainstream processing method of CPU is to carry out single instruction multi-data operation. At the same time, with the continuous development of compiler technology, domain experts have proposed and implemented a solution to automatically generate high-performance code through related compilers. The complete SIMD code automation technology has practical significance in the program production environment, it can shorten the research and development cycle, reduce the labor cost, At the same time to ensure the accuracy of the SIMD program and related program optimization. Based on the clang compiler, this paper extends a set of automatic conversion tools from SIMC to SIMD program. SIMC is a C-like programming language for image and wireless communication, which extends some languages, such as adding matrix, vector, etc. It also extends the description of operator expressions (such as matrix convolution, matrix and operation expression). As a compiler input language, SIMC can improve the development efficiency. To reduce the cost of program optimization and algorithm complexity. After compiling, can automatically generate specific hardware platform specific SIMD program SIMC to SIMD compiler conversion tools mainly focus on the expansion of the clang compiler development, in the compiler lexical, syntax, In the process of semantic analysis, this paper analyzes the parallelism of the special keywords and operator expressions of SIMC programs, and transforms the nodes of special expressions on the intermediate representation AST. It is the core work of the code conversion tool, in which the concrete implementation design can be divided into the extension of a specific expression and its conversion interface design, variable basic information collection, cycle iteration interval parallelism analysis, calling SIMD built-in function interface design. The framework of this paper introduces the SIMC language design description and its algorithm characteristic, the principle of SIMD operation and its extension principle, the code parallelism analysis and its implementation module design. The correctness and performance of the SIMD code generated by the automatic transformation of the SIMC program of the specific algorithm are verified. The program performance is consistent with that of the expert manual optimization version. The final test data show that, On the X86 platform, the SIMC-SIMD compiler and conversion tool can improve the program time efficiency by 3.85-6.59 times compared with the serial language.
【學(xué)位授予單位】:吉林大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2017
【分類號】:TP314

【參考文獻】

相關(guān)期刊論文 前4條

1 徐穎;李春江;董鈺山;周思齊;;GCC編譯器中編譯指導(dǎo)的自動向量化實現(xiàn)[J];計算機科學(xué);2014年S2期

2 劉穎;呂方;王蕾;陳莉;崔慧敏;馮曉兵;;異構(gòu)并行編程模型研究與進展[J];軟件學(xué)報;2014年07期

3 李春江;黃娟娟;徐穎;杜云飛;陳娟;;典型編譯器自動向量化效果評估與分析[J];計算機科學(xué);2013年04期

4 姚遠(yuǎn);趙榮彩;;基于編譯指示的向量化方法[J];計算機工程;2012年12期

,

本文編號:1484234

資料下載
論文發(fā)表

本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1484234.html


Copyright(c)文論論文網(wǎng)All Rights Reserved | 網(wǎng)站地圖 |

版權(quán)申明:資料由用戶3c2a8***提供,本站僅收錄摘要或目錄,作者需要刪除請E-mail郵箱bigeng88@qq.com