Live data from Hacker News

WebGPU – All of the cores, none of the canvas

surma.dev

1–10 of 137 posts

Re: WebGPU – All of the cores, none of the canvas

#2
Question for someone with gpu programming experience: is it feasible to analyze time series data (eg.: run a trading algorithm through a series of stock prices) in parallel (with the algorithms receiving different parameters in each core)?

If not then what is the limiting factor?

Re: WebGPU – All of the cores, none of the canvas

#3

Question for someone with gpu programming experience: is it feasible to analyze time series data (eg.: run a trading algorithm through a series of stock prices) in parallel (with the algorithms receiving different parameters in each core)? If not then what is the limiting factor?

Probably possible, but you would really need some more concrete information.

For some easy experimentation with GPUs I would advise looking at Futhark. It's super easy to setup and get started.

https://futhark-lang.org/

Re: WebGPU – All of the cores, none of the canvas

#4

Question for someone with gpu programming experience: is it feasible to analyze time series data (eg.: run a trading algorithm through a series of stock prices) in parallel (with the algorithms receiving different parameters in each core)? If not then what is the limiting factor?

This depends on the algorithm. If it has lots of branching and control flow, then it's unlikely to run well. If it's based on something like FFT or any sort of linear algebra really, then it should run really well.

WebGPU is accessible enough maybe you should try it! You'll learn a lot either way, and it can be fun.

Re: WebGPU – All of the cores, none of the canvas

#5

Question for someone with gpu programming experience: is it feasible to analyze time series data (eg.: run a trading algorithm through a series of stock prices) in parallel (with the algorithms receiving different parameters in each core)? If not then what is the limiting factor?

This depends on the algorithm. If it has lots of branching and control flow, then it's unlikely to run well. If it's based on something like FFT or any sort of linear algebra really, then it should run really well. WebGPU is accessible enough maybe you should try it! You'll learn a lot either way, and it can be fun.

Isn't there something like SciPy which you can run on WebGPU?

Re: WebGPU – All of the cores, none of the canvas

#6
post #5

Earlier quoted context omitted.

This depends on the algorithm. If it has lots of branching and control flow, then it's unlikely to run well. If it's based on something like FFT or any sort of linear algebra really, then it should run really well. WebGPU is accessible enough maybe you should try it! You'll learn a lot either way, and it can be fun.

Isn't there something like SciPy which you can run on WebGPU?

At this point, there are very few tools actually running on WebGPU, as it's too new. One to watch for sure is IREE, which has a WebGPU backend planned and in the works.

Re: WebGPU – All of the cores, none of the canvas

#7
Is this API going to have a permissions lock, like access to the video camera or microphone APIs do?

If it doesn't, I'm not looking forward to the future where every website I visit tries to pull a big chunk of my graphics card to mine cryptocurrencies without my explicit authorization.

Re: WebGPU – All of the cores, none of the canvas

#8

Is this API going to have a permissions lock, like access to the video camera or microphone APIs do? If it doesn't, I'm not looking forward to the future where every website I visit tries to pull a big chunk of my graphics card to mine cryptocurrencies without my explicit authorization.

It's already the case. Any web page can use WebGL1/2 for general computation. As the author said:

> Using GPUs for calculations of any kind is often called General-Purpose GPU or GPGPU, and WebGL 1 is not great at this. If you wanted to process arbitrary data on the GPU, you have to encode it as a texture, decode it in a shader, do your calculations and then re-encode the result as a texture. WebGL 2 made this a lot easier with Transform Feedback

Post reply on HN