Skip to content

Commit c9d2dd7

Browse files
Wording change: Add types to all internal algorithm members (#536)
1 parent f9b86b6 commit c9d2dd7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

index.bs

+14-14
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ Its <a>default allowlist</a> is <code>'self'</code>.
827827

828828
<details open algorithm>
829829
<summary>
830-
To <dfn>create a context</dfn> given |options|, run these steps:
830+
To <dfn>create a context</dfn> given |options| (a {{GPUDevice}} or {{MLContextOptions), run these steps:
831831
</summary>
832832
<div class=algorithm-steps>
833833
1. Let |context| be a new {{MLContext}} object.
@@ -933,7 +933,7 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
933933

934934
<details open algorithm>
935935
<summary>
936-
To <dfn>create an MLActivation</dfn> given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps:
936+
To <dfn>create an MLActivation</dfn> given {{MLGraphBuilder}} |builder|, [=string=] |name|, optional [=ordered map=] |options| and optional algorithm |init-steps|, run the following steps:
937937
</summary>
938938
<div class=algorithm-steps>
939939
1. Let |activation| be a new {{MLActivation}}.
@@ -1170,7 +1170,7 @@ partial interface MLContext {
11701170

11711171
<details open algorithm>
11721172
<summary>
1173-
To <dfn>validate graph resources</dfn>, given |resources| and |descriptors|, run the following steps:
1173+
To <dfn>validate graph resources</dfn>, given {{MLNamedArrayBufferViews}} |resources| and [=ordered map=] |descriptors|, run the following steps:
11741174
</summary>
11751175
<div class=algorithm-steps>
11761176
1. [=map/For each=] |name| &rarr; |resource| of |resources|:
@@ -1182,7 +1182,7 @@ partial interface MLContext {
11821182

11831183
<details open algorithm>
11841184
<summary>
1185-
To <dfn>validate buffer with descriptor</dfn> given |bufferView| and |descriptor|, run the following steps:
1185+
To <dfn>validate buffer with descriptor</dfn> given {{MLBufferView}} |bufferView| and {{MLOperandDescriptor}} |descriptor|, run the following steps:
11861186
</summary>
11871187
<div class=algorithm-steps>
11881188
1. If |bufferView|'s [=element type=] does not match to |descriptor|.{{MLOperandDescriptor/dataType}} according to [this table](#appendices-mloperanddatatype-arraybufferview-compatibility), return false.
@@ -1192,7 +1192,7 @@ partial interface MLContext {
11921192

11931193
<details open algorithm>
11941194
<summary>
1195-
To <dfn>execute graph</dfn>, given |graph|, |inputs| and |outputs|, run the following steps:
1195+
To <dfn>execute graph</dfn>, given {{MLGraph}} |graph|, {{MLNamedArrayBufferViews}} |inputs| and {{MLNamedArrayBufferViews}} |outputs|, run the following steps:
11961196
</summary>
11971197
<div class=algorithm-steps>
11981198
1. Let |inputResources| denote the input resources of |graph|.{{MLGraph/[[implementation]]}}.
@@ -1516,7 +1516,7 @@ partial interface MLGraphBuilder {
15161516

15171517
<details open algorithm>
15181518
<summary>
1519-
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
1519+
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
15201520
</summary>
15211521
<div class=algorithm-steps>
15221522
1. [=Assert=]: |op| is one of "argMin", "argMax".
@@ -1785,7 +1785,7 @@ partial interface MLGraphBuilder {
17851785

17861786
<details open algorithm>
17871787
<summary>
1788-
To <dfn>check clamp options</dfn> given |options|, run the following steps:
1788+
To <dfn>check clamp options</dfn> given {{MLClampOptions}} |options|, run the following steps:
17891789
</summary>
17901790
<div class=algorithm-steps>
17911791
1. If |options|.{{MLClampOptions/minValue}} is greater than |options|.{{MLClampOptions/maxValue}}, then return false.
@@ -2380,7 +2380,7 @@ partial interface MLGraphBuilder {
23802380

23812381
<details open algorithm>
23822382
<summary>
2383-
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
2383+
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given [=string=] |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
23842384
</summary>
23852385
<div class=algorithm-steps>
23862386
1. [=Assert=]: |op| is one of "add", "sub", "mul", "div", "max", "min", "pow".
@@ -2404,7 +2404,7 @@ partial interface MLGraphBuilder {
24042404

24052405
<details open algorithm>
24062406
<summary>
2407-
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given |shape1| and |shape2|, run the following steps:
2407+
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given [=/list=] |shape1| and [=/list=] |shape2|, run the following steps:
24082408
</summary>
24092409
<div class=algorithm-steps>
24102410
1. [=Assert=]: The type of |shape1| and |shape2| is `sequence of unsigned long`.
@@ -2513,7 +2513,7 @@ Although operations *greaterOrEqual* and *lesserOrEqual* can each be implemented
25132513

25142514
<details open algorithm>
25152515
<summary>
2516-
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
2516+
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given [=string=] |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
25172517
</summary>
25182518
<div class=algorithm-steps>
25192519
1. [=Assert=]: |op| is one of "equal", "greater", "greaterOrEqual", "lesser", "lesserOrEqual", "not".
@@ -2635,7 +2635,7 @@ partial interface MLGraphBuilder {
26352635

26362636
<details open algorithm>
26372637
<summary>
2638-
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given |op| and {{MLOperand}} |input|, run the following steps:
2638+
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given [=string=] |op| and {{MLOperand}} |input|, run the following steps:
26392639
</summary>
26402640
<div class=algorithm-steps>
26412641
1. [=Assert=]: |op| is one of "abs", "ceil", "cos", "erf", "exp", "floor", "identity", "log", "neg", "reciprocal", "sin", "sqrt", "tan".
@@ -4789,7 +4789,7 @@ partial interface MLGraphBuilder {
47894789

47904790
<details open algorithm>
47914791
<summary>
4792-
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
4792+
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
47934793
</summary>
47944794
<div class=algorithm-steps>
47954795
1. [=Assert=]: |op| is one of "averagePool2d", "l2Pool2d", "maxPool2d".
@@ -4970,7 +4970,7 @@ partial interface MLGraphBuilder {
49704970

49714971
<details open algorithm>
49724972
<summary>
4973-
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
4973+
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given [=string=] |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
49744974
</summary>
49754975
<div class=algorithm-steps>
49764976
1. [=Assert=]: |op| is one of "reduceL1", "reduceL2", "reduceLogSum", "reduceLogSumExp", "reduceMax", "reduceMean", "reduceMin", "reduceProduct", "reduceSum", "reduceSumSquare".
@@ -6116,7 +6116,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
61166116

61176117
<details open algorithm>
61186118
<summary>
6119-
To <dfn>check dimensions</dfn> given |dimensions| and |type|, run the following steps:
6119+
To <dfn>check dimensions</dfn> given [=/list=] |dimensions| and {{MLOperandDataType}} |type|, run the following steps:
61206120
</summary>
61216121
<div class=algorithm-steps>
61226122
1. If the [=list/size=] of |dimensions| is 0, return false.

0 commit comments

Comments
 (0)