The Khronos Group, the industry consortium responsible for standards like WebGL, OpenGL and COLLADA, today announced the ratification and public release of the WebCL 1.0 specifications. WebCL is the browser version of OpenCL, and it gives web developers a way to harness GPU and multi-core processing from within the web browser.
The WebCL standard is based on OpenCL, which offers a similar set of capabilities on the desktop.
As Neil Trevett, the chair of the WebCL working group (and Khronos’ president and NVIDIA’s VP for mobile content), told me earlier this week, he expects that once browser vendors adopt this spec, developers will use these capabilities to build things like physics engines for WebGL games, real-time video-editing tools, vision-processing features and photo-editing tools with advanced filters in the browser.
Basically, any app that needs to run code in parallel will be able to run in the browser, too. The standard itself is application agnostic anyway, though it’s fair to assume that games and photo processing will be among the first apps that use these capabilities.
Because the bottleneck for apps like this isn’t the browser, developers also barely incur any performance penalty for running this code from the browser.
Take a look at this (older) video from Samsung to see what a difference WebCL makes:
Because WebCL is so similar to OpenCL, developers should be able to port their code over pretty easily.
The closer code gets to running on bare metal, though, the more security issues something like WebCL opens up, too. Because of this, Trevett noted, the team left out some features that are available in OpenCL because security couldn’t be guaranteed for them. As part of this process, the team developed an open-source kernel validator, and Trevett stressed that the work on WebCL also motivated the OpenCL community to get more secure.
For web developers, this opens up a whole new range of possibilities and could bring new categories of applications to the web. At the same time, though, this is also very unfamiliar territory for many of them. Trevett expects that just like the WebGL ecosystem is now dominated by relatively easy to use frameworks that abstract most of the grunt work away, WebCL will see a similar development. Just like developers who were well-versed in graphics engines started working on WebGL middleware, he expects engineers who are now working in parallel processing will do something similar for WebCL.
It’s still unclear when browsers will start offering this capability. The standard has been in the works since 2011 and the companies involved in the process include the industry heavyweights like Adobe, AMD, Nvidia, ARM, Intel, Opera Software, Mozilla, Google, Samsung and Qualcomm. Nokia, however, does offer a WebCL extension for Firefox, so if you really want to give it a try, that’s probably the best way right now.