Tag Archives: openjdk

AMD and Oracle to collaborate on Heterogenous Computing in Java

In August John Coomes from Oracle made a proposal to add GPU support to Java. One month later, on Sep 10, he proposed the creation of a new project called Sumatra to continue with this endeavour. On Sep 24 this project was approved by a 100% vote in favour. During the recent JavaOne 2012 AMD officially announced its participation in OpenJDK Project Sumatra in collaboration with Oracle and OpenJDK to bring heterogenous computing to Java for server and cloud environments. The Inquirer also reports on this subject.

This is very exciting news indeed. Although there are already two libraries for GPU programming in Java – namely rootbeer and aparapi, having GPU support built in to the Java language, the Java API and most importantly the JVM will provide an alternative more compelling than the use of any external library. And to be quite frank there could not be a collaborator than AMD given their vast contribution to date to OpenCL and OpenCL development tools. And unlike Nvidia, they are wholly committed to OpenCL and not working on their own proprietary alternative.

Although it’ll be a while before this project sees any substantial contribution I cannot wait to see this take form over the next year or two. OpenCL and, in general, the GPU programming paradigm is hard; very hard; and even more importantly porting existing code is even harder; and if anyone can make this domain accessible to the mainstream it’s Java. Once Sumatra is ready hopefully we won’t have to write OpenCL anymore. We’ll be able to write normal Java, compile it and at either compile time or runtime the byte code will get translated into OpenCL and compiled. At execution time we won’t have to worry about what hardware we’re running because with any luck it’ll be write once run anywhere!

HotSpot PermGen removal commit made

As you may know, after the takeover of Java by Oracle and the subsequent decision to merge JRockit into Hotspot, PermGen was due to be removed from Hotspot entirely. Two days ago, a commit (openjdk list message) has been made into the hotspot gc repository to remove permgen (which is the storage of class metadata) and use native memory in its place. Class metadata shall now be represented as C++ classes and will now be allocated in the metaspace linked to classloaders according to the commit message. [Source]

Oracle and AMD propose GPU support in Java

A very exciting development indeed has come to my attention albeit four days late. This news is, without exaggeration, in my humble opinion nothing short of groundbreaking, not only because it pushes the boundaries and capabilities of Java even further in terms of hardware support and performance but also because, as I’m gradually beginning to realise, the future of high performance computing is in the GPU.

John Coomes (OpenJDK HotSpot Group Lead) and Gary Frost (AMD) have proposed a new OpenJDK project to implement GPU support in Java with a native JVM (full thread).

This project intends to enable Java applications to seamlessly take advantage of a GPU–whether it is a discrete device or integrated with a CPU–with the objective to improve the application performance.

Their focus will be on code generation, garbage collection and runtimes.

We propose to use the Hotspot JVM, and will concentrate on code generation, garbage collection, and
runtimes. Performance will be improved, while preserving compile time, memory consumption and code generation quality.

The project will also use the new Java 8 lambda language and may eventually sprout further platform enhancements.

We will start exploring leveraging the new Java 8 Lambda language and library features. As this project progress, we may identify challenges with the Java API and constructs which may lead to new language, JVM and library extensions that will need standardization under the JCP process.

John Coomes (Oracle) will lead the project and Gary Frost (AMD) has gladly offered resources from AMD. As the mail thread got underway two already existing related projects were brought to the list’s attention: rootbeer (PDF, slashdot) and Aparapi (AMD page). Rootbeer is a particularly interesting project as it performs static analysis of Java code and generates CUDA code automatically – quite different from compile time OpenCL bindings from Java. The developer of rootbeer has also shown interest in joining the openjdk project. John Rose, Oracle HotSpot developer, also posted a talk he recently gave on Arrays 2.0 which I’m yet to watch.

The missing link in deriving value from GPUs, from what I understand in a domain that I’m still fairly new to, is that GPU hardware and programming need to be made accessible to the mainstream and that’s the purpose I hope this project will serve. I hope also that, once underway, it also raises wider awareness of how we must make a mental shift from concurrency to parallelism and from data parallelism to task parallelism and how the next generational leap in parallelism will come, not from cpu cores or concurrency frameworks, but from harnessing the mighty GPU.

Hacker news has some discussion. What do you think? Let me know.

JDK8 update: Release schedule and StringBuilder patch

Looking through the jdk8-dev archives (albeit slightly late) I found two points worthy of note. First is the JDK8 release schedule (thread view) as well as commendable openness by the release manager of the release schedule and commitment by Oracle. The second is a movement (thread view) in openjdk to migrate from StringBuffer to StringBuilder which in my opinion is fantastic not only as a means of keeping the codebase up to date in a backward compatible manner but also as a performance improvement. Note the lmax disruptor whitepaper in which benchmarks showed how sychronized code can be slower than unsynchronized code even when only executed by a single thread. On a note of curious trivia: Adam Messinger, who hosted the jdk launch event on video has left Oracle for Twitter to become VP of Application Engineering!