Discussion of webgpu.io vs NPM''s webgpu package for NodeJS

49 views
Skip to first unread message

Dominic Cerisano

unread,
Jan 9, 2020, 10:47:59 PM1/9/20
to Dawn Graphics
Noticed an update to NPM's  webgpu package was posted a few hours ago and the downloads are really spiking.
Pardon my enthusiasm, this is a lot of progress to absorb so suddenly, on top of the recent appearance of webgpu.io in Chrome Canary for Windows.

Is this a good place to start a discussion to track compatibility of webgpu.io for browsers with webgpu for NodeJS?
Where would issues between the two be tracked?

Kai Ninomiya

unread,
Jan 9, 2020, 11:31:14 PM1/9/20
to Dominic Cerisano, Dawn Graphics, xile...@gmail.com
WebGPU for Node is not "first-party" right now - it's in development by Felix Maier (CC'd), who isn't a browser developer and isn't actively participating in the specification of WebGPU.
That said, we absolutely want to see WebGPU support to be first-class in Node.

Probably the best place to discuss it for now would be on Felix's GitHub repository.
But please feel free to loop Dawn developers into those discussions at any time - we are eager to support the project.

One important direction for compatibility with browser-WebGPU would be to get the WebGPU conformance test suite running in Node.
I designed it from the ground-up to be able to run in Node - in fact, you can already run it today with no WebGPU implementation (it will fail all of the tests):

- clone and build cts
- npx ./tools/run cts:

A small update, mainly to this one file, is likely to be enough to get it running on Felix's implementation.

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/ccb24156-7ade-471c-9fe0-cb9efa103aff%40googlegroups.com.

Dominic Cerisano

unread,
Jan 10, 2020, 3:58:56 AM1/10/20
to Kai Ninomiya, Dawn Graphics, xile...@gmail.com
Hi all,

I was going to do this before the holidays, but happily I was delayed and now have encountered Kia who has kindly introduced me to Felix. Grüß Gott, Herr Maier!

Nice to finally get on to these projects, I have some current interest in GPU compute and am looking at WebGPU to hopefully spare me from re-inventing the wheel.
Would like to get a rough idea of what it would take to get the Linux version of Felix's npm webgpu package built.

My current understanding is that Dawn for Vulkan for Linux is stable, and that the npm webgpu package is just a set of native bindings (N-API binary) soo ... pretty straightforward?
I would of course publish back the results of Kia's CTS (also seems pretty clear how to do that).

Happy 2020, if it is not too late already to say so.

Dominic Cerisano

dcerisano@skype

NOTICE: Confidential message which may be privileged. Unauthorized use/disclosure prohibited. 
AVIS : Message confidentiel dont le contenu peut être privilégié. Utilisation/divulgation interdites sans permission. 

Felix Maier

unread,
Jan 10, 2020, 5:09:46 AM1/10/20
to Dawn Graphics
Hey everyone (und Moin Dominic),

The WebGPU Node project is indeed just bindings to Dawn, things only got messy at the conversions from Javascript Objects to native Dawn structs (see this file).

I currently get sponsored to work on a Ray-Tracing extension, so that's my top priority at the moment. Though getting the CTS running in the node bindings would be a big favor, if you need any help on that, just let me know.
Also next week, I'm targeted anyway at trying to build for Linux and Mac - I don't see any problems yet about a Linux build.

One general problem I currently see though is that I'm currently using a Dawn fork extended with the Ray-Tracing stuff, I'm not sure on how we should proceed with this kind of.. mixture - ?

P.S - I've added a Todo section to the node bindings readme

Dominic Cerisano

unread,
Jan 10, 2020, 6:37:02 AM1/10/20
to Felix Maier, Dawn Graphics
Why don't I have a look at just building the linux version of webgpu for node against the Dawn head?
I could pull any of Felix's changes required, and try to pass CTS. Then he should be in good shape for OSX next week.

All good?

Dominic Cerisano

dcerisano@skype

NOTICE: Confidential message which may be privileged. Unauthorized use/disclosure prohibited. 
AVIS : Message confidentiel dont le contenu peut être privilégié. Utilisation/divulgation interdites sans permission. 

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.

Corentin Wallez

unread,
Jan 14, 2020, 9:50:40 AM1/14/20
to Felix Maier, Dawn Graphics
Hey Felix,

On Fri, Jan 10, 2020 at 11:09 AM Felix Maier <xile...@gmail.com> wrote:
Hey everyone (und Moin Dominic),

The WebGPU Node project is indeed just bindings to Dawn, things only got messy at the conversions from Javascript Objects to native Dawn structs (see this file).

Blink uses a fancy code generator for conversions and I see you've done mostly the same. There's a LOT of code to write for JS conversion :/
 
I currently get sponsored to work on a Ray-Tracing extension, so that's my top priority at the moment. Though getting the CTS running in the node bindings would be a big favor, if you need any help on that, just let me know.
Also next week, I'm targeted anyway at trying to build for Linux and Mac - I don't see any problems yet about a Linux build.
 
One general problem I currently see though is that I'm currently using a Dawn fork extended with the Ray-Tracing stuff, I'm not sure on how we should proceed with this kind of.. mixture - ?

That's pretty cool and I'd love to learn more about the interest for WebGPU + RayTracing. The RT diff seems pretty big and I'm worried that integrating it in Dawn would add a lot of friction, also we can't support RT in CI or on all platforms and the code would rote. The best way in the medium term is to keep it as a separate fork of Dawn that exposes a raytracing extension. The node bindings could check for that extension and only expose the function if it is present (and requested). Longer term, if/when RT matures in native, we could make a WebGPU extension and upstream / modify the code.

BTW the prototype node + RT Dawn is pretty cool, it will come extremely handy when WebGPU looks at RT, and will help people get started with RT without the need for Vulkan insanity :)

Also we're hanging out in the #WebGPU:matrix.org Matrix room with folks from both Dawn and wgpu-rs if you'd like to be able to instant message.

Cheers,

Corentin

P.S - I've added a Todo section to the node bindings readme

On Friday, 10 January 2020 04:47:59 UTC+1, Dominic Cerisano wrote:
Noticed an update to NPM's  webgpu package was posted a few hours ago and the downloads are really spiking.
Pardon my enthusiasm, this is a lot of progress to absorb so suddenly, on top of the recent appearance of webgpu.io in Chrome Canary for Windows.

Is this a good place to start a discussion to track compatibility of webgpu.io for browsers with webgpu for NodeJS?
Where would issues between the two be tracked?

Reply all
Reply to author
Forward
0 new messages