This is really awesome. Tested it on both Nvidia and Mac GPUs. Interested to know how debugging in a real application would work since WASM is pretty hard to debug and GPU code is pretty hard to debug. I assume WASM GPU is ... very difficult to debug.
Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
31–35 of 35 posts
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#32Firefox supports WebGPU, but needs a setting in about:config. I enabled the setting but HipScript still denies running on Firefox with the message: "Please try a Chromium-based browser like Google Chrome or Microsoft Edge." Please do feature detection, not browser detection.
I do do feature detection—WebGPU is blocked on Release Firefox regardless of config, you'll need nightly. It does support Safari with its experimental mode enabled for example.
Edit: on Nightly `navigator.gpu` is available, I checked that in the console.
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#33Firefox supports WebGPU, but needs a setting in about:config. I enabled the setting but HipScript still denies running on Firefox with the message: "Please try a Chromium-based browser like Google Chrome or Microsoft Edge." Please do feature detection, not browser detection.
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#34From the "Learn More" link ( https://lights0123.com/blog/2025/01/07/hip-script/ ): "By chaining chipStar¹ (a HIP and NVIDIA® CUDA® to OpenCL compiler), Clspv² (an OpenCL to Vulkan compiler), and Tint³ (among others, a Vulkan shader to WebGPU shader compiler), you can run CUDA code in the browser!" ¹ https://github.com/CHIP-SPV/chipStar/ ² https://github.com/google/clspv/ ³ https://dawn.googlesource.com/dawn/+/refs/he…