Towards Leveraging WebGPU for Browser-Based Computation Offloading in Volunteer ComputingBachelor Thesis
10 June 2024, by Tim Keminer

Photo: mistral
This thesis assesses WebGPU’s suitability for machine learning and compares it to other execution methods. This is done in the form of TensorFlow.js backends. Furthermore, a browser-based volunteer computing system for TensorFlow.js model inferences is set
up and evaluated. The first part of the evaluation is done by comparing execution times on different backends. Those backends are the CPU, WASM, WebGL and WebGPU backends. The second part of the evaluation assesses the effectiveness of the system’s scheduling algorithm in distributing inferences to the providers. The result was that the WebGPU backend mostly performed worse than the WebGL and WASM backends. The only areas in which it showed improvements over the WebGL backend were the creation of a tensor from an array and the median time of fetching data from the GPU’s memory. As for the second part of the evaluation, the scheduling was relatively effective after the weights for the provider had adapted but relatively ineffective before that. The implications of the evaluation are as follows. With the current state of WebGPU, WebGL seems like the better alternative for machine learning model inferences. The other implication is that a volunteer computing system or a system of end-user devices can be a viable option to speed up the execution of inference batches when no server architecture is available or in some other cases in which executing the computations at the edge is faster.
Supervised by:
Prof. Dr. Janick Edinger, Anton Semjonov