Skip to content

Commit

Permalink
Remove restrictive text that prevents compute and computeSync to …
Browse files Browse the repository at this point in the history
…be used with a WebGPU-device-based GPU context.
wchao1115 committed Jan 13, 2023
1 parent 02ce4b5 commit fde3783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
@@ -663,7 +663,7 @@ To <dfn lt="validate MLContext">validate {{MLContext}}</dfn>, given |context|, r
1. Return `true`;

### Synchronous Execution ### {#api-mlcontext-sync-execution}
Synchronously carries out the computational workload of a compiled graph {{MLGraph}} on the calling thread, which must be a worker thread, to produce results as defined by the operations in the graph. This method of execution requires an {{MLContext}} created with {{MLContextOptions}}. Otherwise, it throws an "{{OperationError}}" {{DOMException}}.
Synchronously carries out the computational workload of a compiled graph {{MLGraph}} on the calling thread, which must be a worker thread, to produce results as defined by the operations in the graph.

<script type=idl>
partial interface MLContext {
@@ -754,7 +754,7 @@ console.log(&#96;values: ${bufferE}&#96;);
</div>

### Asynchronous Execution ### {#api-mlcontext-async-execution}
Asynchronously carries out the computational workload of a compiled graph {{MLGraph}} on a separate timeline, either on a CPU worker thread or on a GPU timeline submitting a 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 {{MLContext}} created with {{MLContextOptions}}. Otherwise, it throws an "{{OperationError}}" {{DOMException}}.
Asynchronously carries out the computational workload of a compiled graph {{MLGraph}} on a separate timeline, either on a CPU worker thread or on a GPU timeline submitting a GPU workload on the command queue. The asynchronous nature of this call avoids blocking the calling thread while the computation for result is ongoing.

<script type=idl>
partial interface MLContext {

0 comments on commit fde3783

Please sign in to comment.