Skip to content

Commit

Permalink
Add the command finish steps
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Kis <[email protected]>
  • Loading branch information
zolkis committed Jul 12, 2023
1 parent dbff6e2 commit bb94f01
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,13 +1489,27 @@ partial interface MLCommandEncoder {
};
</script>

<div algorithm=mlcommandencoder.finish>
<div>
**Arguments:**
- *descriptor*: an optional {{GPUCommandBufferDescriptor}}. Descriptor of the command buffer.

**Returns:** {{GPUCommandBuffer}}.
</div>

<details open>
<summary>
The {{MLCommandEncoder/finish(descriptor)}} method steps are:
</summary>
<div algorithm=mlcommandencoder.finish class=algorithm-steps>
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Make a request to the underlying platform to complete the recording of the ML workload, given |descriptor|.
<div class="note">
See the related <a href="https://www.w3.org/TR/webgpu/#dom-gpucommandencoder-finish">WebGPU steps</a>.
</div>
1. Return a {{GPUCommandBuffer}} containing the recorded workload.
</div>
</details>

## The MLGraphBuilder interface ## {#api-mlgraphbuilder}

The {{MLGraphBuilder}} interface defines a set of operations as identified by the [[#usecases]] that can be composed into a computational graph. It also represents the intermediate state of a graph building session.
Expand Down

0 comments on commit bb94f01

Please sign in to comment.