COMP3932 Synoptic Project EPA Presentation
High Fidelity Graphics: Nanite main example, also point clouds. I.e. scientific visualisation --- Operate differently to CPUs Many threads execute the same program in parallel, sharing some work between them notes: There may be 256 or more threads in a workgroup --- Because of the unique execution model, programs do not use the usual programming languages These GPU programs are called compute shaders notes: My project aimed to make these easier to develop
Previous attempts to bring compute to browsers didn't get agreement, especially from Apple --- Strong potential to be best portable GPU compute platforn notes: Existing options include OpenCL, and CUDA.
OpenCL is no longer supported by Apple, and can be challenging to install.
CUDA programs only execute on NVIDIA GPUs, which increases costs.
Native programs can use implementations too, especially the wgpu library --- ## Advantages Support running workloads on the user's device more efficiently than on CPUs - Reduces costs - Limits data protection risk - May reduce latencies notes: API only recently available, so use cases still being explored --- ## Projects - Wonnx, a machine learning (inference) run-time - Vello, a high performance 2d graphics renderer
Implementations include templates (as in C++) and other systems of type parameters. --- ## Modularity To apply prefix sum to larger datasets, a multi-dispatch algorithm is used Image: [NVIDIA GPUGems](https://developer.nvidia.com/gpugems/gpugems3/part-vi-gpu-computing/chapter-39-parallel-prefix-sum-scan-cuda) notes: Each layer of the diagram is a different dispatch, each requiring their own shader
However, these shaders each reuse the same prefix sum code
Without modularity, the implementation of the base prefix sum would need to be included directly within each of these shaders, increasing the likelihood of mistakes --- ## Applicability Parallel scan is prefix sum with an arbitrary operation and data type Image: [Scott Pakin on Wikipedia](https://en.wikipedia.org/wiki/Prefix_sum#/media/File:Hillis-Steele_Prefix_Sum.svg) notes: This can be used for string comparison, stream compaction and sorting
However, the version shown in the diagram only supports prefix sum --- WGSL Shader modules only consist of a single string Functions can only have a single signature notes: WGSL is the shader language of WebGPU
This string is generally in a file. Single string - no modularity
Single signature means no applicability --- Existing solutions based on string manipulation This is fragile, and does not easily support applicability notes: Project explores a potential solution