HipScript Allows NVIDIA CUDA & AMD HIP Code To Run Within Web Browsers

Written by Michael Larabel in Programming on 7 January 2025 at 11:10 AM EST. 7 Comments
PROGRAMMING
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 diagram from project


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.

HipScript online demo


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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week