• 沒有找到結果。

National Sun Yat-sen University Institutional Repository:Item 987654321/28025

N/A
N/A
Protected

Academic year: 2021

Share "National Sun Yat-sen University Institutional Repository:Item 987654321/28025"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會專題研究計畫 期中進度報告

智慧型記憶體架構下平行編譯整合環境之建立(1/3)

計畫類別: 個別型計畫 計畫編號: NSC91-2213-E-110-017-執行期間: 91 年 08 月 01 日至 92 年 07 月 31 日 執行單位: 國立中山大學電機工程學系(所) 計畫主持人: 黃宗傳 計畫參與人員: 朱守禮,蘇郁文,楊昇峰,吳鎮吉 報告類型: 精簡報告 報告附件: 出席國際會議研究心得報告及發表論文 處理方式: 本計畫可公開查詢

國 92 年 5 月 19 日

(2)

智慧型記憶架構平行編譯整合環境之建立(1/3)

The Development of an Integr ated Par allelizing

Envir onment for Intelligent Memor y System

計畫編號:NSC 91-2213-E-110-017

執行期限:91 年 8 月 1 日至 92 年 7 月 31 日

主持人:黃宗傳博士 國立中山大學電機工程學系

計畫參與人員:朱守禮

國立中山大學電機工程

學系

蘇郁文

國立中山大學電機工程

學系

楊昇峰

國立中山大學電機工程

學系

吳鎮吉

國立中山大學電機工程

學系

一、中文摘要 在電腦相關技術的進步下, 一種新的 計算機結構 Intelligent Memory 已被提 出,用以解決記憶體與處理器間的速度差 異所造成的效能瓶頸。在第一年的計畫 中 , 我 們 提 出 七 個 適 用 於 Intelligent Memory 架構最佳化技巧與分析轉換模組 之演算法,以充分發揮此架構之主處理機 (Host Processor)與記憶體處理機(Memory Processor) 的效能。在現有的基礎上,我 們計劃將原來之 SAGE [1, 2, 3] 雛形擴充 成一個完整的系統。而今年最主要的工作 就是設計 SAGE 系統內的各個模組、在 SGI Origin 200 機器上建立 FlexRAM 模擬 器之環境、安裝 Polaris 平行編譯器,並完

(3)

成系統之調校,以做為後續實驗之平台。

關鍵詞:Intelligent Memory, FlexRAM Abstr act

With the rapid growth of computer technology, a new class of computer architecture, intelligent memory, has been proposed to solve the bottleneck arising from the performance gap between the memory and processor. In the first year of this project, we devised several modules for the techniques of analyzing, translation and optimization in the intelligent memory platform. Based on the SAGE prototype we developed, in this project we will enhance its integrity, so that SAGE can become a complete system. In this year, we have set up the environment for FlexRAM simulator and successfully installed Polaris on the SGI Origin 200 machine. We also finished the adjustment of system operation for the use of experiment in the next years.

Keywor ds: Intelligent Memory, FlexRAM 二、緣由與目的 近年來,由於記憶體存取的速度趕不 上中央處理器(CPU)運算的速度,使得電 腦的效能無法有效的提升,而現有的記憶 體階層架構也無法完全解決這個問題,因 此許多研究人員提出了智慧型記憶體系統 (Intelligent Memory 簡稱 I-RAM)這種新的 計算機結構[4][5][6],在 I-RAM 系統中記 憶體不僅是資料儲存元件而且還具備有運 算 的 能 力 。 其 中 包 括 UIUC 的 FlexRAM[4] 、 UC-Davis 的 Active Page[5]、ISI-USC 的 DIVA[6],我們的研 究以 UIUC 的 FlexRAM 作為實驗平台。 但目前的研究方向,大都朝向其硬體 結構的發展,較少提及適合設合此架構之 平行轉換編譯器的研究,為了充分發揮這 類先進架構的效能,我們發展出將現有程 式轉換為設合此架構的平行轉換系統 — SAGE ( Statement – Analysis – Grouping - Evaluation)。 而在目前的平行化系統中,轉換的重 心大都放在盡可能讓迴圈(Loop)中所有的 或部分的輪次(Iteration)能同時被執行,而 我們所提出的 SAGE 系統則採用另一種不 同的轉換方式,它以陳述(Statement)為基 本 單 元 對 迴 圈 執 行 迴 圈 分 散 轉 換(Loop Distribution Transformation),盡可能將迴 圈分成最多個工作單位,然後再根據每個 工作單位的特性分給適合的處理器。 所以如何讓 SAGE 系統自動地幫我們 分析程式以及針對陳述作分割並作出相對 應的轉換是我們的目標。 三、結果與討論 圖一是我們 SAGE 系統各個基本的模 組組織圖。其中包含了陳述間資料相依分 析(Statement Dependence Analysis)模組、 陳述分割(Statement Splitting) 模組、WPG 產 生 器 (Weighted Partition Dependence Graph Generation) 模 組 、 區 塊 權 重 評 估 (Block Weight Evaluation)模組、區塊執行 次序分析(Block Execution Order Analysis) 模組、區塊排程(Block Scheduling) 模組以 及程式碼產生器(Source Code Generation) 模組。 在陳述間資料相依分析模組,我們使 用 UIUC 所發展出的 Polaris 程式分析系統 [7][8]中的部分模組,其中包含 FORTRAN 77 程式的內部表示(Internal Representation 簡稱 IR)[8]、行內展開(Inline Expansion) 模 組 及 資 料 相 依 測 試 (Data Dependence Test)模組。 陳述分割模組負責對程式中的每個迴 圈 (Loop) 做 迴 圈 分 散 轉 換 (Loop Distribution Transformation);利用之前陳 述間資料相依分析模組所得到的資料,我 們將盡可能將迴圈分散成最多個部分。在 演算法(一)中我們列出詳細的步驟。 WPG 產生器模組的工作是根據程式 的執行流程將程式分解並建立加權分割圖 (Weighted Partition Dependence Graph 簡稱 WPG)。

(4)

估 每 個 工 作 在 各 種 處 理 器 上 的 權 重 (Weight)。此 一 機 制 的 方 法 是 我 們 將 WPG 產生器理的區 塊 相 對 映 的 原 始 碼 經 編 譯 後 , 藉 由 U IUC 之 IA-COMA 實 驗 室 所 發 展 的 Fl ex RAM 模 擬 器 [9] 來 執 行 , 然 後 將 所 得 到 的 執 行 時 間 填 入 區 塊 中 。 區塊執行次序分析模組以及區塊排程 模組已在我們上一個計劃中提出了相關的 演算法。 最後的程式碼產生器(Code Generator) 模組則負責輸出適合在模擬器上執行的程 式碼。 我們在 SGI Origin 200 上我們安裝了 SGI Varsity 、 SGI IRIX 6.5 MIPS Pro Fortran 77、SGI IRIX 6.5 MIPS Pro Fortran 90、SGI IRIX 6.5 MIPS Pro C/C++ 相關套 件 以 及 SCI IRIX 6.5 MIPS Pro Performance Analyzer 程式效能分析軟體 以幫助我們在 SGI 上作研究。 四、計劃結果自評 在過去的一年裡我們已經初步設計完 成了 SAGE 系統的各個基本的模組,並且 安裝好了模擬器所需要的環境。而在測試 以及系統安裝方面我們學到許多原本我們 所忽略到的知識;相關參與這項研究計劃 的學弟也能夠藉著這個過程學到了作研究 的方法及作學問的態度。對於後兩年的研 究計劃目標,我們有信心可以完成。 五、參考文獻

[1] T. C. Huang, and S. L. Chu, “SAGE: A New Analysis and Optimization System for FlexRAM Architecture,” in Proc. 2nd Workshop on Intelligent Memory Systems, 2000.

[2] T. C. Huang, and S. L. Chu, “A New Analysis Approach for Intelligent Memory Systems,” in Proc. ISCA 16th International Conference on Computers and Their Applications, pp. 452-457, 2001.

[3] S. L. Chu, T. C. Huang, and L. C. Lee,

“Improving workload balance and code optimization in processor-in-memory systems,” in Proc. 8th International Conference on Parallel and Distributed Systems, pp. 273-278, 2001.

[4] Y. Kang, W. Huang, S. Yoo, D. Keen, Z. Ge, V. Lam, P. Pattnaik, and J. Torrellas, “FlexRAM: Toward an Advanced Intelligent Memory System,”

International Conference on Computer Design, 1999.

[5] M. Oskin, F. T. Chong, and T. Sherwood, “Active Page: A Computation Model for Intelligent Memory Computer Architecture,” in Proc. 25th Annual International Symposium on Computer Architecture, pp. 192 –203, 1998.

[6] J. Granacki, et al. “Data Intensive Architecture: DIVA,” http://www.isi.edu/asd/ diva/, 1998. [7] Polaris Developer’s Document. Center

for Supercomputing Research and Development University of Illinois at Urbana-Champaign, June. 1995.

[8] K. Faigin, S. Weatherford, J. Hoeflinger, D. Padua, and P. Petersen, The Polaris Internal Representation. International Journal of Parallel Programming. Vol. 22, No. 5, Oct. 1994.

[9] Veenstra, J., and Fowler, R.: MINT: A Front End for Efficient Simulation of Shared-Memory Multiprocessors. In MAS-COTS’94, pp 201-207, Jan. 1994.

演 算 法 ( 一 ) 陳 述 分 割演 算 法 (Statement Splitting Algorithm)

(5)

給定一迴圈 L = (I1, I2 , … . In )( S1, S2, … .

Sk ),

步 驟 一 : 以 陳 述 間 資 料 相 依 分 析 (Statement Dependence Analysis)來分析各 個陳述,建構出相依圖 G。 步驟二:依相依圖 G,運用我們在定義一 所 提 供 的 方 法 , 建 構 出 區 塊 分 割 (node partition) Π。 步驟三:在區塊分割(node partition) Π上, 依我們之前所提供的方法,建立權重分割 相 依 圖 (Weighted Partition Dependence Graph)。 定義一: 在相依關係圖 G 上, 對於一個特定 迴圈 L, 令 S={ S1 , S2 , … . Sd},我 們 定 義集 合 S 上的 一個區塊分割 (node partition) Π 為 Sk 和 Sl ,k≠ l, 所形成的子集合,其中 SkSl 且 SlSk,在此∆是一個間接的資料相依關 係 。 對 某 一 分 割 (partition ) Π = {π1,π2 ,… ,πn} , 我 們 定 義 偏 序 關 係

(partial ordering relations) α, α^,和αo 如下。

若 i≠j:

1. πiα πj:若且唯若存在有 Sk ∈ πi

且 Sl∈ πj使得 SkδSl,其中δ 代

表 true dependence relation . 2. πiα^ πj:若且唯若存在有 Sk∈ πi

且 Sl ∈ πj使得 Skδ^ Sl,,其中δ^

代表 anti dependence relation。 3. πiαoπj:若且唯若存在有 Sk ∈ πi

且 Sl ∈ πj使得 Sk δo Sl,其中δo

代表 output dependence relation。

區塊排程 (Block Scheduling) 程式碼產生器 (Sour ce Code Gener ation) 原始程式 (Source Program) 區塊權重評估 (Block Weight Evaluation) 陳述分割 (Statement Splitting) 陳述間資料相依 分析 (Statement Dependence Analysis) 區塊執行次序 分析 (Block Execution Or der Analysis) 圖一、 SAGE 系統各個基本的模組組織圖

參考文獻

相關文件

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

Professor of Computer Science and Information Engineering National Chung Cheng University. Chair

Department of Computer Science and Information Engineering, Chaoyang University of

• Children from this parenting style are more responsive, able to recover quickly from stress; they also have better emotional responsiveness and self- control; they can notice

This algorithm has been incorporated into the FASTA program package, where it has decreased the amount of memory required to calculate local alignments from O(NW ) to O(N )

Experiment a little with the Hello program. It will say that it has no clue what you mean by ouch. The exact wording of the error message is dependent on the compiler, but it might

Figure 6.19 The structure of a class describing a laser weapon in a.

A study of computer technology use and technology leadership of Texas elementary public school principals. Unpublished doctoral dissertation, University of