gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.16k stars 659 forks source link

Get WebGPU as an alternate backend #507

Open robertleeplummerjr opened 5 years ago

robertleeplummerjr commented 5 years ago

A GIF or MEME to give some spice of the internet

What is wrong?

We need this in GPU.js, possibly as a sub-project: https://github.com/maierfelix/webgpu Once it becomes stable, and well supported and tested, we could possibly make it the default fallback.

Where does it happen?

How do we replicate the issue?

How important is this (1-5)?

4

Expected behavior (i.e. solution)

Other Comments

Awendel commented 2 years ago

Agreed. Should be highest priority right now.

WebGPU API will land in Chrome Stable within the next 8 Weeks.

Once that is the case, it will quickly support > 50% devices.

Demand for stable computing library will be very high. Compute Shaders should outperform the old WebGL texture based approach by a magnitude of 2-3 at least.

I'm afraid there is the chance that if GPU.js doesn't offer a WebGPU backend soonish, another new library might take the place and quickly snatch up developers.

formula1 commented 2 years ago

https://github.com/gpuweb/types

maybe its a good idea to just conform gpu.js to the webgpu standard. This way people can use gpu.js and it should work in gpu, canvas and webgpu.

robertleeplummerjr commented 2 years ago

We would welcome some assistance adding a webgpu backend! Anyone available to help get a POC working?

robertleeplummerjr commented 2 years ago

I'm trying to get a small team together to do a POC with this, fyi.

Awendel commented 2 years ago

Would love to join, unfortunately I am currently in the last weeks before launch, so just too constrained time wise. Perhaps afterwards I might be able to help. For now I can just point to a good resource for getting started with WebGPU compute shaders:

https://surma.dev/things/webgpu/

So far probably the best guide I found around the topic.

Pr0gCat commented 2 years ago

@robertleeplummerjr I saw Dawn from chromium are working on binding for node. See https://dawn.googlesource.com/dawn/+/6f8ff744da8d0d4da5e5bbbafca98cf6b76cf99a/src/dawn/node/

jacobbogers commented 11 months ago

We would welcome some assistance adding a webgpu backend! Anyone available to help get a POC working?

Hiya Robertlee whats the status on this one?

robertleeplummerjr commented 11 months ago

It doesn't exist yet. I'm waiting for it to become stable and safe.

jacobbogers commented 11 months ago

It doesn't exist yet. I'm waiting for it to become stable and safe.

Tensorflow is using it as a backend for some time now, https://github.com/tensorflow/tfjs/tree/master/tfjs-backend-webgpu

jacobbogers commented 11 months ago

Also Deno does webgpu out of the box, (to bad node will be a while before its anything good)