O2render: An OpenCL-to-Renderscript translator for porting across various GPUs or CPUs

More than half-a-billion Android devices are world's most impactful real-time, interactive multimedia systems that are open-sourced. Google introduced Renderscript language and runtime in Android releases starting in 2011. Renderscript delivers performance and portability without losing usability. However, it is difficult to reuse software written in existing compute languages such as OpenCL. Thus, we develop the O2render system to enable OpenCL programs on Android devices. We analyze fundamental differences between OpenCL and Renderscript, and present our design of a translator between them using low-level virtual machine (LLVM). We extend LLVMs frontend, Clang, and show that we achieve about the same performance in Renderscript with minimal translation overhead.

[1]  Wu-chun Feng,et al.  CU2CL: A CUDA-to-OpenCL Translator for Multi- and Many-Core Architectures , 2011, 2011 IEEE 17th International Conference on Parallel and Distributed Systems.

[2]  Gregory Diamos The Design and Implementation Ocelot’s Dynamic Binary Translator from PTX to Multi-Core x86 , 2009 .

[3]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[4]  Gianni De Fabritiis,et al.  Swan: A tool for porting CUDA programs to OpenCL , 2011, Comput. Phys. Commun..