Skip to content

Commit 573f901

Browse files
committed
Support rankRange for output tensors in opSupportLimits
Fix #835
1 parent 5aec997 commit 573f901

File tree

1 file changed

+41
-51
lines changed

1 file changed

+41
-51
lines changed

index.bs

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,9 +1422,9 @@ The {{MLOpSupportLimits}} has the following top level members, aside from these,
14221422
dictionary MLOpSupportLimits {
14231423
MLInputOperandLayout preferredInputLayout;
14241424
[EnforceRange] unsigned long long maxTensorByteLength;
1425-
MLDataTypeLimits input;
1426-
MLDataTypeLimits constant;
1427-
MLDataTypeLimits output;
1425+
MLTensorLimits input;
1426+
MLTensorLimits constant;
1427+
MLTensorLimits output;
14281428
};
14291429
</script>
14301430

@@ -1440,18 +1440,6 @@ dictionary MLOpSupportLimits {
14401440
: <dfn>output</dfn>
14411441
:: Support limits for output {{MLOperand}}s for an {{MLGraph}}.
14421442
</dl>
1443-
#### {{MLDataTypeLimits}} dictionary #### {#api-mlcontext-datatypelimits-dictionary}
1444-
<script type="idl">
1445-
typedef sequence<MLOperandDataType> MLDataTypeList;
1446-
1447-
dictionary MLDataTypeLimits {
1448-
MLDataTypeList dataTypes;
1449-
};
1450-
</script>
1451-
<dl dfn-type=dict-member dfn-for=MLDataTypeLimits>
1452-
: <dfn>dataTypes</dfn>
1453-
:: Supported data types.
1454-
</dl>
14551443

14561444
#### {{MLRankRange}} dictionary #### {#api-mlcontext-rankrange-dictionary}
14571445
<script type="idl">
@@ -1469,6 +1457,8 @@ dictionary MLRankRange {
14691457

14701458
#### {{MLTensorLimits}} dictionary #### {#api-mlcontext-tensorlimits-dictionary}
14711459
<script type="idl">
1460+
typedef sequence<MLOperandDataType> MLDataTypeList;
1461+
14721462
dictionary MLTensorLimits {
14731463
MLDataTypeList dataTypes;
14741464
MLRankRange rankRange;
@@ -1486,7 +1476,7 @@ dictionary MLTensorLimits {
14861476
dictionary MLBinarySupportLimits {
14871477
MLTensorLimits a;
14881478
MLTensorLimits b;
1489-
MLDataTypeLimits output;
1479+
MLTensorLimits output;
14901480
};
14911481
</script>
14921482

@@ -1496,22 +1486,22 @@ dictionary MLBinarySupportLimits {
14961486
: <dfn>b</dfn>
14971487
:: {{MLTensorLimits}} for b operand.
14981488
: <dfn>output</dfn>
1499-
:: {{MLDataTypeLimits}} for output operand.
1489+
:: {{MLTensorLimits}} for output operand.
15001490
</dl>
15011491

15021492
#### {{MLSingleInputSupportLimits}} dictionary #### {#api-mlcontext-singleinputsupportlimits-dictionary}
15031493
<script type="idl">
15041494
dictionary MLSingleInputSupportLimits {
15051495
MLTensorLimits input;
1506-
MLDataTypeLimits output;
1496+
MLTensorLimits output;
15071497
};
15081498
</script>
15091499

15101500
<dl dfn-type=dict-member dfn-for=MLSingleInputSupportLimits>
15111501
: <dfn>input</dfn>
15121502
:: {{MLTensorLimits}} for input operand.
15131503
: <dfn>output</dfn>
1514-
:: {{MLDataTypeLimits}} for output operand.
1504+
:: {{MLTensorLimits}} for output operand.
15151505
</dl>
15161506

15171507
### {{MLContext/destroy()}} ### {#api-mlcontext-destroy}
@@ -1755,7 +1745,7 @@ Since the {{MLOperand/[[builder]]}} object is bound by the {{MLGraphBuilder/cons
17551745

17561746
If an operation supports only a subset of {{MLOperandDataType}}s, the <dfn>allowed data types</dfn> for each of the operation's input operands, including both positional arguments and options, are given as either an explicit list of {{MLOperandDataType}}s, or a constraint that the operand's [=MLOperand/dataType=] must be the <dfn lt="same type as">same as</dfn> the [=MLOperand/dataType=] of another input operand, or <dfn lt="any data type">any</dfn> to allow any {{MLOperandDataType}}.
17571747

1758-
Implementations may support fewer data types for operands than specified. This can be queried for each operation using the {{MLContext/opSupportLimits()}} method on {{MLContext}} and inspecting the {{MLDataTypeLimits/dataTypes}} value of the corresponding member for the operation.
1748+
Implementations may support fewer data types for operands than specified. This can be queried for each operation using the {{MLContext/opSupportLimits()}} method on {{MLContext}} and inspecting the {{MLTensorLimits/dataTypes}} value of the corresponding member for the operation.
17591749

17601750
Issue: Should we specify the subset of data types that must be supported for each operator?
17611751

@@ -2321,7 +2311,7 @@ dictionary MLBatchNormalizationSupportLimits {
23212311
MLTensorLimits variance;
23222312
MLTensorLimits scale;
23232313
MLTensorLimits bias;
2324-
MLDataTypeLimits output;
2314+
MLTensorLimits output;
23252315
};
23262316

23272317
partial dictionary MLOpSupportLimits {
@@ -2722,7 +2712,7 @@ partial interface MLGraphBuilder {
27222712

27232713
dictionary MLConcatSupportLimits {
27242714
MLTensorLimits inputs;
2725-
MLDataTypeLimits output;
2715+
MLTensorLimits output;
27262716
};
27272717

27282718
partial dictionary MLOpSupportLimits {
@@ -2768,7 +2758,7 @@ partial dictionary MLOpSupportLimits {
27682758
: <dfn>inputs</dfn>
27692759
:: {{MLTensorLimits}} for all input operands.
27702760
: <dfn>output</dfn>
2771-
:: {{MLDataTypeLimits}} for output operand.
2761+
:: {{MLTensorLimits}} for output operand.
27722762
</dl>
27732763

27742764
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/concat()}}:
@@ -2840,7 +2830,7 @@ dictionary MLConv2dSupportLimits {
28402830
MLTensorLimits input;
28412831
MLTensorLimits filter;
28422832
MLTensorLimits bias;
2843-
MLDataTypeLimits output;
2833+
MLTensorLimits output;
28442834
};
28452835

28462836
partial dictionary MLOpSupportLimits {
@@ -2947,7 +2937,7 @@ partial dictionary MLOpSupportLimits {
29472937
: <dfn>bias</dfn>
29482938
:: {{MLTensorLimits}} for bias operand.
29492939
: <dfn>output</dfn>
2950-
:: {{MLDataTypeLimits}} for output operand.
2940+
:: {{MLTensorLimits}} for output operand.
29512941
</dl>
29522942

29532943
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/conv2d()}}:
@@ -3568,7 +3558,7 @@ partial interface MLGraphBuilder {
35683558

35693559
dictionary MLLogicalNotSupportLimits {
35703560
MLTensorLimits a;
3571-
MLDataTypeLimits output;
3561+
MLTensorLimits output;
35723562
};
35733563

35743564
partial dictionary MLOpSupportLimits {
@@ -3628,7 +3618,7 @@ partial dictionary MLOpSupportLimits {
36283618
: <dfn>a</dfn>
36293619
:: {{MLTensorLimits}} for a operand.
36303620
: <dfn>output</dfn>
3631-
:: {{MLDataTypeLimits}} for output operand.
3621+
:: {{MLTensorLimits}} for output operand.
36323622
</dl>
36333623

36343624
{{MLOpSupportLimits}} has the following members for element-wise logical operations:
@@ -4083,7 +4073,7 @@ dictionary MLQuantizeDequantizeLinearSupportLimits {
40834073
MLTensorLimits input;
40844074
MLTensorLimits scale;
40854075
MLTensorLimits zeroPoint;
4086-
MLDataTypeLimits output;
4076+
MLTensorLimits output;
40874077
};
40884078

40894079
partial dictionary MLOpSupportLimits {
@@ -4141,7 +4131,7 @@ partial dictionary MLOpSupportLimits {
41414131
: <dfn>zeroPoint</dfn>
41424132
:: {{MLTensorLimits}} for zeroPoint operand.
41434133
: <dfn>output</dfn>
4144-
:: {{MLDataTypeLimits}} for output operand.
4134+
:: {{MLTensorLimits}} for output operand.
41454135
</dl>
41464136

41474137
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/dequantizeLinear()}}:
@@ -4540,7 +4530,7 @@ partial interface MLGraphBuilder {
45404530
dictionary MLGatherSupportLimits {
45414531
MLTensorLimits input;
45424532
MLTensorLimits indices;
4543-
MLDataTypeLimits output;
4533+
MLTensorLimits output;
45444534
};
45454535

45464536
partial dictionary MLOpSupportLimits {
@@ -4601,7 +4591,7 @@ partial dictionary MLOpSupportLimits {
46014591
: <dfn>indices</dfn>
46024592
:: {{MLTensorLimits}} for indices operand.
46034593
: <dfn>output</dfn>
4604-
:: {{MLDataTypeLimits}} for output operand.
4594+
:: {{MLTensorLimits}} for output operand.
46054595
</dl>
46064596

46074597
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gather()}}:
@@ -5168,7 +5158,7 @@ dictionary MLGemmSupportLimits {
51685158
MLTensorLimits a;
51695159
MLTensorLimits b;
51705160
MLTensorLimits c;
5171-
MLDataTypeLimits output;
5161+
MLTensorLimits output;
51725162
};
51735163

51745164
partial dictionary MLOpSupportLimits {
@@ -5248,7 +5238,7 @@ partial dictionary MLOpSupportLimits {
52485238
: <dfn>c</dfn>
52495239
:: {{MLTensorLimits}} for c operand.
52505240
: <dfn>output</dfn>
5251-
:: {{MLDataTypeLimits}} for output operand.
5241+
:: {{MLTensorLimits}} for output operand.
52525242
</dl>
52535243

52545244
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gemm()}}:
@@ -5359,7 +5349,7 @@ dictionary MLGruSupportLimits {
53595349
MLTensorLimits bias;
53605350
MLTensorLimits recurrentBias;
53615351
MLTensorLimits initialHiddenState;
5362-
MLDataTypeLimits outputs;
5352+
MLTensorLimits outputs;
53635353
};
53645354

53655355
partial dictionary MLOpSupportLimits {
@@ -5481,7 +5471,7 @@ partial dictionary MLOpSupportLimits {
54815471
: <dfn>initialHiddenState</dfn>
54825472
:: {{MLTensorLimits}} for initialHiddenState operand.
54835473
: <dfn>outputs</dfn>
5484-
:: {{MLDataTypeLimits}} for all the output operands.
5474+
:: {{MLTensorLimits}} for all the output operands.
54855475
</dl>
54865476

54875477
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gru()}}:
@@ -5700,7 +5690,7 @@ dictionary MLGruCellSupportLimits {
57005690
MLTensorLimits hiddenState;
57015691
MLTensorLimits bias;
57025692
MLTensorLimits recurrentBias;
5703-
MLDataTypeLimits output;
5693+
MLTensorLimits output;
57045694
};
57055695

57065696
partial dictionary MLOpSupportLimits {
@@ -5799,7 +5789,7 @@ partial dictionary MLOpSupportLimits {
57995789
: <dfn>recurrentBias</dfn>
58005790
:: {{MLTensorLimits}} for recurrentBias operand.
58015791
: <dfn>output</dfn>
5802-
:: {{MLDataTypeLimits}} for output operand.
5792+
:: {{MLTensorLimits}} for output operand.
58035793
</dl>
58045794

58055795
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gruCell()}}:
@@ -6159,7 +6149,7 @@ dictionary MLNormalizationSupportLimits {
61596149
MLTensorLimits input;
61606150
MLTensorLimits scale;
61616151
MLTensorLimits bias;
6162-
MLDataTypeLimits output;
6152+
MLTensorLimits output;
61636153
};
61646154

61656155
partial dictionary MLOpSupportLimits {
@@ -6235,7 +6225,7 @@ partial dictionary MLOpSupportLimits {
62356225
: <dfn>bias</dfn>
62366226
:: {{MLTensorLimits}} for bias operand.
62376227
: <dfn>output</dfn>
6238-
:: {{MLDataTypeLimits}} for output operand.
6228+
:: {{MLTensorLimits}} for output operand.
62396229
</dl>
62406230

62416231
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/instanceNormalization()}}:
@@ -6680,7 +6670,7 @@ dictionary MLLstmSupportLimits {
66806670
MLTensorLimits peepholeWeight;
66816671
MLTensorLimits initialHiddenState;
66826672
MLTensorLimits initialCellState;
6683-
MLDataTypeLimits outputs;
6673+
MLTensorLimits outputs;
66846674
};
66856675

66866676
partial dictionary MLOpSupportLimits {
@@ -6825,7 +6815,7 @@ partial dictionary MLOpSupportLimits {
68256815
: <dfn>initialCellState</dfn>
68266816
:: {{MLTensorLimits}} for initialCellState operand.
68276817
: <dfn>outputs</dfn>
6828-
:: {{MLDataTypeLimits}} for all the output operands.
6818+
:: {{MLTensorLimits}} for all the output operands.
68296819
</dl>
68306820

68316821
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstm()}}:
@@ -7089,7 +7079,7 @@ dictionary MLLstmCellSupportLimits {
70897079
MLTensorLimits bias;
70907080
MLTensorLimits recurrentBias;
70917081
MLTensorLimits peepholeWeight;
7092-
MLDataTypeLimits outputs;
7082+
MLTensorLimits outputs;
70937083
};
70947084

70957085
partial dictionary MLOpSupportLimits {
@@ -7213,7 +7203,7 @@ partial dictionary MLOpSupportLimits {
72137203
: <dfn>peepholeWeight</dfn>
72147204
:: {{MLTensorLimits}} for peepholeWeight operand.
72157205
: <dfn>outputs</dfn>
7216-
:: {{MLDataTypeLimits}} for all the output operands.
7206+
:: {{MLTensorLimits}} for all the output operands.
72177207
</dl>
72187208

72197209
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstmCell()}}:
@@ -7894,7 +7884,7 @@ partial interface MLGraphBuilder {
78947884
dictionary MLPreluSupportLimits {
78957885
MLTensorLimits input;
78967886
MLTensorLimits slope;
7897-
MLDataTypeLimits output;
7887+
MLTensorLimits output;
78987888
};
78997889

79007890
partial dictionary MLOpSupportLimits {
@@ -7944,7 +7934,7 @@ partial dictionary MLOpSupportLimits {
79447934
: <dfn>slope</dfn>
79457935
:: {{MLTensorLimits}} for slope operand.
79467936
: <dfn>output</dfn>
7947-
:: {{MLDataTypeLimits}} for output operand.
7937+
:: {{MLTensorLimits}} for output operand.
79487938
</dl>
79497939

79507940
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/prelu()}}:
@@ -8675,7 +8665,7 @@ dictionary MLScatterSupportLimits {
86758665
MLTensorLimits input;
86768666
MLTensorLimits indices;
86778667
MLTensorLimits updates;
8678-
MLDataTypeLimits output;
8668+
MLTensorLimits output;
86798669
};
86808670

86818671
partial dictionary MLOpSupportLimits {
@@ -8740,7 +8730,7 @@ partial dictionary MLOpSupportLimits {
87408730
: <dfn>updates</dfn>
87418731
:: {{MLTensorLimits}} for updates operand.
87428732
: <dfn>output</dfn>
8743-
:: {{MLDataTypeLimits}} for output operand.
8733+
:: {{MLTensorLimits}} for output operand.
87448734
</dl>
87458735

87468736
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/scatterElements()}}:
@@ -9547,7 +9537,7 @@ partial interface MLGraphBuilder {
95479537

95489538
dictionary MLSplitSupportLimits {
95499539
MLTensorLimits input;
9550-
MLDataTypeLimits outputs;
9540+
MLTensorLimits outputs;
95519541
};
95529542

95539543
partial dictionary MLOpSupportLimits {
@@ -9597,7 +9587,7 @@ partial dictionary MLOpSupportLimits {
95979587
: <dfn>input</dfn>
95989588
:: {{MLTensorLimits}} for input operand.
95999589
: <dfn>outputs</dfn>
9600-
:: {{MLDataTypeLimits}} for all the output operands.
9590+
:: {{MLTensorLimits}} for all the output operands.
96019591
</dl>
96029592

96039593
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/split()}}:
@@ -10063,7 +10053,7 @@ dictionary MLWhereSupportLimits {
1006310053
MLTensorLimits condition;
1006410054
MLTensorLimits trueValue;
1006510055
MLTensorLimits falseValue;
10066-
MLDataTypeLimits output;
10056+
MLTensorLimits output;
1006710057
};
1006810058

1006910059
partial dictionary MLOpSupportLimits {
@@ -10121,7 +10111,7 @@ partial dictionary MLOpSupportLimits {
1012110111
: <dfn>falseValue</dfn>
1012210112
:: {{MLTensorLimits}} for falseValue operand.
1012310113
: <dfn>output</dfn>
10124-
:: {{MLDataTypeLimits}} for output operand.
10114+
:: {{MLTensorLimits}} for output operand.
1012510115
</dl>
1012610116

1012710117
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/where()}}:

0 commit comments

Comments
 (0)