-
Notifications
You must be signed in to change notification settings - Fork 25
WebCL API
WebCL (Web Computing Language) is a JavaScript binding to OpenCL for heterogeneous parallel computing within any compatible web browser without the use of plug-ins. Primarily, WebCL allows web applications to actualize speed with multi-core CPUs and GPUs; this intends to make computationally intensive programs feasible in the browser, e.g. physics engines, canvas element and video editing. WebCL is designed and maintained by the non-profit Khronos Group. WebCL is currently a draft.
WebCL is integrated into XML3D.js in a form of API that intends to simplify the usage WebCL in web applications. The API does not currently support all the WebCL features and relies highly on Nokia's WebCL plugin. Because the WebCL spesification and Nokia's WebCL implementation still evolves rapidly, the API features are due to change accordingly. Developers should consider this as an experimental feature until the WebCL specification is ratified and native browser implementations of WebCL are available. In the near future, the WebCL API will be also integrated into the Xflow architecture to provide WebCL accelerated Xflow operators.
- x86 CPU with SSE3 or later extension
- AMD or NVIDIA GPU with appropriate drivers
- OpenCL Driver
- OpenCL SDK
- Nokia's WebCL Extension for Firefox 25 (updated always for the latest stable release of FireFox)
- install NVIDIA's OpenCL SDK (https://developer.nvidia.com/cuda-downloads)
- install Intel's OpenCL SDK (http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe)
- Here are steps used with Ubuntu 13.04 and the new multi-package distribution Intel® SDK for OpenCL* Applications XE 2013:
- Download the 64-bit distribution from Intel: intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz
- Download the Intel public key. Intel-E901-172E-EF96-900F-B8E1-4184-D7BE-0E73-F789-186F.pub (If you have trouble finding the newest key, googling the filename can point to the to the correct page at Intel.)
$ sudo apt-get install -y rpm alien libnuma1
$ sudo rpm --import Intel-E901-172E-EF96-900F-B8E1-4184-D7BE-0E73-F789-186F.pub
$ tar -xvf intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz
$ cd intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64/
$ fakeroot alien --to-deb opencl-1.2-base-3.0.67279-1.x86_64.rpm
$ fakeroot alien --to-deb opencl-1.2-intel-cpu-3.0.67279-1.x86_64.rpm
#The lines below install the library files and intallable client driver registration in /opt/intel/opencl-1.2-3.0.67279
$ sudo dpkg -i opencl-1.2-base_3.0.67279-2_amd64.deb
$ sudo dpkg -i opencl-1.2-intel-cpu_3.0.67279-2_amd64.deb
- Two more steps are needed to run an OpenCL program.
Add library to search path:
$ sudo touch /etc/ld.so.conf.d/intelOpenCL.conf
# Edit this file, add the line:
/opt/intel/opencl-1.2-3.0.67279/lib64
# Link to the intel icd file in the expected location:
$ sudo ln /opt/intel/opencl-1.2-3.0.67279/etc/intel64.icd /etc/OpenCL/vendors/intel64.icd
$ sudo ldconfig
- Install Nokia's WebCL extension in FireFox (http://webcl.nokiaresearch.com/extensions/firefox/multiplatform/latest/webcl-1.0.xpi)
- Finally, check that you have WebCL enabled at http://webcl.nokiaresearch.com/