# TornadoVM: Running Java on GPUs and FPGAs

**URL:** https://clojureverse.org/t/tornadovm-running-java-on-gpus-and-fpgas/5588
**Category:** Other Languages
**Created:** [March 10, 2020, 12:36pm UTC](https://clojureverse.org/t/tornadovm-running-java-on-gpus-and-fpgas/5588 "2020-03-10T12:36:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TristeFigure](https://clojureverse.org/user_avatar/clojureverse.org/tristefigure/32/2076_2.png) [@TristeFigure](https://clojureverse.org/u/TristeFigure)
#### Post date: [March 10, 2020, 12:36pm UTC](https://clojureverse.org/t/tornadovm-running-java-on-gpus-and-fpgas/5588/1 "2020-03-10T12:36:08Z")

</div>

> [Dr Juan Fumero](https://www.research.manchester.ac.uk/portal/juan.fumero.html) presented at QCon London on [TornadoVM](https://github.com/beehive-lab/TornadoVM), a plug-in to OpenJDK and GraalVM that runs Java on heterogeneous hardware including Graphical Processing Units (GPUs) and Field Programmable Gate Arrays (FPGAs). Demos during the presentation showed code being sped up by hundreds of times when running on a GPU vs a CPU.

> GPUs and FPGAs can offer 2-3 orders of magnitude speed improvement for highly parallelisable workload. But those speed improvements have been difficult to obtain as programming requires the use of low level languages such as [OpenCL](https://en.wikipedia.org/wiki/OpenCL) and [VHDL](https://en.wikipedia.org/wiki/VHDL). TornadoVM makes acceleration accessible to programmers using Java and Node.js, and annotations are used to mark parallelisable code blocks as a hint to the compiler.

[Source](https://www.infoq.com/news/2020/03/TornadoVM-QCon-London/)  
[HN](https://news.ycombinator.com/item?id=22528837)

---

<div class="post-metadata">

### Author: ![mdiin](https://clojureverse.org/user_avatar/clojureverse.org/mdiin/32/3599_2.png) [@mdiin](https://clojureverse.org/u/mdiin)
#### Post date: [March 10, 2020, 9:33pm UTC](https://clojureverse.org/t/tornadovm-running-java-on-gpus-and-fpgas/5588/2 "2020-03-10T21:33:46Z")

</div>

That was a pretty interesting presentation. After the presentation I asked him about more dynamic languages such as Clojure, which should work since they are compiling JVM bytecode to OpenCL. He didn’t know at that point, however, but suggested to give it a try.

As I understand it, the annotations put on java methods are only hints for the compiler, and any code that is not parallelizable will simply run on the JVM. My memory might be a little off though. Handling recursion is not a goal for TornadoVM though, but perhaps that is where it is actually a good thing that Clojure does loop/recur as a workaround for the missing tail call optimisation in the JVM.

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [September 9, 2020, 9:34am UTC](https://clojureverse.org/t/tornadovm-running-java-on-gpus-and-fpgas/5588/3 "2020-09-09T09:34:31Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
