-
Notifications
You must be signed in to change notification settings - Fork 335
Replace asynchronous .requestAdapterInfo() with synchronous .info #4662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add a `[SameObject] readonly attribute GPUAdapterInfo info;` to `GPUAdapter`. - It returns the same JS object every time you access it. - `requestAdapterInfo` still returns a new one each time for minor backward-compatibility reasons. - **HOWEVER** it has been changed to always return an already-resolved promise instead of resolving later. - If the info available to the page changes for some reason (generally shouldn't), the attributes on the `GPUAdapterInfo` object start returning different values (like an empty string gets changed to a non-empty string). Fixes 4536
Whoops, accidentally opened the PR before I finished it. Should be ready now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reflects the decision made on today's call, so LGTM. I have one verbiage nit:
"Info" is an informal abbreviation, which is common to see in code but in the spec prose we should probably spell it out as "information". I do thing that using "adapter info" when talking about the returned object is a reasonable exception, since it directly reflects the name of the returned object.
Looks like this broke or will break https://chat.webllm.ai/, I will mention it to Tianqi Chen who filed another report against WebKit on this |
Chrome is adding a metric to measure usage of requestAdapterInfo() in the wild in preparation for removal. |
That's great, thank you for adding the metrics. |
FYI I'm updating Apache TVM used by WebLLM to use adapter.info in apache/tvm#17051. |
FYI https://chat.webllm.ai/ now uses the GPUAdapter info attribute when available following apache/tvm#17051 |
The GPUAdapter info attribute is now available in Chrome 127.0.6519.0 (Canary 🐤 at the time of writing). See https://chromiumdash.appspot.com/commit/9e908a7dca56215132ec7afc8962b18f993bbd2d |
…hronous GPUAdapter.info field. (gpuweb/gpuweb#4662)
WebGPU is deprecating async adapter.requestAdapterInfo, and replacing it with sync adapter.info. Spec change: gpuweb/gpuweb#4662
WebGPU is deprecating async adapter.requestAdapterInfo, and replacing it with sync adapter.info. Spec change: gpuweb/gpuweb#4662
WebGPU is deprecating async adapter.requestAdapterInfo, and replacing it with sync adapter.info. Spec change: gpuweb/gpuweb#4662
… with synchronous .info Closes denoland#24779 Ref gpuweb/gpuweb#4662
…ync .info (#24783) Closes #24779 Ref gpuweb/gpuweb#4662
@mwyrzykowski Can you affirm that WebGPU will ship in Safari without |
We don’t need a standards position but we do implement Let me check on the status of removing requestAdapterInfo. I don’t think anyone is still depending on that one. It’s not in the specification either, so it would be a website issue if they continue to use it. |
@beaufortfrancois I made the PR to remove it in WebKit now that WebLLM has updated their site - WebKit/WebKit#33333 - in any case we don't intend to support it and would consider it a website issue for using |
Thank you @mwyrzykowski for your responsiveness! |
Spec PR: gpuweb/gpuweb#4662 Intent to deprecate: https://groups.google.com/a/chromium.org/g/blink-dev/c/HxOgGf4NzQ4 Bug: 335383516 Change-Id: Ie396d3d462d07b77aaeb1ffeaca008c701478e5d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578020 Reviewed-by: Corentin Wallez <[email protected]> Reviewed-by: Ari Chivukula <[email protected]> Commit-Queue: Fr <[email protected]> Cr-Commit-Position: refs/heads/main@{#1354048}
This CL removes the GPUAdapter requestAdapterInfo() method by turning off the DeprecatedRequestAdapterInfo blink runtime feature. Once it's stable enough, we'll clean it up entirely. Spec PR: gpuweb/gpuweb#4662 Intent to deprecate: https://groups.google.com/a/chromium.org/g/blink-dev/c/HxOgGf4NzQ4 Bug: 335383516 Change-Id: Ib6b85a9c8d3661992072028e25ba35798e7e6e4d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5569679 Commit-Queue: Fr <[email protected]> Reviewed-by: Richard (Torne) Coles <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Cr-Commit-Position: refs/heads/main@{#1364867}
This CL removes entirely the GPUAdapter requestAdapterInfo() method. Spec PR: gpuweb/gpuweb#4662 Intent to deprecate: https://groups.google.com/a/chromium.org/g/blink-dev/c/HxOgGf4NzQ4 Bug: 335383516 Change-Id: I538d083699d52355336e08fdf85d0f1870efa65c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5853988 Commit-Queue: Fr <[email protected]> Reviewed-by: Alexei Svitkine <[email protected]> Reviewed-by: Corentin Wallez <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Cr-Commit-Position: refs/heads/main@{#1386121}
WebGPU is deprecating async adapter.requestAdapterInfo, and replacing it with sync adapter.info. Spec change: gpuweb/gpuweb#4662
WebGPU is deprecating async adapter.requestAdapterInfo, and replacing it with sync adapter.info. Spec change: gpuweb/gpuweb#4662
Iteration on #4550.
Replaces the GPUAdapter method
Promise<GPUAdapterInfo> requestAdapterInfo();
with a synchronous attribute
[SameObject] readonly attribute GPUAdapterInfo info;
Important points:
requestAdapterInfo()
is removed. Chromium will deprecate and remove it and attempt to get any sites migrated off of it, so hopefully Firefox/Safari won't have to implement it at all (though the implementation is trivial so they may choose to, for compatibility with outdated sites).GPUAdapter
may no longer change. You can only get new info by getting a newGPUAdapter
. (The only reason this should happen is if someone adds a permission prompt for fingerprintability.)Less important points:
GPUAdapterInfo
object perGPUAdapter
object, sinceadapter.info
returns the same object every time you access it.Fixes #4536