Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
hipscript.lights0123.com
Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
1–10 of 35 posts
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#2"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/heads/main/src/tin...
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#3Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#4Please do feature detection, not browser detection.
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#5Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#6When I looked at the profiler, I was confused to see that one worker thread was at 100% usage the whole time it was running. At first, I thought that maybe it was actually running the code via Wasm on the CPU rather than on the GPU like it said.
Instead, it turns out that the worker was just running `emscripten_futex_wait` - which as far as I can tell is implemented by busy waiting in a loop. Probably doesn't matter for performance since I imagine that's just for the sleep call anyway.
----
Altogether this is an incredibly cool tool. I'm sure there is some performance gap compared to native, but even so this is a extremely impressive and likely has a ton of potential use cases.
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#7What an incredible demo/hack. This is actually the simplest way to actually execute CUDA code that I've seen.
Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#8Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU
#9Could we have PyTorch / ML training with CUDA through the browser performing ok?