Dynamic Code Generation and Optimization for Heterogeneous Devices with Graal
Project
Dynamic Code Generation and Optimization for Heterogeneous Devices with Graal
Principal Investigator
Summary
The aim of this project is to explore how we can harness the power of heterogeneous devices such as GPUs (Graphics Processing Units) from within a dynamic compiler. To accomplish this goal we plan to use the Graal compiler infrastructure developed by Oracle and extend it in order to support dynamic runtime compilation to OpenCL. Our goals are: (1) discover and exploit parallelism opportunities from the high-level information available at runtime and (2) use heterogeneous devices to dynamically accelerate applications transparently from the user. This project will differ from most prior work that has only considered static GPU code generation. Since we will be in a context of dynamic runtime optimizations a whole new range of techniques can be applied in order to better optimize the application. For instance, we can use the profiling information to dynamically discover parallelism, specialize the code and ultimately determine which device is best suited for running the code. Given the current capabilities of the Graal compiler we will first focus our efforts on Java applications and move towards other languages such as R, J and JavaScript as soon the front-ends will be available for these languages. The high-level nature of these languages means that it will be easier to discover sources of parallelism without complicated low-level compiler analysis. For instance we can use bulk data operations for collections1 in Java, the data-parallel operators of J, and the mostly-functional nature of R. In this project, we will develop two research themes; exploiting parallelism and dynamic code generation. The first part will develop techniques to identify and extract parallelism automatically from an application. The second theme will look at the problem of dynamically generating device code.