Skip to content

Commit 658d493

Browse files
committed
Rename gatherND and scatterND to ND again for now to be consistent with current implementation, tracked by separate issue
1 parent 8b8d2aa commit 658d493

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

index.bs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4451,22 +4451,22 @@ partial dictionary MLOpSupportLimits {
44514451
</details>
44524452
</div>
44534453

4454-
### gatherNd ### {#api-mlgraphbuilder-gathernd}
4454+
### gatherND ### {#api-mlgraphbuilder-gathernd}
44554455
Gather slices of the input tensor according to the indices.
44564456

44574457
<script type=idl>
44584458
partial interface MLGraphBuilder {
4459-
MLOperand gatherNd(MLOperand input,
4459+
MLOperand gatherND(MLOperand input,
44604460
MLOperand indices,
44614461
optional MLOperatorOptions options = {});
44624462
};
44634463

44644464
partial dictionary MLOpSupportLimits {
4465-
MLGatherSupportLimits gatherNd;
4465+
MLGatherSupportLimits gatherND;
44664466
};
44674467
</script>
44684468

4469-
<div dfn-for="MLGraphBuilder/gatherNd(input, indices, options)" dfn-type=argument>
4469+
<div dfn-for="MLGraphBuilder/gatherND(input, indices, options)" dfn-type=argument>
44704470
**Arguments:**
44714471
- <dfn>input</dfn>: an {{MLOperand}}. The input N-D tensor from which the values are gathered.
44724472
- <dfn>indices</dfn>: an {{MLOperand}}. The indices array contains entire coordinates into the input tensor, with the rightmost dimension holding the number of dimensions per coordinate. So an indices tensor of shape [10,1] holds 10 single-axis indices, and a shape of [4,3] holds 4 indices of 3D coordinates. The values must be of type {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"uint32"}}, or {{MLOperandDataType/"int64"}}, and each must be in the range -N (inclusive) to N (exclusive) where N is the size of the corresponding input dimension, and a negative index means indexing from the end of the corresponding dimension.
@@ -4475,8 +4475,8 @@ partial dictionary MLOpSupportLimits {
44754475
**Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the *input*'s [=MLOperand/rank=] + *indices*'s [=MLOperand/rank=] - *indices*'s [=MLOperand/shape=][-1] - 1.
44764476
</div>
44774477

4478-
<table id=constraints-gathernd class='data' link-for="MLGraphBuilder/gatherNd(input, indices, options)">
4479-
<caption>Constraints for {{MLGraphBuilder/gatherNd()}}</caption>
4478+
<table id=constraints-gathernd class='data' link-for="MLGraphBuilder/gatherND(input, indices, options)">
4479+
<caption>Constraints for {{MLGraphBuilder/gatherND()}}</caption>
44804480
<thead>
44814481
<tr>
44824482
<th>operand</th>
@@ -4501,19 +4501,19 @@ partial dictionary MLOpSupportLimits {
45014501
</tr>
45024502
</table>
45034503

4504-
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gatherNd()}}:
4504+
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gatherND()}}:
45054505
<dl dfn-type=dict-member dfn-for=MLOpSupportLimits>
4506-
: <dfn>gatherNd</dfn>
4507-
:: Support limits for operator {{MLGraphBuilder/gatherNd()}}.
4506+
: <dfn>gatherND</dfn>
4507+
:: Support limits for operator {{MLGraphBuilder/gatherND()}}.
45084508
</dl>
45094509

45104510
<div class="note">
4511-
The {{MLGraphBuilder/gatherNd(input, indices, options)/indices}} parameter to {{MLGraphBuilder/gatherNd()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
4511+
The {{MLGraphBuilder/gatherND(input, indices, options)/indices}} parameter to {{MLGraphBuilder/gatherND()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
45124512
</div>
45134513

45144514
<details open algorithm>
45154515
<summary>
4516-
The <dfn method for=MLGraphBuilder>gatherNd(|input|, |indices|, |options|)</dfn> method steps are:
4516+
The <dfn method for=MLGraphBuilder>gatherND(|input|, |indices|, |options|)</dfn> method steps are:
45174517
</summary>
45184518
1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}.
45194519
1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| returns false, then [=exception/throw=] a {{TypeError}}.
@@ -4532,7 +4532,7 @@ partial dictionary MLOpSupportLimits {
45324532
1. Let |outputDesc| be the result of [=creating an MLOperandDescriptor=] given |input|'s [=MLOperand/dataType=] and |shapeOutput|.
45334533
1. *Make graph connections:*
45344534
1. Let |output| be the result of [=creating an MLOperand=] given |outputDesc|.
4535-
1. Let |operator| be an [=operator=] for the "gatherNd" operation, given |input|, |indices|, and |options|.
4535+
1. Let |operator| be an [=operator=] for the "gatherND" operation, given |input|, |indices|, and |options|.
45364536
1. Set |output|.{{MLOperand/[[operator]]}} to |operator|.
45374537
1. Set |operator|'s [=operator/inputs=] to |input| and |indices|.
45384538
1. Set |operator|'s [=operator/output=] to |output|.
@@ -4542,7 +4542,7 @@ partial dictionary MLOpSupportLimits {
45424542
<div class="example">
45434543
<details open>
45444544
<summary>
4545-
Examples of how gatherNd works in different slicing schemes.
4545+
Examples of how gatherND works in different slicing schemes.
45464546
</summary>
45474547
<pre highlight="js">
45484548
// input of shape [2,2]:
@@ -4563,7 +4563,7 @@ partial dictionary MLOpSupportLimits {
45634563
{dataType: 'uint32', shape: [3, 2]},
45644564
new Uint32Array([0, 0, 1, 1, 1, 0]));
45654565

4566-
const output1 = builder.gatherNd(input1, indices1);
4566+
const output1 = builder.gatherND(input1, indices1);
45674567

45684568
// input of shape [2,2]:
45694569
// [[0, 1],
@@ -4579,7 +4579,7 @@ partial dictionary MLOpSupportLimits {
45794579
{dataType: 'uint32', shape: [2, 1]},
45804580
new Uint32Array([1, 0]));
45814581

4582-
const output2 = builder.gatherNd(input1, indices2);
4582+
const output2 = builder.gatherND(input1, indices2);
45834583

45844584
// input of shape [2,2,2]:
45854585
// [[[0, 1],
@@ -4601,7 +4601,7 @@ partial dictionary MLOpSupportLimits {
46014601
{dataType: 'uint32', shape: [2, 2]},
46024602
new Uint32Array([0, 1, 1, 0]));
46034603

4604-
const output3 = builder.gatherNd(input2, indices3);
4604+
const output3 = builder.gatherND(input2, indices3);
46054605

46064606
// input of shape [2,2,2]:
46074607
// [[[0, 1],
@@ -4624,7 +4624,7 @@ partial dictionary MLOpSupportLimits {
46244624
{dataType: 'uint32', shape: [3, 1]},
46254625
new Uint32Array([1, 0, 1]));
46264626

4627-
const output4 = builder.gatherNd(input2, indices4);
4627+
const output4 = builder.gatherND(input2, indices4);
46284628

46294629
// input of shape [2,2,2]:
46304630
// [[[0, 1],
@@ -4644,7 +4644,7 @@ partial dictionary MLOpSupportLimits {
46444644
{dataType: 'uint32', shape: [5, 3]},
46454645
new Uint32Array([0,0,1, 0,1,0, 1,0,0, 1,1,0, 1,1,1]));
46464646

4647-
const output5 = builder.gatherNd(input2, indices5);
4647+
const output5 = builder.gatherND(input2, indices5);
46484648
</pre>
46494649
</details>
46504650
</div>
@@ -8463,23 +8463,23 @@ partial dictionary MLOpSupportLimits {
84638463
</details>
84648464
</div>
84658465

8466-
### scatterNd ### {#api-mlgraphbuilder-scatternd}
8466+
### scatterND ### {#api-mlgraphbuilder-scatternd}
84678467
Scatter slices of values from the update tensor atop a copy of the input tensor according to the indices.
84688468

84698469
<script type=idl>
84708470
partial interface MLGraphBuilder {
8471-
MLOperand scatterNd(MLOperand input,
8471+
MLOperand scatterND(MLOperand input,
84728472
MLOperand indices,
84738473
MLOperand updates,
84748474
optional MLOperatorOptions options = {});
84758475
};
84768476

84778477
partial dictionary MLOpSupportLimits {
8478-
MLScatterSupportLimits scatterNd;
8478+
MLScatterSupportLimits scatterND;
84798479
};
84808480
</script>
84818481

8482-
<div dfn-for="MLGraphBuilder/scatterNd(input, indices, updates, options)" dfn-type=argument>
8482+
<div dfn-for="MLGraphBuilder/scatterND(input, indices, updates, options)" dfn-type=argument>
84838483
**Arguments:**
84848484
- <dfn>input</dfn>: an {{MLOperand}}. The input N-D tensor from to initialize the output with.
84858485
- <dfn>indices</dfn>: an {{MLOperand}}. The indices array contains entire coordinates into the output tensor, with the rightmost dimension holding the number of dimensions per coordinate. So an indices tensor of shape [10,1] holds 10 single-axis indices, and a shape of [4,3] holds 4 indices of 3D coordinates. The values must be of type {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"uint32"}}, or {{MLOperandDataType/"int64"}}, and each must be in the range -N (inclusive) to N (exclusive) where N is the size of the corresponding output dimension, and a negative index means indexing from the end of the corresponding dimension.
@@ -8489,8 +8489,8 @@ partial dictionary MLOpSupportLimits {
84898489
**Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the [=MLOperand/rank=] of *input*'s [=MLOperand/rank=] + *indices*'s [=MLOperand/rank=] - *indices*'s [=MLOperand/shape=][-1] - 1.
84908490
</div>
84918491

8492-
<table id=constraints-scatternd class='data' link-for="MLGraphBuilder/scatterNd(input, indices, updates, options)">
8493-
<caption>Constraints for {{MLGraphBuilder/scatterNd()}}</caption>
8492+
<table id=constraints-scatternd class='data' link-for="MLGraphBuilder/scatterND(input, indices, updates, options)">
8493+
<caption>Constraints for {{MLGraphBuilder/scatterND()}}</caption>
84948494
<thead>
84958495
<tr>
84968496
<th>operand</th>
@@ -8520,19 +8520,19 @@ partial dictionary MLOpSupportLimits {
85208520
</tr>
85218521
</table>
85228522

8523-
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/scatterNd()}}:
8523+
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/scatterND()}}:
85248524
<dl dfn-type=dict-member dfn-for=MLOpSupportLimits>
8525-
: <dfn>scatterNd</dfn>
8526-
:: Support limits for operator {{MLGraphBuilder/scatterNd()}}.
8525+
: <dfn>scatterND</dfn>
8526+
:: Support limits for operator {{MLGraphBuilder/scatterND()}}.
85278527
</dl>
85288528

85298529
<div class="note">
8530-
The {{MLGraphBuilder/scatterNd(input, indices, updates, options)/indices}} parameter to {{MLGraphBuilder/scatterNd()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
8530+
The {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}} parameter to {{MLGraphBuilder/scatterND()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the required clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index.
85318531
</div>
85328532

85338533
<details open algorithm>
85348534
<summary>
8535-
The <dfn method for=MLGraphBuilder>scatterNd(|input|, |indices|, |updates|, |options|)</dfn> method steps are:
8535+
The <dfn method for=MLGraphBuilder>scatterND(|input|, |indices|, |updates|, |options|)</dfn> method steps are:
85368536
</summary>
85378537
1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}.
85388538
1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |indices|, and |updates| returns false, then [=exception/throw=] a {{TypeError}}.
@@ -8554,7 +8554,7 @@ partial dictionary MLOpSupportLimits {
85548554
1. Let |outputDesc| be the result of [=creating an MLOperandDescriptor=] given |input|'s [=MLOperand/dataType=] and |shapeOutput|.
85558555
1. *Make graph connections:*
85568556
1. Let |output| be the result of [=creating an MLOperand=] given |outputDesc|.
8557-
1. Let |operator| be an [=operator=] for the "scatterNd" operation, given |input|, |indices|, |updates|, and |options|.
8557+
1. Let |operator| be an [=operator=] for the "scatterND" operation, given |input|, |indices|, |updates|, and |options|.
85588558
1. Set |output|.{{MLOperand/[[operator]]}} to |operator|.
85598559
1. Set |operator|'s [=operator/inputs=] to |input|, |indices|, and |updates|.
85608560
1. Set |operator|'s [=operator/output=] to |output|.
@@ -8564,7 +8564,7 @@ partial dictionary MLOpSupportLimits {
85648564
<div class="example">
85658565
<details open>
85668566
<summary>
8567-
Examples of how scatterNd works in different slicing schemes.
8567+
Examples of how scatterND works in different slicing schemes.
85688568
</summary>
85698569
<pre highlight="js">
85708570
// input of shape [8]:
@@ -8591,7 +8591,7 @@ partial dictionary MLOpSupportLimits {
85918591
{dataType: 'uint32', shape: [4]},
85928592
new Uint32Array([-1, -2, -3, -4]));
85938593

8594-
const output1 = builder.scatterNd(input1, indices1, updates1);
8594+
const output1 = builder.scatterND(input1, indices1, updates1);
85958595

85968596
// input of shape [2,2]:
85978597
// [[0, 1],
@@ -8617,7 +8617,7 @@ partial dictionary MLOpSupportLimits {
86178617
{dataType: 'uint32', shape: [2]},
86188618
new Uint32Array([-1, -2]));
86198619

8620-
const output2 = builder.scatterNd(input2, indices2, updates2);
8620+
const output2 = builder.scatterND(input2, indices2, updates2);
86218621

86228622
// input of shape [3,2]:
86238623
// [[0, 1],
@@ -8646,7 +8646,7 @@ partial dictionary MLOpSupportLimits {
86468646
{dataType: 'uint32', shape: [2, 2]},
86478647
new Uint32Array([-1, -2, -3, 4]));
86488648

8649-
const output3 = builder.scatterNd(input3, indices3, updates3);
8649+
const output3 = builder.scatterND(input3, indices3, updates3);
86508650

86518651
// input of shape [2,2,2]:
86528652
// [[[0, 1],
@@ -8677,7 +8677,7 @@ partial dictionary MLOpSupportLimits {
86778677
{dataType: 'uint32', shape: [2, 2]},
86788678
new Uint32Array([-1, -2, -3, 4]));
86798679

8680-
const output4 = builder.scatterNd(input4, indices4, updates4);
8680+
const output4 = builder.scatterND(input4, indices4, updates4);
86818681
</pre>
86828682
</details>
86838683
</div>

0 commit comments

Comments
 (0)