Intent to Ship: WGSL: packed 4x8 integer dot product (DP4)

344 views
Skip to first unread message

Corentin Wallez

unread,
Jan 5, 2024, 8:16:52 AMJan 5
to blink-dev

Contact emails

cwa...@google.com

Explainer

None

Specification

https://gpuweb.github.io/gpuweb/wgsl/#:~:text=packed_4x8_integer_dot_product

Summary

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Adds support new WGSL builtins to work with 4 8-bit numbers packed in a u32. The new dot product functionality is especially useful for executing machine learning models that work on 8-bit weights.



Blink component

Blink>WebGPU

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

DP4 WGSL builtins have not yet been implemented in any browser, but have been approved by the GPU for the Web Community Group, with representatives from Chrome, Firefox, and Safari.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/949)

WebKit: Positive (https://github.com/WebKit/standards-positions/issues/294#issuecomment-1877411933) Note that this is a blanket approval from Safari for addition to the v1 WebGPU/WGSL spec.

Web developers: Positive Multiple ML frameworks are looking to use this (ONNX runtime, TF.js, etc)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None at the moment, WebGPU currently does not ship on Android WebView.



Debuggability

None



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

No

All platforms will eventually have support. Will immediately be available on Android, ChromeOS, Mac, and Windows, since those platforms already support WebGPU. Linux is planned to have WebGPU support in the future, so this feature will become available when WebGPU does.



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

Yes

WebGPU/WGSL have a conformance test suite (https://github.com/gpuweb/cts) that is regularly pulled into Chromium and part of the testing of Dawn/Tint in Chromium. Note that tests are still being written, but the feature will not be launched until it is fully tested.



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

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

Availability expectation

Feature is available only in Chromium browsers for the near future, on the order of months. Other browsers intend to ship WebGPU support, but don't have specified timelines.

Non-OSS dependencies

Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?

No

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6457584892772352

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Jan 10, 2024, 10:37:48 AMJan 10
to blink-dev, Corentin Wallez
LGTM1 (once tests land)

Yoav Weiss

unread,
Jan 10, 2024, 10:39:45 AMJan 10
to blink-dev, Yoav Weiss, Corentin Wallez
Oops! For this intent as well, can you tick the other review boxes in chromestatus?

Chris Harrelson

unread,
Jan 17, 2024, 7:49:29 PMJan 17
to Yoav Weiss, blink-dev, Corentin Wallez
LGTM2 (as noted in the other intent, tests are needed but we aren't blocking approval on them in this case)


--
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/218fe6d2-b667-4210-8320-17b28693eeb0n%40chromium.org.

Mike Taylor

unread,
Jan 17, 2024, 8:26:16 PMJan 17
to Chris Harrelson, Yoav Weiss, blink-dev, Corentin Wallez
Reply all
Reply to author
Forward
0 new messages