標題: | 在KVM虛擬機器中支援OpenCL圖形加速裝置 Enabling OpenCL Support for GPGPU in Kernel-based Virtual Machine |
作者: | 田璨榮 Tian, Tsan-Rong 游逸平 You, Yi-Ping 資訊科學與工程研究所 |
關鍵字: | OpenCL;系統虛擬化;KVM;圖形處理器虛擬化;API Remoting;Virtio;OpenCL;System virtualization;Kernel-based Virtual Machine;GPU virtualization;API Remoting;Virtio |
公開日期: | 2011 |
摘要: | 現今高效能運算領域中,以異質多核心系統進行平行運算已成為一大重要發展趨勢,妥善運用不同種類核心之計算能力優勢,可大幅提高運算效能。OpenCL 即為因應愈來愈普及的異質多核心運算環境所提出的程式開發模型,幫助程式開發人員撰寫有效率、具移植性的異質多核心程式,提升計算效能,但目前於系統虛擬化環境中並不支援OpenCL,無法以系統虛擬化幫助進行更佳的OpenCL運算資源管理。在本篇論文中,我們以KVM虛擬機器為基礎提出了一個OpenCL虛擬化架構,並以API Remoting的方式達成OpenCL運算資源多工。本論文的OpenCL虛擬化架構分為:(一)適用於客戶虛擬機器(guest virtual machine)環境下的OpenCL函式庫,負責包裝OpenCL函式請求與回覆。(二)Virtio-CL,為一虛擬裝置,負責客戶虛擬機器與虛擬機器管理者(hypervisor)之間的資料傳輸。(三)一個新的執行緒(thread),其負責真正執行OpenCL函式,稱為CL執行緒。由於API Remoting的特性,OpenCL程式在OpenCL主端與客戶端間資料傳輸量直接影響虛擬化負擔。在實驗中發現,我們選用的OpenCL運算密集型(device-intensive)測試程式僅有少量虛擬化負擔,平均為6.4%,且當客戶虛擬機器數量增加時,虛擬化負擔增幅不大,代表我們的虛擬化架構能實現有效的OpenCL運算資源管理。 Heterogeneous multi-core programming has become more and more important, and OpenCL, an open industrial standard for parallel programming, provides a uniform programming model for programmers to write efficient, portable code for heterogeneous compute devices. However, OpenCL is not supported in system virtualization environment, which explores more opportunities of better resource utilization. In this thesis we propose an OpenCL virtualization framework based on Kernel-based Virtual Machine (KVM) with API Remoting to enable multiplexing of multiple guest virtual machines (guest VMs) over the underlying OpenCL resources. The framework comprises three major components: an OpenCL library implementation in guest VMs for packing/unpacking OpenCL requests/responses, a virtual device, called Virtio-CL, which is responsible for the communication between guest VMs and the hypervisor, and a new thread, called CL thread, which is dedicated for the OpenCL API invocation. Although the overhead of the proposed virtualization framework is directly affected by the amount of data to be transferred between the OpenCL host and devices because of the primitive nature of API Remoting, the experiments demonstrate that the virtualization framework has only little virtualization overhead (6.4% on average) for common device-intensive OpenCL programs and performs well when the number of guest VMs involved in the system increases, which directly infers the effective resource utilization of OpenCL devices of the framework. |
URI: | http://140.113.39.130/cdrfb3/record/nctu/#GT079855520 http://hdl.handle.net/11536/48254 |
顯示於類別: | 畢業論文 |