Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 41 additions & 51 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1422,9 +1422,9 @@ The {{MLOpSupportLimits}} has the following top level members, aside from these,
dictionary MLOpSupportLimits {
MLInputOperandLayout preferredInputLayout;
[EnforceRange] unsigned long long maxTensorByteLength;
MLDataTypeLimits input;
MLDataTypeLimits constant;
MLDataTypeLimits output;
MLTensorLimits input;
MLTensorLimits constant;
MLTensorLimits output;
};
</script>

Expand All @@ -1440,18 +1440,6 @@ dictionary MLOpSupportLimits {
: <dfn>output</dfn>
:: Support limits for output {{MLOperand}}s for an {{MLGraph}}.
</dl>
#### {{MLDataTypeLimits}} dictionary #### {#api-mlcontext-datatypelimits-dictionary}
<script type="idl">
typedef sequence<MLOperandDataType> MLDataTypeList;

dictionary MLDataTypeLimits {
MLDataTypeList dataTypes;
};
</script>
<dl dfn-type=dict-member dfn-for=MLDataTypeLimits>
: <dfn>dataTypes</dfn>
:: Supported data types.
</dl>

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

#### {{MLTensorLimits}} dictionary #### {#api-mlcontext-tensorlimits-dictionary}
<script type="idl">
typedef sequence<MLOperandDataType> MLDataTypeList;

dictionary MLTensorLimits {
MLDataTypeList dataTypes;
MLRankRange rankRange;
Expand All @@ -1486,7 +1476,7 @@ dictionary MLTensorLimits {
dictionary MLBinarySupportLimits {
MLTensorLimits a;
MLTensorLimits b;
MLDataTypeLimits output;
MLTensorLimits output;
};
</script>

Expand All @@ -1496,22 +1486,22 @@ dictionary MLBinarySupportLimits {
: <dfn>b</dfn>
:: {{MLTensorLimits}} for b operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

#### {{MLSingleInputSupportLimits}} dictionary #### {#api-mlcontext-singleinputsupportlimits-dictionary}
<script type="idl">
dictionary MLSingleInputSupportLimits {
MLTensorLimits input;
MLDataTypeLimits output;
MLTensorLimits output;
};
</script>

<dl dfn-type=dict-member dfn-for=MLSingleInputSupportLimits>
: <dfn>input</dfn>
:: {{MLTensorLimits}} for input operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

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

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

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.
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.

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

Expand Down Expand Up @@ -2321,7 +2311,7 @@ dictionary MLBatchNormalizationSupportLimits {
MLTensorLimits variance;
MLTensorLimits scale;
MLTensorLimits bias;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -2722,7 +2712,7 @@ partial interface MLGraphBuilder {

dictionary MLConcatSupportLimits {
MLTensorLimits inputs;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -2768,7 +2758,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>inputs</dfn>
:: {{MLTensorLimits}} for all input operands.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/concat()}}:
Expand Down Expand Up @@ -2840,7 +2830,7 @@ dictionary MLConv2dSupportLimits {
MLTensorLimits input;
MLTensorLimits filter;
MLTensorLimits bias;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -2947,7 +2937,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>bias</dfn>
:: {{MLTensorLimits}} for bias operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

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

dictionary MLLogicalNotSupportLimits {
MLTensorLimits a;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -3628,7 +3618,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>a</dfn>
:: {{MLTensorLimits}} for a operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following members for element-wise logical operations:
Expand Down Expand Up @@ -4083,7 +4073,7 @@ dictionary MLQuantizeDequantizeLinearSupportLimits {
MLTensorLimits input;
MLTensorLimits scale;
MLTensorLimits zeroPoint;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -4141,7 +4131,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>zeroPoint</dfn>
:: {{MLTensorLimits}} for zeroPoint operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/dequantizeLinear()}}:
Expand Down Expand Up @@ -4540,7 +4530,7 @@ partial interface MLGraphBuilder {
dictionary MLGatherSupportLimits {
MLTensorLimits input;
MLTensorLimits indices;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -4601,7 +4591,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>indices</dfn>
:: {{MLTensorLimits}} for indices operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gather()}}:
Expand Down Expand Up @@ -5168,7 +5158,7 @@ dictionary MLGemmSupportLimits {
MLTensorLimits a;
MLTensorLimits b;
MLTensorLimits c;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -5248,7 +5238,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>c</dfn>
:: {{MLTensorLimits}} for c operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gemm()}}:
Expand Down Expand Up @@ -5359,7 +5349,7 @@ dictionary MLGruSupportLimits {
MLTensorLimits bias;
MLTensorLimits recurrentBias;
MLTensorLimits initialHiddenState;
MLDataTypeLimits outputs;
MLTensorLimits outputs;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -5481,7 +5471,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>initialHiddenState</dfn>
:: {{MLTensorLimits}} for initialHiddenState operand.
: <dfn>outputs</dfn>
:: {{MLDataTypeLimits}} for all the output operands.
:: {{MLTensorLimits}} for all the output operands.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gru()}}:
Expand Down Expand Up @@ -5700,7 +5690,7 @@ dictionary MLGruCellSupportLimits {
MLTensorLimits hiddenState;
MLTensorLimits bias;
MLTensorLimits recurrentBias;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -5799,7 +5789,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>recurrentBias</dfn>
:: {{MLTensorLimits}} for recurrentBias operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gruCell()}}:
Expand Down Expand Up @@ -6159,7 +6149,7 @@ dictionary MLNormalizationSupportLimits {
MLTensorLimits input;
MLTensorLimits scale;
MLTensorLimits bias;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -6235,7 +6225,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>bias</dfn>
:: {{MLTensorLimits}} for bias operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/instanceNormalization()}}:
Expand Down Expand Up @@ -6680,7 +6670,7 @@ dictionary MLLstmSupportLimits {
MLTensorLimits peepholeWeight;
MLTensorLimits initialHiddenState;
MLTensorLimits initialCellState;
MLDataTypeLimits outputs;
MLTensorLimits outputs;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -6825,7 +6815,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>initialCellState</dfn>
:: {{MLTensorLimits}} for initialCellState operand.
: <dfn>outputs</dfn>
:: {{MLDataTypeLimits}} for all the output operands.
:: {{MLTensorLimits}} for all the output operands.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstm()}}:
Expand Down Expand Up @@ -7089,7 +7079,7 @@ dictionary MLLstmCellSupportLimits {
MLTensorLimits bias;
MLTensorLimits recurrentBias;
MLTensorLimits peepholeWeight;
MLDataTypeLimits outputs;
MLTensorLimits outputs;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -7213,7 +7203,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>peepholeWeight</dfn>
:: {{MLTensorLimits}} for peepholeWeight operand.
: <dfn>outputs</dfn>
:: {{MLDataTypeLimits}} for all the output operands.
:: {{MLTensorLimits}} for all the output operands.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstmCell()}}:
Expand Down Expand Up @@ -7894,7 +7884,7 @@ partial interface MLGraphBuilder {
dictionary MLPreluSupportLimits {
MLTensorLimits input;
MLTensorLimits slope;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -7944,7 +7934,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>slope</dfn>
:: {{MLTensorLimits}} for slope operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/prelu()}}:
Expand Down Expand Up @@ -8675,7 +8665,7 @@ dictionary MLScatterSupportLimits {
MLTensorLimits input;
MLTensorLimits indices;
MLTensorLimits updates;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -8740,7 +8730,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>updates</dfn>
:: {{MLTensorLimits}} for updates operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

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

dictionary MLSplitSupportLimits {
MLTensorLimits input;
MLDataTypeLimits outputs;
MLTensorLimits outputs;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -9597,7 +9587,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>input</dfn>
:: {{MLTensorLimits}} for input operand.
: <dfn>outputs</dfn>
:: {{MLDataTypeLimits}} for all the output operands.
:: {{MLTensorLimits}} for all the output operands.
</dl>

{{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/split()}}:
Expand Down Expand Up @@ -10063,7 +10053,7 @@ dictionary MLWhereSupportLimits {
MLTensorLimits condition;
MLTensorLimits trueValue;
MLTensorLimits falseValue;
MLDataTypeLimits output;
MLTensorLimits output;
};

partial dictionary MLOpSupportLimits {
Expand Down Expand Up @@ -10121,7 +10111,7 @@ partial dictionary MLOpSupportLimits {
: <dfn>falseValue</dfn>
:: {{MLTensorLimits}} for falseValue operand.
: <dfn>output</dfn>
:: {{MLDataTypeLimits}} for output operand.
:: {{MLTensorLimits}} for output operand.
</dl>

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