AMD & Oracle Team Up on OpenJDK 'Sumatra' for Heterogeneous Computing

A newly announced OpenJDK project aims to extend the recent trend of offloading compute cycles from CPUs to Graphics Processing Units (GPUs) with support for a native Java Virtual Machine (JVM), APIs and the Java language. Dubbed "Sumatra," the project is a joint effort of AMD and Oracle.

"In the last few years there has been a trend toward using GPU devices for pure compute rather than just the graphics," explained Gary Frost, technical lead of software development for application and developer infrastructure at AMD. "To do that, developers have had to rely on domain-specific languages, and it really hasn't been made available to the mass programmer through languages like Java. This project closes that gap."

Project Sumatra was officially announced on Sunday evening during the opening keynote presentations for the annual JavaOne conference in San Francisco. Phil Rogers, AMD Corporate Fellow, and George Saab, vice president of Oracle's Java Platform group (and chairman of the OpenJDK governing board), made the announcement. News that the project had been approved went out on the OpenJDK mailing list on Sept. 25.

According to the project proposal, Sumatra "will demonstrate the performance advantages of offloading Java compute to a GPU" and allow Java applications "to seamlessly take advantage of a GPU -- whether it is a discrete device or integrated with a CPU.

In a nutshell, the goal of the project is to improve performance and power consumption, and to help bring heterogeneous computing to Java for server and cloud environments, Frost told ADTmag.

"It will allow Java developers to use the patterns and idioms they've come to love over the years," he said. "And the intent is that the JVM will not only be able to emit code for x86 or SPARK going forward, but will be able to generate code specifically aimed at GPU devices."

Sumatra has roots in a project started a few years ago by AMD, called "Aparapi," which aimed to allow Java code to be executed on GPU and Accelerated Processing Unit (APU) devices by converting Java bytecode to OpenCL at run time. The Aparapi API allowed Java developers to create their projects in pure Java, and then converted that code at run time under the covers into OpenCL (the open standard language for parallel computing), which would execute on the GPU. The performance improvements were impressive, Frost said, reportedly as much as 60X. Sumatra takes that external Aparapi API and brings it into the JVM itself.

The Aparapi project, which was open sourced in 2011, is still "alive and vibrant," Frost said, and he expects feedback from it to help with Sumatra. Some of the contributors to the Sumatra project are current users of Aparapi, he said.

"AMD is in a unique position here," Frost said. "We have CPUs and GPUs, and with our APU line of products we're bringing the silicon of both of those together. We're trying to make sure that people are using all of the compute we're making available."

One technology that's likely to prove crucial to achieving the goals of the Sumatra project is the Lambda Expressions for Java, expected in Java SE 8. According the Lambda project proposal on the OpenJDK Web site, Lambda "aims to support programming in a multicore environment by adding closures and related features to the Java language." It's unlikely that the fruits of the Sumatra project will be harvested until the release of Java SE 8 or 9, Frost said, because it will rely on those features being in place.

Oracle and AMD are encouraging individuals and organizations to participate in the Sumatra Project through the OpenJDK community. More information is available on the OpenJDK Web site.