I'm a young developer interested in HPC and parallel programming.
As you can see here http://www.khronos.org/webcl has been "released" (not yet, is a working draft) this porting for the web of OpenCL. I don't know where to start from, because I can't see what to do, because I would like to do it on Chrome that, unfortunately, still doesn't have his experimental plugin like Firefox, and I know that it would have better performance thanks to the v8.
Well, no one knows nothing about it? I know I should use idl files, but I don't know where or what do, actually.
Actually I think that my problem, lately, is first the debugging. Firebug, compared to the debugger of chrome is a pain and confusing. Chrome has less bug, is lighter and can give better performance also for this, what I was saying, lightweight.
And we should also see how is implemented the .idl for Firefox and make some comparisons about performance, on how resources are handled from both engines.
(Jan 2020) There are other options to do web computation on the GPU:
WebGL compute shaders (old but readily accessible)
This is pretty easy to set up within a WebGL context. Shortcomings compared to WebCL are minor:
value = buffer[n] >> 10
i.e. 1024 = 2^10). I did not have any precision concerns as some scientific / fintech apps do.You can find the recently-updated spec here.
WebGPU (new standard)
This is the latest standard under implementation, and successor to WebGL 1.0, 2.0 and WebCL.
You can access the GPU's computational power directly from JavaScript, dealing with latency on GPU callouts by using
async
andawait
. You will need to write shaders in WHLSL (now WSL), a new, high-level shader language based closely on Direct3D HLSL.It abstracts the latest low-level 3D graphics APIs such as Metal, Vulkan and Direct3D 12, thereby reducing GPU overheads compared with Open/WebGL.
Choices?
WebGL compute shaders for those who intend to use computational results in WebGL rendering, who are anyway doing WebGL rendering in their app, or who want to prototype on web and then port to native OpenGL.
WebGPU for planned cross-browserness including on Apple devices (where GL has been poorly supported for a long time), newness, and speed. Also used for graphics.
WebCL via the extension for Chrome / Chromium if you ultimately want the opportunity to run the code on CPUs too, without modification, and don't need GPU rendering.