Skip to content

Commit

Permalink
Merge pull request #510 from inexorabletash/wording-validate-buffer
Browse files Browse the repository at this point in the history
SHA: d706feb
Reason: push, by huningxin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
huningxin and github-actions[bot] committed Jan 18, 2024
1 parent 31d5ebb commit a9130c2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 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="b03b7ba79fdd1ce14a81ed5cde4ca5f3e8643dc4" name="document-revision">
<meta content="d706febd9e1ffa166f1aaafaf193a71b29856bea" name="document-revision">
<style>
/* Make <dl> blocks more distinct from their surroundings. */
main dl:not(.switch) {
Expand Down Expand Up @@ -2060,8 +2060,6 @@ <h4 class="heading settled" data-level="7.5.2" id="api-mlcontext-sync-execution"
<summary> To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="validate-buffer-with-descriptor">validate buffer with descriptor</dfn> given <var>bufferView</var> and <var>descriptor</var>, run the following steps: </summary>
<div class="algorithm-steps">
<ol>
<li data-md>
<p>If <var>bufferView</var> is not an <code class="idl"><a data-link-type="idl" href="#typedefdef-mlbufferview" id="ref-for-typedefdef-mlbufferview">MLBufferView</a></code>, return false.</p>
<li data-md>
<p>If <var>bufferView</var>’s <a data-link-type="dfn" href="https://tc39.es/ecma262/#table-the-typedarray-constructors" id="ref-for-table-the-typedarray-constructors">element type</a> does not match to <var>descriptor</var>.<code class="idl"><a data-link-type="idl" href="#dom-mloperanddescriptor-datatype" id="ref-for-dom-mloperanddescriptor-datatype">dataType</a></code> according to <a href="#appendices-mloperanddatatype-arraybufferview-compatibility">this table</a>, return false.</p>
<li data-md>
Expand Down Expand Up @@ -2324,7 +2322,7 @@ <h3 class="heading settled" data-level="7.7" id="api-mlgraphbuilder"><span class
<a data-link-type="idl-name" href="#mloperand" id="ref-for-mloperand①②"><c- n>MLOperand</c-></a> <a class="idl-code" data-link-type="method" href="#dom-mlgraphbuilder-input" id="ref-for-dom-mlgraphbuilder-input"><c- g>input</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑤"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/input(name, descriptor)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-input-name-descriptor-name"><code><c- g>name</c-></code><a class="self-link" href="#dom-mlgraphbuilder-input-name-descriptor-name"></a></dfn>, <a data-link-type="idl-name" href="#dictdef-mloperanddescriptor" id="ref-for-dictdef-mloperanddescriptor④"><c- n>MLOperandDescriptor</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/input(name, descriptor)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-input-name-descriptor-descriptor"><code><c- g>descriptor</c-></code><a class="self-link" href="#dom-mlgraphbuilder-input-name-descriptor-descriptor"></a></dfn>);

// Create an operand for a graph constant.
<a data-link-type="idl-name" href="#mloperand" id="ref-for-mloperand①③"><c- n>MLOperand</c-></a> <a class="idl-code" data-link-type="method" href="#dom-mlgraphbuilder-constant" id="ref-for-dom-mlgraphbuilder-constant①"><c- g>constant</c-></a>(<a data-link-type="idl-name" href="#dictdef-mloperanddescriptor" id="ref-for-dictdef-mloperanddescriptor⑤"><c- n>MLOperandDescriptor</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(descriptor, bufferView)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-descriptor-bufferview-descriptor"><code><c- g>descriptor</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-descriptor-bufferview-descriptor"></a></dfn>, <a data-link-type="idl-name" href="#typedefdef-mlbufferview" id="ref-for-typedefdef-mlbufferview①"><c- n>MLBufferView</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(descriptor, bufferView)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-descriptor-bufferview-bufferview"><code><c- g>bufferView</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-descriptor-bufferview-bufferview"></a></dfn>);
<a data-link-type="idl-name" href="#mloperand" id="ref-for-mloperand①③"><c- n>MLOperand</c-></a> <a class="idl-code" data-link-type="method" href="#dom-mlgraphbuilder-constant" id="ref-for-dom-mlgraphbuilder-constant①"><c- g>constant</c-></a>(<a data-link-type="idl-name" href="#dictdef-mloperanddescriptor" id="ref-for-dictdef-mloperanddescriptor⑤"><c- n>MLOperandDescriptor</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(descriptor, bufferView)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-descriptor-bufferview-descriptor"><code><c- g>descriptor</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-descriptor-bufferview-descriptor"></a></dfn>, <a data-link-type="idl-name" href="#typedefdef-mlbufferview" id="ref-for-typedefdef-mlbufferview"><c- n>MLBufferView</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(descriptor, bufferView)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-descriptor-bufferview-bufferview"><code><c- g>bufferView</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-descriptor-bufferview-bufferview"></a></dfn>);

// Create a single-value operand from the specified number of the specified type.
<a data-link-type="idl-name" href="#mloperand" id="ref-for-mloperandâ‘ â‘Ł"><c- n>MLOperand</c-></a> <a class="idl-code" data-link-type="method" href="#dom-mlgraphbuilder-constant-value-type" id="ref-for-dom-mlgraphbuilder-constant-value-type"><c- g>constant</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(value, type), MLGraphBuilder/constant(value)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-value-type-value"><code><c- g>value</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-value-type-value"></a></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-mloperanddatatype" id="ref-for-enumdef-mloperanddatatypeâ‘ "><c- n>MLOperandDataType</c-></a> <dfn class="idl-code" data-dfn-for="MLGraphBuilder/constant(value, type), MLGraphBuilder/constant(value)" data-dfn-type="argument" data-export id="dom-mlgraphbuilder-constant-value-type-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-mlgraphbuilder-constant-value-type-type"></a></dfn> = "float32");
Expand Down Expand Up @@ -2972,7 +2970,7 @@ <h5 class="heading settled" data-level="7.7.8.1" id="api-mlgraphbuilder-constant
<li data-md>
<p><em>descriptor</em>: an <code class="idl"><a data-link-type="idl" href="#dictdef-mloperanddescriptor" id="ref-for-dictdef-mloperanddescriptor⑦">MLOperandDescriptor</a></code>. The descriptor of the output tensor.</p>
<li data-md>
<p><em>bufferView</em>: an <code class="idl"><a data-link-type="idl" href="#typedefdef-mlbufferview" id="ref-for-typedefdef-mlbufferview②">MLBufferView</a></code>. The view of the buffer containing the initializing data.</p>
<p><em>bufferView</em>: an <code class="idl"><a data-link-type="idl" href="#typedefdef-mlbufferview" id="ref-for-typedefdef-mlbufferviewâ‘ ">MLBufferView</a></code>. The view of the buffer containing the initializing data.</p>
</ul>
<strong>Returns:</strong>: an <code class="idl"><a data-link-type="idl" href="#mloperand" id="ref-for-mloperand⑤④">MLOperand</a></code>. The constant output tensor.
</div>
Expand Down Expand Up @@ -10543,7 +10541,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
window.dfnpanelData['dom-mlgraph-implementation-slot'] = {"dfnID": "dom-mlgraph-implementation-slot", "url": "#dom-mlgraph-implementation-slot", "dfnText": "[[implementation]]", "refSections": [{"refs": [{"id": "ref-for-dom-mlgraph-implementation-slot"}, {"id": "ref-for-dom-mlgraph-implementation-slot\u2460"}, {"id": "ref-for-dom-mlgraph-implementation-slot\u2461"}, {"id": "ref-for-dom-mlgraph-implementation-slot\u2462"}], "title": "7.4.2. Dispatch Execution Commands"}, {"refs": [{"id": "ref-for-dom-mlgraph-implementation-slot\u2463"}, {"id": "ref-for-dom-mlgraph-implementation-slot\u2464"}, {"id": "ref-for-dom-mlgraph-implementation-slot\u2465"}], "title": "7.5.2. Synchronous Execution"}, {"refs": [{"id": "ref-for-dom-mlgraph-implementation-slot\u2466"}], "title": "7.7.4.2. buildSync(outputs)"}], "external": false};
window.dfnpanelData['typedefdef-mlnamedoperands'] = {"dfnID": "typedefdef-mlnamedoperands", "url": "#typedefdef-mlnamedoperands", "dfnText": "MLNamedOperands", "refSections": [{"refs": [{"id": "ref-for-typedefdef-mlnamedoperands"}, {"id": "ref-for-typedefdef-mlnamedoperands\u2460"}], "title": "7.7. MLGraphBuilder interface"}], "external": false};
window.dfnpanelData['dictdef-mlbufferresourceview'] = {"dfnID": "dictdef-mlbufferresourceview", "url": "#dictdef-mlbufferresourceview", "dfnText": "MLBufferResourceView", "refSections": [{"refs": [{"id": "ref-for-dictdef-mlbufferresourceview"}, {"id": "ref-for-dictdef-mlbufferresourceview\u2460"}], "title": "7.7. MLGraphBuilder interface"}], "external": false};
window.dfnpanelData['typedefdef-mlbufferview'] = {"dfnID": "typedefdef-mlbufferview", "url": "#typedefdef-mlbufferview", "dfnText": "MLBufferView", "refSections": [{"refs": [{"id": "ref-for-typedefdef-mlbufferview"}], "title": "7.5.2. Synchronous Execution"}, {"refs": [{"id": "ref-for-typedefdef-mlbufferview\u2460"}], "title": "7.7. MLGraphBuilder interface"}, {"refs": [{"id": "ref-for-typedefdef-mlbufferview\u2461"}], "title": "7.7.8.1. constant(descriptor, bufferView)"}], "external": false};
window.dfnpanelData['typedefdef-mlbufferview'] = {"dfnID": "typedefdef-mlbufferview", "url": "#typedefdef-mlbufferview", "dfnText": "MLBufferView", "refSections": [{"refs": [{"id": "ref-for-typedefdef-mlbufferview"}], "title": "7.7. MLGraphBuilder interface"}, {"refs": [{"id": "ref-for-typedefdef-mlbufferview\u2460"}], "title": "7.7.8.1. constant(descriptor, bufferView)"}], "external": false};
window.dfnpanelData['mlgraphbuilder'] = {"dfnID": "mlgraphbuilder", "url": "#mlgraphbuilder", "dfnText": "MLGraphBuilder", "refSections": [{"refs": [{"id": "ref-for-mlgraphbuilder"}], "title": "3. Security Considerations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2460"}, {"id": "ref-for-mlgraphbuilder\u2461"}, {"id": "ref-for-mlgraphbuilder\u2462"}, {"id": "ref-for-mlgraphbuilder\u2463"}, {"id": "ref-for-mlgraphbuilder\u2464"}, {"id": "ref-for-mlgraphbuilder\u2465"}, {"id": "ref-for-mlgraphbuilder\u2466"}], "title": "6.1. Overview"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2467"}], "title": "7.3. MLActivation interface"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2468"}], "title": "7.3.1. Creating MLActivation"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2460\u24ea"}, {"id": "ref-for-mlgraphbuilder\u2460\u2460"}, {"id": "ref-for-mlgraphbuilder\u2460\u2461"}, {"id": "ref-for-mlgraphbuilder\u2460\u2462"}, {"id": "ref-for-mlgraphbuilder\u2460\u2463"}, {"id": "ref-for-mlgraphbuilder\u2460\u2464"}, {"id": "ref-for-mlgraphbuilder\u2460\u2465"}], "title": "7.7. MLGraphBuilder interface"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2460\u2466"}], "title": "7.7.1. MLGraphBuilder constructor"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2460\u2467"}], "title": "7.7.2. argMin/Max"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2460\u2468"}], "title": "7.7.3. batchNormalization"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u24ea"}], "title": "7.7.5. cast"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2460"}], "title": "7.7.6. clamp"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2461"}], "title": "7.7.7. concat"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2462"}], "title": "7.7.8. constant"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2463"}], "title": "7.7.9. conv2d"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2464"}], "title": "7.7.10. convTranspose2d"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2465"}], "title": "7.7.11. Element-wise binary operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2466"}], "title": "7.7.12. Element-wise logical operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2467"}], "title": "7.7.13. Element-wise unary operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2461\u2468"}], "title": "7.7.14. elu"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u24ea"}], "title": "7.7.15. expand"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2460"}], "title": "7.7.16. gather"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2461"}], "title": "7.7.17. gemm"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2462"}], "title": "7.7.18. gru"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2463"}], "title": "7.7.19. gruCell"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2464"}], "title": "7.7.20. hardSigmoid"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2465"}], "title": "7.7.21. hardSwish"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2466"}], "title": "7.7.23. instanceNormalization"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2467"}], "title": "7.7.24. layerNormalization"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2462\u2468"}], "title": "7.7.25. leakyRelu"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u24ea"}], "title": "7.7.26. linear"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2460"}], "title": "7.7.27. lstm"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2461"}], "title": "7.7.28. lstmCell"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2462"}], "title": "7.7.29. matmul"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2463"}], "title": "7.7.30. pad"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2464"}], "title": "7.7.31. Pooling operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2465"}], "title": "7.7.32. prelu"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2466"}], "title": "7.7.33. Reduction operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2467"}], "title": "7.7.34. relu"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2463\u2468"}], "title": "7.7.35. resample2d"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u24ea"}], "title": "7.7.36. reshape"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2460"}], "title": "7.7.37. sigmoid"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2461"}], "title": "7.7.38. slice"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2462"}], "title": "7.7.39. softmax"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2463"}], "title": "7.7.40. softplus"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2464"}], "title": "7.7.41. softsign"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2465"}], "title": "7.7.42. split"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2466"}], "title": "7.7.43. tanh"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2467"}], "title": "7.7.44. transpose"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2464\u2468"}], "title": "7.7.45. triangular"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2465\u24ea"}], "title": "7.7.46. where"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2465\u2460"}], "title": "7.8. MLOperand interface"}, {"refs": [{"id": "ref-for-mlgraphbuilder\u2465\u2461"}, {"id": "ref-for-mlgraphbuilder\u2465\u2462"}, {"id": "ref-for-mlgraphbuilder\u2465\u2463"}], "title": "7.8.1. Creating MLOperand"}], "external": false};
window.dfnpanelData['dom-mlbufferresourceview-resource'] = {"dfnID": "dom-mlbufferresourceview-resource", "url": "#dom-mlbufferresourceview-resource", "dfnText": "resource", "refSections": [{"refs": [{"id": "ref-for-dom-mlbufferresourceview-resource"}], "title": "7.7. MLGraphBuilder interface"}], "external": false};
window.dfnpanelData['dom-mlbufferresourceview-offset'] = {"dfnID": "dom-mlbufferresourceview-offset", "url": "#dom-mlbufferresourceview-offset", "dfnText": "offset", "refSections": [{"refs": [{"id": "ref-for-dom-mlbufferresourceview-offset"}], "title": "7.7. MLGraphBuilder interface"}], "external": false};
Expand Down

0 comments on commit a9130c2

Please sign in to comment.