Intent to Deprecate and Remove: Remove non-standard GPUAdapter requestAdapterInfo() method

431 views
Skip to first unread message

François Beaufort

unread,
Sep 9, 2024, 10:39:02 AMSep 9
to blink-dev

Contact emails

fbea...@google.com

Explainer

None

Specification

https://gpuweb.github.io/gpuweb/#dom-gpuadapter-info

Summary

The WebGPU WG decided it was impractical for requestAdapterInfo() to trigger a permission prompt so they’ve removed that option and replaced it with the GPUAdapter info attribute so that web developers can get the same GPUAdapterInfo value synchronously this time. See the previous intent to ship at https://groups.google.com/a/chromium.org/g/blink-dev/c/eZqMmX7q_bA/m/euMLVMpxAgAJ



Blink component

Blink>WebGPU

Motivation

The requestAdapterInfo() asynchronous method in WebGPU is redundant because developers can already get GPUAdapterInfo synchronously using the GPUAdapter info attribute. Hence, it should be removed.

A search for the string "requestAdapterInfo" in HTTPArchive yielded no results.

According to https://chromestatus.com/metrics/feature/timeline/popularity/4977, the requestAdapterInfo() method accounted for approximately 0.41% of page loads in September 2024.

Chrome UKMs helped us in identifying the most popular websites using the WebGPU requestAdapterInfo() method: - Twitch: The team has been contacted and has indicated that they will update their code. - Dynatrace: Used by the vast majority of those websites for analytics, they have been made aware of this deprecation.



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

When WebGPU eventually launches in Safari and Firefox, websites will be able to get GPUAdapterInfo values exclusively through the standardized GPUAdapter info attribute. We anticipate Safari and Firefox will soon support WebGPU, but won't include this non-standard method. Therefore, the sooner Chromium implements the Deprecate and Remove process, the less likely it is that content will work in Chromium but not in other browsers. In Chromium-based browsers, as the requestAdapterInfo() asynchronous method returned a promise, websites that followed best practices were already catching rejected promises. Web developers have been made aware of this change in July 2024 at https://developer.chrome.com/blog/new-in-webgpu-127?hl=en#gpuadapter_info_attribute. They can use the following one-line code during the transition period: const info = adapter.info || await adapter.requestAdapterInfo();



Gecko: No signal

WebKit: No signal

Web developers: No signals

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



Debuggability

None



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

No

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5140787340509184?gate=5110989125844992

This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Sep 9, 2024, 11:40:05 AMSep 9
to François Beaufort, blink-dev
I know that WebKit !== Safari, but I do see they have requestAdapterInfo today. Do we have any sense of what their plans are there (maybe a standards position could clarify that)?


Gecko: No signal

WebKit: No signal

Web developers: No signals

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



Debuggability

None



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

No

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5140787340509184?gate=5110989125844992

This intent message was generated by Chrome Platform Status.
--
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/CAPpwU5KohE-NU%2B0bAsWzgaNLUCPGCqBr%2BH3jpoY58yGK-frwOg%40mail.gmail.com.

François Beaufort

unread,
Sep 9, 2024, 11:46:00 AMSep 9
to Mike Taylor, blink-dev
As you can see in https://github.com/gpuweb/gpuweb/pull/4662#issuecomment-2141279713, they re-added temporarily requestAdapterInfo() at the time to avoid breaking websites that didn't make the move yet.
FYI, I've updated Apache TVM used by WebLLM to use adapter.info in apache/tvm#17051.

Mike Taylor

unread,
Sep 9, 2024, 11:48:05 AMSep 9
to François Beaufort, blink-dev
Cool - does that mean WebKit is willing to remove it now (or shortly after we do)?

François Beaufort

unread,
Sep 9, 2024, 11:49:18 AMSep 9
to Mike Taylor, blink-dev
I believe they do but I'll let them respond to that: https://github.com/gpuweb/gpuweb/pull/4662#issuecomment-2338474559 

François Beaufort

unread,
Sep 10, 2024, 2:55:36 AMSep 10
to Mike Taylor, blink-dev
https://github.com/gpuweb/gpuweb/pull/4662#issuecomment-2338982367 indicates they have just removed it in WebKit as expected.

Yoav Weiss (@Shopify)

unread,
Sep 10, 2024, 6:29:16 AMSep 10
to blink-dev, François Beaufort, blink-dev, Mike Taylor
LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Yoav Weiss (@Shopify)

unread,
Sep 10, 2024, 6:32:27 AMSep 10
to blink-dev, Yoav Weiss, François Beaufort, blink-dev, Mike Taylor
Wait, I was a bit quick on that LGTM (excited about the removal in WebKit, I guess).
You're saying that our latest data is that this API is used in 0.41% of requests. What happens to that usage (which seems concentrated to a few 3P scripts) when the API is removed? What does breakage in practice look like?

François Beaufort

unread,
Sep 10, 2024, 8:01:21 AMSep 10
to Yoav Weiss (@Shopify), blink-dev, Mike Taylor
I've checked with a Chromium build that removes the requestAdapterInfo() method and the websites I've tried are not broken.
The content of the string sent for analytics is simply different but the POST request still happens properly.

LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Yoav Weiss (@Shopify)

unread,
Sep 10, 2024, 8:09:49 AMSep 10
to François Beaufort, blink-dev, Mike Taylor
OK, LGTM1 then :D

Mike Taylor

unread,
Sep 10, 2024, 11:05:28 AMSep 10
to Yoav Weiss (@Shopify), François Beaufort, blink-dev

LGTM2 % requesting review bits for Enterprise, Debuggability, and Testing.

Sites could fail if they're still calling this, but I trust the team to handle outreach (as they've already done) and react accordingly.

Daniel Bratell

unread,
Sep 11, 2024, 10:56:22 AMSep 11
to Yoav Weiss (@Shopify), François Beaufort, blink-dev, Mike Taylor
It's a bit scary, but given the analysis, the risk seems contained. You listed None as Finch flag though. I think it's policy, and prudent, to make changes like this protected by a flag so that it can be undone if we're wrong.

/Daniel

François Beaufort

unread,
Sep 11, 2024, 11:04:22 AMSep 11
to Daniel Bratell, Yoav Weiss (@Shopify), blink-dev, Mike Taylor
Good point Daniel! I'll go update the chrome status entry.
Here's how we'll proceed:
1. We'll deprecate the method with `DeprecateAs` in the IDL file
2. Then we'll add a blink runtime feature off by default that hides the method with `RuntimeEnabled` to remove it
3. And finally we can remove it completely in the IDL file.

Alex Russell

unread,
Sep 11, 2024, 11:58:43 AMSep 11
to blink-dev, fbea...@google.com, Yoav Weiss, blink-dev, Mike Taylor, Daniel Bratell
LGTM3

OK, LGTM1 then :D

LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
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+unsubscribe@chromium.org.

Daniel Bratell

unread,
Sep 11, 2024, 12:03:48 PMSep 11
to Alex Russell, blink-dev, fbea...@google.com, Yoav Weiss, Mike Taylor

Bonus LGTM4

/Daniel

Reply all
Reply to author
Forward
0 new messages