fbea...@google.com, cwa...@google.com
https://github.com/gpuweb/gpuweb/issues/614
https://gpuweb.github.io/gpuweb/#timestamp
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:
- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
WebGPU spec: https://github.com/w3ctag/design-reviews/issues/626
A new TAG review was not requested because timestamp queries were already part of the original one for the WebGPU spec and was approved.
Timestamp queries 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. See https://github.com/gpuweb/gpuweb/wiki/Minutes-2021-09-27#:~:text=consensus%20to%20support%20end/begin%2Dpass%20timestamp%20queries
Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1827998)
WebKit: Positive (https://github.com/gpuweb/gpuweb/pull/2190)
Web developers: Positive. It’s one of the most common requested features. Many developers already use it today by running chrome with a special flag. See https://omar-shehata.medium.com/how-to-use-webgpu-timestamp-query-9bf81fb5344a
Note that it was heavily used to benchmark and optimize Tensorflow.js.
Other signals:
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. Parallel work is occurring to launch WebGPU on Android.
No DevTools changes are required.
No
All platforms will eventually have support. Will immediately be available on ChromeOS, Mac, and Windows, since those platforms already support WebGPU. Linux and Android are planned to have WebGPU support in the future, so this feature will become available when WebGPU does.
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.
None
None
None
False
https://bugs.chromium.org/p/dawn/issues/detail?id=1800
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.
Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?
No
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
https://chromestatus.com/feature/5136606877188096
This intent message was generated by Chrome Platform Status.
Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
--
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/CAPpwU5%2BEFoeuehbvaMwzXK3wZ6UxX0U4n7yZJwwJgVOADbBwHA%40mail.gmail.com.
On Thu, Oct 26, 2023 at 5:21 PM 'François Beaufort' via blink-dev <blin...@chromium.org> wrote:Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
By "isolated" do you mean "has the cross-origin isolated capability"?
I wasn't able to find any spec or tests for this requirement, which seems like a potential interoperability issue.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5%2B2kO0iA3TKMz5WbYAk42ZRv_1JJz8RvhzpAnLvKy6MQA%40mail.gmail.com.
Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
Blink component
TAG review
WebGPU spec: https://github.com/w3ctag/design-reviews/issues/626
TAG review status
A new TAG review was not requested because timestamp queries were already part of the original one for the WebGPU spec and was approved.
Risks
Interoperability and Compatibility
Timestamp queries 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. See https://github.com/gpuweb/gpuweb/wiki/Minutes-2021-09-27#:~:text=consensus%20to%20support%20end/begin%2Dpass%20timestamp%20queries
Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1827998)
WebKit: Positive (https://github.com/gpuweb/gpuweb/pull/2190)
Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
On Thu, Oct 26, 2023 at 11:05 AM Domenic Denicola <dom...@chromium.org> wrote:On Thu, Oct 26, 2023 at 5:21 PM 'François Beaufort' via blink-dev <blin...@chromium.org> wrote:Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
By "isolated" do you mean "has the cross-origin isolated capability"?Yes.
I wasn't able to find any spec or tests for this requirement, which seems like a potential interoperability issue.The WebGPU spec currently says: "The feature is optional, and a WebGPU implementation may limit its exposure only to those scenarios that are trusted."
See https://gpuweb.github.io/gpuweb/#security-timing:~:text=The%20feature%20is%20optional%2C%20and%20a%20WebGPU%20implementation%20may%20limit%20its%20exposure%20only%20to%20those%20scenarios%20that%20are%20trusted
On Thu, Oct 26, 2023 at 7:21 PM François Beaufort <fbea...@google.com> wrote:On Thu, Oct 26, 2023 at 11:05 AM Domenic Denicola <dom...@chromium.org> wrote:On Thu, Oct 26, 2023 at 5:21 PM 'François Beaufort' via blink-dev <blin...@chromium.org> wrote:Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
By "isolated" do you mean "has the cross-origin isolated capability"?Yes.
I wasn't able to find any spec or tests for this requirement, which seems like a potential interoperability issue.The WebGPU spec currently says: "The feature is optional, and a WebGPU implementation may limit its exposure only to those scenarios that are trusted."
See https://gpuweb.github.io/gpuweb/#security-timing:~:text=The%20feature%20is%20optional%2C%20and%20a%20WebGPU%20implementation%20may%20limit%20its%20exposure%20only%20to%20those%20scenarios%20that%20are%20trustedI realize that. I was suggesting that, for interoperability purposes, you should consider specifying the actual condition, instead of leaving it vague and optional. (E.g. at least in other standards bodies, we have guidance to avoid optional or implementation-defined features; instead, we try to work together with other browser engines to come to a common, interoperable implementation, backed by a test suite.)I hope the API Owners can consider this when deciding whether or not to approve, as I believe that letting these sorts of non-specified and non-tested features be shipped is harmful for the platform's health.
On 10/30/23 12:59 PM, Corentin Wallez wrote:
On Fri, Oct 27, 2023 at 2:19 AM Domenic Denicola <dom...@chromium.org> wrote:
On Thu, Oct 26, 2023 at 7:21 PM François Beaufort <fbea...@google.com> wrote:
On Thu, Oct 26, 2023 at 11:05 AM Domenic Denicola <dom...@chromium.org> wrote:
On Thu, Oct 26, 2023 at 5:21 PM 'François Beaufort' via blink-dev <blin...@chromium.org> wrote:
Contact emails
fbea...@google.com, cwa...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/614
Specification
https://gpuweb.github.io/gpuweb/#timestamp
Summary
WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads.
While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers. To offer even more advanced protection against timing attacks and fingerprinting, timestamp queries are also coarsened based on site isolation status:- Isolated contexts: timestamp queries are exposed with a resolution of 100 microseconds.
- Non-isolated contexts: timestamp queries are not exposed at all.
By "isolated" do you mean "has the cross-origin isolated capability"?
Yes.
I wasn't able to find any spec or tests for this requirement, which seems like a potential interoperability issue.
The WebGPU spec currently says: "The feature is optional, and a WebGPU implementation may limit its exposure only to those scenarios that are trusted."
See https://gpuweb.github.io/gpuweb/#security-timing:~:text=The%20feature%20is%20optional%2C%20and%20a%20WebGPU%20implementation%20may%20limit%20its%20exposure%20only%20to%20those%20scenarios%20that%20are%20trusted
I realize that. I was suggesting that, for interoperability purposes, you should consider specifying the actual condition, instead of leaving it vague and optional. (E.g. at least in other standards bodies, we have guidance to avoid optional or implementation-defined features; instead, we try to work together with other browser engines to come to a common, interoperable implementation, backed by a test suite.)
I hope the API Owners can consider this when deciding whether or not to approve, as I believe that letting these sorts of non-specified and non-tested features be shipped is harmful for the platform's health.I'll add discussion of that to the agenda for this week's WebGPU meeting: can we agree on the availability of timestamp queries (provided there is hardware support) and the quantization depending on contexts. (but to be perfectly honest I think we'll have pushback). Of course the WebGPU standard body tries to avoid implementation-defined features, and instead have deterministic and tested features, but timestamps is one of the ones that might need to be an exception to it. Let's see what consensus the group comes to!
--
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/CAM0wra_p2U%2BwqkMrhH12DgMzph_77Ps4xk0Bn_ZspD%2BWEYzuqA%40mail.gmail.com.
LGTM2
100 microseconds sound very coarse for this, but I guess that
just means they have to average data over many frames. And if they
are happy, I'm happy.
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfUuxbMGbLHiKmhCttPF3H4c23NkvCjMu7dY_Ok8NDQkxw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/4b86877b-ca04-464d-85df-2b4ce479194a%40gmail.com.