HipScript is a new open-source project that allows for compiling and running AMD HIP and NVIDIA CUDA code within web browsers by leveraging WebAssembly and WebGPU.
For those wanting to execute NVIDIA CUDA and/or AMD HIP codebases within the web browser, HipScript leverages other open-source projects for providing a path to compiling and executing the codes using the WebAssembly (WASM) and WebGPU standards.
HipScript leverages the chipStar compiler for taking those AMD HIP / NVIDIA CUDA code and compiling to OpenCL. Then comes clspv for compiling OpenCL to SPIR-V/Vulkan followed by Tint as a Vulkan shader to WebGPU shader compiler. In the end the NVIDIA / HIP kernels ultimately ends up within WebAssembly for running in modern browsers like Google Chrome when launched with WebGPU and Vulkan support enabled.
HipScript is capable of running basic kernels with full C++ support, handle static and dynamic shared memory, and support other “very basic” subset features of HIP and CUDA.
Those wishing to learn more about HipScript can see this blog post by Ben Schattinger announcing the effort. There is also this online demo page for trying out HipScript within your supported web browser. The code is available on GitHub.