針對在圖形處理器上運行的 OpenVX 應用程式以 融合原始函式獲得資料轉移最佳化
Data Movement Optimization by Fusing Primitive Kernels for OpenVX Applications on GPUs
摘要
許多研究都指出圖形處理器核心函式之間的資料傳輸對於效能有嚴重的傷害。我們
在 OpenVX 這個影像處理框架中發現其工作流程圖的系統設計會帶來許多冗餘的資料
傳輸。目前尚未有研究解決這個 OpenVX 上的問題。這篇論文提出了 VXFE,一個延
伸模組用來幫助 OpenVX 能對其中的原始核心函式進行融合,藉以消弭核心函式之間
不需要的資料傳輸。首先,VXFE 會分析由 OpenVX 應用程式所轉譯出的工作流程圖,
找出具有不必要的中間產物的核心函式。再來,被選上的核心函式將會被融合成為新
的核心函式,並同時具有原先核心函式的生產者與消費者的行為。最後,新的核心函
式會取代原有核心函式在工作流程圖的位置並帶來效能的提升。實驗結果顯示,核心
函式融合能減少最多 48% 的核心函式執行時間。另外,我們證實了其他研究中用於解
決範圍存取問題的負載增量方法亦可以解決某些核心函式融合產生的線程束內的分歧
問題。
在 OpenVX 這個影像處理框架中發現其工作流程圖的系統設計會帶來許多冗餘的資料
傳輸。目前尚未有研究解決這個 OpenVX 上的問題。這篇論文提出了 VXFE,一個延
伸模組用來幫助 OpenVX 能對其中的原始核心函式進行融合,藉以消弭核心函式之間
不需要的資料傳輸。首先,VXFE 會分析由 OpenVX 應用程式所轉譯出的工作流程圖,
找出具有不必要的中間產物的核心函式。再來,被選上的核心函式將會被融合成為新
的核心函式,並同時具有原先核心函式的生產者與消費者的行為。最後,新的核心函
式會取代原有核心函式在工作流程圖的位置並帶來效能的提升。實驗結果顯示,核心
函式融合能減少最多 48% 的核心函式執行時間。另外,我們證實了其他研究中用於解
決範圍存取問題的負載增量方法亦可以解決某些核心函式融合產生的線程束內的分歧
問題。
Many research have demonstrated that data transactions among dependent compute kernels on graphics processing units are a severe issue in terms of performance. We observed that
OpenVX, an open standard for acceleration of computer vision applications, has the similar
issue due to its design of workflow graphs. However, there is still no research work addressing this problem. In this thesis, we propose an extension of the OpenVX runtime system, called
VXFE, that eliminates redundant intermediate memory transactions between OpenVX primitive
compute kernels by using fusion techniques of OpenCL kernels. VXFE consists of three major
components: (1) a fusion selector, which analyzes the workflow graph of a given OpenVX application and selects candidate OpenCL kernels for fusion, (2) a fusion reactor, which performs
a sourcetosource transformation on two candidate kernels to produce an equivalent fused kernel, and (3) a fusion transfector, which modifies the workflow graph of the OpenVX application
by merging nodes (corresponding to the candidate kernels) in the graph and binds the node to
the fused kernel. The experimental results showed that the proposed approach improved the
execution time of compute kernels up to 48%. In addition, we demonstrated that the technique
of workload duplication, a previously proposed method for solving range accesses issue, could
be also used in the problem of intrawarp divergence, which is introduced when applying fusion
techniques.
OpenVX, an open standard for acceleration of computer vision applications, has the similar
issue due to its design of workflow graphs. However, there is still no research work addressing this problem. In this thesis, we propose an extension of the OpenVX runtime system, called
VXFE, that eliminates redundant intermediate memory transactions between OpenVX primitive
compute kernels by using fusion techniques of OpenCL kernels. VXFE consists of three major
components: (1) a fusion selector, which analyzes the workflow graph of a given OpenVX application and selects candidate OpenCL kernels for fusion, (2) a fusion reactor, which performs
a sourcetosource transformation on two candidate kernels to produce an equivalent fused kernel, and (3) a fusion transfector, which modifies the workflow graph of the OpenVX application
by merging nodes (corresponding to the candidate kernels) in the graph and binds the node to
the fused kernel. The experimental results showed that the proposed approach improved the
execution time of compute kernels up to 48%. In addition, we demonstrated that the technique
of workload duplication, a previously proposed method for solving range accesses issue, could
be also used in the problem of intrawarp divergence, which is introduced when applying fusion
techniques.