Live data from Hacker News

Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

hipscript.lights0123.com

21–30 of 35 posts

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#21
post #16

I love the idea of this, but sadly I can't get it to work in Firefox, Chrome or Edge on my work pc, probably because I can't find "--enable-features=Vulkan" equivalent in the about:flags and the argument doesn't appear to work on windows. I'm actually a bit more curious about a standalone application that skips the webgpu part and goes straight to Vulkan as I would love to be able to experiment with some Cuda only ap…

I got a `Uncaught (in promise) TypeError: WebAssembly compilation aborted: Network error: Response body loading was aborted` error the first time, but after a reload it worked.

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#24

Earlier quoted context omitted.

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.

I enabled WebGPU in safari on my m1 Mac and got this error when running the GoL demo: ``` TypeError: B.values().some is not a function. (In 'B.values().some(r=>r.args.length)', 'B.values().some' is undefined) ``` EDIT: I got the same error with all three sample scripts

I believe I just fixed this—JavaScriptCore doesn't have support for a recently-introduced function.

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#25
Sounds interesting! I love all these edge experiments. But as long as there is architecture dependent code for models, I feel these edge experiments can't fully express their strong suit.

You try to run something and Voila you need Ampere or Hopper or Laplace for flash attnt.

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#26
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.

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#27

Earlier quoted context omitted.

I enabled WebGPU in safari on my m1 Mac and got this error when running the GoL demo: ``` TypeError: B.values().some is not a function. (In 'B.values().some(r=>r.args.length)', 'B.values().some' is undefined) ``` EDIT: I got the same error with all three sample scripts

I believe I just fixed this—JavaScriptCore doesn't have support for a recently-introduced function.

I can confirm it is working for me now, thanks!

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#29
post #9

How performant is the CUDA code in browser compared to standalone program? Could we have PyTorch / ML training with CUDA through the browser performing ok?

WebGPU don't have access to most accelerators in GPU so it would be super slow compared to CUDNN version but pure CUDA would be only x times times faster.

Re: Show HN: HipScript – Run CUDA in the browser with WebAssembly and WebGPU

#30
post #9

How performant is the CUDA code in browser compared to standalone program? Could we have PyTorch / ML training with CUDA through the browser performing ok?

Well the bigger issue is that even natively I doubt there is enough performance to train anything interesting.
Post reply on HN