• Home
  • Search
  • Machine-Learning-based Performance Heuristics for Runtime CPU/GPU Selection
  • Cite Icon31
  • https://doi.org/10.1145/2807426.2807429Copy DOI Icon

Machine-Learning-based Performance Heuristics for Runtime CPU/GPU Selection

  • Sep 8, 2015
  • Akihiro Hayashi +3 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

High-level languages such as Java increase both productivity and portability with productive language features such as managed runtime, type safety, and precise exception semantics. Additionally, Java 8 provides parallel stream APIs with lambda expressions to facilitate parallel programming for mainstream users of multi-core CPUs and many-core GPUs. These high-level APIs avoid the complexity of writing natively running parallel programs with OpenMP and CUDA/OpenCL through Java Native Interface (JNI). The adoption of such high-level programming models offers opportunities for enabling compilers to perform parallel-aware optimizations and code generation.While many prior approaches have the ability to generate parallel code for both multi-core CPUs and many-core GPUs from Java and other high-level languages, selection of the preferred computing resource between CPUs and GPUs for individual kernels remains one of the most important challenges since a variety of factors affecting performance such as datasets and feature of programs need to be taken into account.This paper explores the possibility of using machine learning to address this challenge. The key idea is to enable a Java runtime to select a preferable hardware device with performance heuristics constructed by supervised machine-learning techniques. For this purpose, if our JIT compiler detects a parallel stream API, 1) our compiler records features of its computation such as the parallel loop range and the number of instructions and 2) our Java runtime generates these features for constructing training data. For the results reported in this paper, we constructed a prediction model with support vector machines (SVMs) after obtaining 291 samples by running 11 applications with different data sets and optimization levels. Our Java runtime then uses the SVMs to make predictions for unseen programs.Our experimental results on an IBM POWER8 platform with NVIDIA Tesla GPUs show that our prediction model predicts a faster configuration with up to 99.0% accuracy with 5-fold cross validation. Based on these results, we conclude that supervised machine-learning is a promising approach for building performance heuristics for mapping Java applications onto accelerators.

Similar Papers
  • Conference Article
  • Citations3

Building Java program analysis tools using Javana

  • Oct 22, 2006
  • Dries Buytaert +3
  • Conference Article
  • Citations5

HJ-OpenCL

  • Sep 08, 2015
  • Max Grossman +2
  • Research Article
  • Citations2

Evaluating the Java Native Interface (JNI)

  • Apr 01, 2018
  • International Journal of Distributed Systems and Technologies
  • Stelios Sotiriadis +3
  • Research Article
  • Citations21

Bringing java's wild native world under control

  • Nov 01, 2013
  • ACM Transactions on Information and System Security
  • Mengtao Sun +4
  • Book Chapter
  • Citations15

JNI Light: An Operational Model for the Core JNI

  • Jan 01, 2010
  • Gang Tan
  • Research Article
  • Citations35

A Transformation Framework for Optimizing Task-Parallel Programs

  • Apr 01, 2013
  • ACM Transactions on Programming Languages and Systems
  • V Krishna Nandivada +3
  • Conference Article
  • Citations7

Sulong - execution of LLVM-based languages on the JVM

  • Jul 17, 2016
  • Manuel Rigger +2
  • Research Article
  • Citations4

Ensemble Learning with Support Vector Machines for Bond Rating

  • Jan 01, 2012
  • Journal of Intelligence and Information Systems
  • Myoung-Jong Kim
  • Conference Article
  • Citations5

The application of feature selection in Hepatitis B virus reactivation

  • Mar 01, 2017
  • Huina Wang +2
  • Research Article
  • Citations17

Compiling scala for the Java virtual machine

  • Jan 01, 2005
  • Infoscience (Ecole Polytechnique Fédérale de Lausanne)
  • Michel Schinz
  • Conference Article
  • Citations1

Array Bounds Check Elimination for Java Based on Sparse Representation

  • Jan 01, 2009
  • Keqiao Yang +2
  • Conference Article
  • Citations56

Automatic parallelization for graphics processing units

  • Aug 27, 2009
  • Alan Leung +2
  • Research Article
  • Citations4

Equational Logic and Categorical Semantics for Multi-Languages

  • Oct 01, 2020
  • Electronic Notes in Theoretical Computer Science
  • Samuele Buro +2
  • Research Article
  • Citations3

Toward an SGX-Friendly Java Runtime

  • Jan 01, 2024
  • IEEE Transactions on Computers
  • Mingyu Wu +7
  • Conference Article
  • Citations13

Toward Harnessing High-Level Language Virtual Machines for Further Speeding Up Weak Mutation Testing

  • Apr 01, 2012
  • Vinicius H.S Durelli +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.