GPU Computing on the Web

The WebCL project exposes OpenCL into JavaScript, allowing web developers to tap into the massive parallel computing resources of modern GPUs and multicore CPUs. This, when combined with WebGL and other emerging standards, enables entirely new categories of interactive web apps, such as photo editing, video processing, visualization, simulation, and cutting-edge games -- things that haven't been possible on the web before.

Getting Started

  • 1. Install and run Firefox 20 (no, other versions will not work).
  • 2. Click here to install Nokia WebCL (Windows/Linux/Mac).
  • 3. Click here to check that you have WebCL enabled (if not, please read the FAQ).
  • 4. Click here to check that you have WebGL enabled (if not, follow the instructions).
  • 5. Check out our demos.

WebCL extension for Firefox 20

The Nokia WebCL prototype is now available for Firefox 20. Click here to download the new add-on for Windows, Linux, and Mac OS X. As always, the source code is available on our Github repo. Special thanks to Anthony Liot for the Mac build and Owen Kaluza for the 64-bit Linux build!

Fractured | Fractal Art Studio

Fractured is an awesome GPU accelerated fractal exploration application running right in your browser. It lets you zoom in to a variety of fractals and share your discoveries on Flickr and Imgur. WebGL or Nokia WebCL is required; the latter is typically slower (due to it being a browser extension rather than an integrated component), but allows for much deeper zoom levels.

Path Tracing on WebCL

Matias Piispanen from Aalto University has created a WebCL port of David Bucciarelli's SmallptGPU. Click on the image below to check out the demo. Source code is available on github.

We're live on Github!

I'm pleased to announce that we have moved the WebCL source code repository to Github, while at the same time switching the license from LGPL to the much more permissive MPL 2.0. This should make it a lot easier for people to contribute to the project, as well as to fork the code for their own purposes. Click here to visit our Github repo. In related news, we have also brought our API docs up to date.

Online WebCL kernel editing

For those interested in online editing of CL kernels, here's the tool for you: www.clkernels.com by Matthew Scarpino. It's similar to our Kernel Toy, but gives you more flexibility in setting up kernel arguments and is not limited to image processing.

Fluid Simulation on WebCL

Matias Piispanen from Aalto University has written a nice fluid simulation demo using WebCL. Click here to check it out. Tip: Try moving the mouse on top of the canvas to stir up the fluid! For those who'd like to play around with the source code, it's available on github.

Liquid Resize on WebCL

I finally got around to making Intel's content-aware image resizing demo work on WebCL. Like the other RiverTrail demos, this one also works best with Intel OpenCL, and very poorly with NVIDIA GPUs. Be forewarned that the demo may take several minutes to run, particularly in the sequential JavaScript mode. The smaller you scale the image the longer it takes, so it's a good idea to try resizing by just a few pixels at first. That said, click here to check out the demo.

WebCL Working Draft announced

The WebCL Working Draft is now publicly available at khronos.org. This is an early draft that is subject to change at any time. Feedback is invited via the public_webcl@khronos.org mailing list (see archives and instructions for signing up).

Intel physics demos on WebCL

Only two weeks after Intel announced and open-sourced their data-parallel programming abstraction for JavaScript, called River Trail, Jeff Fifield had already ported it to WebCL. This means we can now run Intel's content, including the fancy Particles demo and the less fancy N-Body benchmark, on WebCL, without having to install the River Trail extension. Note that these demos seem to work much faster on the CPU than the GPU (at least on my PC), so I recommend installing either Intel's or AMD's OpenCL driver for x86 CPUs.

WebCL Bitcoin Miner

The WebCL bitcoin miner developed by Adrien Plagnol (here) is now working on the Nokia WebCL extension, too, thanks to a little JavaScript wrapper that I wrote to hide the differences between their WebCL implementation and ours. Click here to run the miner.

Random number generation

Check out our latest WebCL demo: the Random Number Generator. It also serves as a benchmark for comparing JavaScript with various WebCL platforms. On my Windows 7 PC running Firefox 5, the kernel runs in about 30 milliseconds on the GPU (Quadro NVS 290), in about 60 ms on the CPU (Core2 Duo @ 3.16 GHz), and in about 3000 ms in JavaScript. I'll do the math for you: WebCL is 50x faster than JavaScript even without using the GPU.

Printing money with WebCL

So what can you do with WebCL? Well, the most obvious use case is, of course, Bitcoin mining. In other words, running cryptographic algorithms on your GPU to authenticate money transfers in the Bitcoin currency system. As a reward, you generate a small amount of Bitcoins for yourself. It appears that the fastest GPUs can run through several hundred million cryptographic hashes per second, generating on the order of 10 USD worth of Bitcoins per day. There are two independent WebCL based Bitcoin mining sites, www.coined.com and www.kradminer.com (update: this site is now defunct).

Khronos WebCL pages are live

The official WebCL pages at Khronos are now up and running at khronos.org/webcl. The Khronos WebCL Wiki is going to serve as the primary source of information on the upcoming WebCL standard. Also, check out the Nokia WebCL FAQ.

WebCL announced at GDC

Good news: Our proposal to initiate a WebCL working group has been officially approved and was announced today at GDC in San Francisco. Jari Nikara will be chairing the group (together with Tasneem Brutch of Samsung) for the time being, until a permanent chair is elected. The announcement got lots of coverage in the news and has been well received in the web developer community. You can follow up on WebCL related news here.

WebCL introduced at Khronos

Today at the Khronos face-to-face meeting in Las Vegas, we gave a quick presentation and demo of our WebCL work and unofficially proposed the formation of a working group to standardize it. The idea was well received, with lots of interest from different kinds of companies.

Demo video available

Check out our demo video on YouTube or download it in full resolution!