Skip to content

Commit

Permalink
Add resource contention considerations
Browse files Browse the repository at this point in the history
This is to address feedback from the TAG review:
w3ctag/design-reviews#933
  • Loading branch information
anssiko committed Oct 10, 2024
1 parent 81a355a commit 8d71e18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ This API is disabled by default in all cross-origin frames using the [[#permissi

This API allows creation of an {{MLContext}} from a {{GPUDevice}} defined by WebGPU specification. See <a href="https://gpuweb.github.io/gpuweb/#security-considerations">WebGPU Security Considerations</a> for more information regarding security characteristics of this context.

This API provides an abstraction across GPU, CPU and dedicated ML accelerator hardware. When using a GPU, <a href="https://www.w3.org/TR/webgpu/#security-dos">denial of service</a> considerations similar to WebGPU apply. When using a CPU or a dedicated ML accelerator, the types of potential resource contention are different and mitigations will be implementation- and configuration-dependent. Implementations should use whatever mechanisms available from the platform to prevent sites from using an unfair amount of system resources. These compute units are shared resources and the use of any compute API will affect overall performance on a fully-loaded system.

Once the graph is fully constructed and compiled, the input shapes into each of the operations in the graph are inferred and finalized. The bounds checking occurs when the compute method is invoked that executes the graph against the actual data. No actual data is bound to the compiled graph before this stage. It is the implementation's responsibility to make sure proper bounds checking occurs against the shapes of the data already inferred by that time.

Issue: Document operations susceptible to out-of-bounds access as a guidance to implementers.
Expand Down

0 comments on commit 8d71e18

Please sign in to comment.