GENERAL PURPOSE COMPUTATIONS ON GRAPHICS PROCESSING UNIT (GPGPU) COMPUTATION ROUTINES FOR HIGH-PERFORMANCE DATA VISUALIZATION IN MEDICAL AND OTHER APPLICATIONS
Margaritis, Athanasios (2019)
Margaritis, Athanasios
2019
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2019121727071
https://urn.fi/URN:NBN:fi:amk-2019121727071
Tiivistelmä
Abstract:
Data visualization is an important part of computing that grows both in complexity and computing resources demand. Numerous medical fields require the necessary resources to take advantage of the modern visualization techniques. JavaScript is the most commonly used programming language for web applications that can run in a variety of devices like IoT devices, embedded systems, mobile phones and computers so it is a perfect candidate for use in modern patient-oriented medical solutions for example in visualizing information and patient statistics on Telemedicine applications, making charts for understanding Big Data in epidemiological studies, or in real-time device assisted surgery
Arction Oy's LightningChart JS visualization library is designed to offer an easy but robust visualization solution for JavaScript based applications. But due to the nature of JavaScript, which is inherently single core, an effort to gain multithreaded performance is made by using General Purpose Computations on Graphics Processing Unit (GPGPU) Technologies.
Even though the graphics pipeline has been exposed to JavaScript via the WebGL API since 2011 there has yet to be an official GPGPU solution adopted by the industry. Therefore, several independent solutions have appeared. The first part of this paper focuses on choosing the best solution available right now that offers performance, ease of use, and broad platform support. After reviewing 5 candidates, GPU.js was chosen.
Then gpu.js was used to create a GPGPU acceleration module for LightningChart JS. The Iterative Waterfall model was used throughout the development process. All the routines that were requested to be accelerated by gpu.js were written both for the Central Processing Unit (CPU) and Graphics Processing Unit (GPU) and then thoroughly benchmarked. Numerous optimization techniques were used for writing the GPU accelerated code.
According to the results, on most routines GPU showed a significant overhead over the CPU and the GPU usually overcame the CPU only for computations larger than 1 Million points and higher, but around the 10 Million point mark most browsers run into memory allocation issues thus negating the acceleration. The platform and the code complexity highly affected the result with some browsers performing better than others. Best results were seen when drawing the results directly to the Canvas element, negating a second memory copy back to the CPU.
While this implementation shows great potential, the fact that it is so highly platform dependent passes the burden of GPGPU acceleration choice to the end user who might not be equipped to make such a decision. Nevertheless gpu.js offers great results on server-side data preparation and manipulation.
Future development aspects can include further optimization solutions to make the code more stable and the results more constant between platforms and making sure that the code keeps in pace with the technological advancements like taking advantage of new emerging Graphical Application Programming Interfaces (API’s) and embedded solutions.
Data visualization is an important part of computing that grows both in complexity and computing resources demand. Numerous medical fields require the necessary resources to take advantage of the modern visualization techniques. JavaScript is the most commonly used programming language for web applications that can run in a variety of devices like IoT devices, embedded systems, mobile phones and computers so it is a perfect candidate for use in modern patient-oriented medical solutions for example in visualizing information and patient statistics on Telemedicine applications, making charts for understanding Big Data in epidemiological studies, or in real-time device assisted surgery
Arction Oy's LightningChart JS visualization library is designed to offer an easy but robust visualization solution for JavaScript based applications. But due to the nature of JavaScript, which is inherently single core, an effort to gain multithreaded performance is made by using General Purpose Computations on Graphics Processing Unit (GPGPU) Technologies.
Even though the graphics pipeline has been exposed to JavaScript via the WebGL API since 2011 there has yet to be an official GPGPU solution adopted by the industry. Therefore, several independent solutions have appeared. The first part of this paper focuses on choosing the best solution available right now that offers performance, ease of use, and broad platform support. After reviewing 5 candidates, GPU.js was chosen.
Then gpu.js was used to create a GPGPU acceleration module for LightningChart JS. The Iterative Waterfall model was used throughout the development process. All the routines that were requested to be accelerated by gpu.js were written both for the Central Processing Unit (CPU) and Graphics Processing Unit (GPU) and then thoroughly benchmarked. Numerous optimization techniques were used for writing the GPU accelerated code.
According to the results, on most routines GPU showed a significant overhead over the CPU and the GPU usually overcame the CPU only for computations larger than 1 Million points and higher, but around the 10 Million point mark most browsers run into memory allocation issues thus negating the acceleration. The platform and the code complexity highly affected the result with some browsers performing better than others. Best results were seen when drawing the results directly to the Canvas element, negating a second memory copy back to the CPU.
While this implementation shows great potential, the fact that it is so highly platform dependent passes the burden of GPGPU acceleration choice to the end user who might not be equipped to make such a decision. Nevertheless gpu.js offers great results on server-side data preparation and manipulation.
Future development aspects can include further optimization solutions to make the code more stable and the results more constant between platforms and making sure that the code keeps in pace with the technological advancements like taking advantage of new emerging Graphical Application Programming Interfaces (API’s) and embedded solutions.