Skip to content

Commit f474e81

Browse files
committed
Support rankRange for output tensors in opSupportLimits
Fix #835
1 parent 61d4d5a commit f474e81

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
@@ -1223,9 +1223,9 @@ The {{MLOpSupportLimits}} has the following top level members, aside from these,
12231223
dictionary MLOpSupportLimits {
12241224
MLInputOperandLayout preferredInputLayout;
12251225
[EnforceRange] unsigned long long maxTensorByteLength;
1226-
MLDataTypeLimits input;
1227-
MLDataTypeLimits constant;
1228-
MLDataTypeLimits output;
1226+
MLTensorLimits input;
1227+
MLTensorLimits constant;
1228+
MLTensorLimits output;
12291229
};
12301230
</script>
12311231

@@ -1241,18 +1241,6 @@ dictionary MLOpSupportLimits {
12411241
: <dfn>output</dfn>
12421242
:: Support limits for output {{MLOperand}}s for an {{MLGraph}}.
12431243
</dl>
1244-
#### {{MLDataTypeLimits}} dictionary #### {#api-mlcontext-datatypelimits-dictionary}
1245-
<script type="idl">
1246-
typedef sequence<MLOperandDataType> MLDataTypeList;
1247-
1248-
dictionary MLDataTypeLimits {
1249-
MLDataTypeList dataTypes;
1250-
};
1251-
</script>
1252-
<dl dfn-type=dict-member dfn-for=MLDataTypeLimits>
1253-
: <dfn>dataTypes</dfn>
1254-
:: Supported data types.
1255-
</dl>
12561244

12571245
#### {{MLRankRange}} dictionary #### {#api-mlcontext-rankrange-dictionary}
12581246
<script type="idl">
@@ -1270,6 +1258,8 @@ dictionary MLRankRange {
12701258

12711259
#### {{MLTensorLimits}} dictionary #### {#api-mlcontext-tensorlimits-dictionary}
12721260
<script type="idl">
1261+
typedef sequence<MLOperandDataType> MLDataTypeList;
1262+
12731263
dictionary MLTensorLimits {
12741264
MLDataTypeList dataTypes;
12751265
MLRankRange rankRange;
@@ -1287,7 +1277,7 @@ dictionary MLTensorLimits {
12871277
dictionary MLBinarySupportLimits {
12881278
MLTensorLimits a;
12891279
MLTensorLimits b;
1290-
MLDataTypeLimits output;
1280+
MLTensorLimits output;
12911281
};
12921282
</script>
12931283

@@ -1297,22 +1287,22 @@ dictionary MLBinarySupportLimits {
12971287
: <dfn>b</dfn>
12981288
:: {{MLTensorLimits}} for b operand.
12991289
: <dfn>output</dfn>
1300-
:: {{MLDataTypeLimits}} for output operand.
1290+
:: {{MLTensorLimits}} for output operand.
13011291
</dl>
13021292

13031293
#### {{MLSingleInputSupportLimits}} dictionary #### {#api-mlcontext-singleinputsupportlimits-dictionary}
13041294
<script type="idl">
13051295
dictionary MLSingleInputSupportLimits {
13061296
MLTensorLimits input;
1307-
MLDataTypeLimits output;
1297+
MLTensorLimits output;
13081298
};
13091299
</script>
13101300

13111301
<dl dfn-type=dict-member dfn-for=MLSingleInputSupportLimits>
13121302
: <dfn>input</dfn>
13131303
:: {{MLTensorLimits}} for input operand.
13141304
: <dfn>output</dfn>
1315-
:: {{MLDataTypeLimits}} for output operand.
1305+
:: {{MLTensorLimits}} for output operand.
13161306
</dl>
13171307

13181308
### {{MLContext/destroy()}} ### {#api-mlcontext-destroy}
@@ -1556,7 +1546,7 @@ Since the {{MLOperand/[[builder]]}} object is bound by the {{MLGraphBuilder/cons
15561546

15571547
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}}.
15581548

1559-
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.
1549+
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.
15601550

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

@@ -2121,7 +2111,7 @@ dictionary MLBatchNormalizationSupportLimits {
21212111
MLTensorLimits variance;
21222112
MLTensorLimits scale;
21232113
MLTensorLimits bias;
2124-
MLDataTypeLimits output;
2114+
MLTensorLimits output;
21252115
};
21262116

21272117
partial dictionary MLOpSupportLimits {
@@ -2522,7 +2512,7 @@ partial interface MLGraphBuilder {
25222512

25232513
dictionary MLConcatSupportLimits {
25242514
MLTensorLimits inputs;
2525-
MLDataTypeLimits output;
2515+
MLTensorLimits output;
25262516
};
25272517

25282518
partial dictionary MLOpSupportLimits {
@@ -2568,7 +2558,7 @@ partial dictionary MLOpSupportLimits {
25682558
: <dfn>inputs</dfn>
25692559
:: {{MLTensorLimits}} for all input operands.
25702560
: <dfn>output</dfn>
2571-
:: {{MLDataTypeLimits}} for output operand.
2561+
:: {{MLTensorLimits}} for output operand.
25722562
</dl>
25732563

25742564
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/concat()}}:
@@ -2640,7 +2630,7 @@ dictionary MLConv2dSupportLimits {
26402630
MLTensorLimits input;
26412631
MLTensorLimits filter;
26422632
MLTensorLimits bias;
2643-
MLDataTypeLimits output;
2633+
MLTensorLimits output;
26442634
};
26452635

26462636
partial dictionary MLOpSupportLimits {
@@ -2747,7 +2737,7 @@ partial dictionary MLOpSupportLimits {
27472737
: <dfn>bias</dfn>
27482738
:: {{MLTensorLimits}} for bias operand.
27492739
: <dfn>output</dfn>
2750-
:: {{MLDataTypeLimits}} for output operand.
2740+
:: {{MLTensorLimits}} for output operand.
27512741
</dl>
27522742

27532743
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/conv2d()}}:
@@ -3366,7 +3356,7 @@ partial interface MLGraphBuilder {
33663356

33673357
dictionary MLLogicalNotSupportLimits {
33683358
MLTensorLimits a;
3369-
MLDataTypeLimits output;
3359+
MLTensorLimits output;
33703360
};
33713361

33723362
partial dictionary MLOpSupportLimits {
@@ -3424,7 +3414,7 @@ partial dictionary MLOpSupportLimits {
34243414
: <dfn>a</dfn>
34253415
:: {{MLTensorLimits}} for a operand.
34263416
: <dfn>output</dfn>
3427-
:: {{MLDataTypeLimits}} for output operand.
3417+
:: {{MLTensorLimits}} for output operand.
34283418
</dl>
34293419

34303420
{{MLOpSupportLimits}} has the following members for element-wise logical operations:
@@ -3845,7 +3835,7 @@ dictionary MLQuantizeDequantizeLinearSupportLimits {
38453835
MLTensorLimits input;
38463836
MLTensorLimits scale;
38473837
MLTensorLimits zeroPoint;
3848-
MLDataTypeLimits output;
3838+
MLTensorLimits output;
38493839
};
38503840

38513841
partial dictionary MLOpSupportLimits {
@@ -3903,7 +3893,7 @@ partial dictionary MLOpSupportLimits {
39033893
: <dfn>zeroPoint</dfn>
39043894
:: {{MLTensorLimits}} for zeroPoint operand.
39053895
: <dfn>output</dfn>
3906-
:: {{MLDataTypeLimits}} for output operand.
3896+
:: {{MLTensorLimits}} for output operand.
39073897
</dl>
39083898

39093899
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/dequantizeLinear()}}:
@@ -4303,7 +4293,7 @@ partial interface MLGraphBuilder {
43034293
dictionary MLGatherSupportLimits {
43044294
MLTensorLimits input;
43054295
MLTensorLimits indices;
4306-
MLDataTypeLimits output;
4296+
MLTensorLimits output;
43074297
};
43084298

43094299
partial dictionary MLOpSupportLimits {
@@ -4364,7 +4354,7 @@ partial dictionary MLOpSupportLimits {
43644354
: <dfn>indices</dfn>
43654355
:: {{MLTensorLimits}} for indices operand.
43664356
: <dfn>output</dfn>
4367-
:: {{MLDataTypeLimits}} for output operand.
4357+
:: {{MLTensorLimits}} for output operand.
43684358
</dl>
43694359

43704360
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gather()}}:
@@ -4931,7 +4921,7 @@ dictionary MLGemmSupportLimits {
49314921
MLTensorLimits a;
49324922
MLTensorLimits b;
49334923
MLTensorLimits c;
4934-
MLDataTypeLimits output;
4924+
MLTensorLimits output;
49354925
};
49364926

49374927
partial dictionary MLOpSupportLimits {
@@ -5011,7 +5001,7 @@ partial dictionary MLOpSupportLimits {
50115001
: <dfn>c</dfn>
50125002
:: {{MLTensorLimits}} for c operand.
50135003
: <dfn>output</dfn>
5014-
:: {{MLDataTypeLimits}} for output operand.
5004+
:: {{MLTensorLimits}} for output operand.
50155005
</dl>
50165006

50175007
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gemm()}}:
@@ -5122,7 +5112,7 @@ dictionary MLGruSupportLimits {
51225112
MLTensorLimits bias;
51235113
MLTensorLimits recurrentBias;
51245114
MLTensorLimits initialHiddenState;
5125-
MLDataTypeLimits outputs;
5115+
MLTensorLimits outputs;
51265116
};
51275117

51285118
partial dictionary MLOpSupportLimits {
@@ -5244,7 +5234,7 @@ partial dictionary MLOpSupportLimits {
52445234
: <dfn>initialHiddenState</dfn>
52455235
:: {{MLTensorLimits}} for initialHiddenState operand.
52465236
: <dfn>outputs</dfn>
5247-
:: {{MLDataTypeLimits}} for all the output operands.
5237+
:: {{MLTensorLimits}} for all the output operands.
52485238
</dl>
52495239

52505240
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gru()}}:
@@ -5463,7 +5453,7 @@ dictionary MLGruCellSupportLimits {
54635453
MLTensorLimits hiddenState;
54645454
MLTensorLimits bias;
54655455
MLTensorLimits recurrentBias;
5466-
MLDataTypeLimits output;
5456+
MLTensorLimits output;
54675457
};
54685458

54695459
partial dictionary MLOpSupportLimits {
@@ -5562,7 +5552,7 @@ partial dictionary MLOpSupportLimits {
55625552
: <dfn>recurrentBias</dfn>
55635553
:: {{MLTensorLimits}} for recurrentBias operand.
55645554
: <dfn>output</dfn>
5565-
:: {{MLDataTypeLimits}} for output operand.
5555+
:: {{MLTensorLimits}} for output operand.
55665556
</dl>
55675557

55685558
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gruCell()}}:
@@ -5922,7 +5912,7 @@ dictionary MLNormalizationSupportLimits {
59225912
MLTensorLimits input;
59235913
MLTensorLimits scale;
59245914
MLTensorLimits bias;
5925-
MLDataTypeLimits output;
5915+
MLTensorLimits output;
59265916
};
59275917

59285918
partial dictionary MLOpSupportLimits {
@@ -5998,7 +5988,7 @@ partial dictionary MLOpSupportLimits {
59985988
: <dfn>bias</dfn>
59995989
:: {{MLTensorLimits}} for bias operand.
60005990
: <dfn>output</dfn>
6001-
:: {{MLDataTypeLimits}} for output operand.
5991+
:: {{MLTensorLimits}} for output operand.
60025992
</dl>
60035993

60045994
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/instanceNormalization()}}:
@@ -6443,7 +6433,7 @@ dictionary MLLstmSupportLimits {
64436433
MLTensorLimits peepholeWeight;
64446434
MLTensorLimits initialHiddenState;
64456435
MLTensorLimits initialCellState;
6446-
MLDataTypeLimits outputs;
6436+
MLTensorLimits outputs;
64476437
};
64486438

64496439
partial dictionary MLOpSupportLimits {
@@ -6588,7 +6578,7 @@ partial dictionary MLOpSupportLimits {
65886578
: <dfn>initialCellState</dfn>
65896579
:: {{MLTensorLimits}} for initialCellState operand.
65906580
: <dfn>outputs</dfn>
6591-
:: {{MLDataTypeLimits}} for all the output operands.
6581+
:: {{MLTensorLimits}} for all the output operands.
65926582
</dl>
65936583

65946584
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstm()}}:
@@ -6852,7 +6842,7 @@ dictionary MLLstmCellSupportLimits {
68526842
MLTensorLimits bias;
68536843
MLTensorLimits recurrentBias;
68546844
MLTensorLimits peepholeWeight;
6855-
MLDataTypeLimits outputs;
6845+
MLTensorLimits outputs;
68566846
};
68576847

68586848
partial dictionary MLOpSupportLimits {
@@ -6976,7 +6966,7 @@ partial dictionary MLOpSupportLimits {
69766966
: <dfn>peepholeWeight</dfn>
69776967
:: {{MLTensorLimits}} for peepholeWeight operand.
69786968
: <dfn>outputs</dfn>
6979-
:: {{MLDataTypeLimits}} for all the output operands.
6969+
:: {{MLTensorLimits}} for all the output operands.
69806970
</dl>
69816971

69826972
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstmCell()}}:
@@ -7657,7 +7647,7 @@ partial interface MLGraphBuilder {
76577647
dictionary MLPreluSupportLimits {
76587648
MLTensorLimits input;
76597649
MLTensorLimits slope;
7660-
MLDataTypeLimits output;
7650+
MLTensorLimits output;
76617651
};
76627652

76637653
partial dictionary MLOpSupportLimits {
@@ -7707,7 +7697,7 @@ partial dictionary MLOpSupportLimits {
77077697
: <dfn>slope</dfn>
77087698
:: {{MLTensorLimits}} for slope operand.
77097699
: <dfn>output</dfn>
7710-
:: {{MLDataTypeLimits}} for output operand.
7700+
:: {{MLTensorLimits}} for output operand.
77117701
</dl>
77127702

77137703
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/prelu()}}:
@@ -8438,7 +8428,7 @@ dictionary MLScatterSupportLimits {
84388428
MLTensorLimits input;
84398429
MLTensorLimits indices;
84408430
MLTensorLimits updates;
8441-
MLDataTypeLimits output;
8431+
MLTensorLimits output;
84428432
};
84438433

84448434
partial dictionary MLOpSupportLimits {
@@ -8503,7 +8493,7 @@ partial dictionary MLOpSupportLimits {
85038493
: <dfn>updates</dfn>
85048494
:: {{MLTensorLimits}} for updates operand.
85058495
: <dfn>output</dfn>
8506-
:: {{MLDataTypeLimits}} for output operand.
8496+
:: {{MLTensorLimits}} for output operand.
85078497
</dl>
85088498

85098499
{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/scatterElements()}}:
@@ -9310,7 +9300,7 @@ partial interface MLGraphBuilder {
93109300

93119301
dictionary MLSplitSupportLimits {
93129302
MLTensorLimits input;
9313-
MLDataTypeLimits outputs;
9303+
MLTensorLimits outputs;
93149304
};
93159305

93169306
partial dictionary MLOpSupportLimits {
@@ -9360,7 +9350,7 @@ partial dictionary MLOpSupportLimits {
93609350
: <dfn>input</dfn>
93619351
:: {{MLTensorLimits}} for input operand.
93629352
: <dfn>outputs</dfn>
9363-
:: {{MLDataTypeLimits}} for all the output operands.
9353+
:: {{MLTensorLimits}} for all the output operands.
93649354
</dl>
93659355

93669356
{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/split()}}:
@@ -9826,7 +9816,7 @@ dictionary MLWhereSupportLimits {
98269816
MLTensorLimits condition;
98279817
MLTensorLimits trueValue;
98289818
MLTensorLimits falseValue;
9829-
MLDataTypeLimits output;
9819+
MLTensorLimits output;
98309820
};
98319821

98329822
partial dictionary MLOpSupportLimits {
@@ -9884,7 +9874,7 @@ partial dictionary MLOpSupportLimits {
98849874
: <dfn>falseValue</dfn>
98859875
:: {{MLTensorLimits}} for falseValue operand.
98869876
: <dfn>output</dfn>
9887-
:: {{MLDataTypeLimits}} for output operand.
9877+
:: {{MLTensorLimits}} for output operand.
98889878
</dl>
98899879

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

0 commit comments

Comments
 (0)