Intent to Experiment: WebGPU

916 views
Skip to first unread message

Corentin Wallez

unread,
May 4, 2021, 2:53:34 PM5/4/21
to blin...@chromium.org

Contact emails

cwa...@chromium.orgbcla...@google.comdx...@chromium.org

Explainer

None

Specification

https://gpuweb.github.io/gpuweb/

API spec

Yes

Design docs


https://gpuweb.github.io/gpuweb/
https://gpuweb.github.io/gpuweb/wgsl/
https://gpuweb.github.io/gpuweb/explainer/

Summary

The WebGPU API is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It will provide modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is being developed by the “GPU for the Web” W3C community group.



Blink component

Blink>WebGPU

Search tags

gpuwebgl

TAG review

https://github.com/w3ctag/design-reviews/issues/626

TAG review status

Pending

Risks



Interoperability and Compatibility

With positive signals (and at least WIP implementations) from all browsers, the biggest interoperability risk is the surface of the API which is quite large.



Gecko: In development (https://hg.mozilla.org/mozilla-central/file/tip/dom/webgpu)

WebKit: In development (https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Modules/webgpu)

Web developers: Strongly positive (https://doc.babylonjs.com/extensions/webgpu) Significant interest and positive feedback from the many early adopters (Babylon.js, Earth, TF.js, sokol-gfx, and many many others).

Activation

WebGPU is not polyfillable on existing APIs and requires hardware support on the system. (software fallback is not implemented yet).



Security

See detailed security explainer: https://gpuweb.github.io/gpuweb/#malicious-use



Goals for experimentation

Allow developers to use WebGPU and provide feedback on the API or the shading language. We expect feedback about ergonomics, ease of use and easy of porting existing content to WebGPU, and missing features. As well as many bug reports :)


Also help partners evaluate the performance of WebGPU in the wild to figure out areas of the implementation to optimize before launch.


Ongoing technical constraints

None

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

This feature will not be available in Origin Trial on: - Android because adding Android support is a lot of engineering that we're scheduling to happen between the Origin Trial and the shipment of WebGPU. - Windows 7 and 8 since they don't have D3D12. Support will be extended to these versions of Windows after the first version of WebGPU is shipped. - Other devices that don't support D3D12/Metal/Vulkan or don't have a GPU with good enough minimum specifications.(maybe) - ARM devices if we don't find time to test on ARM platforms before the Origin Trial starts. The goal is that WebGPU will eventually be supported in hardware on the vast majority of systems on all Blink OSes and have software fallback on the others.



Is this feature fully tested by web-platform-tests?

Yes

DevTrial instructions

https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#chromium-chrome-edge-etc

Flag name

--enable-unsafe-webgpu

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1156646

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1156661

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6213121689518080

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/dxqWTSvyhDg/1UDaFD17AQAJ

Yoav Weiss

unread,
May 5, 2021, 3:24:38 AM5/5/21
to Corentin Wallez, blink-dev
What are the timelines for the Origin Trial? Do you have partners lined up to experiment with the API?

On Tue, May 4, 2021 at 8:53 PM Corentin Wallez <cwa...@chromium.org> wrote:

https://gpuweb.github.io/gpuweb/explainer/ seems like a better answer here :)
 



Specification

https://gpuweb.github.io/gpuweb/

API spec

Yes

Design docs


https://gpuweb.github.io/gpuweb/
https://gpuweb.github.io/gpuweb/wgsl/
https://gpuweb.github.io/gpuweb/explainer/

Summary

The WebGPU API is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It will provide modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is being developed by the “GPU for the Web” W3C community group.



Blink component

Blink>WebGPU

Search tags

gpuwebgl

TAG review

https://github.com/w3ctag/design-reviews/issues/626


I found https://gpuweb.github.io/gpuweb/explainer/#error-monad-mental-model somewhat curious. Might be worthwhile to highlight that as part of the TAG review, as well as test out the ergonomics during the OT.
 



TAG review status

Pending

Risks



Interoperability and Compatibility

With positive signals (and at least WIP implementations) from all browsers, the biggest interoperability risk is the surface of the API which is quite large.



Gecko: In development (https://hg.mozilla.org/mozilla-central/file/tip/dom/webgpu)

WebKit: In development (https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Modules/webgpu)

Typically we ask for bit.ly/blink-signals, but I tend to agree that the above shows a high-level of engagement and doesn't require extra requests for position.
 

Web developers: Strongly positive (https://doc.babylonjs.com/extensions/webgpu) Significant interest and positive feedback from the many early adopters (Babylon.js, Earth, TF.js, sokol-gfx, and many many others).

Activation

WebGPU is not polyfillable on existing APIs and requires hardware support on the system. (software fallback is not implemented yet).



Security

See detailed security explainer: https://gpuweb.github.io/gpuweb/#malicious-use



Goals for experimentation

Allow developers to use WebGPU and provide feedback on the API or the shading language. We expect feedback about ergonomics, ease of use and easy of porting existing content to WebGPU, and missing features. As well as many bug reports :)


Also help partners evaluate the performance of WebGPU in the wild to figure out areas of the implementation to optimize before launch.


Ongoing technical constraints

None

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No

This feature will not be available in Origin Trial on: - Android because adding Android support is a lot of engineering that we're scheduling to happen between the Origin Trial and the shipment of WebGPU. - Windows 7 and 8 since they don't have D3D12. Support will be extended to these versions of Windows after the first version of WebGPU is shipped. - Other devices that don't support D3D12/Metal/Vulkan or don't have a GPU with good enough minimum specifications.(maybe) - ARM devices if we don't find time to test on ARM platforms before the Origin Trial starts. The goal is that WebGPU will eventually be supported in hardware on the vast majority of systems on all Blink OSes and have software fallback on the others.



Is this feature fully tested by web-platform-tests?

Yes


Can you link to the test suite?
Do the other implementations agree with ours on the testing front? 

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGdfWNPSQ1zn11muQUp%2Bx5PtoONfpqHpaDWn5f7Q62Ly4sSc%3Dg%40mail.gmail.com.

Corentin Wallez

unread,
May 5, 2021, 7:31:34 AM5/5/21
to Yoav Weiss, blink-dev
Hey Yoav, thanks for the review!

On Wed, May 5, 2021 at 9:24 AM Yoav Weiss <yoav...@chromium.org> wrote:
What are the timelines for the Origin Trial? Do you have partners lined up to experiment with the API?

The timeline is to start the OT in M94 until M97 (or a later milestone if the guideline of "three milestones" changes with the faster release cadence). We have some internal partners lined up but I don't know if they are ready to share their commitment yet. I believe Microsoft also has some internal partners too.
 
On Tue, May 4, 2021 at 8:53 PM Corentin Wallez <cwa...@chromium.org> wrote:

https://gpuweb.github.io/gpuweb/explainer/ seems like a better answer here :)
 
Thanks for noting this! It was the first time I used chromestatus.com and I'm having some difficulties filing out everything. (and forgot to proofread that part).
 



Specification

https://gpuweb.github.io/gpuweb/

API spec

Yes

Design docs


https://gpuweb.github.io/gpuweb/
https://gpuweb.github.io/gpuweb/wgsl/
https://gpuweb.github.io/gpuweb/explainer/

Summary

The WebGPU API is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It will provide modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is being developed by the “GPU for the Web” W3C community group.



Blink component

Blink>WebGPU

Search tags

gpuwebgl

TAG review

https://github.com/w3ctag/design-reviews/issues/626


I found https://gpuweb.github.io/gpuweb/explainer/#error-monad-mental-model somewhat curious. Might be worthwhile to highlight that as part of the TAG review, as well as test out the ergonomics during the OT.
 
Sounds good, I'll add a comment on the TAG review for things that are most atypical in WebGPU and could use a more careful review.
The test suite is developed at https://github.com/gpuweb/cts and can be embedded in WPT.

I'm not aware of other implementations using it yet (partly because the WebIDL for WebGPU was still evolving so it only worked on one implementation at a time), though some node.js WebGPU bindings used it in the past. That test suite was mentioned dozens of times in the WebGPU calls and mailing lists and there haven't been any concerns raised.

Yoav Weiss

unread,
May 5, 2021, 8:25:53 AM5/5/21
to Corentin Wallez, blink-dev
LGTM to experiment M94-M97

On Wed, May 5, 2021 at 1:31 PM Corentin Wallez <cwa...@chromium.org> wrote:
Hey Yoav, thanks for the review!

On Wed, May 5, 2021 at 9:24 AM Yoav Weiss <yoav...@chromium.org> wrote:
What are the timelines for the Origin Trial? Do you have partners lined up to experiment with the API?

The timeline is to start the OT in M94 until M97 (or a later milestone if the guideline of "three milestones" changes with the faster release cadence). We have some internal partners lined up but I don't know if they are ready to share their commitment yet. I believe Microsoft also has some internal partners too.
 
On Tue, May 4, 2021 at 8:53 PM Corentin Wallez <cwa...@chromium.org> wrote:

https://gpuweb.github.io/gpuweb/explainer/ seems like a better answer here :)
 
Thanks for noting this! It was the first time I used chromestatus.com and I'm having some difficulties filing out everything. (and forgot to proofread that part).

No worries! :) The explainer is great! Might be worthwhile to bump up the JS API part (maybe above the Privacy questionnaire part, to give folks a feeling of how the API is used before diving into the privacy and security details) 
Non-blocking, but would be nice to talk to the wpt.fyi folks and see if it can be integrated there, once the API shape is stable enough.

Corentin Wallez

unread,
May 5, 2021, 10:30:34 AM5/5/21
to Yoav Weiss, blink-dev
On Wed, May 5, 2021 at 2:25 PM Yoav Weiss <yoav...@chromium.org> wrote:
LGTM to experiment M94-M97

Thank you!
 
On Wed, May 5, 2021 at 1:31 PM Corentin Wallez <cwa...@chromium.org> wrote:
Hey Yoav, thanks for the review!

On Wed, May 5, 2021 at 9:24 AM Yoav Weiss <yoav...@chromium.org> wrote:
What are the timelines for the Origin Trial? Do you have partners lined up to experiment with the API?

The timeline is to start the OT in M94 until M97 (or a later milestone if the guideline of "three milestones" changes with the faster release cadence). We have some internal partners lined up but I don't know if they are ready to share their commitment yet. I believe Microsoft also has some internal partners too.
 
On Tue, May 4, 2021 at 8:53 PM Corentin Wallez <cwa...@chromium.org> wrote:

https://gpuweb.github.io/gpuweb/explainer/ seems like a better answer here :)
 
Thanks for noting this! It was the first time I used chromestatus.com and I'm having some difficulties filing out everything. (and forgot to proofread that part).

No worries! :) The explainer is great! Might be worthwhile to bump up the JS API part (maybe above the Privacy questionnaire part, to give folks a feeling of how the API is used before diving into the privacy and security details) 

Sounds good, I'll make a PR to change the order.
Good idea, I filed an issue to investigate integrating in wpt.fyi.
Reply all
Reply to author
Forward
0 new messages