Logo image
An OpenCL Compiler Framework with Vector Data Flow Analysis for SIMD Optimizations on CPUs+GPUs
Dissertation

An OpenCL Compiler Framework with Vector Data Flow Analysis for SIMD Optimizations on CPUs+GPUs

Lin, Yu-Te
Doctor of Philosophy (PHD), 國立清華大學, 資訊工程學系
2015

Abstract

編譯器 繪圖處理器 向量運算 向量語法分析 資料流分析 OpenCL compiler GPU SIMD optimization vector parsing data flow analysis
The use of heterogeneous multi-core platforms for both embedded and high-performance computing is becoming widespread. The integration of processors of different types means that these platforms require novel frameworks for supporting the development of software for them. Open Computing Language (OpenCL) is a commonly used framework for programming on heterogeneous multi-core platforms. One of the most important parts of OpenCL is the back-end compiler that compiles OpenCL programs for different processors. Most OpenCL compilers currently utilize LLVM as their compiler infrastructure, which presents an interesting question: Can OpenCL be effectively implemented on other compiler infrastructures? Supporting OpenCL on other compiler infrastructures could provide the opportunity to incorporate more academic innovations in the development of OpenCL and its applications. The support of single-instruction multiple-data (SIMD) linguistics of OpenCL also requires special compiler data flow analysis to meet the optimization requirements. Here we describe a method to apply an OpenCL compiler based on the Open64 compiler infrastructure to AMD graphics processing units (GPUs) and x86 CPUs. Open64 is equipped with many legacy compiler optimizations, supporting OpenCL on Open64 provides the potential for these legacy optimizations to be applied to OpenCL programs. The required procedures are detailed herein for the front-end, middle-end, and back-end of the Open64 compiler. We then propose a calculus framework to support the data flow analysis of vector constructs for OpenCL programs that compilers can use to perform SIMD optimizations. We model OpenCL vector operations as data access functions in the style of mathematical functions. We then show that the data flow analysis for OpenCL vector linguistics can be performed based on the data access functions. Based on the information gathered from data flow analysis, we illustrate a set of SIMD optimizations on OpenCL programs. Preliminary experimental results have demonstrated that the Open64-based OpenCL compiler can successfully compile fifteen benchmarks from the AMD APP SDK. Executing the compiled programs on the AMD GPU platform also produces correct results. The experimental results incorporating our calculus and our proposed compiler optimizations show that the proposed SIMD optimizations can provide average performance improvements of 22% on x86 CPUs and 4% on AMD GPUs. For the selected fifteen benchmarks, eleven of them are improved on x86 CPUs and six of them are improved on AMD GPUs. These results demonstrate the potential to adopt Open64 as an alternative OpenCL compiler as well as develop OpenCL SIMD optimizations on Open64.

Metrics

1 Record Views

Details

Logo image