Skip to content

Commit

Permalink
Update anchor link for compute() after dropping synchronous execution…
Browse files Browse the repository at this point in the history
… support (#596)

SHA: 86081aa
Reason: push, by anssiko

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ibelem and github-actions[bot] committed Mar 7, 2024
1 parent 4466c7d commit e70839a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
<link href="https://www.w3.org/TR/webnn/" rel="canonical">
<meta content="480b094e6619158064c2539851262118ff4e22b1" name="document-revision">
<meta content="86081aa5515132e03f43efbcafd9c9369af8f76a" name="document-revision">
<style>
/* Make <dl> blocks more distinct from their surroundings. */
main dl:not(.switch) {
Expand Down Expand Up @@ -962,7 +962,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Web Neural Network API</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-03-06">6 March 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-03-07">7 March 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -1097,9 +1097,9 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc">
<li><a href="#mlnamedarraybufferviews-transfer-alg"><span class="secno">7.3.1</span> <span class="content"><code class="idl"><span>MLNamedArrayBufferViews</span></code> transfer algorithm</span></a>
<li>
<a href="#api-mlcontext-async-execution"><span class="secno">7.3.2</span> <span class="content"><code class="idl"><span>compute()</span></code></span></a>
<a href="#api-mlcontext-compute"><span class="secno">7.3.2</span> <span class="content"><code class="idl"><span>compute()</span></code></span></a>
<ol class="toc">
<li><a href="#api-mlcontext-async-execution-examples"><span class="secno">7.3.2.1</span> <span class="content">Examples</span></a>
<li><a href="#api-mlcontext-compute-examples"><span class="secno">7.3.2.1</span> <span class="content">Examples</span></a>
</ol>
</ol>
<li><a href="#api-mlgraph"><span class="secno">7.4</span> <span class="content"><code class="idl"><span>MLGraph</span></code> interface</span></a>
Expand Down Expand Up @@ -1845,7 +1845,7 @@ <h4 class="heading settled" data-level="7.3.1" id="mlnamedarraybufferviews-trans
</ol>
</div>
</details>
<h4 class="heading settled" data-level="7.3.2" id="api-mlcontext-async-execution"><span class="secno">7.3.2. </span><span class="content"><code class="idl"><a data-link-type="idl" href="#dom-mlcontext-compute" id="ref-for-dom-mlcontext-compute④">compute()</a></code></span><a class="self-link" href="#api-mlcontext-async-execution"></a></h4>
<h4 class="heading settled" data-level="7.3.2" id="api-mlcontext-compute"><span class="secno">7.3.2. </span><span class="content"><code class="idl"><a data-link-type="idl" href="#dom-mlcontext-compute" id="ref-for-dom-mlcontext-compute④">compute()</a></code></span><a class="self-link" href="#api-mlcontext-compute"></a></h4>
Asynchronously carries out the computational workload of a compiled graph <code class="idl"><a data-link-type="idl" href="#mlgraph" id="ref-for-mlgraph⑧">MLGraph</a></code> on a separate timeline, either on a worker thread for the CPU execution, or on a GPU timeline for the submission of GPU workload on the command queue. The asynchronous nature of this call avoids blocking the calling thread while the computation for result is ongoing. This method of execution requires an <code class="idl"><a data-link-type="idl" href="#mlcontext" id="ref-for-mlcontext①⑧">MLContext</a></code> created with <code class="idl"><a data-link-type="idl" href="#dictdef-mlcontextoptions" id="ref-for-dictdef-mlcontextoptions⑤">MLContextOptions</a></code>. Otherwise, it <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw">throws</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#operationerror" id="ref-for-operationerror②">OperationError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑥">DOMException</a></code>.
<div class="note" role="note"> In accordance with the <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#arraybufferview-write" id="ref-for-arraybufferview-write">Web IDL warning</a>, to prevent the calling thread from modifying the input and output resources while the computation is ongoing, this method <a data-link-type="dfn" href="#mlnamedarraybufferviews-transfer" id="ref-for-mlnamedarraybufferviews-transfer">transfers</a> the input and output <code class="idl"><a data-link-type="idl" href="#typedefdef-mlnamedarraybufferviews" id="ref-for-typedefdef-mlnamedarraybufferviews①②">MLNamedArrayBufferViews</a></code> to new views that share the same backing memory allocations. The transferred views are returned to the caller via the promise fulfillment with the computation result written into the backing memory of the output views. </div>
<div>
Expand Down Expand Up @@ -1901,7 +1901,7 @@ <h4 class="heading settled" data-level="7.3.2" id="api-mlcontext-async-execution
</ol>
</div>
</details>
<h5 class="heading settled" data-level="7.3.2.1" id="api-mlcontext-async-execution-examples"><span class="secno">7.3.2.1. </span><span class="content">Examples</span><a class="self-link" href="#api-mlcontext-async-execution-examples"></a></h5>
<h5 class="heading settled" data-level="7.3.2.1" id="api-mlcontext-compute-examples"><span class="secno">7.3.2.1. </span><span class="content">Examples</span><a class="self-link" href="#api-mlcontext-compute-examples"></a></h5>
<div class="example" id="example-51b119bc">
<a class="self-link" href="#example-51b119bc"></a>
<details open>
Expand Down

0 comments on commit e70839a

Please sign in to comment.