Abstract
HTML5 has become very attractive for cross-platform applications on software-side. Likewise, GPU has increased in popularity due to its energy efficiency of parallel execution on hardware-side. JavaScript, which performs dynamic operations of HTML5, is natively slow. To resolve the performance problem, web computing language (WebCL) can be utilized. WebCL operates by adapting open computing language (OpenCL) codes for web execution. Programming of WebCL code can be quite challenging, however, for both OpenCL and web programmers. In this paper, we propose an OpenCL-to-WebCL translator infrastructure, called O2WebCL. O2WebCL consists of a fully automated OpenCL-to-WebCL translator and O2WebCL library. The O2WebCL translator converts OpenCL codes into WebCL codes and O2WebCL application programming interfaces. The O2WebCL library operates as a bridge between the OpenCL and WebCL libraries. We resolved some implementation issues for the bridge such as type conversion and indirect addressing. We evaluated the performance of our work and found that we could achieve, on average, 75 % of the performance of the equivalent OpenCL execution.
This is a preview of subscription content, access via your institution.








References
Worth C, Packard K (2003) Cairo: cross-device rendering for vector graphics. In: Proceedings of the 2003 Linux symposium
Pennington H (1999) GTK+/Gnome application development. New Riders, Indianapolis
Dalheimer M (2002) Programming with QT: writing portable GUI applications on Unix and Win32. O’Reilly Media, Inc., USA
Neuburg M, Hayes S (1999) Real basic: the definitive guide. O’Reilly & Associates, Inc., USA
RAD Studio XE5. Available online http://www.embarcadero.com/products/rad-studio/
Berjon R, Faulkner S, Leithead T, Navara ED, O’Connor E, Pfeiffer S, Hickson I (2013) HTML5: A vocabulary and associated APIs for HTML and XHTML. W3C Candidate Recommendation World Wide Web Consortium, W3C (February 4, 2014)
Martinsen JK, Grahn H (2010) An alternative optimization technique for JavaScript engines. In: Proceedings of the third Swedish workshop on multi-core computing (MCC-10), pp 155–160
Mehrara M, Hsu P-C, Samadi M, Mahlke S (2011) Dynamic parallelization of JavaScript applications using an ultra-lightweight speculation mechanism. In: 2011 IEEE 17th international symposium on high performance computer architecture (HPCA). IEEE, pp 87–98
Fortuna E, Anderson O, Ceze L, Eggers S (2010) A limit study of JavaScript parallelism. In: 2010 IEEE international symposium on workload characterization (IISWC). IEEE, pp 1–10
Khronos OpenCL Working Group (2010) The OpenCL Specification, Version 1.1. Document Revision, 44
Pheatt C (2008) Intel threading building blocks. J Comput Sci Coll 23(4):298–298
CUDA 5. Available online http://developer.nvidia.com/category/zone/cuda-zone/
WebCL-Heterogeneous parallel computing in HTML5 web browsers. Available online http://www.khronos.org/webcl/
Jeon W, Brutch T, Gibbs S (2012) WebCL for hardware-accelerated web applications. In: WWW’12 Dev. Lyon, France
Vaughan-Nichols SJ (2008) The mobile web comes of age. IEEE Comput 41(11):15–17
Nokia WebCL Extension for Firefox. Available online http://webcl.nokiaresearch.com/
FireFox WebCL Branch. Available online http://hg.mozilla.org/projects/webcl/
Node-webcl, an implementation of Khronos WebCL specification using Node.JS. Available online http://github.com/Motorola-Mobility/node-webcl/
V8 JavaScript Engine. Available online http://code.google.com/p/v8/
SpiderMonkey JavaScript Engine. Available online https://developer.mozilla.org/en-US/docs/SpiderMonkey
WebKit: an open source web browser engine. Available online http://www.webkit.org/
Ha J, Haghighat MR, Cong S, McKinley KS (2009) A concurrent trace-based just-in-time compiler for single-threaded JavaScript. PESPMA 2009:47
Lee S-W, Moon S-M (2011) Selective just-in-time compilation for client-side mobile javascript engine. In: Proceedings of the 14th international conference on compilers, architectures and synthesis for embedded systems. ACM, pp 5–14
Martinsen JK, Grahn H (2011) Thread-level speculation as an optimization technique in web applications—initial results. In: 2011 6th IEEE international symposium on industrial embedded systems (SIES). IEEE, pp 83–86
Baskaran MM, Ramanujam J, Sadayappan P (2010) Automatic C-to-CUDA code generation for affine programs. In: Compiler construction. Springer, Berlin, pp 244–263
Lee S, Eigenmann R (2010) OpenMPC: Extended OpenMP programming and tuning for GPUs. In: Proceedings of the 2010 ACM/IEEE international conference for high performance computing, networking, storage and analysis. IEEE Computer Society, pp 1–11
Zakai A (2011) Emscripten: an LLVM-to-JavaScript compiler. In: Proceedings of the ACM international conference companion on object oriented programming systems languages and applications companion. ACM, pp 301–312
Unreal Engine 3. Available online http://www.unrealengine.com/en/news/epic_games_releases_epic_citadel_on_the_web/
Intel HTML5 App Porter Tool-BETA. Available online http://software.intel.com/en-us/html5/articles/technical-reference-intel-html5-app-porter-tool-beta
Terry P (1985) CLANG—a simple teaching language. ACM SIGPLAN Not 20(12):54–63
Typed Array Specification. Available online http://www.khronos.org/registry/typedarray/specs/latest/
Geforce GTX 550. Available online http://www.nvidia.com/object/product-geforcegtx-560ti-gtx-550ti-us.html
Acknowledgments
This work was supported by the Industrial Strategic Technology Development Program (10041664, The Development of Fusion Processor based on Multi-Shader GPU) funded by the Ministry of Trade, Industry and Energy (MI, Korea).
Author information
Authors and Affiliations
Corresponding authors
Rights and permissions
About this article
Cite this article
Cho, M., Han, Y., Kim, M. et al. O2WebCL: an automatic OpenCL-to-WebCL translator for high performance web computing. J Supercomput 71, 2050–2065 (2015). https://doi.org/10.1007/s11227-014-1260-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-014-1260-4
Keywords
- OpenCL
- WebCL
- JavaScript
- OpenCL to WebCL translation